Nabil
11/18/2020, 10:22 AMIrTypeOperatorCallImpl
instruction with an operator = IMPLICIT_NOTNULL
This works fine on JVM platform, however for K/N it throws
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#L1353svyatoslav.scherbina
11/19/2020, 2:55 PMis 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.
Nabil
11/19/2020, 4:11 PM