Give localized region for expected list elem pattern

This commit is contained in:
Ayaz Hafiz 2022-10-31 17:00:25 -05:00
parent cb61f51814
commit 283f6e8e1e
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

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