-
Notifications
You must be signed in to change notification settings - Fork 260
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
NullPointerException fixed in Parser #1683
Conversation
Source/Dafny/Dafny.atg
Outdated
) | ||
{ Attribute<ref attrs> } (. r.Attributes = attrs; .) | ||
{ Attribute<ref attrs> } (. if(r != null) { r.Attributes = attrs; } .) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that this can lead to some portion of the source code being silently ignored? And, if so, can we detect it and emit a useful error message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know to what extent it will ignore portions of the source code, because before it would actually crash. The new behavior is thus strictly better than the previous one, but again I can't guarantee the absence of null pointer exceptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to improve the language server's stability.
I only request to change the way you log the exception.
Did you forget to push your last changes? I don't see any difference. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes all three problems of #1682
I'd prefer having separate PRs for issues that can solved separately. I know this PR is small, but having the DafnyLangParser
change in a separate PR would for example make it easier to see whether there's a test change for this functional change.
Indeed, I must have been distracted or the push failed and I did not check it. |
Here you are: |
This PR fixes one problem of #1682
I added a tests to ensure does not happen again for this particular case
#1694 fixes the two other problems