Bug 156962 - Keep a different scope in the parser for a function's parameters
Summary: Keep a different scope in the parser for a function's parameters
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-24 16:01 PDT by Saam Barati
Modified: 2016-04-24 16:01 PDT (History)
10 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 2016-04-24 16:01:00 PDT
Because we don't do this, a function's default parameter values can cause us to think something is captured when it isn't.
for example:
```
let inner;
function foo(a = function() { return inner; }) {
    let inner; // We will mark this as captured even though it isn't.
    return inner;
}
```