mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Merge branch 'main' into constrain-early-return-functions
This commit is contained in:
commit
20ba4a92de
88 changed files with 155 additions and 518 deletions
|
@ -2754,34 +2754,6 @@ pub fn constrain_decls(
|
|||
expected,
|
||||
);
|
||||
|
||||
constraint = constraints.let_constraint(
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
expect_constraint,
|
||||
constraint,
|
||||
Generalizable(false),
|
||||
)
|
||||
}
|
||||
ExpectationFx => {
|
||||
let loc_expr = &declarations.expressions[index];
|
||||
|
||||
let bool_type = constraints.push_variable(Variable::BOOL);
|
||||
let expected = constraints.push_expected_type(Expected::ForReason(
|
||||
Reason::ExpectCondition,
|
||||
bool_type,
|
||||
loc_expr.region,
|
||||
));
|
||||
|
||||
let expect_constraint = constrain_expr(
|
||||
types,
|
||||
constraints,
|
||||
&mut env,
|
||||
loc_expr.region,
|
||||
&loc_expr.value,
|
||||
expected,
|
||||
);
|
||||
|
||||
constraint = constraints.let_constraint(
|
||||
[],
|
||||
[],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue