diff options
author | Paul Phillips <paulp@improving.org> | 2009-09-26 18:34:45 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-09-26 18:34:45 +0000 |
commit | 09b71d8beaaa9ce643f130165ec026d51fd0681d (patch) | |
tree | 30517a43794a41b0af40cc093ad65939748392be /src | |
parent | f7ba972de12ea2c0a39fef6db6d4a56b47b647e4 (diff) | |
download | scala-09b71d8beaaa9ce643f130165ec026d51fd0681d.tar.gz scala-09b71d8beaaa9ce643f130165ec026d51fd0681d.tar.bz2 scala-09b71d8beaaa9ce643f130165ec026d51fd0681d.zip |
Changed OffsetPositions to say something useful...
Changed OffsetPositions to say something useful rather than issuing the
default toString method. (I hope that wasn't intentional, but that's
hard to believe and it's been driving me up the wall.)
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/util/Position.scala | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/util/Position.scala b/src/compiler/scala/tools/nsc/util/Position.scala index d71904156e..50cd0be675 100644 --- a/src/compiler/scala/tools/nsc/util/Position.scala +++ b/src/compiler/scala/tools/nsc/util/Position.scala @@ -222,12 +222,10 @@ class OffsetPosition(override val source: SourceFile, override val point: Int) e } override def hashCode = point * 37 + source.file.hashCode - override def dbgString = - "source-"+source.path+ - ",line-"+line+ - (if (point >= source.length) ",out-of-bounds-"+point - else ",offset="+point) - + override def toString = { + val pointmsg = if (point > source.length) "out-of-bounds-" else "offset=" + "source-%s,line-%s,%s%s".format(source.path, line, pointmsg, point) + } override def show = "["+point+"]" } |