aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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