whenever I try to call a top level function in an ...
# scripting
e
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)
embedding them into an
object
compiles fine
r
Looks like a compiler bug, you should make a youtrack issue
n
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
e
1.5.21
EAP is stuck on that