hi!
I ran into an interesting problem when using kotlinx serialization. I have an enum class in one file and a data class that serializes that enum class in another file (along with other fields) and i get an error during the build stage:
Symbol with IrConstructorSymbolImpl is unbound
I was wondering why this was the case as it worked before when the enum was in the same file as the data class and i found something interesting (will post text snippets in thread).
If the enum class’s definition is commented out
including an
@OptIn(ExperimentalSerializationApi::class)
(since I am using the
@JsonNames
annotation as well) in the same file as the data class, then the error does not appear. However, if I remove the
@OptIn(ExperimentalSerializationApi::class)
annotation, the error returns.
I have two questions
1. Why must the enum’s definition be in the same file as the data class?
2. Why does commenting out the whole definition in the same file cause the error to go away?
Thanks for any clarification and help in advance!