blob: 36298a01fab816abff7a5284f7f093bc265bdb8e [file] [log] [blame]
function test() {
function correctProtoBound(proto) {
var f = ()=>5;
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");