https://kotlinlang.org logo
Title
j

jossiwolf

03/09/2020, 11:10 AM
I'm trying to parcelize an inline class but I'm getting a runtime crash
java.lang.NoClassDefFoundError: Failed resolution of: LpackaageName/DealershipId$Creator;
@Parcelize
inline class DealershipId(val value: String): Parcelable
Did anybody encounter this? Kotlin 1.3.70, but wasn't working on 1.3.61 either
l

louiscad

03/09/2020, 11:46 AM
inline classes are experimental. I don't think using them in conjunction with
@Parcelize
is supported for now. Here's my suggestion: Ask for that feature on kotl.in/issue and in another issue that you link, request that an error is shown at compile time or at least in the IDE when trying to use them together while this isn't supported.
j

jossiwolf

03/09/2020, 11:54 AM
Thanks!
l

louiscad

03/09/2020, 1:13 PM
Once you have created the issue, please link it here 🙂
👍 1
j

jossiwolf

03/10/2020, 10:51 AM
@louiscad I decided to create a bug issue first and wait for the response, based on that I can follow up with a feature request or suggest adding a compile time check for this. https://youtrack.jetbrains.com/issue/KT-37384?project=kt
👍 1
l

louiscad

03/10/2020, 10:52 AM
Perfect @jossiwolf!
j

jossiwolf

03/10/2020, 10:53 AM
Thanks for the help 🙂