leandro
08/14/2019, 1:27 PM@Serializable
open class Foo(open val foo: String)
@Serializable
data class Bar(override val foo: String, val bar: String) : Foo(foo)
The compiler is pointing on Bar
that I have foo
declared twice (has duplicate serial name of property foo, either in it or its parents
). I could not find this scenario on the polymorphism doc. Does anyone know how to get around this?Fudge
08/14/2019, 11:35 PMFoo
abstract:
@Serializable
abstract class Foo {
abstract val foo : String
}
@Serializable
data class Bar(override val foo: String, val bar: String) : Foo()
Fudge
08/14/2019, 11:42 PMFoo
to not be abstract I dont know. Not being able to override concrete vals is probably not intended, and could be grounds for an issue.leandro
08/15/2019, 9:03 AMFoo
too. This is a sample of a problem, but the real class has about 12 properties that I’d have to repeat on `Bar`` 😕