2f3293f99e
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
16 lines
377 B
Kotlin
Vendored
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)
|
|
}
|