summaryrefslogtreecommitdiff
path: root/sources/scalac/util
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-06-24 08:57:30 +0000
committerpaltherr <paltherr@epfl.ch>2003-06-24 08:57:30 +0000
commit9753961477f1f648656ec130675ed1b78f4f73b1 (patch)
tree3d0d93f692d5f7ca3a0eedfe1b0b74eab6dd027d /sources/scalac/util
parent3102d7d40fcc65e6174e84d5424cd45d688c0257 (diff)
downloadscala-9753961477f1f648656ec130675ed1b78f4f73b1.tar.gz
scala-9753961477f1f648656ec130675ed1b78f4f73b1.tar.bz2
scala-9753961477f1f648656ec130675ed1b78f4f73b1.zip
- Removed file from encoded positions
Diffstat (limited to 'sources/scalac/util')
-rw-r--r--sources/scalac/util/Reporter.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/sources/scalac/util/Reporter.java b/sources/scalac/util/Reporter.java
index ccf466ae7d..b7d233213f 100644
--- a/sources/scalac/util/Reporter.java
+++ b/sources/scalac/util/Reporter.java
@@ -148,7 +148,7 @@ public class Reporter {
/** Prints the message with the given position indication. */
public void printMessage(Position position, String message) {
- if (position != null && position.file().id() != 0) {
+ if (position != null) {
message = " " + message;
if (position.line() != 0)
message = position.line() + ":" + message;
@@ -160,8 +160,7 @@ public class Reporter {
/** Prints the error message. */
public void printError(Position position, String message) {
- if (position != null && position.file().id() == 0)
- message = "error: " + message;
+ if (position == null) message = "error: " + message;
printMessage(position, message);
}
@@ -179,8 +178,7 @@ public class Reporter {
/** Prints the source line of the given position. */
public void printSourceLine(Position position) {
- if (position == null || position.file().id() == 0) return;
- if (position.line() == 0) return;
+ if (position == null || position.line() == 0) return;
printMessage(position.file().getLine(position.line()));
printColumnMarker(position);
}
@@ -226,8 +224,6 @@ public class Reporter {
private boolean testAndLog(Position position) {
if (position == null) return false;
if (position.column() == 0) return false;
- if (position.line() == 0) return false;
- if (position.file().id() == 0) return false;
if (positions.contains(position)) return true;
positions.add(position);
return false;