Hi, when building lately I get the following error...
# kotlin-native
g
Hi, when building lately I get the following error. It’s probably something we wrote because a few commits before we managed to build the .Framework just fine. Any idea?
a
Hello! This issue looks interesting, so I would like to ask for a code to reproduce it.
g
Sure, will try to isolate the problematic code and report back to you
@Artyom Degtyarev [JB] I discovered what triggers this crash: doing this inside a serializable class:
Copy code
@Serializable
class TransformerRule {
    @Serializer(forClass = TransformerRule::class)
    companion object : KSerializer<TransformerRule> {}
}
Doing it this way fixes the compiler crash:
Copy code
@Serializable
data class TransformerRule {
    @Serializer(forClass = TransformerRule::class)
    object TransformerRuleSerializer: KSerializer<TransformerRule> {}
}
👀 1
@Artyom Degtyarev [JB] Here it is as a ticket https://youtrack.jetbrains.com/issue/KT-32475