blob: dabd57de4bb70e945bd9a08ba990d1b06ee0f08c [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function test() {
async function* gen()
{
}
var originalPrototype = gen.prototype;
var g = gen();
shouldBe(g.__proto__, gen.prototype);
gen.prototype = {};
var g = gen();
shouldBe(g.__proto__, gen.prototype);
shouldBe(g.__proto__ !== originalPrototype, true);
}
noInline(test);
for (var i = 0; i < 1e5; ++i)
test();