From a0026a09d76c09266c368c7a07a0cc2c5994367e Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Thu, 29 Sep 2016 15:27:18 +0200 Subject: Make reporter hint about existing explanations --- src/dotty/tools/dotc/reporting/ConsoleReporter.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 = { -- cgit v1.2.3