Fix constraining

This commit is contained in:
Ayaz Hafiz 2022-11-02 15:08:10 -05:00
parent d811fa8e5a
commit a9bdbc968f
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -532,12 +532,11 @@ pub fn constrain_pattern(
opt_rest: _,
},
} => {
let elem_var_index = constraints.push_type(Type::Variable(*elem_var));
for loc_pat in patterns.iter() {
let expected = PExpected::ForReason(
PReason::ListElem,
Type::Variable(*elem_var),
loc_pat.region,
);
let expected =
PExpected::ForReason(PReason::ListElem, elem_var_index, loc_pat.region);
constrain_pattern(
constraints,