https://kotlinlang.org logo
p

parth

09/01/2020, 10:52 PM
specifically:
Copy code
Class 'FilterOptions' is not abstract and does not implement abstract member public abstract fun describeContents(): Int defined in android.os.Parcelable
but in the generated code…
Copy code
public FilterOptions(@Nullable String keyword) {
      this.keyword = keyword;
   }

   public int describeContents() {
      return 0;
   }
what gives?
r

Rohan Pambhar

09/02/2020, 9:48 AM
You can only annotate
@Parcelize
as follow-
Copy code
@Parcelize
data class MyModel(val vFirstName: String?, val iAge: Int) : Parcelable
I am not sure, but AFAIK it is the only way to use
@Parcelize
annotation. Correct me if I am wrong after testing this. 🙂
p

parth

09/02/2020, 2:37 PM
yup, that’s how I was using it. My code snippet was the generated code proving that I was using the annotation correctly 🙂
a

Alexey Belkov [JB]

09/07/2020, 12:50 PM
Does it work in Kotlin 1.3.72? If yes, then this is probably a Kotlin regression. Can you please file an issue at http://kotl.in/issue with a sample project to reproduce the bug.
👍🏾 1
13 Views