Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/resolve/resolveCallableReferencesAfterAllSimpleArguments.fir.kt
T
Kirill Rakhman 2f3293f99e [FIR] Skip redundant INAPPLICABLE_CANDIDATE on call with unresolved callable reference argument
A new resolution diagnostic UnsuccessfulCallableReferenceAtom is
introduced that is used in EagerResolveOfCallableReferences.
No diagnostic is reported on unresolved calls with this diagnostic
because

#KT-59856
2023-07-20 07:29:18 +00:00

16 lines
377 B
Kotlin
Vendored

// !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
baz(a, ::<!UNRESOLVED_REFERENCE!>fooB<!>)
bar(::<!UNRESOLVED_REFERENCE!>fooB<!>, a)
}