Inherit KProperty interfaces from function types

To be able to write the following: listOfStrings.map(String::length)
This commit is contained in:
Alexander Udalov
2015-12-11 17:13:00 +03:00
parent f25f0db10e
commit dc84445e2e
14 changed files with 98 additions and 4 deletions
@@ -0,0 +1,7 @@
import kotlin.reflect.declaredMemberProperties
class A(val foo: String)
fun box(): String {
return (A::class.declaredMemberProperties.single()).invoke(A("OK")) as String
}