Bug 158030
| Summary: | [ES6] Different errors during parsing ordinary function and arrow function | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | GSkachkov <gskachkov> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | gskachkov, saam, ticaiolima, ysuzuki |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
GSkachkov
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Caio Lima
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 =).