summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Map-iterator-already-done.js
blob: 3e3db754366af256d35dfa2f7b4c1dea0150a3ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
let a = new Map();
for (let i = 0; i < 1000; i++)
  a.set(i, i);

function f() {
  let iter = a.entries();
  while (!iter.next().done) {}
  iter.next();
}

for (let i = 0; i < 10; i++)
  f();