« Bugzilla Issues Index

#1261 — Arrow functions early errors with rest parameter

It turns out that the following is a SyntaxError

(foo) => { var foo; }


(foo, => { var foo; }


The reason is that for the first IsSimpleParameterList is true but for the second one it is false.

"It is a Syntax Error if IsSimpleParameterList of ArrowParameters is true and any element of the BoundNames of ArrowParameters also occurs in the VarDeclaredNames of ConciseBody."

This does not seem to be the expected behavior.

Fixed in rev15, close issue?