summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/util/SourceFile.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-29 20:19:55 +0000
committerPaul Phillips <paulp@improving.org>2011-05-29 20:19:55 +0000
commit1125a9cfab5c5bacfd10bf1a559b97437339dbaf (patch)
tree5d5155cf1465d1796901773a156d4d9e94efb3b2 /src/compiler/scala/tools/nsc/util/SourceFile.scala
parent75ec2ba72f17a57060ca5831ccc9e38167e957ae (diff)
downloadscala-1125a9cfab5c5bacfd10bf1a559b97437339dbaf.tar.gz
scala-1125a9cfab5c5bacfd10bf1a559b97437339dbaf.tar.bz2
scala-1125a9cfab5c5bacfd10bf1a559b97437339dbaf.zip
Fixed a crasher in the scanner when unicode esc...
Fixed a crasher in the scanner when unicode escape sequences offered up EOF before completion. Also made the repl a little more robust against crashers in scalac. Treat it like a hostile witness! Closes #4584, no review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/util/SourceFile.scala')
-rw-r--r--src/compiler/scala/tools/nsc/util/SourceFile.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/util/SourceFile.scala b/src/compiler/scala/tools/nsc/util/SourceFile.scala
index f875ff549f..97aa08b183 100644
--- a/src/compiler/scala/tools/nsc/util/SourceFile.scala
+++ b/src/compiler/scala/tools/nsc/util/SourceFile.scala
@@ -22,7 +22,7 @@ abstract class SourceFile {
def isSelfContained: Boolean
def length : Int
def position(offset: Int) : Position = {
- assert(offset < length)
+ assert(offset < length, file + ": " + offset + " >= " + length)
new OffsetPosition(this, offset)
}
def position(line: Int, column: Int) : Position = new OffsetPosition(this, lineToOffset(line) + column)