Files
kotlin/compiler/testData/codegen/boxWithStdlib/reflection/properties/invokeKProperty.kt
Alexander Udalov dc84445e2e Inherit KProperty interfaces from function types
To be able to write the following: listOfStrings.map(String::length)
2015-12-16 19:48:28 +03:00

8 lines
178 B
Kotlin
Vendored

import kotlin.reflect.declaredMemberProperties
class A(val foo: String)
fun box(): String {
return (A::class.declaredMemberProperties.single()).invoke(A("OK")) as String
}