Closed Bug 881981 Opened 11 years ago Closed 11 years ago

Immediately invoked Arrow Functions incorrectly throw SyntaxError

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: bbenvie, Unassigned)

Details

> ()=>{}()
> SyntaxError: missing ; before statement

Since arrow functions can only be expressions, this shouldn't throw.
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?
Oh apologies, I didn't catch that!
Actually no, CoverParenthesizedExpressionAndArrowParameterList is a Primary Expression, so this bug is still valid.
How does that cover grammar come into play? It's just used for the parameters part of an arrow function.
Sorry, you're right!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
No longer blocks: es6
You need to log in before you can comment on or make changes to this bug.