diff --git a/src/dotty/tools/dotc/reporting/ConsoleReporter.scala b/src/dotty/tools/dotc/reporting/ConsoleReporter.scala index 8ded4035ce66..45933d9548a3 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 = {