Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 530787

Summary: Block scoping for const expressions computes wrong block scope
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 17.0   
Target Milestone: 18.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Michael Rennie CLA 2018-02-06 10:12:40 EST
Consider the following example:

function func() {
	if(true) {}
	const myconst = "hello";
}

If you select 'myconst' it will not be flagged for occurrences. If you comment out the preceding if statement, it is marked as expected.

I'm guessing we are not properly clearing the block stack.