| 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: | 8.0 | ||
| Target Milestone: | 8.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | 445410 | ||
| Bug Blocks: | |||
|
Description
Curtis Windatt
To reproduce you actually need a redefine in the program scope, which I had elsewhere in my test file.
var f;
f();
function g(){
f(); // Not marked
}
function f(){}
function h(){
f();
}
f();
The problem is that we clear any occurrences in nested scopes when we encounter the redefine, as we assume they belong to another defining node. However, in this case, the nested call is a valid occurrence. The solution is the same principle used in Bug 445410, rather than applying occurrences in nested scopes, we attempt to move them to the defining scope. That way when we pop the defining scope only the occurrences 'belonging' to that defining node are used.
Fixed in master
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=d618324379e3e0ee0507b700509e95bc880746e2
|