Kotlin/kotlin-examples

Parcelize can't serialize the parent class field

chenfei0928 opened this issue · 1 comments

I use Parcelize to serialize a data class, the class is extend a open class, this open class has some field, but Parcelize can't serialize the field of the open class.

For example:

@Parcelize
open class OpenClass(
    var id: Int=0
) : Parcelable

@Parcelize
data class ChildClass(
    var name: String
) : OpenClass(0), Parcelable

The Subclasses do not serialize the fields from the parent class.

I'm sorry for my wrong issue submit, I will submit it to youtrack
It is not the example issue