summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/cacheir/optimize-get-iterator-1.js
blob: f22d5fab63d02f40d099a93cabbe53552eecbec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
(() => {
  let returnCalled = false;
  ({}).__proto__.return = () => {
    returnCalled = true;
    return { value: 3, done: true };
  };

  assertEq(returnCalled, false);
  let [a,b] = [1,2,3];
  assertEq(returnCalled, true);
  assertEq(a, 1);
  assertEq(b, 2);
})();