Another odd one I'm finding in testing
•
Screen
is an expect/actual interface that, on
androidMain
, extends android's
Parcelable
interface
•
AndroidScreen
is a regular interface in an android library project that extends
Screen
•
OpenUrlScreen
is an
actual
class in
androidMain
that implements both and leverages the
@Parcelize
plugin
@Parcelize
actual data class OpenUrlScreen actual constructor(actual val url: String) : Screen, AndroidScreen
At a glance, it
seems that the parcelize plugin is generating bytecode that doesn't name the parameter, and because it doesn't match what Kotlin expects from the metadata (which indicates they're a named param), it falls over. However, the original declaration is in java, so why would it matter?
public void writeToParcel(@NonNull Parcel dest, @WriteFlags int flags);
Let me know if I should file a bug for this (and where, as I know Google maintains this plugin but I'm not sure if this is bug with the compiler or parcelize)