blob: e1ca9b4ae108a86c3b387805946778220f528504 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
class Base {
constructor() {}
}
class Mid extends Base {
constructor() { super(); }
f() { return new super.constructor(); }
}
class Derived extends Mid {
constructor() { super(); }
}
let d = new Derived();
var df = d.f();
assertEq(df.constructor, Base);
if (typeof reportCompare === 'function')
reportCompare(0,0,"OK");
|