WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
162358
Disallow trailing commas in arrow function arguments, e.g. (X,)=>1
https://bugs.webkit.org/show_bug.cgi?id=162358
Summary
Disallow trailing commas in arrow function arguments, e.g. (X,)=>1
John Wilander
Reported
2016-09-21 13:49:35 PDT
Reported here: "(X,)=>1//safari ios10"
https://twitter.com/garethheyes/status/778685893506850828
Chrome and Firefox don't allow it and according to the reporter Edge doesn't either.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-12-01 12:38:07 PST
<
rdar://problem/29464660
>
Saam Barati
Comment 2
2016-12-02 12:25:09 PST
I'm pretty sure this is part of ES2017 spec
Saam Barati
Comment 3
2016-12-02 12:25:34 PST
http://www.2ality.com/2015/11/trailing-comma-parameters.html?m=1
GSkachkov
Comment 4
2016-12-03 03:09:32 PST
He he. It is not bug it is a feature of ECMA 2017 Before proposal of this syntax was on stage 3, at beginning of November it was merged to master
https://github.com/tc39/ecma262/pull/711
In spec
https://tc39.github.io/ecma262/#prod-FormalParameters
can be found: FormalParameters can be: FormalParameterList[?Yield, ?Await], Actually both Chrome Canary (57.0.2939.0 canary (64-bit)) and FireFox Nightly (52.0a1 (2016-10-15) (64-bit)) support this syntax now
Saam Barati
Comment 5
2016-12-12 17:34:11 PST
Closing this since it's the spec.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug