mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
use equal_types_with_storage in Lambda constraining
This commit is contained in:
parent
f23945ad94
commit
7df4465a6e
1 changed files with 5 additions and 7 deletions
|
@ -403,14 +403,12 @@ pub fn constrain_expr(
|
|||
pattern_state_constraints,
|
||||
ret_constraint,
|
||||
),
|
||||
// "the closure's type is equal to expected type"
|
||||
constraints.equal_types(function_type.clone(), expected, Category::Lambda, region),
|
||||
// "fn_var is equal to the closure's type" - fn_var is used in code gen
|
||||
constraints.equal_types_var(
|
||||
*fn_var,
|
||||
NoExpectation(function_type),
|
||||
Category::Storage(std::file!(), std::line!()),
|
||||
constraints.equal_types_with_storage(
|
||||
function_type,
|
||||
expected,
|
||||
Category::Lambda,
|
||||
region,
|
||||
*fn_var,
|
||||
),
|
||||
closure_constraint,
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue