According to
14.2.1<http://people.mozilla.org/~jorendorff/es6-draft.html#sec-arrow-function-definitions-static-semantics-early-errors>,
the following arrow function expression should produce an early error :
x => {var x;}
Here is the spec line that mandates this rule. While this scenario is allowed
in the regular functions (even in strict mode), I would like to understand the
rationale behind this specific rule in arrow functions. Can someone shed some
light on this ?
-------
14.2.1<http://people.mozilla.org/~jorendorff/es6-draft.html#sec-arrow-function-definitions-static-semantics-early-errors>Static
Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
* It is a Syntax Error if any element of the BoundNames of
ArrowParameters also occurs in theVarDeclaredNames of ConciseBody.
* It is a Syntax Error if any element of the BoundNames of
ArrowParameters also occurs in the LexicallyDeclaredNames of ConciseBody.
-------
Regards,
Suresh
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss