ursus
07/10/2019, 1:31 AMHullaballoonatic
07/10/2019, 2:46 AMfun Foo.copy() = when(this) {
is Bar -> copy()
is Quax -> copy()
}
that'd certainly work, since this
would be smartcast to the data classes, which themselves have a copy method already.
i'm not sure if there's a less verbose way of accomplishing it, though.ursus
07/10/2019, 3:30 AMursus
07/10/2019, 3:30 AMepabst
07/10/2019, 4:54 AM