Czar06/21/2017, 11:33 AM
You probably see the problem:
data class CommonProperties(/*properties here*/) sealed class Device(val commonProperties: CommonProperties) data class Type1Device(commonProperties: CommonProperties, /*other properties*/): Device(commonProperties) //...
. Any suggestions on how to improve the design of my hierarchy?
Data class primary constructor must have only property (val / var) parameters
spand06/21/2017, 11:37 AM
on an interface ?
lupajz06/21/2017, 11:47 AM
in sealed class header would not work ? or maybe just use class instead of data
Czar06/21/2017, 11:57 AM
spand06/21/2017, 12:07 PM
lupajz06/21/2017, 12:13 PM
Czar06/21/2017, 12:14 PM
darkmoon_uk06/21/2017, 12:44 PM
in the way you've done, just use inheritance and put the properties in