Skip to content

Commit abba939

Browse files
committed
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.
1 parent 6ca41d5 commit abba939

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/reporting/ConsoleReporter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ConsoleReporter(
4141
}
4242

4343
override def doReport(d: Diagnostic)(implicit ctx: Context): Unit =
44-
if (!d.isSuppressed) d match {
44+
if (!d.isSuppressed || !hasErrors) d match {
4545
case d: Error =>
4646
printMessageAndPos(s"error: ${d.msg}", d.pos)
4747
if (ctx.settings.prompt.value) displayPrompt()

0 commit comments

Comments
 (0)