Debian Codegraph @

js/src/tests/test262/language/statements/for/S12.6.3_A4_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 "in"-expression is not allowed as a ExpressionNoIn in "for
8 (ExpressionNoIn; FirstExpression; SecondExpression) Statement"
9 IterationStatement
10 es5id: 12.6.3_A4_T2
11 description: Checking if execution of "for (1 in arr;1;){}" fails
12 negative:
13 phase: parse
14 type: SyntaxError
15 ---*/
16
17 $DONOTEVALUATE();
18
19 arr = [1,2,3,4,5];
20
21 //////////////////////////////////////////////////////////////////////////////
22 //CHECK#1
23 for(1 in arr;1;) {
24 break;
25 }
26 //
27 //////////////////////////////////////////////////////////////////////////////