Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.fir.kt
T
2023-01-31 08:39:43 +00:00

15 lines
422 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.<!INAPPLICABLE_CANDIDATE!>getValue<!>(null, ::<!UNSUPPORTED!>x<!>) // no exception after fix
<!UNRESOLVED_REFERENCE!>print<!>(<!UNINITIALIZED_VARIABLE!>a<!>)
}