Bug 161408
| Summary: | [JSC] ArrowFormalParameters and MethodDefinition parameters do not use StrictFormalParameters restrictions | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Caitlin Potter (:caitp) <caitp> |
| Component: | JavaScriptCore | Assignee: | Saam Barati <saam> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | joepeck, saam, ysuzuki |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | All | ||
| OS: | All | ||
Caitlin Potter (:caitp)
ArrowFormalParameters and MethodDefinition parameters should be parsed according to the StrictFormalParameters production (https://tc39.github.io/ecma262/#sec-arrow-function-definitions, https://tc39.github.io/ecma262/#prod-MethodDefinition).
Per https://tc39.github.io/ecma262/#sec-function-definitions-static-semantics-early-errors, these functions should not parse successfully when there are duplicate formal parameters.
E.g.
var f = (a, a) => 1 /* should be SyntaxError */
var O = {
m(a, a) { return 1; } /* should be SyntaxError */
};
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Joseph Pecoraro
This gets fixed by bug 171190! I'll update the FIXME and include the tests in that change.
*** This bug has been marked as a duplicate of bug 171190 ***