Implement KClass.getProperties()

#KT-6570 In Progress
This commit is contained in:
Alexander Udalov
2015-02-20 19:40:47 +03:00
parent fdfd808d80
commit da209e673c
7 changed files with 125 additions and 1 deletions
@@ -0,0 +1,12 @@
import kotlin.reflect.jvm.*
import kotlin.test.*
open class Super(val r: String)
class Sub(r: String) : Super(r)
fun box(): String {
val props = javaClass<Sub>().kotlin.getProperties()
assertEquals(listOf("r"), props.map { it.name })
return props.single().get(Sub("OK")).toString()
}