Bug 146981 - using "with (o) {...}" shouldn't cause every variable to be closed over
Summary: using "with (o) {...}" shouldn't cause every variable to be closed over
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-15 14:33 PDT by Saam Barati
Modified: 2015-07-15 14:33 PDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2015-07-15 14:33:04 PDT
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