Additional tests on reflection calls

This commit is contained in:
Alexander Udalov
2015-08-07 17:29:02 +03:00
parent ccb58d8601
commit 7dcb690254
7 changed files with 82 additions and 0 deletions
@@ -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
}