make Storage store where it came from

This commit is contained in:
Folkert 2020-11-11 01:16:30 +01:00
parent c64a6da745
commit 984cf744e3
3 changed files with 18 additions and 13 deletions

View file

@ -1090,7 +1090,7 @@ fn constrain_def(env: &Env, def: &Def, body_con: Constraint) -> Constraint {
pattern_state.constraints.push(Eq(
expr_type,
annotation_expected.clone(),
Category::Storage,
Category::Storage(std::file!(), std::line!()),
Region::span_across(&annotation.region, &def.loc_expr.region),
));
@ -1173,7 +1173,7 @@ fn constrain_def(env: &Env, def: &Def, body_con: Constraint) -> Constraint {
state.constraints.push(Constraint::Eq(
pattern_type.clone(),
Expected::NoExpectation(loc_ann.clone()),
Category::Storage,
Category::Storage(std::file!(), std::line!()),
loc_pattern.region,
));
@ -1218,7 +1218,7 @@ fn constrain_def(env: &Env, def: &Def, body_con: Constraint) -> Constraint {
Eq(
Type::Variable(*fn_var),
NoExpectation(fn_type),
Category::Storage,
Category::Storage(std::file!(), std::line!()),
region,
),
closure_constraint,