diff options
author | Lex Spoon <lex@lexspoon.org> | 2006-05-19 13:11:58 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2006-05-19 13:11:58 +0000 |
commit | a31e6c4000afaf023d7029b2e771e9b6242c8dbd (patch) | |
tree | 0cd0c8688a2f9ec5e22468f64cf915150265b14e | |
parent | 45ccffe15dc3f45d7db81ae62a3e645c12a6aae4 (diff) | |
download | scala-a31e6c4000afaf023d7029b2e771e9b6242c8dbd.tar.gz scala-a31e6c4000afaf023d7029b2e771e9b6242c8dbd.tar.bz2 scala-a31e6c4000afaf023d7029b2e771e9b6242c8dbd.zip |
Print source positions in the underlying source...
Print source positions in the underlying source file if it can be
found. (The difference is significant when the SourceFile is a
CompoundSourceFile or a SourceFileFragment.)
-rw-r--r-- | src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala b/src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala index a99a321854..4eb1ce16b6 100644 --- a/src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala +++ b/src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala @@ -68,8 +68,9 @@ class ConsoleReporter(reader : BufferedReader, writer : PrintWriter) extends Abs def printMessage(msg : String) = writer.println(msg); /** Prints the message with the given position indication. */ - def printMessage(pos : Position, msg : String) : Unit = { - if (pos != null) { + def printMessage(posIn : Position, msg : String) : Unit = { + if (posIn != null) { + val pos = posIn.inUltimateSource val buf = new StringBuffer(msg); buf.insert(0, " "); if (pos.line != Position.NOLINE) |