mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Constraining of list patterns
This commit is contained in:
parent
7b87d0093e
commit
9ab5d0efb8
4 changed files with 67 additions and 6 deletions
|
@ -11821,4 +11821,30 @@ All branches in an `if` must have the same type!
|
|||
I would have to crash if I saw one of those! Add branches for them!
|
||||
"###
|
||||
);
|
||||
|
||||
test_report!(
|
||||
#[ignore = "must implement exhaustiveness sketching for lists first"]
|
||||
mismatch_within_list_pattern,
|
||||
indoc!(
|
||||
r#"
|
||||
when [] is
|
||||
[A, 1u8] -> ""
|
||||
"#
|
||||
),
|
||||
@r###"
|
||||
"###
|
||||
);
|
||||
|
||||
test_report!(
|
||||
#[ignore = "must implement exhaustiveness sketching for lists first"]
|
||||
mismatch_list_pattern_vs_condition,
|
||||
indoc!(
|
||||
r#"
|
||||
when [A, B] is
|
||||
["foo", "bar"] -> ""
|
||||
"#
|
||||
),
|
||||
@r###"
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue