Bug 156962
Summary: | Keep a different scope in the parser for a function's parameters | ||
---|---|---|---|
Product: | WebKit | Reporter: | Saam Barati <saam> |
Component: | JavaScriptCore | Assignee: | Saam Barati <saam> |
Status: | NEW | ||
Severity: | Normal | CC: | benjamin, fpizlo, ggaren, gskachkov, keith_miller, mark.lam, msaboff, oliver, sukolsak, ysuzuki |
Priority: | P2 | ||
Version: | WebKit Local Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Saam Barati
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;
}
```
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |