mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Merge pull request #7050 from roc-lang/arg-patterns-as
This commit is contained in:
commit
2469a3aa2d
11 changed files with 179 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
\({ x, y } as point), (@Location inner as outer) ->
|
||||
crash ""
|
|
@ -0,0 +1,57 @@
|
|||
SpaceAfter(
|
||||
Closure(
|
||||
[
|
||||
@2-19 As(
|
||||
@2-10 RecordDestructure(
|
||||
[
|
||||
@4-5 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@7-8 Identifier {
|
||||
ident: "y",
|
||||
},
|
||||
],
|
||||
),
|
||||
PatternAs {
|
||||
spaces_before: [],
|
||||
identifier: @14-19 "point",
|
||||
},
|
||||
),
|
||||
@23-47 As(
|
||||
@23-38 Apply(
|
||||
@23-32 OpaqueRef(
|
||||
"@Location",
|
||||
),
|
||||
[
|
||||
@33-38 Identifier {
|
||||
ident: "inner",
|
||||
},
|
||||
],
|
||||
),
|
||||
PatternAs {
|
||||
spaces_before: [],
|
||||
identifier: @42-47 "outer",
|
||||
},
|
||||
),
|
||||
],
|
||||
@56-64 SpaceBefore(
|
||||
Apply(
|
||||
@56-61 Crash,
|
||||
[
|
||||
@62-64 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
\({ x, y } as point), (@Location inner as outer) ->
|
||||
crash ""
|
|
@ -281,6 +281,7 @@ mod test_snapshots {
|
|||
pass/apply_two_args.expr,
|
||||
pass/apply_unary_negation.expr,
|
||||
pass/apply_unary_not.expr,
|
||||
pass/arg_pattern_as.expr,
|
||||
pass/basic_apply.expr,
|
||||
pass/basic_docs.expr,
|
||||
pass/basic_field.expr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue