Bug 527557 - Changing ecmaVersion does not invalidate cached ASTs
Summary: Changing ecmaVersion does not invalidate cached ASTs
Status: ASSIGNED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: JS Tools (show other bugs)
Version: 16.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-11-21 10:05 EST by Michael Rennie CLA
Modified: 2018-05-15 15:31 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2017-11-21 10:05:18 EST
While looking at bug 527300, I created a project with a set ecmaVersion of '5'. I then loaded the example snippet from that bug, hovered around the file, then changed the ecmaVersion to '6'. This change did not allow the command to work on the ECMA 6 nodes (ClassDeclaration, MethodDefinition, etc) because the cached AST was still the ECMA 5 one.
Comment 1 Michael Rennie CLA 2018-01-31 09:33:27 EST
The key to reproducing this bug is to interact with the original source file in a way that does NOT cause it to be re-parsed. One way to do this is to only hover over stuff (hover computations never cause a re-parse)