Files
kotlin-fork/compiler/testData/resolve/varargs/UnaryVsVararg.jet
T
Andrey Breslav 0f98c281ab KT-1781 Can't distinguish between two constructors
#KT-1781 Fixed

 Now, if foo() and foo(vararg bar) both match the call site, the first one is preferred
2012-04-16 16:14:08 +04:00

11 lines
213 B
Plaintext

~unary~fun foo1(a : Int) : String = "noarg"
~vararg~fun foo1(a : Int, vararg t : Int) : String = "vararg"
fun test1() {
`unary`foo1(1)
`vararg`foo1(1, 1)
val a = intArray()
`vararg`foo1(1, *a)
}