File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -420,10 +420,15 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
420
420
case _ => ifExpr
421
421
}
422
422
def ascription (tpt : Tree , isWildcard : Boolean ) = {
423
+ val underlyingTreeTpe =
424
+ if (isRepeatedParamType(tpt)) TypeTree (defn.SeqType .appliedTo(pt :: Nil ))
425
+ else tpt
426
+
423
427
val expr1 =
424
- if (isWildcard) tree.expr.withType(tpt.tpe)
428
+ if (isRepeatedParamType(tpt)) tree.expr.withType(defn.SeqType .appliedTo(pt :: Nil ))
429
+ else if (isWildcard) tree.expr.withType(tpt.tpe)
425
430
else typed(tree.expr, tpt.tpe.widenSkolem)
426
- assignType(cpy.Typed (tree)(expr1, tpt), tpt )
431
+ assignType(cpy.Typed (tree)(expr1, tpt), underlyingTreeTpe )
427
432
}
428
433
if (untpd.isWildcardStarArg(tree))
429
434
cases(
You can’t perform that action at this time.
0 commit comments