File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -581,7 +581,7 @@ class Typer extends Namer
581581 if (untpd.isWildcardStarArg(tree)) {
582582 def typedWildcardStarArgExpr = {
583583 val ptArg =
584- if (ctx.mode.is(Mode .QuotedPattern )) pt.subst(defn. RepeatedParamClass :: Nil , defn. SeqType :: Nil )
584+ if (ctx.mode.is(Mode .QuotedPattern )) pt.underlyingIfRepeated(isJava = false )
585585 else WildcardType
586586 val tpdExpr = typedExpr(tree.expr, ptArg)
587587 tpdExpr.tpe.widenDealias match {
@@ -1969,7 +1969,9 @@ class Typer extends Namer
19691969 case Splice (pat) =>
19701970 try patternHole(tree)
19711971 finally {
1972- val pat1 = pat.subst(defn.RepeatedParamClass :: Nil , defn.SeqClass :: Nil )
1972+ val patType = pat.tpe.widen
1973+ val patType1 = patType.underlyingIfRepeated(isJava = false )
1974+ val pat1 = if (patType eq patType1) pat else pat.withType(patType1)
19731975 patBuf += pat1
19741976 }
19751977 case _ =>
You can’t perform that action at this time.
0 commit comments