Additional tests on reflection calls
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user