Debian Codegraph @

js/src/tests/test262/language/statements/variable/S12.2_A7.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: VariableDeclaration within "for" statement is allowed
6 es5id: 12.2_A7
7 description: Declaring variable within "for" statement
8 ---*/
9
10 //////////////////////////////////////////////////////////////////////////////
11 //CHECK#1
12 try{
13 infor_var = infor_var;
14 }catch(e){
15 throw new Test262Error('#1: Variable declaration inside "for" loop is admitted');
16 };
17 //
18 //////////////////////////////////////////////////////////////////////////////
19
20 for (;;){
21 break;
22 var infor_var;
23 }
24
25 reportCompare(0, 0);