From 9753961477f1f648656ec130675ed1b78f4f73b1 Mon Sep 17 00:00:00 2001 From: paltherr Date: Tue, 24 Jun 2003 08:57:30 +0000 Subject: - Removed file from encoded positions --- sources/scalac/util/Reporter.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'sources/scalac/util') 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; -- cgit v1.2.3