mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
14 lines
202 B
Kotlin
14 lines
202 B
Kotlin
// !CHECK_TYPE
|
|
|
|
import kotlin.reflect.KMemberFunction0
|
|
|
|
class A<T>(val t: T) {
|
|
fun foo(): T = t
|
|
}
|
|
|
|
fun bar() {
|
|
val x = A<String>::foo
|
|
|
|
checkSubtype<KMemberFunction0<A<String>, String>>(x)
|
|
}
|