Bug 161408 - [JSC] ArrowFormalParameters and MethodDefinition parameters do not use StrictFormalParameters restrictions
Summary: [JSC] ArrowFormalParameters and MethodDefinition parameters do not use Strict...
Status: RESOLVED DUPLICATE of bug 171190
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-30 14:51 PDT by Caitlin Potter (:caitp)
Modified: 2017-04-22 23:47 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***