Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/genericCallWithReferenceAgainstVararg.fir.kt
T
Kirill Rakhman d91000e39c [FIR] Report INAPPLICABLE_CANDIDATE or more specific diagnostic for callable references
... instead of just UNRESOLVED_REFERENCE when something went wrong
during resolution.

#KT-59401 related
2023-11-08 15:45:48 +00:00

17 lines
432 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(vararg ints: Int) {}
fun test(i: IntArray) {
myLet(i, ::foo)
myLet(::foo)
myLet<Int>(::<!INAPPLICABLE_CANDIDATE!>foo<!>)
myLet<IntArray>(::foo)
myLetExplicit1(::foo)
myLetExplicit2(::foo)
}
fun <T> myLet(t: T, block: (T) -> Unit) {}
fun <T> myLet(block: (T) -> Unit) {}
fun myLetExplicit1(block: (Int) -> Unit) {}
fun myLetExplicit2(block: (IntArray) -> Unit) {}