If I have a KProperty of `KProperty<Type, Field...
# announcements
h
If I have a KProperty of
KProperty<Type, Field>
, is it possible for me to get the specified field of
Type
? so like if we have
Copy code
data class Foo(bar: String)

fun main() {
  val foo = Foo("baz")
  val whatWeWant = Foo::bar
  println(foo.(whatWeWant)) // prints baz. unknown syntax
}
c
whatWeWant.getter.call(foo)
h
Thanks! 😄
👍 1