Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.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

15 lines
393 B
Kotlin
Vendored

// Issue: KT-41729
import kotlin.reflect.KProperty
class Foo {
operator fun <T> getValue(thisRef: Any?, property: KProperty<*>) = 1
}
fun main(x: Int) {
val f = Foo()
val a: Int
<!VARIABLE_EXPECTED!><!UNRESOLVED_REFERENCE!>get<!>()<!> = f.getValue(null, ::<!UNSUPPORTED!>x<!>) // no exception after fix
<!UNRESOLVED_REFERENCE!>print<!>(<!UNINITIALIZED_VARIABLE!>a<!>)
}