Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.kt
T
Dmitry Petrov 9ccb1fd506 KT-9601, KT-10103:
Chose maximally specific function in callable reference
 #KT-9601 Fixed
 #KT-10103 Fixed
2015-11-26 12:52:12 +03:00

17 lines
364 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
fun fun1() {}
fun fun1(x: Int) {}
val ref1 = ::<!OVERLOAD_RESOLUTION_AMBIGUITY!>fun1<!>
fun fun2(vararg x: Int) {}
fun fun2(x: Int) {}
val ref2 = ::<!OVERLOAD_RESOLUTION_AMBIGUITY!>fun2<!>
fun fun3(x0: Int, vararg xs: Int) {}
fun fun3(x0: String, vararg xs: String) {}
val ref3 = ::<!OVERLOAD_RESOLUTION_AMBIGUITY!>fun3<!>