Skip to content

Commit

Permalink
Make reporter hint about existing explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmulder committed Oct 10, 2016
1 parent e42bb30 commit a0026a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dotty/tools/dotc/reporting/ConsoleReporter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit a0026a0

Please sign in to comment.