Skip to content

Commit c460b52

Browse files
committed
Force read unpickled trees to avoid Ycheck failure
1 parent b30672b commit c460b52

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

compiler/src/dotty/tools/dotc/core/quoted/PickledQuotes.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import dotty.tools.dotc.core.tasty.{TastyPickler, TastyPrinter, TastyString}
1616

1717
import scala.quoted.Types._
1818
import scala.quoted.Exprs._
19-
2019
import scala.reflect.ClassTag
2120

2221
object PickledQuotes {
@@ -53,7 +52,13 @@ object PickledQuotes {
5352

5453
/** Transform the expression into its fully spliced Tree */
5554
def quotedExprToTree[T](expr: quoted.Expr[T])(implicit ctx: Context): Tree = expr match {
56-
case expr: TastyExpr[_] => unpickleExpr(expr)
55+
case expr: TastyExpr[_] =>
56+
val unpickled = unpickleExpr(expr)
57+
val force = new TreeTraverser {
58+
def traverse(tree: tpd.Tree)(implicit ctx: Context): Unit = traverseChildren(tree)
59+
}
60+
force.traverse(unpickled)
61+
unpickled
5762
case expr: LiftedExpr[T] =>
5863
expr.value match {
5964
case value: Class[_] => ref(defn.Predef_classOf).appliedToType(classToType(value))

0 commit comments

Comments
 (0)