Assaf Shouval
04/13/2023, 7:45 PMsealed interface IA {
@Serializable
data class B(val b: Int) : IA
}
@Serializable
data class C(val ia: IA, val str:String)
why is C is Serializable if IA is not necessarily? is there a way to ensure that it won't be compiling?ephemient
04/13/2023, 7:49 PMInterfaces are implicitly polymorphic
ephemient
04/13/2023, 7:53 PM@Serializable sealed interface
but I'm not sure there's a way to prevent the implicit @Polymorphic ia: IA