Files
kotlin-fork/compiler/testData/diagnostics/tests/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

9 lines
229 B
Plaintext

fun foo1(<!UNUSED_PARAMETER!>a<!> : Int) : String = "noarg"
fun foo1(<!UNUSED_PARAMETER!>a<!> : Int, vararg <!UNUSED_PARAMETER!>t<!> : Int) : String = "vararg"
fun test1() {
foo1(1)
val a = IntArray(0)
foo1(1, *a)
}