var (name, email) = orderObj.copy("B") println(...
# announcements
g
var (name, email) = orderObj.copy("B") println("You have ordered ${name} from ${email}") var (name, email) = orderObj println("But, your previous order was ${name} from ${email}")
s
Destructering into
var
(instead of a
val
) is currently not possible. But there is a feature request for this, and it is still 'open': https://youtrack.jetbrains.com/issue/KT-11362
g
thanks