8cdddbfd9d
There is one of checks left unimplemented (FirParcelizePropertyChecker.checkParcelableClassProperty) because it requires huge commonization of detecting which type can be serialized and which not, which is not prioritized job for now
21 lines
427 B
Kotlin
Vendored
21 lines
427 B
Kotlin
Vendored
package test
|
|
|
|
import kotlinx.parcelize.*
|
|
import android.os.*
|
|
|
|
class Box(val value: String)
|
|
|
|
@Parcelize
|
|
class Foo(val box: Box): Parcelable {
|
|
companion object : Parceler<Foo> {
|
|
override fun create(parcel: Parcel) = Foo(Box(parcel.readString()))
|
|
|
|
override fun Foo.write(parcel: Parcel, flags: Int) {
|
|
parcel.writeString(box.value)
|
|
}
|
|
}
|
|
}
|
|
|
|
@Parcelize
|
|
class Foo2(val box: Box): Parcelable
|