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

Parser NPE on dangling comma in Vector literal #5691

Closed
radeusgd opened this issue Feb 18, 2023 · 0 comments · Fixed by #5776
Closed

Parser NPE on dangling comma in Vector literal #5691

radeusgd opened this issue Feb 18, 2023 · 0 comments · Fixed by #5776
Assignees

Comments

@radeusgd
Copy link
Member

radeusgd commented Feb 18, 2023

What issue are you facing?

Run the following program:

main =
    x = ["a", ]
    IO.println x

Expected behaviour

I would expect to get a syntax error message, showing me the location where I added a malformed vector literal.

Instead, I'm getting:

Execution finished with an error: java.lang.NullPointerException

I'm not sure, but I suspect this issue may potentially also affect GUI stability - as the kind of problematic form [x, ] is often a partial result when adding new elements to a vector when editing a node. So if that goes to the parser and crashes it with NPE, it may be one of the reasons of the engine dying. This is just a hypothesis though. Regardless, it is a bug that is making user mistakes hard to debug.

Enso Version

latest develop + non-parser related changes to stdlib

@radeusgd radeusgd added --bug Type: bug triage labels Feb 18, 2023
@JaroslavTulach JaroslavTulach added this to the Beta Release milestone Feb 20, 2023
@JaroslavTulach JaroslavTulach moved this from ❓New to 📤 Backlog in Issues Board Feb 24, 2023
@JaroslavTulach JaroslavTulach linked a pull request Feb 28, 2023 that will close this issue
2 tasks
@JaroslavTulach JaroslavTulach moved this from 📤 Backlog to 🔧 Implementation in Issues Board Feb 28, 2023
@mergify mergify bot closed this as completed in #5776 Feb 28, 2023
mergify bot pushed a commit that referenced this issue Feb 28, 2023
@github-project-automation github-project-automation bot moved this from 🔧 Implementation to 🟢 Accepted in Issues Board Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants