2014-07-13 01:04:16 +02:00
|
|
|
class Base {
|
|
|
|
constructor(x: any) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Foo extends Base {
|
|
|
|
constructor() {
|
2015-09-16 02:19:03 +02:00
|
|
|
super(this); // error: "super" has to be called before "this" accessing
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Foo2 extends Base {
|
|
|
|
public p = 0;
|
|
|
|
constructor() {
|
|
|
|
super(this); // error
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Foo3 extends Base {
|
|
|
|
constructor(public p) {
|
|
|
|
super(this); // error
|
|
|
|
}
|
|
|
|
}
|