Debian Codegraph @

js/src/tests/test262/language/statements/break/S12.8_A6.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 Appearing of "break" within a function call that is nested in a
8 IterationStatement yields SyntaxError
9 es5id: 12.8_A6
10 description: >
11 Checking if using "break Identifier" within a function body
12 appears to be invalid
13 negative:
14 phase: parse
15 type: SyntaxError
16 ---*/
17
18 $DONOTEVALUATE();
19
20 var x=0,y=0;
21
22 LABEL1 : do {
23 x++;
24 (function(){break LABEL1;})();
25 y++;
26 } while(0);