mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Fix constraining
This commit is contained in:
parent
d811fa8e5a
commit
a9bdbc968f
1 changed files with 4 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue