2.1.28 [ECMA-262/6] Section 13.2.1 Static Semantics: Early Errors

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.

IE11 Mode and EdgeHTML Mode (All versions)

Functions and generator functions are allowed to have duplicates in LexicallyDeclaredNames.

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.

IE11 Mode and EdgeHTML Mode (All versions)

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

    }