| throw new Error("Bad assertion") |
| function test(f, n = 1000) { |
| for (let i = 0; i < n; ++i) |
| get foo() { return this; } |
| class Child extends Base { |
| let arr = () => super.foo; |
| let A = Child.prototype.a; |
| var AA = Child.prototype.a; |
| this.AAA = Child.prototype.a; |
| assert(Child.prototype.a.call("xyz") === "xyz"); |
| assert(Child.prototype.a.call(obj) === obj); |
| assert(Child.prototype.a.call(25) === 25); |
| assert(Child.prototype.a.call(globalObj) === globalObj); |
| assert(Child.prototype.b.call("xyz") === "xyz"); |
| assert(Child.prototype.b.call(obj) === obj); |
| assert(Child.prototype.b.call(25) === 25); |
| assert(Child.prototype.b.call(globalObj) === globalObj); |
| assert(A() === undefined); |
| assert(AA() === undefined); |
| assert(AAA() === undefined); |