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 4c6f317 commit f63ff90Copy full SHA for f63ff90
compiler/src/dotty/tools/dotc/parsing/Scanners.scala
@@ -565,7 +565,7 @@ object Scanners {
565
lastOffset = prev.lastOffset
566
lineOffset = prev.lineOffset
567
}
568
- token match {
+ (token: @switch) match {
569
case CASE =>
570
lookAhead()
571
if (token == CLASS) fuse(CASECLASS)
@@ -601,8 +601,8 @@ object Scanners {
601
if colonSyntax then observeColonEOL()
602
case RBRACE | RPAREN | RBRACKET =>
603
closeIndented()
604
- case EOF if !source.maybeIncomplete =>
605
- closeIndented()
+ case EOF =>
+ if !source.maybeIncomplete then closeIndented()
606
case _ =>
607
608
0 commit comments