Skip to content

Commit a76dd9f

Browse files
Backport "Fix #20211" to LTS (#21079)
Backports #20220 to the LTS branch. PR submitted by the release tooling. [skip ci]
2 parents 4553799 + 08d07bb commit a76dd9f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package dotty.tools.dotc
22
package transform
33

4+
import config.Printers.checks as printer
45
import core.Names.Name
56
import core.DenotTransformers.*
67
import core.SymDenotations.*
@@ -415,7 +416,7 @@ object TreeChecker {
415416
res
416417
catch case NonFatal(ex) if !ctx.run.enrichedErrorMessage =>
417418
val treeStr = tree.show(using ctx.withPhase(ctx.phase.prev.megaPhase))
418-
println(ctx.run.enrichErrorMessage(s"exception while retyping $treeStr of class ${tree.className} # ${tree.uniqueId}"))
419+
printer.println(ctx.run.enrichErrorMessage(s"exception while retyping $treeStr of class ${tree.className} # ${tree.uniqueId}"))
419420
throw ex
420421
}
421422

@@ -782,7 +783,7 @@ object TreeChecker {
782783
// We want make sure that transparent inline macros are checked in the same way that
783784
// non transparent macros are, so we try to prepare a context which would make
784785
// the checks behave the same way for both types of macros.
785-
//
786+
//
786787
// E.g. Different instances of skolem types are by definition not able to be a subtype of
787788
// one another, however in practice this is only upheld during typer phase, and we do not want
788789
// it to be upheld during this check.

0 commit comments

Comments
 (0)