| Summary: | Occurrences are not marked in with or for-in statements | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | Curtis Windatt <curtis.windatt.public> |
| Severity: | normal | ||
| Priority: | P3 | CC: | curtis.windatt.public, mamacdon |
| Version: | unspecified | ||
| Target Milestone: | 6.0 RC1 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
Is the goal here to mark occurrences only in the "object" of the WithStatement? Or are you thinking about wading into the swamp within the curly braces too? (In reply to Mark Macdonald from comment #1) > Is the goal here to mark occurrences only in the "object" of the > WithStatement? Or are you thinking about wading into the swamp within the > curly braces too? The goal is to mark all of them. We already mark inside the body, but we do not check the actual WithStatement node itself. The fix is really small, something like: case Estraverse.Syntax.WithExpression: this.checkId(node.object); break; (In reply to Michael Rennie from comment #2) > case Estraverse.Syntax.WithExpression: > this.checkId(node.object); > break; We also don't support the ForInStatement node case Estraverse.Syntax.ForInStatement: this.checkId(node.left); this.checkId(node.right); break; |
var foo = 10; with(foo) { console.log('with'); } select foo - the occurrence in the with statement is not marked