I'm emitting an `IrTypeOperatorCallImpl` instructi...
# compiler
n
I'm emitting an
IrTypeOperatorCallImpl
instruction with an
operator = IMPLICIT_NOTNULL
This works fine on JVM platform, however for K/N it throws
Copy code
e: kotlin.NotImplementedError: An operation is not implemented: TYPE_OP type=MyClassFoo origin=IMPLICIT_NOTNULL typeOperand=MyClassFoo
	at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateTypeOperator(IrToBitcode.kt:1351)
Browsing K/N repo I found that indeed this is not supported
TODO(ir2string(value))
is this a known issue? is there a work around this? https://github.com/JetBrains/kotlin-native/blob/master/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt#L1353
s
is this a known issue?
This is not an issue at all, because the compiler doesn’t generate these operations for Kotlin code. IIRC, they are specific to Java interoperability, so are JVM-specific.
is there a work around this?
Yes. Avoiding generating JVM-specific operations for Native backend should help.
n
Thanks for clarifying 👍