Hello, is there any way to legitimately pass seria...
# serialization
t
Hello, is there any way to legitimately pass serializable parent constructor parameter from serializable child class with generated serializer?
Copy code
@Serializable
sealed class A(
    val foo: String
) {
    @Serializable
    class B(
        foo: String,
        val bar: String,
	) : A(foo)
}
Getting error "This class is not serializable automatically because it has primary constructor parameters that are not properties"
I'll go with:
Copy code
@Serializable
sealed class A {
	abstract val foo: String
    @Serializable
    class B(
        override val foo: String,
        val bar: String,
	) : A(foo)
}
For now.