mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
add When pattern errors
This commit is contained in:
parent
2d1a1621c3
commit
7f999a06f3
7 changed files with 276 additions and 35 deletions
|
@ -517,7 +517,7 @@ pub fn constrain_expr(
|
|||
PExpected::ForReason(
|
||||
PReason::WhenMatch { index },
|
||||
cond_type.clone(),
|
||||
region,
|
||||
Region::across_all(when_branch.patterns.iter().map(|v| &v.region)),
|
||||
),
|
||||
FromAnnotation(
|
||||
name.clone(),
|
||||
|
@ -543,7 +543,7 @@ pub fn constrain_expr(
|
|||
PExpected::ForReason(
|
||||
PReason::WhenMatch { index },
|
||||
cond_type.clone(),
|
||||
region,
|
||||
Region::across_all(when_branch.patterns.iter().map(|v| &v.region)),
|
||||
),
|
||||
ForReason(
|
||||
Reason::WhenBranch { index },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue