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 =
|
||||
Expected::ForReason(Reason::ExpectCondition, bool_type, loc_expr.region);
|
||||
|
||||
constraint = constrain_expr(
|
||||
let expect_constraint = constrain_expr(
|
||||
constraints,
|
||||
&mut env,
|
||||
loc_expr.region,
|
||||
&loc_expr.value,
|
||||
expected,
|
||||
);
|
||||
|
||||
constraint = constraints.let_constraint([], [], [], expect_constraint, constraint)
|
||||
}
|
||||
Function(function_def_index) => {
|
||||
constraint = constrain_function_def(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue