diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2012-07-26 16:01:57 +0200 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2012-07-26 16:02:53 +0200 |
commit | 33118594a3f4f5c2336c1ca5994c14f30b3cf676 (patch) | |
tree | 4b4984255aba9b7f487ffe5500054d5cd0c22ba6 /src/reflect | |
parent | ad08f24448729009fc8d5ff0acf307a43b4cfe0a (diff) | |
download | scala-33118594a3f4f5c2336c1ca5994c14f30b3cf676.tar.gz scala-33118594a3f4f5c2336c1ca5994c14f30b3cf676.tar.bz2 scala-33118594a3f4f5c2336c1ca5994c14f30b3cf676.zip |
`ScriptSourceFile` should not hard-code `OffsetPosition`.
The presentation compiler should support script source files as well, but it needs range positions. This commit
fixes an oversight when `RangePosition` was introduced.
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/util/SourceFile.scala | 2 |
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 df4a3336c3..f8d656ad34 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 */ |