diff --git a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala index 3b7fdc35b97d..6b24e3f3643c 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -173,6 +173,7 @@ trait TreeInfo[T >: Untyped <: Type] { self: Trees.Instance[T] => case Typed(Ident(nme.WILDCARD_STAR), _) => true case Typed(_, Ident(tpnme.WILDCARD_STAR)) => true case Typed(_, tpt: TypeTree) => tpt.hasType && tpt.tpe.isRepeatedParam + case NamedArg(_, arg) => isWildcardStarArg(arg) case _ => false } diff --git a/tests/pos/i3207.check b/tests/pos/i3207.check new file mode 100644 index 000000000000..9cd18c01426a --- /dev/null +++ b/tests/pos/i3207.check @@ -0,0 +1,2 @@ +WrappedArray() +WrappedArray(A, B) diff --git a/tests/pos/i3207.scala b/tests/pos/i3207.scala new file mode 100644 index 000000000000..267c39c11fe7 --- /dev/null +++ b/tests/pos/i3207.scala @@ -0,0 +1,6 @@ +object Test extends App { + def foo(ff: String*) = ff + def bar(bb: String*) = foo(ff = bb: _*) + println(bar()) + println(bar("A", "B")) +}