Skip to content

Commit 7d5df9e

Browse files
committed
Specialize the printer in TreeChecker
1 parent 2ba368d commit 7d5df9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/src/dotty/tools/dotc/transform/TreeChecker.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package dotty.tools
22
package dotc
33
package transform
44

5+
import config.Printers.checks as printer
56
import core.Names.Name
67
import core.DenotTransformers.*
78
import core.SymDenotations.*
@@ -445,7 +446,7 @@ object TreeChecker {
445446
res
446447
catch case NonFatal(ex) if !ctx.run.enrichedErrorMessage =>
447448
val treeStr = tree.show(using ctx.withPhase(ctx.phase.prev.megaPhase))
448-
println(ctx.run.enrichErrorMessage(s"exception while retyping $treeStr of class ${tree.className} # ${tree.uniqueId}"))
449+
printer.println(ctx.run.enrichErrorMessage(s"exception while retyping $treeStr of class ${tree.className} # ${tree.uniqueId}"))
449450
throw ex
450451
}
451452

@@ -844,7 +845,7 @@ object TreeChecker {
844845
// We want make sure that transparent inline macros are checked in the same way that
845846
// non transparent macros are, so we try to prepare a context which would make
846847
// the checks behave the same way for both types of macros.
847-
//
848+
//
848849
// E.g. Different instances of skolem types are by definition not able to be a subtype of
849850
// one another, however in practice this is only upheld during typer phase, and we do not want
850851
// it to be upheld during this check.

0 commit comments

Comments
 (0)