Files
kotlin/compiler/testData/codegen/boxWithStdlib/reflection/properties/genericClassLiteralPropertyReceiverIsStar.kt
Alexander Udalov 8f0885ca03 Rename KClass.properties and extensionProperties: prepend 'member'
To better emphasize the fact that all returned properties require an instance
of the class they are declared in. Another issue was that
'Some::class.extensionProperties' was sometimes incorrectly perceived as
"get all extension properties available on the class Some"
2015-07-29 21:36:47 +03:00

11 lines
193 B
Kotlin
Vendored

import kotlin.reflect.*
class A<T> {
val result = "OK"
}
fun box(): String {
val k: KProperty1<A<*>, *> = A::class.memberProperties.single()
return k.get(A<String>()) as String
}