Closed
Bug 881981
Opened 11 years ago
Closed 11 years ago
Immediately invoked Arrow Functions incorrectly throw SyntaxError
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
INVALID
People
(Reporter: bbenvie, Unassigned)
Details
> ()=>{}()
> SyntaxError: missing ; before statement
Since arrow functions can only be expressions, this shouldn't throw.
Comment 1•11 years ago
|
||
Wrong bug tracker, this should rather go to bugs.ecmascript.org ;-) ArrowFunction is on the rhs of the AssignmentExpression production rule, I guess you want it to be on the rhs of the PrimaryExpression rule?
Reporter | ||
Comment 2•11 years ago
|
||
Oh apologies, I didn't catch that!
Reporter | ||
Comment 3•11 years ago
|
||
Actually no, CoverParenthesizedExpressionAndArrowParameterList is a Primary Expression, so this bug is still valid.
Comment 4•11 years ago
|
||
How does that cover grammar come into play? It's just used for the parameters part of an arrow function.
Reporter | ||
Comment 5•11 years ago
|
||
Sorry, you're right!
Reporter | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•