Address PR comments, add syntax tests

This commit is contained in:
Sam Mohr 2024-10-21 03:06:43 -07:00
parent b3e60f9d3a
commit 7518a2c5ab
No known key found for this signature in database
GPG key ID: EA41D161A3C1BC99
28 changed files with 772 additions and 34 deletions

View file

@ -136,7 +136,7 @@ fn constrain_untyped_closure(
vars.push(fn_var);
let body_type = constraints.push_expected_type(ForReason(
Reason::Return,
Reason::FunctionOutput,
return_type_index,
loc_body_expr.region,
));
@ -1409,7 +1409,7 @@ pub fn constrain_expr(
let return_type_index = constraints.push_variable(*return_var);
let expected_return_value = constraints.push_expected_type(ForReason(
Reason::Return,
Reason::FunctionOutput,
return_type_index,
return_value.region,
));