Fix bug with when not passing down options

This commit is contained in:
Joshua Warner 2024-12-11 19:36:03 -08:00
parent a0de21d7d7
commit 0cc16b0d2c
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 86 additions and 46 deletions

View file

@ -0,0 +1,6 @@
[
when 2 is
8 ->
[
],
]

View file

@ -0,0 +1,32 @@
@0-18 SpaceAfter(
List(
[
@1-17 When(
@6-7 Num(
"2",
),
[
WhenBranch {
patterns: [
@11-12 NumLiteral(
"8",
),
],
value: @14-17 List(
Collection {
items: [],
final_comments: [
Newline,
],
},
),
guard: None,
},
],
),
],
),
[
Newline,
],
)

View file

@ -0,0 +1,2 @@
[when 2 is 8->[
]]

View file

@ -677,6 +677,7 @@ mod test_snapshots {
pass/when_in_binops.expr,
pass/when_in_function.expr,
pass/when_in_function_python_style_indent.expr,
pass/when_in_list.expr,
pass/when_in_parens.expr,
pass/when_in_parens_indented.expr,
pass/when_newline_after_condition.expr,