Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal authored Apr 18, 2024
2 parents 75f38b5 + bdbf205 commit 99c19a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions compiler/src/dotty/tools/dotc/transform/TreeChecker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/neg-macros/i19842-a.check
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/neg-macros/i19842-b.check
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 99c19a7

Please sign in to comment.