diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index bd15d9faa5e4..3dd6e784b4b4 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -253,7 +253,7 @@ object Parsers { /** If at end of file, issue an incompleteInputError. * Otherwise issue a syntax error and skip to next safe point. */ - def syntaxErrorOrIncomplete(msg: => Message) = + def syntaxErrorOrIncomplete(msg: => Message) = if (in.token == EOF) incompleteInputError(msg) else { syntaxError(msg)