summaryrefslogtreecommitdiffstats
path: root/js/src/tests/js1_7/extensions/regress-590813.js
blob: ec701ced55f2e41bc34361b93fda14a078056539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

var actual = '';
var expected = 'A0B1B2C0C1C2';

var x = Iterator([1,2,3], true);

for (var a in x) {
  actual += 'A' + a;
  for (var b in x) {
    actual += 'B' + b;
  }
}

var y = Iterator([1,2,3], true);

for (var c in y) {
  actual += 'C' + c;
}
for (var d in y) {
  actual += 'D' + d;
}

reportCompare(expected, actual, "Handle nested Iterator iteration right");