haikuwebkit/JSTests/es6/super_is_statically_bound.js

20 lines
269 B
JavaScript

function test() {
class B {
qux() { return "bar"; }
}
class C extends B {
qux() { return super.qux() + this.corge; }
}
var obj = {
qux: C.prototype.qux,
corge: "ley"
};
return obj.qux() === "barley";
}
if (!test())
throw new Error("Test failed");