blob: 97274998ae409e9c7d115c748153a70639390f44 [file] [log] [blame]
function test() {
function correctProtoBound(proto) {
var f = function*(){};
if (Object.setPrototypeOf) {
Object.setPrototypeOf(f, proto);
}
else {
f.__proto__ = proto;
}
var boundF = Function.prototype.bind.call(f, null);
return Object.getPrototypeOf(boundF) === proto;
}
return correctProtoBound(Function.prototype)
&& correctProtoBound({})
&& correctProtoBound(null);
}
if (!test())
throw new Error("Test failed");