Skip to content

Commit

Permalink
Add info to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecb committed Oct 23, 2023
1 parent be61feb commit a46d796
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ncc/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,11 @@ impl Expr
let arg_type = args[idx].eval_type()?;

if !assign_compat(&param_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,
))
}
}

Expand Down

0 comments on commit a46d796

Please sign in to comment.