@@ -1919,7 +1919,7 @@ class Typer extends Namer
19191919 else {
19201920 val elemTpes = (elems, pts).zipped.map((elem, pt) =>
19211921 ctx.typeComparer.widenInferred(elem.tpe, pt))
1922- val resTpe = TypeOps .tupleOf (elemTpes)
1922+ val resTpe = TypeOps .nestedPairs (elemTpes)
19231923 app1.cast(resTpe)
19241924 }
19251925 }
@@ -1942,13 +1942,15 @@ class Typer extends Namer
19421942 val quotedPt = if (exprPt.exists) exprPt.argTypesHi.head else defn.AnyType
19431943 val quoted1 = typedExpr(quoted, quotedPt)(quoteContext.addMode(Mode .QuotedPattern ))
19441944 val (shape, splices) = splitQuotePattern(quoted1)
1945- val splicePat = typed(untpd. Tuple (splices.map(untpd. TypedSplice (_))).withSpan(quoted.span ))
1946- val patType = TypeOps .tupleOf (splices.tpes. map(_.widen) )
1945+ val patType = defn.tupleType (splices.tpes. map(_.widen ))
1946+ val splicePat = typed(untpd. Tuple (splices.map(untpd. TypedSplice (_))).withSpan(quoted.span), patType )
19471947 UnApply (
1948- ref(defn.QuotedMatcher_unapplyR ).appliedToType(patType),
1949- ref(defn.InternalQuoted_exprQuoteR ).appliedToType(shape.tpe).appliedTo(shape) :: givenReflection :: Nil ,
1950- splicePat :: Nil ,
1951- pt)
1948+ fun = ref(defn.QuotedMatcher_unapplyR ).appliedToType(patType),
1949+ implicits =
1950+ ref(defn.InternalQuoted_exprQuoteR ).appliedToType(shape.tpe).appliedTo(shape) ::
1951+ givenReflection :: Nil ,
1952+ patterns = splicePat :: Nil ,
1953+ proto = pt)
19521954 }
19531955 else
19541956 typedApply(untpd.Apply (untpd.ref(defn.InternalQuoted_exprQuoteR ), quoted), pt)(quoteContext).withSpan(tree.span)
0 commit comments