summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-07-29 07:18:22 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-07-29 07:18:22 -0700
commit1ad6e501997d332e2bc0ccc8dd40e3909e728930 (patch)
tree6288ba7922b688f1ab3c12dc0decc6da259a2867
parentbb5388273724d79b70373f73300a82d54bfe50b6 (diff)
parent33118594a3f4f5c2336c1ca5994c14f30b3cf676 (diff)
downloadscala-1ad6e501997d332e2bc0ccc8dd40e3909e728930.tar.gz
scala-1ad6e501997d332e2bc0ccc8dd40e3909e728930.tar.bz2
scala-1ad6e501997d332e2bc0ccc8dd40e3909e728930.zip
Merge pull request #997 from dragos/ide/range-positions-in-script-sources
`ScriptSourceFile` should not hard-code `OffsetPosition`.
-rw-r--r--src/reflect/scala/reflect/internal/util/SourceFile.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/util/SourceFile.scala b/src/reflect/scala/reflect/internal/util/SourceFile.scala
index f24e44b351..793ef0ac22 100644
--- a/src/reflect/scala/reflect/internal/util/SourceFile.scala
+++ b/src/reflect/scala/reflect/internal/util/SourceFile.scala
@@ -98,7 +98,7 @@ class ScriptSourceFile(underlying: BatchSourceFile, content: Array[Char], overri
override def positionInUltimateSource(pos: Position) =
if (!pos.isDefined) super.positionInUltimateSource(pos)
- else new OffsetPosition(underlying, pos.point + start)
+ else pos.withSource(underlying, start)
}
/** a file whose contents do not change over time */