Debian Codegraph @

js/src/tests/test262/language/statements/continue/static-init-with-label.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-continue-statement
6 description: IterationStatement search does not traverse static initialization block boundaries (label specified)
7 info: |
8 4.1.1 Static Semantics: Early Errors
9 ContinueStatement : continue ;
10 ContinueStatement : continue LabelIdentifier ;
11
12 - It is a Syntax Error if this ContinueStatement is not nested, directly or
13 indirectly (but not crossing function or static initialization block
14 boundaries), within an IterationStatement.
15 negative:
16 phase: parse
17 type: SyntaxError
18 features: [class-static-block]
19 ---*/
20
21 $DONOTEVALUATE();
22
23 label: while(false) {
24 class C {
25 static {
26 continue label;
27 }
28 }
29 }