We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6daae21 + 6c6f7d8 commit 2664204Copy full SHA for 2664204
compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala
@@ -4,7 +4,7 @@ package reporting
4
5
import core.Contexts.*
6
import java.io.{ BufferedReader, PrintWriter }
7
-import Diagnostic.Error
+import Diagnostic.*
8
9
/**
10
* This class implements a Reporter that displays messages on a text console
@@ -18,9 +18,11 @@ class ConsoleReporter(
18
19
override def doReport(dia: Diagnostic)(using Context): Unit = {
20
super.doReport(dia)
21
- dia match
22
- case dia: Error if ctx.settings.Xprompt.value => Reporter.displayPrompt(reader, writer)
23
- case _ =>
+ if ctx.settings.Xprompt.value then
+ dia match
+ case _: Error => Reporter.displayPrompt(reader, writer)
24
+ case _: Warning if ctx.settings.XfatalWarnings.value => Reporter.displayPrompt(reader, writer)
25
+ case _ =>
26
}
27
28
0 commit comments