import kotlinx.serialization.Serializable
@Serializable
sealed class Exercise(open val id: String) {
@Serializable
data class Theory(override val id: String) : Exercise(id)
}
I have such kind of sealed class in my code, and compiler says me:
Serializable class has duplicate serial name of property 'id', either in the class itself or its supertypes
.
Is there way to have open val in serializable sealed class, which works correctly when overriding it?