Debian Codegraph @

js/src/tests/test262/language/statements/class/static-init-invalid-undefined-continue-target.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 reference an undefined `continue` target
7 info: |
8 ClassStaticBlockBody : ClassStaticBlockStatementList
9
10 - It is a Syntax Error if ContainsUndefinedContinueTarget of
11 ClassStaticBlockStatementList with arguments « » and « » is true.
12 negative:
13 phase: parse
14 type: SyntaxError
15 features: [class-static-block]
16 ---*/
17
18 $DONOTEVALUATE();
19
20 class C {
21 static {
22 x: while (false) {
23 continue y;
24 }
25 }
26 }