I have an expectation for
Parcelable
and
Parcelize
in my KMP module defined like so:
expect interface Parcelable
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
expect annotation class Parcelize()
and fulfilled on Android like so:
actual typealias Parcelable = android.os.Parcelable
actual typealias Parcelize = kotlinx.parcelize.Parcelize
This works well at runtime, however classes in the Android module that are themselves annotated with
kotlinx.parcelize.Parcelize
and have properties with types from the KMP module which are Parcelable/Parcelize cause an error to be shown in the IDE:
Type is not directly supported by 'Parcelize'. Annotate the parameter type with '@RawValue' if you want it to be serialized using 'writeValue()'
Does anyone know of a way to silence or suppress these errors? Or am I doing something wrong?