Bug 527557

Summary: Changing ecmaVersion does not invalidate cached ASTs
Product: [ECD] Orion (Archived) Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Project Inbox <orion.client-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 Keywords: triaged
Version: 16.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

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)