question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@Contextual does not work with IR compiler

See original GitHub issue

Describe the bug I use @Contextual at many places in my multiplatform library. It works fine and all my unit tests are working with jvm und js(LEGACY), but not with js(IR) and native targets. I get the following stacktrace when building the project:

e: java.lang.IllegalStateException: Not found Idx for public net.folivo.trixnity.core.model.events/Event|null[0]
        at org.jetbrains.kotlin.backend.common.serialization.IrFileDeserializer.loadTopLevelDeclarationProto(IrFileDeserializer.kt:45)
        at org.jetbrains.kotlin.backend.common.serialization.IrFileDeserializer.deserializeDeclaration$ir_serialization_common(IrFileDeserializer.kt:36)
        at org.jetbrains.kotlin.backend.common.serialization.FileDeserializationState.deserializeAllFileReachableTopLevel(IrFileDeserializer.kt:127)
        at org.jetbrains.kotlin.backend.common.serialization.ModuleDeserializationState.deserializeReachableDeclarations(BasicIrModuleDeserializer.kt:163)
        at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.deserializeAllReachableTopLevels(KotlinIrLinker.kt:105)
        at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.findDeserializedDeclarationForSymbol(KotlinIrLinker.kt:124)
        at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.getDeclaration(KotlinIrLinker.kt:162)
        at org.jetbrains.kotlin.ir.util.ExternalDependenciesGeneratorKt.getDeclaration(ExternalDependenciesGenerator.kt:61)
        at org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator.generateUnboundSymbolsAsDependencies(ExternalDependenciesGenerator.kt:48)
        at org.jetbrains.kotlin.ir.backend.js.KlibKt.loadIr(klib.kt:288)
        at org.jetbrains.kotlin.ir.backend.js.CompilerKt.compile(compiler.kt:57)
        at org.jetbrains.kotlin.ir.backend.js.CompilerKt.compile$default(compiler.kt:36)
        at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:256)
        at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:182)
        at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:75)
        at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:90)
        at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
        at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
        at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1575)
        at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
        at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
        at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

To Reproduce Here is a minimal example from my code base.

Expected behavior @Contextual should work with IR compiler as it does without.

Environment

  • Kotlin version: 1.5.20
  • Library version: 1.2.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Dominaezzzcommented, Sep 6, 2021

I’m not using @Contextual either. I think this has to do with generics. @benkuly just happens to be using both.

1reaction
benkulycommented, Aug 25, 2021

With Kotlin 1.5.30 this does also affect the jvm target with the following exception. I also updated the example branch linked above.

org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: /home/benkuly/repos/trixnity/trixnity-core/src/commonMain/kotlin/net/folivo/trixnity/core/model/events/UnsignedData.kt
The root cause java.lang.RuntimeException was thrown at: org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:50)
	at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException(CodegenUtil.kt:239)
	at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException$default(CodegenUtil.kt:235)
	at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invokeSequential(performByIrFile.kt:68)
	at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:55)
	at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:41)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:29)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:29)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:43)
	at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.doGenerateFilesInternal(JvmIrCodegenFactory.kt:191)
	at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModule(JvmIrCodegenFactory.kt:60)
	at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:35)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:321)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:113)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:56)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:169)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:92)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:412)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:112)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:358)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally$default(IncrementalCompilerRunner.kt:300)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl$rebuild(IncrementalCompilerRunner.kt:119)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:170)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:81)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:607)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:96)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1658)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Exception while generating code for:
FUN name:write$Self visibility:public modality:FINAL <> (self:net.folivo.trixnity.core.model.events.UnsignedData, output:kotlinx.serialization.encoding.CompositeEncoder, serialDesc:kotlinx.serialization.descriptors.SerialDescriptor) returnType:kotlin.Unit
  annotations:
    JvmStatic
  VALUE_PARAMETER name:self index:0 type:net.folivo.trixnity.core.model.events.UnsignedData
  VALUE_PARAMETER name:output index:1 type:kotlinx.serialization.encoding.CompositeEncoder
  VALUE_PARAMETER name:serialDesc index:2 type:kotlinx.serialization.descriptors.SerialDescriptor
  BLOCK_BODY
    WHEN type=kotlin.Unit origin=null
      BRANCH
        if: WHEN type=kotlin.Boolean origin=null
          BRANCH
            if: CALL 'public open fun shouldEncodeElementDefault (descriptor: kotlinx.serialization.descriptors.SerialDescriptor, index: kotlin.Int): kotlin.Boolean declared in kotlinx.serialization.encoding.CompositeEncoder' type=kotlin.Boolean origin=null
              $this: GET_VAR 'output: kotlinx.serialization.encoding.CompositeEncoder declared in net.folivo.trixnity.core.model.events.UnsignedData.write$Self' type=kotlinx.serialization.encoding.CompositeEncoder origin=null
              descriptor: GET_VAR 'serialDesc: kotlinx.serialization.descriptors.SerialDescriptor declared in net.folivo.trixnity.core.model.events.UnsignedData.write$Self' type=kotlinx.serialization.descriptors.SerialDescriptor origin=null
              index: CONST Int type=kotlin.Int value=0
            then: CONST Boolean type=kotlin.Boolean value=true
          BRANCH
            if: CONST Boolean type=kotlin.Boolean value=true
            then: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
              $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
                arg0: BLOCK type=@[Contextual] net.folivo.trixnity.core.model.events.Event<*>? origin=null
                  GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:redactedBecause type:@[Contextual] net.folivo.trixnity.core.model.events.Event<*>? visibility:private [final]' type=@[Contextual] net.folivo.trixnity.core.model.events.Event<*>? origin=null
                    receiver: GET_VAR 'self: net.folivo.trixnity.core.model.events.UnsignedData declared in net.folivo.trixnity.core.model.events.UnsignedData.write$Self' type=net.folivo.trixnity.core.model.events.UnsignedData origin=null
                arg1: CONST Null type=kotlin.Nothing? value=null
        then: CALL 'public abstract fun encodeNullableSerializableElement <T> (descriptor: kotlinx.serialization.descriptors.SerialDescriptor, index: kotlin.Int, serializer: kotlinx.serialization.SerializationStrategy<T of kotlinx.serialization.encoding.CompositeEncoder.encodeNullableSerializableElement>, value: T of kotlinx.serialization.encoding.CompositeEncoder.encodeNullableSerializableElement?): kotlin.Unit declared in kotlinx.serialization.encoding.CompositeEncoder' type=kotlin.Unit origin=null
          <T>: @[Contextual] net.folivo.trixnity.core.model.events.Event<*>?
          $this: GET_VAR 'output: kotlinx.serialization.encoding.CompositeEncoder declared in net.folivo.trixnity.core.model.events.UnsignedData.write$Self' type=kotlinx.serialization.encoding.CompositeEncoder origin=null
          descriptor: GET_VAR 'serialDesc: kotlinx.serialization.descriptors.SerialDescriptor declared in net.folivo.trixnity.core.model.events.UnsignedData.write$Self' type=kotlinx.serialization.descriptors.SerialDescriptor origin=null
          index: CONST Int type=kotlin.Int value=0
          serializer: CONSTRUCTOR_CALL 'public constructor <init> (serializableClass: kotlin.reflect.KClass<T of kotlinx.serialization.ContextualSerializer>, fallbackSerializer: kotlinx.serialization.KSerializer<T of kotlinx.serialization.ContextualSerializer>?, typeArgumentsSerializers: kotlin.Array<kotlinx.serialization.KSerializer<*>>) [primary] declared in kotlinx.serialization.ContextualSerializer' type=kotlinx.serialization.ContextualSerializer<@[Contextual] net.folivo.trixnity.core.model.events.Event<*>?> origin=null
            <class: T>: @[Contextual] net.folivo.trixnity.core.model.events.Event<*>?
            serializableClass: CLASS_REFERENCE 'CLASS CLASS name:Event modality:SEALED visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<*>
            fallbackSerializer: CALL 'public final fun <get-nullable> <T> (): kotlinx.serialization.KSerializer<T of kotlinx.serialization.builtins.BuiltinSerializersKt.<get-nullable>?> declared in kotlinx.serialization.builtins.BuiltinSerializersKt' type=kotlinx.serialization.KSerializer<@[Contextual] net.folivo.trixnity.core.model.events.Event<*>?> origin=null
              <T>: @[Contextual] net.folivo.trixnity.core.model.events.Event<*>
              $receiver: CALL 'public final fun serializer <T0> (typeSerial0: kotlinx.serialization.KSerializer<T0 of net.folivo.trixnity.core.model.events.Event.Companion.serializer>): kotlinx.serialization.KSerializer<net.folivo.trixnity.core.model.events.Event<T0 of net.folivo.trixnity.core.model.events.Event.Companion.serializer>> declared in net.folivo.trixnity.core.model.events.Event.Companion' type=kotlinx.serialization.KSerializer<net.folivo.trixnity.core.model.events.Event<T0 of net.folivo.trixnity.core.model.events.Event.Companion.serializer>> origin=null
                <T0>: @[Contextual] net.folivo.trixnity.core.model.events.Event<*>?
                $this: GET_FIELD 'FIELD FIELD_FOR_OBJECT_INSTANCE name:Companion type:net.folivo.trixnity.core.model.events.Event.Companion visibility:public [final,static]' type=net.folivo.trixnity.core.model.events.Event.Companion origin=null
            typeArgumentsSerializers: BLOCK type=kotlin.Array<kotlinx.serialization.KSerializer<out @[Contextual] net.folivo.trixnity.core.model.events.Event<*>?>> origin=null
              VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Array<kotlinx.serialization.KSerializer<out @[Contextual] net.folivo.trixnity.core.model.events.Event<*>?>> [val]
                CALL 'public final fun arrayOfNulls <T> (size: kotlin.Int): kotlin.Array<T of kotlin.arrayOfNulls?> declared in kotlin' type=kotlin.Array<kotlinx.serialization.KSerializer<out @[Contextual] net.folivo.trixnity.core.model.events.Event<*>?>> origin=null
                  <T>: kotlinx.serialization.KSerializer<out @[Contextual] net.folivo.trixnity.core.model.events.Event<*>?>
                  size: CONST Int type=kotlin.Int value=1
              CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit [operator] declared in kotlin.Array' type=kotlin.Unit origin=null
                $this: GET_VAR 'val tmp0: kotlin.Array<kotlinx.serialization.KSerializer<out @[Contextual] net.folivo.trixnity.core.model.events.Event<*>?>> [val] declared in net.folivo.trixnity.core.model.events.UnsignedData.write$Self' type=kotlin.Array<kotlinx.serialization.KSerializer<out @[Contextual] net.folivo.trixnity.core.model.events.Event<*>?>> origin=null
                index: CONST Int type=kotlin.Int value=0
                value: CONSTRUCTOR_CALL 'public constructor <init> (baseClass: kotlin.reflect.KClass<T of kotlinx.serialization.PolymorphicSerializer>) [primary] declared in kotlinx.serialization.PolymorphicSerializer' type=kotlinx.serialization.PolymorphicSerializer<net.folivo.trixnity.core.model.events.EventContent> origin=null
                  <class: T>: net.folivo.trixnity.core.model.events.EventContent
                  baseClass: CLASS_REFERENCE 'CLASS INTERFACE name:EventContent modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<*>
              GET_VAR 'val tmp0: kotlin.Array<kotlinx.serialization.KSerializer<out @[Contextual] net.folivo.trixnity.core.model.events.Event<*>?>> [val] declared in net.folivo.trixnity.core.model.events.UnsignedData.write$Self' type=kotlin.Array<kotlinx.serialization.KSerializer<out @[Contextual] net.folivo.trixnity.core.model.events.Event<*>?>> origin=null
          value: BLOCK type=@[Contextual] net.folivo.trixnity.core.model.events.Event<*>? origin=null
            GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:redactedBecause type:@[Contextual] net.folivo.trixnity.core.model.events.Event<*>? visibility:private [final]' type=@[Contextual] net.folivo.trixnity.core.model.events.Event<*>? origin=null
              receiver: GET_VAR 'self: net.folivo.trixnity.core.model.events.UnsignedData declared in net.folivo.trixnity.core.model.events.UnsignedData.write$Self' type=net.folivo.trixnity.core.model.events.UnsignedData origin=null

	at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:50)
	at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate$default(FunctionCodegen.kt:43)
	at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generateMethodNode(ClassCodegen.kt:341)
	at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generateMethod(ClassCodegen.kt:358)
	at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generate(ClassCodegen.kt:130)
	at org.jetbrains.kotlin.backend.jvm.JvmLowerKt$codegenPhase$1$1.lower(JvmLower.kt:304)
	at org.jetbrains.kotlin.backend.common.phaser.FileLoweringPhaseAdapter.invoke(PhaseBuilders.kt:120)
	at org.jetbrains.kotlin.backend.common.phaser.FileLoweringPhaseAdapter.invoke(PhaseBuilders.kt:116)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invokeSequential(performByIrFile.kt:65)
	... 46 more
Caused by: java.lang.IllegalArgumentException: Null argument in ExpressionCodegen for parameter VALUE_PARAMETER name:typeSerial0 index:0 type:kotlinx.serialization.KSerializer<T0 of net.folivo.trixnity.core.model.events.Event.Companion.serializer>
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:478)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:134)
	at org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl.accept(IrCallImpl.kt:47)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.gen(ExpressionCodegen.kt:217)
	at org.jetbrains.kotlin.backend.jvm.codegen.IrCallGenerator$DefaultImpls.genValueAndPut(IrCallGenerator.kt:47)
	at org.jetbrains.kotlin.backend.jvm.codegen.IrCallGenerator$DefaultCallGenerator.genValueAndPut(IrCallGenerator.kt:50)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:471)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:134)
	at org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl.accept(IrCallImpl.kt:47)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.gen(ExpressionCodegen.kt:217)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.generateConstructorArguments(ExpressionCodegen.kt:605)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitConstructorCall(ExpressionCodegen.kt:593)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitConstructorCall(ExpressionCodegen.kt:134)
	at org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl.accept(IrConstructorCallImpl.kt:28)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.gen(ExpressionCodegen.kt:217)
	at org.jetbrains.kotlin.backend.jvm.codegen.IrCallGenerator$DefaultImpls.genValueAndPut(IrCallGenerator.kt:47)
	at org.jetbrains.kotlin.backend.jvm.codegen.IrCallGenerator$DefaultCallGenerator.genValueAndPut(IrCallGenerator.kt:50)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:479)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:134)
	at org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl.accept(IrCallImpl.kt:47)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitWhen(ExpressionCodegen.kt:980)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitWhen(ExpressionCodegen.kt:134)
	at org.jetbrains.kotlin.ir.expressions.IrWhen.accept(IrWhen.kt:29)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitStatementContainer(ExpressionCodegen.kt:435)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlockBody(ExpressionCodegen.kt:439)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlockBody(ExpressionCodegen.kt:134)
	at org.jetbrains.kotlin.ir.expressions.IrBlockBody.accept(IrBody.kt:54)
	at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.generate(ExpressionCodegen.kt:235)
	at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.doGenerate(FunctionCodegen.kt:122)
	at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:48)
	... 55 more
Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible that Contextual does not work with IR compile ...
Contextual and generics don't exactly play nice, but it should still work. ... Haha, JVM switched to IR compiler. I'm guessing javascript will...
Read more >
Internal compiler error: StackOverflow - ContextualSerializer ...
I've found the following works*. - It's mostly just a simplified copy of the implementation. (However, the descriptor cannot 'implement' ...
Read more >
Contextual receivers: Compiler error assigning contextual function to ...
When assigning a function to a val that has contextual receivers using ... I am not sure if the error is directly related...
Read more >
Contextual Compiler Pass Injection · Cassette
To resolve issues like these, we'll need to dig deeper than contextual dispatch and implement an actual compiler pass. First, let's go over...
Read more >
Design: Fortran IR — The Flang Compiler - LLVM releases
Pro: Straightforward implementation when control-flow is well-structured as the contextual state parallels the syntax of the language closely.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found