mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 03:42:17 +00:00
add spread as test
This commit is contained in:
parent
9cf0d5366f
commit
2de96ed5a8
1 changed files with 13 additions and 0 deletions
|
@ -12637,6 +12637,19 @@ In roc, functions are always written as a lambda, like{}
|
|||
"###
|
||||
);
|
||||
|
||||
test_no_problem!(
|
||||
list_match_spread_as,
|
||||
indoc!(
|
||||
r#"
|
||||
l : List [A, B]
|
||||
|
||||
when l is
|
||||
[A, .. as rest] | [.. as rest, A] -> rest
|
||||
[.. as rest] -> rest
|
||||
"#
|
||||
)
|
||||
);
|
||||
|
||||
test_no_problem!(
|
||||
list_match_exhaustive_empty_and_rest_with_unary_head,
|
||||
indoc!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue