Bug 158030 - [ES6] Different errors during parsing ordinary function and arrow function
Summary: [ES6] Different errors during parsing ordinary function and arrow function
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-24 11:21 PDT by GSkachkov
Modified: 2016-06-27 19:39 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description GSkachkov 2016-05-24 11:21:44 PDT
It seems that we have different error message in case of errors in parsing of the function parameters
>>> var arr = (a, ...last,)=> {return last;};
Unexpected token '...'
>>> var f = function (a, ...last,) {return last;};
Unexpected token ','. Rest parameter should be the last parameter in a function declaration.
Comment 1 Caio Lima 2016-06-27 19:39:45 PDT
I think the report of ordinary functions more clear. I think we should give same syntax error to them.

I am interested  working in this =).