add spread as test

This commit is contained in:
Brendan Hansknecht 2023-11-20 20:09:34 -08:00
parent 9cf0d5366f
commit 2de96ed5a8
No known key found for this signature in database
GPG key ID: 0EA784685083E75B

View file

@ -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!(