Debian Codegraph @

js/src/tests/test262/language/statements/for/S12.6.3_A8.1_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: Blocks within "for(with var)" braces are not allowed
7 es5id: 12.6.3_A8.1_T2
8 description: >
9 Checking if execution of "for(var index=0; {index++;index<100;};
10 index*2;) { arr.add(""+index);}" fails
11 negative:
12 phase: parse
13 type: SyntaxError
14 ---*/
15
16 $DONOTEVALUATE();
17
18 var arr = [];
19
20 //////////////////////////////////////////////////////////////////////////////
21 //CHECK#1
22 for(var index=0; {index++;index<100;}; index*2;) { arr.add(""+index);};
23 //
24 //////////////////////////////////////////////////////////////////////////////