File tree Expand file tree Collapse file tree 7 files changed +13
-16
lines changed
compiler/src/dotty/tools/dotc
src-bootstrapped/scala/internal/quoted
src-non-bootstrapped/scala/internal/quoted
quote-matcher-symantics-1 Expand file tree Collapse file tree 7 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -723,6 +723,12 @@ class Definitions {
723723 lazy val InternalQuoted_patternHoleR : TermRef = InternalQuotedModule .requiredMethodRef(" patternHole" )
724724 def InternalQuoted_patternHole (implicit ctx : Context ): Symbol = InternalQuoted_patternHoleR .symbol
725725
726+ lazy val InternalQuotedMatcherModuleRef : TermRef = ctx.requiredModuleRef(" scala.internal.quoted.Matcher" )
727+ def InternalQuotedMatcherModule (implicit ctx : Context ): Symbol = InternalQuotedMatcherModuleRef .symbol
728+
729+ lazy val InternalQuotedMatcher_unapplyR : TermRef = InternalQuotedMatcherModule .requiredMethodRef(nme.unapply)
730+ def InternalQuotedMatcher_unapply (implicit ctx : Context ) = InternalQuotedMatcher_unapplyR .symbol
731+
726732 lazy val QuotedExprsModule : TermSymbol = ctx.requiredModule(" scala.quoted.Exprs" )
727733 def QuotedExprsClass (implicit ctx : Context ): ClassSymbol = QuotedExprsModule .asClass
728734
@@ -745,12 +751,6 @@ class Definitions {
745751 lazy val TastyReflectionModule : TermSymbol = ctx.requiredModule(" scala.tasty.Reflection" )
746752 lazy val TastyReflection_macroContext : TermSymbol = TastyReflectionModule .requiredMethod(" macroContext" )
747753
748- lazy val QuotedMatcherModuleRef : TermRef = ctx.requiredModuleRef(" scala.runtime.quoted.Matcher" )
749- def QuotedMatcherModule (implicit ctx : Context ): Symbol = QuotedMatcherModuleRef .symbol
750-
751- lazy val QuotedMatcher_unapplyR : TermRef = QuotedMatcherModule .requiredMethodRef(nme.unapply)
752- def QuotedMatcher_unapply (implicit ctx : Context ) = QuotedMatcher_unapplyR .symbol
753-
754754 lazy val EqlType : TypeRef = ctx.requiredClassRef(" scala.Eql" )
755755 def EqlClass (implicit ctx : Context ): ClassSymbol = EqlType .symbol.asClass
756756 def EqlModule (implicit ctx : Context ): Symbol = EqlClass .companionModule
Original file line number Diff line number Diff line change @@ -1944,7 +1944,7 @@ class Typer extends Namer
19441944 val patType = defn.tupleType(splices.tpes.map(_.widen))
19451945 val splicePat = typed(untpd.Tuple (splices.map(untpd.TypedSplice (_))).withSpan(quoted.span), patType)
19461946 UnApply (
1947- fun = ref(defn.QuotedMatcher_unapplyR ).appliedToType(patType),
1947+ fun = ref(defn.InternalQuotedMatcher_unapplyR ).appliedToType(patType),
19481948 implicits =
19491949 ref(defn.InternalQuoted_exprQuoteR ).appliedToType(shape.tpe).appliedTo(shape) ::
19501950 implicitArgTree(defn.TastyReflectionType , tree.span) :: Nil ,
Original file line number Diff line number Diff line change 1- package scala .runtime .quoted
1+ package scala .internal .quoted
22
33import scala .annotation .internal .sharable
44
Original file line number Diff line number Diff line change 1- package scala .runtime .quoted
1+ package scala .internal .quoted
22
3- import scala .quoted ._
4- import scala .tasty ._
3+ import scala .quoted .Expr
4+ import scala .tasty .Reflection
55
66object Matcher {
77
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ object Macros {
1010 private def impl [A , B ](a : Expr [A ], b : Expr [B ])(implicit reflect : Reflection ): Expr [Unit ] = {
1111 import reflect ._
1212
13- val res = scala.runtime .quoted.Matcher .unapply[Tuple ](a)(b, reflect).map { tup =>
13+ val res = scala.internal .quoted.Matcher .unapply[Tuple ](a)(b, reflect).map { tup =>
1414 tup.toArray.toList.map {
1515 case r : Expr [_] =>
1616 s " Expr( ${r.unseal.showCode}) "
Original file line number Diff line number Diff line change 11
22import Macros ._
33
4- import scala .runtime .quoted .Matcher ._
4+ import scala .internal .quoted .Matcher ._
55
66import scala .internal .Quoted .patternHole
77
Original file line number Diff line number Diff line change @@ -4,9 +4,6 @@ import scala.quoted.matching._
44
55import scala .tasty .Reflection
66
7- import scala .runtime .quoted .Matcher ._
8-
9- import scala .internal .Quoted .patternHole
107
118object Macros {
129
You can’t perform that action at this time.
0 commit comments