Files
kotlin-fork/plugins/parcelize/parcelize-compiler/testData/diagnostics/kt20062.fir.kt
T
Dmitriy Novozhilov 8cdddbfd9d [FIR] Implement checkers for FIR parcelize plugin
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
2021-11-23 15:01:31 +03:00

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