enso-org / enso

Hybrid visual and textual functional programming.
https://ensoanalytics.com
Apache License 2.0
7.36k stars 324 forks source link

NPE from compiler instead of syntax error on `@anno` #11201

Closed JaroslavTulach closed 2 weeks ago

JaroslavTulach commented 3 weeks ago

Create following program:

@anno
fn = 10

and execute it. The execution crashes with:

Caused by: org.graalvm.polyglot.PolyglotException: java.lang.NullPointerException: Cannot invoke "org.enso.compiler.core.ir.Expression.transformExpressions(scala.PartialFunction)" because "ir" is null
        at org.enso.runtime.compiler/org.enso.compiler.pass.desugar.SectionsToBinOp$.runExpression(SectionsToBinOp.scala:83)
        at org.enso.runtime.compiler/org.enso.compiler.pass.desugar.SectionsToBinOp$.$anonfun$runModule$1(SectionsToBinOp.scala:57)
        at org.enso.runtime.parser/org.enso.compiler.core.ir.Name$GenericAnnotation.mapExpressions(Name.scala:749)
        at org.enso.runtime.parser/org.enso.compiler.core.ir.Name$GenericAnnotation.mapExpressions(Name.scala:681)
        at org.enso.runtime.parser/org.enso.compiler.core.ir.Module.$anonfun$mapExpressions$3(Module.scala:144)
        at scala.library@2.13.11/scala.collection.immutable.List.map(List.scala:246)
        at org.enso.runtime.parser/org.enso.compiler.core.ir.Module.mapExpressions(Module.scala:144)
        at org.enso.runtime.compiler/org.enso.compiler.pass.desugar.SectionsToBinOp$.runModule(SectionsToBinOp.scala:55)
        at org.enso.runtime.compiler/org.enso.compiler.pass.PassManager.$anonfun$runPassesOnModule$2(PassManager.scala:101)
enso-bot[bot] commented 2 weeks ago

Jaroslav Tulach reports a new STANDUP for yesterday (2024-10-02):

Progress: .

Discord
Discord - Group Chat That’s All Fun & Games
Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.