fn-scope-var-name-redeclaration-attempt-with-class.js (696B)
1 // |reftest| error:SyntaxError 2 // This file was procedurally generated from the following sources: 3 // - src/declarations/class.case 4 // - src/declarations/redeclare/fn-block-attempt-to-redeclare-var-declaration.template 5 /*--- 6 description: redeclaration with ClassDeclaration (VariableDeclaration in BlockStatement inside a function) 7 esid: sec-block-static-semantics-early-errors 8 flags: [generated] 9 negative: 10 phase: parse 11 type: SyntaxError 12 info: | 13 Block : { StatementList } 14 15 It is a Syntax Error if any element of the LexicallyDeclaredNames of 16 StatementList also occurs in the VarDeclaredNames of StatementList. 17 18 ---*/ 19 20 21 $DONOTEVALUATE(); 22 23 function x() { 24 { class f {}; var f; } 25 }