mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Add mono tests for record pattern with as
This commit is contained in:
parent
4e19753189
commit
ada24e4fd9
2 changed files with 44 additions and 0 deletions
|
@ -657,6 +657,19 @@ fn record_optional_field_function_use_default() {
|
|||
"
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn as_pattern_in_closure_arg() {
|
||||
r"
|
||||
g = \{x, y, w, h} -> (x + w, y + h)
|
||||
|
||||
f = \({ x, y } as box) ->
|
||||
(right, bottom) = g box
|
||||
(x, y, right, bottom)
|
||||
|
||||
f { x: 1, y: 2, w: 3, h: 4 }
|
||||
"
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn quicksort_help() {
|
||||
// do we still need with_larger_debug_stack?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue