8d9618348d
Delete the old ones in package kotlin.reflect.jvm because otherwise the code using those functions will become red in a lot less meaningful way (overload resolution ambiguity) than if they're deleted (unresolved import) Based on the work originally done by @dnpetrov #KT-8380 Fixed
16 lines
417 B
Kotlin
Vendored
16 lines
417 B
Kotlin
Vendored
import kotlin.reflect.*
|
|
import kotlin.test.*
|
|
|
|
open class Super(val r: String)
|
|
|
|
class Sub(r: String) : Super(r)
|
|
|
|
fun box(): String {
|
|
val props = javaClass<Sub>().kotlin.declaredMemberProperties
|
|
if (!props.isEmpty()) return "Fail $props"
|
|
|
|
val allProps = javaClass<Sub>().kotlin.memberProperties
|
|
assertEquals(listOf("r"), allProps.map { it.name })
|
|
return allProps.single().get(Sub("OK")) as String
|
|
}
|