diff options
Diffstat (limited to 'src/library/scala/util/parsing/input/OffsetPosition.scala')
-rw-r--r-- | src/library/scala/util/parsing/input/OffsetPosition.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library/scala/util/parsing/input/OffsetPosition.scala b/src/library/scala/util/parsing/input/OffsetPosition.scala index 01d9ea5cb8..23f79c74d1 100644 --- a/src/library/scala/util/parsing/input/OffsetPosition.scala +++ b/src/library/scala/util/parsing/input/OffsetPosition.scala @@ -6,7 +6,8 @@ ** |/ ** \* */ -package scala.util.parsing.input +package scala +package util.parsing.input import scala.collection.mutable.ArrayBuffer @@ -22,7 +23,7 @@ case class OffsetPosition(source: java.lang.CharSequence, offset: Int) extends P /** An index that contains all line starts, including first line, and eof. */ private lazy val index: Array[Int] = { - var lineStarts = new ArrayBuffer[Int] + val lineStarts = new ArrayBuffer[Int] lineStarts += 0 for (i <- 0 until source.length) if (source.charAt(i) == '\n') lineStarts += (i + 1) |