Bug 161408

Summary: [JSC] ArrowFormalParameters and MethodDefinition parameters do not use StrictFormalParameters restrictions
Product: WebKit Reporter: Caitlin Potter (:caitp) <caitp>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: joepeck, saam, ysuzuki
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   

Description Caitlin Potter (:caitp) 2016-08-30 14:51:07 PDT
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 */
};
Comment 1 Joseph Pecoraro 2017-04-22 23:47:35 PDT
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 ***