aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-09-29 15:27:18 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-10-10 13:25:36 +0200
commita0026a09d76c09266c368c7a07a0cc2c5994367e (patch)
treeefa7de7be870913b6ca185fc82757a36934f0363
parente42bb303231b9c91f679c410d51455ba91df024d (diff)
downloaddotty-a0026a09d76c09266c368c7a07a0cc2c5994367e.tar.gz
dotty-a0026a09d76c09266c368c7a07a0cc2c5994367e.tar.bz2
dotty-a0026a09d76c09266c368c7a07a0cc2c5994367e.zip
Make reporter hint about existing explanations
-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 = {