Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/property/genericClass.kt
T

18 lines
320 B
Kotlin
Vendored

// FIR_IDENTICAL
// !CHECK_TYPE
import kotlin.reflect.KProperty1
class A<T>(val t: T) {
val foo: T = t
}
fun bar() {
val x = A<String>::foo
checkSubtype<KProperty1<A<String>, String>>(x)
checkSubtype<KProperty1<A<String>, Any?>>(x)
val y = A<*>::foo
checkSubtype<KProperty1<A<*>, Any?>>(y)
}