Files
kotlin-fork/compiler/testData/codegen/boxWithStdlib/reflection/call/fakeOverrideSubstituted.kt
T
2015-08-24 01:29:58 +03:00

11 lines
204 B
Kotlin
Vendored

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
}