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
581
581
if (untpd.isWildcardStarArg(tree)) {
582
582
def typedWildcardStarArgExpr = {
583
583
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 )
585
585
else WildcardType
586
586
val tpdExpr = typedExpr(tree.expr, ptArg)
587
587
tpdExpr.tpe.widenDealias match {
@@ -1969,7 +1969,9 @@ class Typer extends Namer
1969
1969
case Splice (pat) =>
1970
1970
try patternHole(tree)
1971
1971
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)
1973
1975
patBuf += pat1
1974
1976
}
1975
1977
case _ =>
You can’t perform that action at this time.
0 commit comments