@@ -1919,7 +1919,7 @@ class Typer extends Namer
1919
1919
else {
1920
1920
val elemTpes = (elems, pts).zipped.map((elem, pt) =>
1921
1921
ctx.typeComparer.widenInferred(elem.tpe, pt))
1922
- val resTpe = TypeOps .tupleOf (elemTpes)
1922
+ val resTpe = TypeOps .nestedPairs (elemTpes)
1923
1923
app1.cast(resTpe)
1924
1924
}
1925
1925
}
@@ -1942,13 +1942,15 @@ class Typer extends Namer
1942
1942
val quotedPt = if (exprPt.exists) exprPt.argTypesHi.head else defn.AnyType
1943
1943
val quoted1 = typedExpr(quoted, quotedPt)(quoteContext.addMode(Mode .QuotedPattern ))
1944
1944
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 )
1947
1947
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)
1952
1954
}
1953
1955
else
1954
1956
typedApply(untpd.Apply (untpd.ref(defn.InternalQuoted_exprQuoteR ), quoted), pt)(quoteContext).withSpan(tree.span)
0 commit comments