https://kotlinlang.org logo
c

carlos cdmp

04/18/2020, 6:30 PM
Hello, is there any elegant way to define a sealed class of data classes with common vals?
a

Adam Powell

04/18/2020, 6:34 PM
You can declare the common vals as abstract in the sealed class and then declare them as override in the data class constructor params
4
👍🏻 2
2 Views