mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
properly constrain expects (don't forget original constraint)
This commit is contained in:
parent
a4686cd74e
commit
03aef94e44
1 changed files with 3 additions and 1 deletions
|
@ -1769,13 +1769,15 @@ pub fn constrain_decls(
|
||||||
let expected =
|
let expected =
|
||||||
Expected::ForReason(Reason::ExpectCondition, bool_type, loc_expr.region);
|
Expected::ForReason(Reason::ExpectCondition, bool_type, loc_expr.region);
|
||||||
|
|
||||||
constraint = constrain_expr(
|
let expect_constraint = constrain_expr(
|
||||||
constraints,
|
constraints,
|
||||||
&mut env,
|
&mut env,
|
||||||
loc_expr.region,
|
loc_expr.region,
|
||||||
&loc_expr.value,
|
&loc_expr.value,
|
||||||
expected,
|
expected,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
constraint = constraints.let_constraint([], [], [], expect_constraint, constraint)
|
||||||
}
|
}
|
||||||
Function(function_def_index) => {
|
Function(function_def_index) => {
|
||||||
constraint = constrain_function_def(
|
constraint = constrain_function_def(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue