blob: 28a142c8a6c54f476ec039a14e9e2d3e7b96df1a [file] [log] [blame]
for (let i = 0; i <= 1e5; ++i) {
let error;
let returnCalled;
let iterable = {
next() { return this; },
get done() {
throw error = new Error();
},
[Symbol.iterator]() { return this; },
return() {
returnCalled = true;
}
};
try {
for (a of iterable)
throw new Error();
} catch (e) {
if (e !== error)
throw e;
}
if (returnCalled)
throw new Error();
}