2014-07-13 01:04:16 +02:00
|
|
|
class Base {
|
|
|
|
constructor(a: any) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Foo extends Base {
|
|
|
|
public x: number;
|
|
|
|
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 x: number = 0;
|
|
|
|
constructor() {
|
|
|
|
super(this); // error
|
|
|
|
}
|
|
|
|
}
|