whenever I try to call a top level function in an imported script, I get:
error: backend Internal error: Exception during code generation
File being compiled: /home/elect/IdeaProjects/incubator/scijava/scijava-function/templates/main/java/org/scijava/function/Computers.main.kts
The root cause java.lang.RuntimeException was thrown at: org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:50) (Computers.main.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during code generation
File being compiled: /home/elect/IdeaProjects/incubator/scijava/scijava-function/templates/main/java/org/scijava/function/Computers.main.kts
The root cause java.lang.RuntimeException was thrown at: org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:50)
elect
11/05/2021, 12:22 AM
embedding them into an
object
compiles fine
r
rnett
11/05/2021, 1:59 AM
Looks like a compiler bug, you should make a youtrack issue
n
nfrankel
11/07/2021, 8:19 AM
what kotlin version do you have?
i seem to remember i had something similar happened when i upgraded to 1.5
downgrading to 1.4 solved the issue