Files
kotlin-fork/compiler/testData/resolve/varargs/NilaryVsVararg.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
192 B
Plaintext

~nilary~fun foo0() : String = "noarg"
~vararg~fun foo0(vararg t : Int) : String = "vararg"
fun test0() {
`nilary`foo0()
`vararg`foo0(1)
val a = intArray()
`vararg`foo0(*a)
}