blob: e6f39cc343eb98aee3062de1cfec4eb1b642967c [file] [log] [blame]
function vendIterator() {
return 1;
}
noInline(vendIterator);
function test() {
let iterable = {
[Symbol.iterator]() { return vendIterator(); },
next() { return { done: true }; }
}
for (let o of iterable)
throw new Error();
throw new Error();
}
noInline(test);
for (let i = 0; i < 1e5; ++i) {
let error;
try {
test();
} catch (e) {
error = e;
}
if (error != "TypeError: Iterator result interface is not an object.")
throw new Error();
}