Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/compiler/scala/tools/nsc/transform/UnCurry.scala
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ abstract class UnCurry extends InfoTransform
args.take(formals.length - 1) :+ (suffix setType formals.last)
}

val args1 = if (isVarArgTypes(formals)) transformVarargs(formals.last.typeArgs.head) else args
val args1 = if (isVarArgTypes(formals)) transformVarargs(formals.last.typeArgs.head.widen) else args

map2(formals, args1) { (formal, arg) =>
if (!isByNameParamType(formal))
Expand Down
1 change: 1 addition & 0 deletions test/files/run/literal-type-varargs.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Xexperimental
4 changes: 4 additions & 0 deletions test/files/run/literal-type-varargs.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
object Test extends App {
val x = List.apply[1](1)
assert(x == List(1))
}