2.1.13 [ECMA-262/7] Section 13.2.1 Static Semantics: Early Errors
V0057: No error is issued if an element of LexicallyDeclaredNames also occurs in VarDeclaredNames
The specification states:
-
13.2.1 Static Semantics: Early Errors Block : { StatementList } • It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains any duplicate entries. • It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList also occurs in the VarDeclaredNames of StatementList.
EdgeHTML Mode
No error is issued if an element of LexicallyDeclaredNames also occurs in VarDeclaredNames. For example:
{
let x;
var x; // should be a syntax error but is not
}
V0058: Functions and generator functions are allowed to have duplicates in LexicallyDeclaredNames
The specification states:
-
13.2.1 Static Semantics: Early Errors Block : { StatementList } • It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains any duplicate entries. • It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList also occurs in the VarDeclaredNames of StatementList.
EdgeHTML Mode
Functions and generator functions are allowed to have duplicates in LexicallyDeclaredNames.