mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Mark branch patterns degenerate when they don't bind symbols body needs
This commit is contained in:
parent
ed6ee71225
commit
4031770836
11 changed files with 110 additions and 32 deletions
|
@ -1822,14 +1822,15 @@ fn constrain_when_branch_help(
|
|||
};
|
||||
|
||||
for (i, loc_pattern) in when_branch.patterns.iter().enumerate() {
|
||||
let pattern_expected = pattern_expected(HumanIndex::zero_based(i), loc_pattern.region);
|
||||
let pattern_expected =
|
||||
pattern_expected(HumanIndex::zero_based(i), loc_pattern.pattern.region);
|
||||
|
||||
let mut partial_state = PatternState::default();
|
||||
constrain_pattern(
|
||||
constraints,
|
||||
env,
|
||||
&loc_pattern.value,
|
||||
loc_pattern.region,
|
||||
&loc_pattern.pattern.value,
|
||||
loc_pattern.pattern.region,
|
||||
pattern_expected,
|
||||
&mut partial_state,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue