Zac Sweers
04/16/2024, 5:29 PMScreen 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)Zac Sweers
04/16/2024, 5:33 PMAndroidScreen, happens with just this too
@Parcelize
actual data class OpenUrlScreen actual constructor(actual val url: String) : Screendmitriy.novozhilov
04/17/2024, 6:22 AMZac Sweers
04/17/2024, 5:54 PM