Bug 146981
| Summary: | using "with (o) {...}" shouldn't cause every variable to be closed over | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Saam Barati <saam> |
| Component: | JavaScriptCore | Assignee: | Saam Barati <saam> |
| Status: | NEW | ||
| Severity: | Normal | CC: | basile_clement, benjamin, fpizlo, ggaren, mark.lam, mmirman, msaboff, oliver, ysuzuki |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Saam Barati
For example, consider this:
```
let x, y;
with(o) {
print(x);
}
```
There is no way anything in the "with" may resolve to "y". It's stupid to put it in the JSLexicalEnvironment when it doesn't need to be
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |