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 {
723
723
lazy val InternalQuoted_patternHoleR : TermRef = InternalQuotedModule .requiredMethodRef(" patternHole" )
724
724
def InternalQuoted_patternHole (implicit ctx : Context ): Symbol = InternalQuoted_patternHoleR .symbol
725
725
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
+
726
732
lazy val QuotedExprsModule : TermSymbol = ctx.requiredModule(" scala.quoted.Exprs" )
727
733
def QuotedExprsClass (implicit ctx : Context ): ClassSymbol = QuotedExprsModule .asClass
728
734
@@ -745,12 +751,6 @@ class Definitions {
745
751
lazy val TastyReflectionModule : TermSymbol = ctx.requiredModule(" scala.tasty.Reflection" )
746
752
lazy val TastyReflection_macroContext : TermSymbol = TastyReflectionModule .requiredMethod(" macroContext" )
747
753
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
-
754
754
lazy val EqlType : TypeRef = ctx.requiredClassRef(" scala.Eql" )
755
755
def EqlClass (implicit ctx : Context ): ClassSymbol = EqlType .symbol.asClass
756
756
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
1944
1944
val patType = defn.tupleType(splices.tpes.map(_.widen))
1945
1945
val splicePat = typed(untpd.Tuple (splices.map(untpd.TypedSplice (_))).withSpan(quoted.span), patType)
1946
1946
UnApply (
1947
- fun = ref(defn.QuotedMatcher_unapplyR ).appliedToType(patType),
1947
+ fun = ref(defn.InternalQuotedMatcher_unapplyR ).appliedToType(patType),
1948
1948
implicits =
1949
1949
ref(defn.InternalQuoted_exprQuoteR ).appliedToType(shape.tpe).appliedTo(shape) ::
1950
1950
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
2
2
3
3
import scala .annotation .internal .sharable
4
4
Original file line number Diff line number Diff line change 1
- package scala .runtime .quoted
1
+ package scala .internal .quoted
2
2
3
- import scala .quoted ._
4
- import scala .tasty ._
3
+ import scala .quoted .Expr
4
+ import scala .tasty .Reflection
5
5
6
6
object Matcher {
7
7
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ object Macros {
10
10
private def impl [A , B ](a : Expr [A ], b : Expr [B ])(implicit reflect : Reflection ): Expr [Unit ] = {
11
11
import reflect ._
12
12
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 =>
14
14
tup.toArray.toList.map {
15
15
case r : Expr [_] =>
16
16
s " Expr( ${r.unseal.showCode}) "
Original file line number Diff line number Diff line change 1
1
2
2
import Macros ._
3
3
4
- import scala .runtime .quoted .Matcher ._
4
+ import scala .internal .quoted .Matcher ._
5
5
6
6
import scala .internal .Quoted .patternHole
7
7
Original file line number Diff line number Diff line change @@ -4,9 +4,6 @@ import scala.quoted.matching._
4
4
5
5
import scala .tasty .Reflection
6
6
7
- import scala .runtime .quoted .Matcher ._
8
-
9
- import scala .internal .Quoted .patternHole
10
7
11
8
object Macros {
12
9
You can’t perform that action at this time.
0 commit comments