blob: f31625a5666fff23539ef98c5f9a42d38f3fc5ca [file] [log] [blame]
function assert(b) {
if (!b)
throw new Error;
}
function readPrototype(f) {
return f.prototype;
}
noInline(readPrototype);
{
let f1 = function () { };
let f2 = () => undefined;
for (let i = 0; i < 100; ++i) {
assert(!f2.hasOwnProperty("prototype"));
assert(f1.hasOwnProperty("prototype"));
}
for (let i = 0; i < 100; ++i)
assert(readPrototype(f2) === undefined);
assert(readPrototype(f1) !== undefined);
assert(readPrototype(f1) === f1.prototype);
}