-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
any jsdoc tag after @callback causes debug assert #48327
Comments
Maybe because TypeScript doesn't support
|
During editing, before requesting quickinfo, I get which is in IncrementalParser.updateSourceFile:
The failure during quickinfo is on the line in addSyntheticNodes: |
I haven't got a working test case, but I'm pretty sure the problem is the way that Edit: At least, modifying parseCallbackTag to always treat a final tag as a return tag does avoid the crash. |
My test case fails with yet another assert in incremental parsing, in a pair of assertions that an element's new span is still contained by its parent's span. Now that I have something that's easy to debug, I should be able to come up with a fix.
|
My hypothesis was almost right. The problem is that every node after Parsing tag comments in the middle of the tag was always a bit hacky... |
Does this issue occur when all extensions are disabled?: Yes
While writing javascript, intellisense and syntax highlighting seemingly kept freezing up or displaying incorrectly, which I found quite odd. It would go back to normal if I closed and reopened the file, but would happen again later.
Following that, I realized it happens whenever I edited a jsdoc comment in a specific way, and recorded gifs: Stable and Insiders, with extensions disabled and no extensions installed, respectively.
Though the above gifs were recorded on real code, with some minor trimming out code I've produced this gist which replicates it in the same manner as the gifs.
It seems to be caused by the
@this {ListenerBlock}
tag on line 11 in the gist, as it stops happening when that line isn't present. I also tried@this ListenerBlock
in the same spot, which causes it to happen as well.I don't know whether or not if it's valid jsdoc to use the
@this
tag in this way to document a function's this value, but it seems reasonable reading it's documentation. Though I now suspect this is invalid syntax, I've still reported the issue as I would personally expect invalid syntax inside comments to be disregarded/ignored, rather than cause problems.Steps to Reproduce:
@this {ListenerBlock}
jsdoc tag causes it to stop happening.@this ListenerBlock
back to the jsdoc comment documenting the callback also causes the syntax highlighting and intellisense to stop working properly.The text was updated successfully, but these errors were encountered: