Files
kotlin-fork/compiler/testData/codegen/boxWithStdlib/reflection/properties/fakeOverridesInSubclass.kt
T
Alexander Udalov da209e673c Implement KClass.getProperties()
#KT-6570 In Progress
2015-03-11 16:42:37 +03:00

13 lines
299 B
Kotlin

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()
}