Files
kotlin-fork/compiler/testData/codegen/box/reflection/call/fakeOverrideSubstituted.kt
T
2023-06-07 14:59:38 +00:00

14 lines
244 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_REFLECT
open class A<T>(val t: T) {
fun foo() = t
}
class B(s: String) : A<String>(s)
fun box(): String {
val foo = B::class.members.single { it.name == "foo" }
return foo.call(B("OK")) as String
}