Surface constrain_expr takes an index

This commit is contained in:
Ayaz Hafiz 2022-11-07 16:36:23 -06:00
parent 9abed3472a
commit 4e2eb67ff1
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 82 additions and 52 deletions

View file

@ -467,11 +467,11 @@ pub fn constrain_pattern(
state.vars.push(*expr_var);
let expr_expected = Expected::ForReason(
let expr_expected = constraints.push_expected_type(Expected::ForReason(
Reason::RecordDefaultField(label.clone()),
pat_type_index,
loc_expr.region,
);
));
let expr_con = constrain_expr(
constraints,