| Summary: | [Occurrences] Does not mark occurrence that happens in a nested scope BEFORE the declaration | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Curtis Windatt <curtis.windatt.public> |
| Component: | JS Tools | Assignee: | Curtis Windatt <curtis.windatt.public> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 6.0 | ||
| Target Milestone: | 7.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 448535 | ||
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=0255c555c8f6da52de979e739033d8c7078346a1 Fixed in master If we leave a scope without having found a defining node, we add the occurrences to the parent scope. If the defining node is found in the parent scope, the occurrences are then marked. Doing this removes the need for a separate globals array. As the occurrences keep getting passed up until they reach the Program scope. If no defining node is found in the program, we can just mark everything stored in the program scope. I also included an improvement to the test suite to print out the expected/actual occurrences. Makes it far easier to see what is happening without debugging (especially in cases where we mark the same occurrence twice). |
f(); function g(){ f(); // Not marked } function f(){} function h(){ f(); } f(); No matter which occurrence of f is selected, the call inside of g() will not be marked.