summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/variable/S12.2_A7.js
blob: 6e58224dd671ffc0b32cb49ea02fa83a5d375131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: VariableDeclaration within "for" statement is allowed
es5id: 12.2_A7
description: Declaring variable within "for" statement
---*/

//////////////////////////////////////////////////////////////////////////////
//CHECK#1
try{
	infor_var = infor_var;
}catch(e){
	throw new Test262Error('#1: Variable declaration inside "for" loop is admitted');
};
//
//////////////////////////////////////////////////////////////////////////////

for (;;){
    break;
    var infor_var;
}

reportCompare(0, 0);