mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Fix as pattern formatting inside apply
This commit is contained in:
parent
f8b0be725c
commit
04612fb2cb
5 changed files with 48 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
when t is
|
||||
Ok ({} as d) -> S
|
|
@ -0,0 +1,42 @@
|
|||
@0-29 SpaceAfter(
|
||||
When(
|
||||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "t",
|
||||
},
|
||||
[
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@14-25 SpaceBefore(
|
||||
Apply(
|
||||
@14-16 Tag(
|
||||
"Ok",
|
||||
),
|
||||
[
|
||||
@18-25 As(
|
||||
@18-20 RecordDestructure(
|
||||
[],
|
||||
),
|
||||
PatternAs {
|
||||
spaces_before: [],
|
||||
identifier: @24-25 "d",
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
value: @28-29 Tag(
|
||||
"S",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
when t is
|
||||
Ok ({} as d)->S
|
|
@ -564,6 +564,7 @@ mod test_snapshots {
|
|||
pass/pattern_as_spaces.expr,
|
||||
pass/pattern_comma_newlines.expr,
|
||||
pass/pattern_record_apply_comment.expr,
|
||||
pass/pattern_with_as_parens.expr,
|
||||
pass/pattern_with_space_in_parens.expr, // https://github.com/roc-lang/roc/issues/929
|
||||
pass/pizza_dbg.expr,
|
||||
pass/pizza_question.moduledefs,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue