parseVarDeclarationList will turn its last identifier into a pattern if it's not already a pattern node.
But, when doing so, it will pass in the token right after the identifier, not the token corresponding to the identifier.
Created attachment 246069 [details]
will upload with changelog later tonight
Do you have a test case showing this problem so we can avoid hitting it in the future?
(In reply to comment #2)
> Do you have a test case showing this problem so we can avoid hitting it in
> the future?
Not directly for asserting the token is at a given location, but the tests I will include when I land:
will fail if we break the token location. That said, this breakage is dependent on the Type Profiler's internal organization of data using text ranges. This is unlikely to change, but there is no guarantee.
Is there a more direct way to assert against the token location of given statement in a JS test?
Comment on attachment 246069 [details]
Bug fix looks good. Needs a change log and a test case.
Created attachment 246316 [details]