Support KClass.functions and declaredFunctions

This commit is contained in:
Alexander Udalov
2015-07-08 03:59:35 +03:00
parent 50dbda1e1a
commit da5cffdb60
7 changed files with 105 additions and 9 deletions
@@ -5,9 +5,16 @@ class A {
var String.id: String
get() = this
set(value) {}
fun Int.foo(): Double = toDouble()
}
fun box(): String {
val p = javaClass<A>().kotlin.extensionProperties.single()
return if ("$p" == "var A.(kotlin.String.)id") "OK" else "Fail $p"
val q = javaClass<A>().kotlin.declaredFunctions.single()
if ("$q" != "fun A.(kotlin.Int.)foo(): kotlin.Double") return "Fail q $q"
return "OK"
}