-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Code fix for accidental calls to get-accessors #38749
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
Code fix for accidental calls to get-accessors #38749
Conversation
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.
🥇
2570825
to
7b9d7f0
Compare
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 once the whitespace in diagnosticMessages.json is back to normal.
src/compiler/diagnosticMessages.json
Outdated
"category": "Error", | ||
"code": 2422 | ||
}, | ||
"Class '{0}' defines instan |
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 like whitespace changed in this file. Can you undo that change please?
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.
That seems like a recurring problem, at least for me. I fixed this merge conflict through the GitHub UI and this is what I got. Do you know why this might be happening? (Windows line endings for example?) I wonder if there's a way it can be resolved on master such that it stops happening.
In the meantime, I'll fix it on this branch shortly...
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.
What editor do you use? Do you have prettier or other formatting configured? The linux+emacs and macos+code people don't have this problem as far as I'm aware, although it does have Windows line endings.
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.
Hm, I guess it's possible that the problem only happens in the GitHub merge UI. I didn't keep careful track of when it happened and when it didn't. Anyway, fixed now :)
Backlog bug: #24554
This is a follow-up to #37800 which adds a code fix associated with the new error message.
cc @sandersn for review :)
The cleanest way I found to implement this was updating the parser to keep references to the open/close paren tokens. Unfortunately I wasn't able to make forEachChild handle these properly, (see commit history in this branch) so I just skip these nodes. Let me know if there's a better way!