blob: 3fe8593b5404c5714e79acb1b3c721cfaf73c140 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
(() => {
let nextCalled = 0;
([])[Symbol.iterator]().__proto__.next = () => {
nextCalled++;
return {value: nextCalled, done: false};
};
assertEq(nextCalled, 0);
let [a,b] = [1,2,3];
assertEq(nextCalled, 2);
assertEq(a, 1);
assertEq(b, 2);
})();
|