aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 7cc35387e..663e24415 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -393,7 +393,8 @@ trait Applications extends Compatibility{ self: Typer =>
def makeVarArg(n: Int, elemFormal: Type): Unit = {
val args = typedArgBuf.takeRight(n).toList
typedArgBuf.trimEnd(n)
- typedArgBuf += SeqLiteral(TypeTree(elemFormal), args)
+ val seqType = if (methodType.isJava) defn.ArrayType else defn.SeqType
+ typedArgBuf += tpd.SeqLiteral(seqType.appliedTo(elemFormal :: Nil), args)
}
def fail(msg: => String, arg: Tree[T]) = {