diff --git a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala index 0515a6978a47..2ebe33a9a14f 100644 --- a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala +++ b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala @@ -2,6 +2,7 @@ package dotty.tools package dotc package transform +import config.Printers.checks as printer import core.Names.Name import core.DenotTransformers.* import core.SymDenotations.* @@ -445,7 +446,7 @@ object TreeChecker { res catch case NonFatal(ex) if !ctx.run.enrichedErrorMessage => val treeStr = tree.show(using ctx.withPhase(ctx.phase.prev.megaPhase)) - println(ctx.run.enrichErrorMessage(s"exception while retyping $treeStr of class ${tree.className} # ${tree.uniqueId}")) + printer.println(ctx.run.enrichErrorMessage(s"exception while retyping $treeStr of class ${tree.className} # ${tree.uniqueId}")) throw ex } @@ -844,7 +845,7 @@ object TreeChecker { // We want make sure that transparent inline macros are checked in the same way that // non transparent macros are, so we try to prepare a context which would make // the checks behave the same way for both types of macros. - // + // // E.g. Different instances of skolem types are by definition not able to be a subtype of // one another, however in practice this is only upheld during typer phase, and we do not want // it to be upheld during this check. diff --git a/tests/neg-macros/i19842-a.check b/tests/neg-macros/i19842-a.check index af5dbc604f93..30b295cd05a5 100644 --- a/tests/neg-macros/i19842-a.check +++ b/tests/neg-macros/i19842-a.check @@ -8,7 +8,7 @@ |Parents in tree: [trait Serializer] | | at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8) - | at dotty.tools.dotc.transform.TreeChecker$.checkParents(TreeChecker.scala:209) + | at dotty.tools.dotc.transform.TreeChecker$.checkParents(TreeChecker.scala:210) | at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:257) | at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:256) | at Macros$.makeSerializer(Macro.scala:25) diff --git a/tests/neg-macros/i19842-b.check b/tests/neg-macros/i19842-b.check index 95a71fb9f98d..d84d916acb66 100644 --- a/tests/neg-macros/i19842-b.check +++ b/tests/neg-macros/i19842-b.check @@ -8,7 +8,7 @@ |Parents in tree: [class Object, trait Serializer, trait Foo] | | at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8) - | at dotty.tools.dotc.transform.TreeChecker$.checkParents(TreeChecker.scala:209) + | at dotty.tools.dotc.transform.TreeChecker$.checkParents(TreeChecker.scala:210) | at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:257) | at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:256) | at Macros$.makeSerializer(Macro.scala:27)