aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-09-27 16:52:30 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-10-10 13:25:36 +0200
commita7d3f6e1b85f772bb343c5d006fd1e4edc844a93 (patch)
treef353b850dd66852bc80d0372aa91ec9298b0a14c
parentf5ad8492d076051c8805370c05610d8294ccb241 (diff)
downloaddotty-a7d3f6e1b85f772bb343c5d006fd1e4edc844a93.tar.gz
dotty-a7d3f6e1b85f772bb343c5d006fd1e4edc844a93.tar.bz2
dotty-a7d3f6e1b85f772bb343c5d006fd1e4edc844a93.zip
Don't force Message twice in MessageContainer
-rw-r--r--src/dotty/tools/dotc/printing/Formatting.scala2
-rw-r--r--src/dotty/tools/dotc/reporting/diagnostic/MessageContainer.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/printing/Formatting.scala b/src/dotty/tools/dotc/printing/Formatting.scala
index 41bd91607..ae3819513 100644
--- a/src/dotty/tools/dotc/printing/Formatting.scala
+++ b/src/dotty/tools/dotc/printing/Formatting.scala
@@ -241,7 +241,7 @@ object Formatting {
*/
def typeDiff(found: Type, expected: Type)(implicit ctx: Context): (String, String) = {
val fnd = wrapNonSensical(found, found.show)
- val exp = wrapNonSensical(expected, found.show)
+ val exp = wrapNonSensical(expected, expected.show)
(found, expected) match {
case (_: RefinedType, _: RefinedType) =>
diff --git a/src/dotty/tools/dotc/reporting/diagnostic/MessageContainer.scala b/src/dotty/tools/dotc/reporting/diagnostic/MessageContainer.scala
index 7bb092da2..a1a99f17d 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.replaceAll("\u001B\\[[;\\d]*m", "")
+ myMsg = contained.msg.replaceAll("\u001B\\[[;\\d]*m", "")
if (myMsg.contains(nonSensicalStartTag)) {
myIsNonSensical = true
// myMsg might be composed of several d"..." invocations -> nested