Show the right fct name in type error messages

This commit is contained in:
jecaro 2023-11-16 16:44:55 +01:00
parent 7b1f2d2ac1
commit c858031f74
No known key found for this signature in database
GPG key ID: 3AEB4D2AFA2ACD45
6 changed files with 125 additions and 13 deletions

View file

@ -502,6 +502,7 @@ pub fn constrain_expr(
let reason = Reason::FnArg {
name: opt_symbol,
arg_index: HumanIndex::zero_based(index),
called_via: *called_via,
};
let expected_arg =
constraints.push_expected_type(ForReason(reason, arg_type_index, region));