https://kotlinlang.org logo
#compiler
Title
# compiler
n

natario1

08/21/2022, 8:45 AM
Compiler plugin question - what does this error mean?
Copy code
e: java.lang.UnsupportedOperationException: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:my.sample.ProblematicCallbackImpl
        at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor$TopLevelCodeContext.unsupported(IrToBitcode.kt:253)
I identified the offending code (
irGet(thisClass.thisReceiver!!)
) but not a solution. I’m using the receiver to call a superclass function. I tried using
superClass.thisReceiver!!
instead, but that creates a different error.
i

Iaroslav Postovalov

08/21/2022, 8:03 PM
On what phase do you add such code? AFAIK, Kotlin/Native IR lowering replaces getting
thisReceiver
with getting a normal variable.
n

natario1

08/21/2022, 9:06 PM
In IrGenerationExtension, before lowerings I suppose. I "solved" it by getting the receiver from elsewhere (the function being called) but I'd like to understand what's happening, K/N errors are quite hard to decode
6 Views