mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Decision tree compilation of list patterns
This commit is contained in:
parent
da1d937277
commit
ae71c7efe2
7 changed files with 479 additions and 38 deletions
|
@ -2000,3 +2000,19 @@ fn unreachable_branch_is_eliminated_but_produces_lambda_specializations() {
|
|||
"#
|
||||
)
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn match_list() {
|
||||
indoc!(
|
||||
r#"
|
||||
l = [A, B]
|
||||
|
||||
when l is
|
||||
[] -> "A"
|
||||
[A] -> "B"
|
||||
[A, A, ..] -> "C"
|
||||
[A, B, ..] -> "D"
|
||||
[B, ..] -> "E"
|
||||
"#
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue