-
Notifications
You must be signed in to change notification settings - Fork 12.8k
TypeScript gets into bad editing state with async arrow functions #37522
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
Comments
First time I can see this behavior is |
https://github.com/microsoft/TypeScript/pulls?q=is%3Apr+closed%3A2019-12-17..2019-12-19+is%3Aclosed might be (?) a reasonable filter to figure out what started this. |
I'm not 100% sure, but I'm fairly certain this is caused by #35731. It's one of the only parser changes, and switches a lot of parsing checks on arrow functions to check the modifier list instead of |
I am interested in incremental parsing and have a vague high-level familiarity with the algorithm, so if @sandersn runs out of time, wants a hand, or just wants to pawn this one off, I’d be happy to take a look. |
I'm very likely to be out of time for this release, and I'm not familiar with the algorithm. So I'll give it to you, @andrewbranch I remember that PR was the second attempt, after @PranavSenthilnathan and I abandoned the first attempt as "probably a bad idea". It might still be a bad idea! |
@DanielRosenwasser I can’t reproduce this in VS Code with 3.8.0-dev.20191219, 3.8.3, or current master, or in the playground. Are there any other tricks to get this to happen? |
@DanielRosenwasser are you still able to reproduce this? |
No one can reproduce this so I’m going to close... 😬 |
This seems to be an issue with 3.8 and newer. 3.7.5 doesn't exhibit this behavior.
There's a couple of ways to observe this. First, try writing out the following code character-by-character.
You'll get
Alternatively, paste the full example into a buffer. Then erase the
c
inasync
.Give it a second, then add it back. TypeScript doesn't seem to refresh its semantic diagnostics for some reason.
You'll get
The text was updated successfully, but these errors were encountered: