Created
November 14, 2013 18:22
-
-
Save mroch/7471758 to your computer and use it in GitHub Desktop.
Arrow function parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval => 42; // ok | |
(eval) => 42; // ok | |
(eval, a) => 42; // ok | |
(a, a) => 42; // Syntax error per 14.1.1 (StrictFormalParameters : FormalParameters) | |
"use strict"; (eval) => 42; // Syntax error per 14.2.10 | |
(eval) => { "use strict"; }; // Syntax error per 14.2.10 | |
// Syntax errors per 14.1.1 (FormalParameters : FormalParameterList), since IsSimpleParameterList is false | |
// This is changing to be allowed? | |
(eval, a = 10) => 42; | |
(eval = 10) => 42; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
yes to line 10. I've removed that rule. so lines 11 and 12 are ok, but these will be syntax errors as a script:
"use strict"; (eval, a = 10) => 42;
"use strict"; (eval = 10) => 42;