Debian Codegraph @

js/src/tests/test262/language/statements/class/static-init-invalid-lex-dup.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright (C) 2021 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 esid: sec-class-definitions-static-semantics-early-errors
6 description: Block cannot declare duplicate lexically-scoped bindings
7 info: |
8 ClassStaticBlockBody : ClassStaticBlockStatementList
9
10 - It is a Syntax Error if the LexicallyDeclaredNames of
11 ClassStaticBlockStatementList contains any duplicate entries.
12 negative:
13 phase: parse
14 type: SyntaxError
15 features: [class-static-block]
16 ---*/
17
18 $DONOTEVALUATE();
19
20 class C {
21 static {
22 let x;
23 let x;
24 }
25 }