We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eca1369 commit 0a4cb68Copy full SHA for 0a4cb68
compiler/src/dotty/tools/dotc/reporting/Reporter.scala
@@ -202,7 +202,8 @@ abstract class Reporter extends interfaces.ReporterResult {
202
203
/** Issue all error messages in this reporter to next outer one, or make sure they are written. */
204
def flush()(using Context): Unit =
205
- removeBufferedMessages.foreach(ctx.reporter.report)
+ val msgs = removeBufferedMessages
206
+ if msgs.nonEmpty then msgs.foreach(ctx.reporter.report)
207
208
/** If this reporter buffers messages, all buffered messages, otherwise Nil */
209
def pendingMessages(using Context): List[Diagnostic] = Nil
0 commit comments