File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -615,14 +615,20 @@ class Definitions {
615615 lazy val QuotedExprType = ctx.requiredClassRef(" scala.quoted.Expr" )
616616 def QuotedExprClass (implicit ctx : Context ) = QuotedExprType .symbol.asClass
617617
618- def QuotedExpr_~ (implicit ctx : Context ) = QuotedExprClass .requiredMethod(nme.UNARY_~ )
619- def QuotedExpr_run (implicit ctx : Context ) = QuotedExprClass .requiredMethod(nme.run)
618+ lazy val QuotedExpr_spliceR = QuotedExprClass .requiredMethod(nme.UNARY_~ )
619+ def QuotedExpr_~ (implicit ctx : Context ) = QuotedExpr_spliceR .symbol
620+ lazy val QuotedExpr_runR = QuotedExprClass .requiredMethodRef(nme.run)
621+ def QuotedExpr_run (implicit ctx : Context ) = QuotedExpr_runR .symbol
620622
621623 lazy val QuotedTypeType = ctx.requiredClassRef(" scala.quoted.Type" )
622624 def QuotedTypeClass (implicit ctx : Context ) = QuotedTypeType .symbol.asClass
623625
624- def QuotedType_~ (implicit ctx : Context ) =
625- QuotedTypeClass .info.member(tpnme.UNARY_~ ).symbol.asType
626+ lazy val QuotedType_spliceR = QuotedTypeClass .requiredType(tpnme.UNARY_~ ).typeRef
627+ def QuotedType_~ = QuotedType_spliceR .symbol
628+
629+ lazy val QuotedTypeModule = QuotedTypeClass .companionModule
630+ lazy val QuotedType_applyR = QuotedTypeModule .requiredMethodRef(nme.apply)
631+ def QuotedType_apply (implicit ctx : Context ) = QuotedType_applyR .symbol
626632
627633 def Unpickler_unpickleExpr = ctx.requiredMethod(" scala.runtime.quoted.Unpickler.unpickleExpr" )
628634 def Unpickler_unpickleType = ctx.requiredMethod(" scala.runtime.quoted.Unpickler.unpickleType" )
Original file line number Diff line number Diff line change @@ -313,6 +313,9 @@ object Denotations {
313313 def requiredClass (name : PreName )(implicit ctx : Context ): ClassSymbol =
314314 info.member(name.toTypeName).requiredSymbol(_.isClass).asClass
315315
316+ def requiredType (name : PreName )(implicit ctx : Context ): TypeSymbol =
317+ info.member(name.toTypeName).requiredSymbol(_.isType).asType
318+
316319 /** The alternative of this denotation that has a type matching `targetType` when seen
317320 * as a member of type `site`, `NoDenotation` if none exists.
318321 */
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import dotty.tools.dotc.core.quoted._
2222/** Translates quoted terms and types to `unpickle` method calls.
2323 * Checks that the phase consistency principle (PCP) holds.
2424 */
25- class ReifyQuotes extends MacroTransform {
25+ class ReifyQuotes extends MacroTransformWithImplicits {
2626 import ast .tpd ._
2727
2828 override def phaseName : String = " reifyQuotes"
You can’t perform that action at this time.
0 commit comments