mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Fix when branches to use lifting as well
This commit is contained in:
parent
e068ae6b5a
commit
c4077dc971
5 changed files with 62 additions and 19 deletions
|
@ -0,0 +1,5 @@
|
|||
when
|
||||
0
|
||||
is
|
||||
B ->
|
||||
t
|
|
@ -0,0 +1,36 @@
|
|||
@0-17 SpaceAfter(
|
||||
When(
|
||||
@5-6 SpaceAfter(
|
||||
Num(
|
||||
"0",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@10-11 Tag(
|
||||
"B",
|
||||
),
|
||||
],
|
||||
value: @13-17 ParensAround(
|
||||
SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "t",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
when 0
|
||||
is B->(
|
||||
t)
|
|
@ -735,6 +735,7 @@ mod test_snapshots {
|
|||
pass/when_in_parens.expr,
|
||||
pass/when_in_parens_indented.expr,
|
||||
pass/when_newline_after_condition.expr,
|
||||
pass/when_newline_before_is_and_in_branch_parens.expr,
|
||||
pass/when_result_list.expr,
|
||||
pass/when_with_alternative_patterns.expr,
|
||||
pass/when_with_function_application.expr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue