Bug 158030

Summary: [ES6] Different errors during parsing ordinary function and arrow function
Product: WebKit Reporter: GSkachkov <gskachkov>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: gskachkov, saam, ticaiolima, ysuzuki
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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 =).