const-name-redeclaration-attempt-with-let.js (693B)
1 // |reftest| error:SyntaxError 2 // This file was procedurally generated from the following sources: 3 // - src/declarations/let.case 4 // - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template 5 /*--- 6 description: redeclaration with let-LexicalDeclaration (LexicalDeclaration (const) in SwitchStatement) 7 esid: sec-switch-statement-static-semantics-early-errors 8 flags: [generated] 9 negative: 10 phase: parse 11 type: SyntaxError 12 info: | 13 SwitchStatement : switch ( Expression ) CaseBlock 14 15 It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any 16 duplicate entries. 17 18 ---*/ 19 20 21 $DONOTEVALUATE(); 22 23 switch (0) { case 1: const f = 0; default: let f }