Is it possible, that `@Contextual` does not work w...
# serialization
b
Is it possible, that
@Contextual
does not work with IR compiler and generic classes or do I something wrong? Here is a minmal example: https://gitlab.com/benkuly/trixnity/-/blob/ir-compiler-issues/trixnity-core/src/co[…]in/kotlin/net/folivo/trixnity/core/model/events/UnsignedData.kt
e
what happens if you move
@Contextual
to the before
val
? instead of before type
d
Contextual and generics don't exactly play nice, but it should still work.
How does it not work?
b
Moving it before
val
does not change anything. I get
java.lang.IllegalStateException: Not found Idx for public net.folivo.trixnity.core.model.events/Event|null[0]
It works fine with JVM and JS(legacy), but not with IR (js, native).
d
Haha, JVM switched to IR compiler. I'm guessing javascript will follow suit soon.
I'm surprised they haven't fixed this yet.
b
Yeah, but in 1.5.21 it works and as far as I know IR is the default as well for that version.
d
Ah true.