Fix crash when getting member completion for an object literal#853
Conversation
There was a problem hiding this comment.
It's not really clear what is going on for someone running into the code for the first time. I didn't figure it out until I read the assertion. Please add a quick comment.
There was a problem hiding this comment.
Is there a particular question you want answered? Basically, we start with a Fidelity node, and we have to find the corresponding AST node. @mhegazy said he is working on removing the Fidelity part, so that might make it clearer.
There was a problem hiding this comment.
Right, I just mean a quick comment explaining that we are trying to find corresponding AST nodes for fidelity nodes.
There was a problem hiding this comment.
actually I will just remove the check. it is a for loop after all. thanks.
|
👍 |
Fix crash when getting member completion for an object literal
The following code caused a crash:
This changes the find the relevant token at the beginning of getCompletionsAtPosition. This fixes the crash, but the following case still does not work:
This represents the next item to be done, which is making the type checker give us the right contextual type.