jakt
jakt copied to clipboard
Parser infinite loop when parsing unsupported match body expression that is surrounded by brackets
This causes the parser to go into an infinite loop:
function main() {
match foo {
(++foo) => 1
}
}
Removing the ()
around ++foo
makes it error:
-----
function main() {
match foo {
++foo => 1
}
}
-----
Error: ParserError("expected '=>' after pattern case", Span { file_id: 1, start: 42, end: 44 })
Looking into this.
fixed as of 9012330