mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
small rigid fix
This commit is contained in:
parent
b2f3dd18fd
commit
ec3868ed7e
1 changed files with 18 additions and 6 deletions
|
@ -1229,12 +1229,24 @@ fn constrain_def(env: &Env, def: &Def, body_con: Constraint) -> Constraint {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
_ => constrain_expr(
|
_ => {
|
||||||
&env,
|
let expected = annotation_expected;
|
||||||
def.loc_expr.region,
|
|
||||||
&def.loc_expr.value,
|
let ret_constraint =
|
||||||
annotation_expected,
|
constrain_expr(env, def.loc_expr.region, &def.loc_expr.value, expected);
|
||||||
),
|
|
||||||
|
And(vec![
|
||||||
|
Let(Box::new(LetConstraint {
|
||||||
|
rigid_vars: Vec::new(),
|
||||||
|
flex_vars: vec![],
|
||||||
|
def_types: SendMap::default(),
|
||||||
|
defs_constraint: True,
|
||||||
|
ret_constraint,
|
||||||
|
})),
|
||||||
|
// Store type into AST vars. We use Store so errors aren't reported twice
|
||||||
|
Store(signature, expr_var, std::file!(), std::line!()),
|
||||||
|
])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue