Files
tsgo/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing2.errors.txt

16 lines
563 B
Plaintext

checkSuperCallBeforeThisAccessing2.ts(5,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
==== checkSuperCallBeforeThisAccessing2.ts (1 errors) ====
class Based { }
class Derived extends Based {
public x: number;
constructor() {
this.x = 100;
~~~~
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
super();
this.x = 10;
var that = this;
}
}