Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/unsupported/localVariableWithSubstitution.fir.kt
T

14 lines
341 B
Kotlin
Vendored

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