summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testWithAndShadowing.js
blob: 07922c899391c1cc4bca4e881bfa81f6baa2ee76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// see bug 470795
var o = [{},{},{i:42}]
var i;
var s = [];
for (var j = 0; j < 3; ++j) {
    with (o[j]) {
	for (i = 0; i < 2; ++i) {
	    s.push(j);
            s.push(i);
	} 
    }
}
assertEq(s.join(), '0,0,0,1,1,0,1,1,2,0,2,1');