https://kotlinlang.org logo
#getting-started
Title
# getting-started
p

poohbar

07/16/2020, 8:19 PM
any clue why does this not compile?
Copy code
data class Customer(
    val id: String,
    val firstName: String,
    val lastName: String,
    val age: Int
)

val joe = Customer(
    "123",
    "Joe",
    "Smith",
    55
)

joe::class.declaredMemberProperties
    .map { it.name to it.get(joe)}