i want a `class AA` with a property `x: Int` and ...
# serialization
l
i want a
class AA
with a property
x: Int
and a
class BB
with properties
x: Int
and
y: Int
where
BB
inherits from
AA
(alternative: inner class would be ok too in case thats the only option) i've tried the snippets below, but no success so far. i checked the guide but couldnt find what i need. how do i make this work?
i found this solution, but it isn't perfect as i cant do
val x: AA = BB(1,2)
. is this there a better way ?
a
open class AA(open val x: Int) class BB(override val x: Int, val y: Int): AA(x)
l
that is exactly my 2nd snippet...