roc/crates/compiler/test_syntax/tests/snapshots/pass/pattern_as.expr.result-ast
Joshua Warner b4fa7294c7
Extend test_syntax to check that canonicalization doesn't panic on the input
Importantly, this would have caught the issue discovered in #7279, prior to that landing on main.
2024-12-06 17:13:10 -08:00

35 lines
874 B
Text

@0-25 SpaceAfter(
When(
@5-6 Num(
"0",
),
[
WhenBranch {
patterns: [
@14-20 SpaceBefore(
As(
@14-15 Underscore(
"",
),
PatternAs {
spaces_before: [],
identifier: @19-20 "n",
},
),
[
Newline,
],
),
],
value: @24-25 Var {
module_name: "",
ident: "n",
},
guard: None,
},
],
),
[
Newline,
],
)