blob: d16ca166591b31a57669b94cd6f0899aeb5d174d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
class base {
constructor() { }
test() {
return false;
}
}
let standin = { test() { return true; } };
class derived extends base {
constructor() { super(); }
test() {
assertEq(super.test(), false);
Object.setPrototypeOf(derived.prototype, standin);
assertEq(super["test"](), true);
}
}
new derived().test();
if (typeof reportCompare === 'function')
reportCompare(0,0,"OK");
|