Debian Codegraph @

js/src/tests/test262/language/statements/continue/S12.7_A5_T2.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright 2009 the Sputnik authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 info: |
7 When "continue Identifier" is evaluated Identifier must be label in the
8 label set of an enclosing (but not crossing function boundaries)
9 IterationStatement
10 es5id: 12.7_A5_T2
11 description: Identifier is a function name
12 negative:
13 phase: parse
14 type: SyntaxError
15 ---*/
16
17 $DONOTEVALUATE();
18
19 LABEL_OUT : var x=0, y=0;
20 LABEL_DO_LOOP : do {
21 LABEL_IN : x++;
22 if(x===10)break;
23 continue IN_DO_FUNC;
24 LABEL_IN_2 : y++;
25 function IN_DO_FUNC(){}
26 } while(0);
27
28 LABEL_ANOTHER_LOOP : do {
29 ;
30 } while(0);
31
32 function OUT_FUNC(){};