aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/reporting/ConsoleReporter.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-04-12 18:24:26 +0200
committerMartin Odersky <odersky@gmail.com>2015-04-13 16:06:10 +0200
commitabba939a71423070e29c6035fa973b3291423106 (patch)
tree7dc87fd52d61ef640e8794ec1d44c24395934a21 /src/dotty/tools/dotc/reporting/ConsoleReporter.scala
parent6ca41d5721da042218c81c4851de8333584c54f1 (diff)
downloaddotty-abba939a71423070e29c6035fa973b3291423106.tar.gz
dotty-abba939a71423070e29c6035fa973b3291423106.tar.bz2
dotty-abba939a71423070e29c6035fa973b3291423106.zip
Print supressed error message if it comes first.
An error message might be suppressed because it contains internal code. But if it is the first one, we should still print it. Otherwise, we risk a scenario where we see "2 errors" but none is printed.
Diffstat (limited to 'src/dotty/tools/dotc/reporting/ConsoleReporter.scala')
-rw-r--r--src/dotty/tools/dotc/reporting/ConsoleReporter.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/reporting/ConsoleReporter.scala b/src/dotty/tools/dotc/reporting/ConsoleReporter.scala
index a7f7f70bb..f07f43a63 100644
--- a/src/dotty/tools/dotc/reporting/ConsoleReporter.scala
+++ b/src/dotty/tools/dotc/reporting/ConsoleReporter.scala
@@ -41,7 +41,7 @@ class ConsoleReporter(
}
override def doReport(d: Diagnostic)(implicit ctx: Context): Unit =
- if (!d.isSuppressed) d match {
+ if (!d.isSuppressed || !hasErrors) d match {
case d: Error =>
printMessageAndPos(s"error: ${d.msg}", d.pos)
if (ctx.settings.prompt.value) displayPrompt()