summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2006-05-19 13:11:58 +0000
committerLex Spoon <lex@lexspoon.org>2006-05-19 13:11:58 +0000
commita31e6c4000afaf023d7029b2e771e9b6242c8dbd (patch)
tree0cd0c8688a2f9ec5e22468f64cf915150265b14e /src
parent45ccffe15dc3f45d7db81ae62a3e645c12a6aae4 (diff)
downloadscala-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.)
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala5
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)