Inherit KProperty interfaces from function types
To be able to write the following: listOfStrings.map(String::length)
This commit is contained in:
+7
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user