@@ -705,14 +705,16 @@ class Definitions {
705705 lazy val QuotedExprType : TypeRef = ctx.requiredClassRef(" scala.quoted.Expr" )
706706 def QuotedExprClass (implicit ctx : Context ): ClassSymbol = QuotedExprType .symbol.asClass
707707
708- lazy val InternalQuotedModule : TermRef = ctx.requiredModuleRef(" scala.internal.Quoted" )
709- def InternalQuotedModuleClass : Symbol = InternalQuotedModule .symbol
710- lazy val InternalQuoted_exprQuoteR : TermRef = InternalQuotedModuleClass .requiredMethodRef(" exprQuote" .toTermName )
708+ lazy val InternalQuotedModuleRef : TermRef = ctx.requiredModuleRef(" scala.internal.Quoted" )
709+ def InternalQuotedModule : Symbol = InternalQuotedModuleRef .symbol
710+ lazy val InternalQuoted_exprQuoteR : TermRef = InternalQuotedModule .requiredMethodRef(" exprQuote" )
711711 def InternalQuoted_exprQuote (implicit ctx : Context ): Symbol = InternalQuoted_exprQuoteR .symbol
712- lazy val InternalQuoted_exprSpliceR : TermRef = InternalQuotedModuleClass .requiredMethodRef(" exprSplice" .toTermName )
712+ lazy val InternalQuoted_exprSpliceR : TermRef = InternalQuotedModule .requiredMethodRef(" exprSplice" )
713713 def InternalQuoted_exprSplice (implicit ctx : Context ): Symbol = InternalQuoted_exprSpliceR .symbol
714- lazy val InternalQuoted_typeQuoteR : TermRef = InternalQuotedModuleClass .requiredMethodRef(" typeQuote" .toTermName )
714+ lazy val InternalQuoted_typeQuoteR : TermRef = InternalQuotedModule .requiredMethodRef(" typeQuote" )
715715 def InternalQuoted_typeQuote (implicit ctx : Context ): Symbol = InternalQuoted_typeQuoteR .symbol
716+ lazy val InternalQuoted_patternHoleR : TermRef = InternalQuotedModule .requiredMethodRef(" patternHole" )
717+ def InternalQuoted_patternHole (implicit ctx : Context ): Symbol = InternalQuoted_patternHoleR .symbol
716718
717719 lazy val QuotedExprsModule : TermSymbol = ctx.requiredModule(" scala.quoted.Exprs" )
718720 def QuotedExprsClass (implicit ctx : Context ): ClassSymbol = QuotedExprsModule .asClass
@@ -723,24 +725,8 @@ class Definitions {
723725 lazy val QuotedType_spliceR : TypeRef = QuotedTypeClass .requiredType(tpnme.splice).typeRef
724726 def QuotedType_splice : Symbol = QuotedType_spliceR .symbol
725727
726- lazy val QuotedTypeModuleType : TermRef = ctx.requiredModuleRef(" scala.quoted.Type" )
727- def QuotedTypeModule (implicit ctx : Context ): Symbol = QuotedTypeModuleType .symbol
728-
729- lazy val QuotedLiftableModule : TermSymbol = ctx.requiredModule(" scala.quoted.Liftable" )
730- def QuotedLiftableModuleClass (implicit ctx : Context ): ClassSymbol = QuotedLiftableModule .asClass
731-
732- def QuotedLiftable_BooleanIsLiftable : TermRef = QuotedLiftableModule .requiredMethodRef(" BooleanIsLiftable" )
733- def QuotedLiftable_ByteIsLiftable : TermRef = QuotedLiftableModule .requiredMethodRef(" ByteIsLiftable" )
734- def QuotedLiftable_CharIsLiftable : TermRef = QuotedLiftableModule .requiredMethodRef(" CharIsLiftable" )
735- def QuotedLiftable_ShortIsLiftable : TermRef = QuotedLiftableModule .requiredMethodRef(" ShortIsLiftable" )
736- def QuotedLiftable_IntIsLiftable : TermRef = QuotedLiftableModule .requiredMethodRef(" IntIsLiftable" )
737- def QuotedLiftable_LongIsLiftable : TermRef = QuotedLiftableModule .requiredMethodRef(" LongIsLiftable" )
738- def QuotedLiftable_FloatIsLiftable : TermRef = QuotedLiftableModule .requiredMethodRef(" FloatIsLiftable" )
739- def QuotedLiftable_DoubleIsLiftable : TermRef = QuotedLiftableModule .requiredMethodRef(" DoubleIsLiftable" )
740- def QuotedLiftable_StringIsLiftable : TermRef = QuotedLiftableModule .requiredMethodRef(" StringIsLiftable" )
741-
742- lazy val QuotedLiftableType : TypeRef = ctx.requiredClassRef(" scala.quoted.Liftable" )
743- def QuotedLiftableClass (implicit ctx : Context ): ClassSymbol = QuotedLiftableType .symbol.asClass
728+ lazy val QuotedTypeModuleRef : TermRef = ctx.requiredModuleRef(" scala.quoted.Type" )
729+ def QuotedTypeModule (implicit ctx : Context ): Symbol = QuotedTypeModuleRef .symbol
744730
745731 def Unpickler_unpickleExpr : TermSymbol = ctx.requiredMethod(" scala.runtime.quoted.Unpickler.unpickleExpr" )
746732 def Unpickler_liftedExpr : TermSymbol = ctx.requiredMethod(" scala.runtime.quoted.Unpickler.liftedExpr" )
@@ -752,6 +738,12 @@ class Definitions {
752738 lazy val TastyReflectionModule : TermSymbol = ctx.requiredModule(" scala.tasty.Reflection" )
753739 lazy val TastyReflection_macroContext : TermSymbol = TastyReflectionModule .requiredMethod(" macroContext" )
754740
741+ lazy val QuotedMatcherModuleRef : TermRef = ctx.requiredModuleRef(" scala.runtime.quoted.Matcher" )
742+ def QuotedMatcherModule (implicit ctx : Context ): Symbol = QuotedMatcherModuleRef .symbol
743+
744+ lazy val QuotedMatcher_unapplyR : TermRef = QuotedMatcherModule .requiredMethodRef(nme.unapply)
745+ def QuotedMatcher_unapply (implicit ctx : Context ) = QuotedMatcher_unapplyR .symbol
746+
755747 lazy val EqlType : TypeRef = ctx.requiredClassRef(" scala.Eql" )
756748 def EqlClass (implicit ctx : Context ): ClassSymbol = EqlType .symbol.asClass
757749 def EqlModule (implicit ctx : Context ): Symbol = EqlClass .companionModule
@@ -1178,7 +1170,9 @@ class Definitions {
11781170 }
11791171
11801172 def tupleType (elems : List [Type ]): Type = {
1181- TupleType (elems.size).appliedTo(elems)
1173+ val arity = elems.length
1174+ if (arity <= MaxTupleArity && TupleType (arity) != null ) TupleType (arity).appliedTo(elems)
1175+ else TypeOps .nestedPairs(elems)
11821176 }
11831177
11841178 def isProductSubType (tp : Type )(implicit ctx : Context ): Boolean =
@@ -1271,8 +1265,9 @@ class Definitions {
12711265 def adjustForTuple (cls : ClassSymbol , tparams : List [TypeSymbol ], parents : List [Type ]): List [Type ] = {
12721266 def syntheticParent (tparams : List [TypeSymbol ]): Type =
12731267 if (tparams.isEmpty) TupleTypeRef
1274- else (tparams :\ (UnitType : Type )) ((tparam, tail) => PairType .appliedTo(tparam.typeRef, tail))
1275- if (isTupleClass(cls) || cls == UnitClass ) parents :+ syntheticParent(tparams) else parents
1268+ else TypeOps .nestedPairs(tparams.map(_.typeRef))
1269+ if (isTupleClass(cls) || cls == UnitClass ) parents :+ syntheticParent(tparams)
1270+ else parents
12761271 }
12771272
12781273 // ----- primitive value class machinery ------------------------------------------
0 commit comments