aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/reporting/ConsoleReporter.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/reporting/ConsoleReporter.scala b/src/dotty/tools/dotc/reporting/ConsoleReporter.scala
index 8ded4035c..45933d954 100644
--- a/src/dotty/tools/dotc/reporting/ConsoleReporter.scala
+++ b/src/dotty/tools/dotc/reporting/ConsoleReporter.scala
@@ -120,7 +120,10 @@ class ConsoleReporter(
printMessageAndPos(m.contained, m.pos, "Info")
}
- if (ctx.shouldExplain(m)) printExplanation(m.contained)
+ if (ctx.shouldExplain(m))
+ printExplanation(m.contained)
+ else if (m.contained.explanation.nonEmpty)
+ printMessage("\nlonger explanation available when compiling with `-explain`")
}
def displayPrompt(): Unit = {