From a46d7962baba711c644f140a95778ec27eefebb2 Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert Date: Mon, 23 Oct 2023 23:14:48 +0100 Subject: [PATCH] Add info to error message --- ncc/src/types.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ncc/src/types.rs b/ncc/src/types.rs index 6cc5a35..28facec 100644 --- a/ncc/src/types.rs +++ b/ncc/src/types.rs @@ -433,7 +433,11 @@ impl Expr let arg_type = args[idx].eval_type()?; if !assign_compat(¶m_type, &arg_type) { - return ParseError::msg_only("argument type not compatible with parameter type") + return ParseError::msg_only(&format!( + "argument type {} not compatible with parameter type {}", + arg_type, + param_type, + )) } }