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

[TypeScript] Non-null assertion is not an accessor #3893

Merged

Conversation

Thom1729
Copy link
Collaborator

Fix #3890.

I figured out what I was thinking. I added the ! postfix operator to dot_accessor because it kept things like function call detection working without further alteration. This PR tweaks a few contexts to make everything work without wrongly marking the ! in !. as an accessor.

I also changed a few contexts to use literal ?. instead of the dot_accessor variable when just a dot wouldn't be valid anyway. And I moved the ! postfix operator to left-expression-end. I have to imagine that having it in expression-end instead might have caused some subtle bugs, but I'm not sufficiently motivated to track those down (if indeed they ever existed).

@deathaxe deathaxe merged commit ba620ca into sublimehq:master Dec 16, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TypeScript] !. is incorrectly scoped as punctuation.accessor
4 participants