Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
JaroslavTulach opened this issue Sep 27, 2024 · 1 comment · Fixed by #11224
Closed

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

JaroslavTulach opened this issue Sep 27, 2024 · 1 comment · Fixed by #11224
Assignees

Comments

@JaroslavTulach
Copy link
Member

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 [email protected]/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)

@JaroslavTulach JaroslavTulach self-assigned this Oct 1, 2024
@JaroslavTulach JaroslavTulach moved this from 📤 Backlog to 👁️ Code review in Issues Board Oct 1, 2024
@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Oct 2, 2024
@enso-bot
Copy link

enso-bot bot commented Oct 3, 2024

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

Progress: .

Discord
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🟢 Accepted
Development

Successfully merging a pull request may close this issue.

1 participant