diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-09-27 16:07:56 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-10-10 13:25:35 +0200 |
commit | f5ad8492d076051c8805370c05610d8294ccb241 (patch) | |
tree | c8d2aa477d5927bfb14c1e8f6c0417a6d60cab24 /src/dotty/tools/dotc/reporting/diagnostic | |
parent | 24bcdfdcdaa04e3cf2aa3c7289415f8a98d3d376 (diff) | |
download | dotty-f5ad8492d076051c8805370c05610d8294ccb241.tar.gz dotty-f5ad8492d076051c8805370c05610d8294ccb241.tar.bz2 dotty-f5ad8492d076051c8805370c05610d8294ccb241.zip |
Fix reporting of ErrorTypes in highlighted segments
Diffstat (limited to 'src/dotty/tools/dotc/reporting/diagnostic')
-rw-r--r-- | src/dotty/tools/dotc/reporting/diagnostic/MessageContainer.scala | 2 | ||||
-rw-r--r-- | src/dotty/tools/dotc/reporting/diagnostic/messages.scala | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/reporting/diagnostic/MessageContainer.scala b/src/dotty/tools/dotc/reporting/diagnostic/MessageContainer.scala index d15c1d2f1..7bb092da2 100644 --- a/src/dotty/tools/dotc/reporting/diagnostic/MessageContainer.scala +++ b/src/dotty/tools/dotc/reporting/diagnostic/MessageContainer.scala @@ -41,7 +41,7 @@ class MessageContainer( /** The message to report */ def message: String = { if (myMsg == null) { - myMsg = msgFn.msg + myMsg = msgFn.msg.replaceAll("\u001B\\[[;\\d]*m", "") if (myMsg.contains(nonSensicalStartTag)) { myIsNonSensical = true // myMsg might be composed of several d"..." invocations -> nested diff --git a/src/dotty/tools/dotc/reporting/diagnostic/messages.scala b/src/dotty/tools/dotc/reporting/diagnostic/messages.scala index 01cf00cf7..76b2fd3e9 100644 --- a/src/dotty/tools/dotc/reporting/diagnostic/messages.scala +++ b/src/dotty/tools/dotc/reporting/diagnostic/messages.scala @@ -202,13 +202,13 @@ object messages { } } - case class MissingIdent(tree: untpd.Ident, treeKind: String, name: Name)(implicit ctx: Context) + case class MissingIdent(tree: untpd.Ident, treeKind: String, name: String)(implicit ctx: Context) extends Message("E005") { val kind = "Missing Identifier" val msg = em"not found: $treeKind$name" val explanation = { - hl"""|An identifier for `${name.show}` is missing. This means that something + hl"""|An identifier for `$treeKind$name` is missing. This means that something |has either been misspelt or you're forgetting an import""".stripMargin } } |