We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 367acdd commit 24bdb6eCopy full SHA for 24bdb6e
compiler/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -3150,10 +3150,10 @@ object Parsers {
3150
SubMatch(sel, cases)
3151
case _ =>
3152
syntaxErrorOrIncomplete(ExpectedTokenButFound(ARROW, tok))
3153
- EmptyTree
+ atSpan(self.span)(Block(Nil, EmptyTree))
3154
3155
val body = tok match
3156
- case ARROW => atSpan(in.skipToken()):
+ case ARROW => atSpan(in.skipToken()):
3157
if exprOnly then
3158
if in.indentSyntax && in.isAfterLineEnd && in.token != INDENT then
3159
warning(em"""Misleading indentation: this expression forms part of the preceding catch case.
0 commit comments