Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/resolve/resolveCallableReferencesAfterAllSimpleArguments.fir.kt
T

16 lines
408 B
Kotlin
Vendored

// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface A
interface B
fun fooB(b: B) {}
fun <T> bar(f: (T) -> Unit, e: T) {}
fun <T> baz(e: T, f: (T) -> Unit) {}
fun test(a: A, b: B) {
// Note that diagnostic is always on callable references as they are resolved after simple arguments
<!INAPPLICABLE_CANDIDATE!>baz<!>(a, ::fooB)
<!INAPPLICABLE_CANDIDATE!>bar<!>(::fooB, a)
}