diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 307745f8e5..4ac6aea923 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -9,7 +9,7 @@ package scala.tools.nsc package ast.parser import scala.collection.mutable.ListBuffer -import util.{ OffsetPosition, BatchSourceFile } +import util.{ OffsetPosition } import symtab.Flags import Tokens._ @@ -91,7 +91,7 @@ self => val syntaxErrors = new ListBuffer[(Int, String)] def incompleteInputError(msg: String) { - val offset = unit.source.asInstanceOf[BatchSourceFile].content.length - 1 + val offset = unit.source.content.length - 1 if (smartParsing) syntaxErrors += ((offset, msg)) else unit.incompleteInputError(o2p(offset), msg) } |