TypeScript/tests/baselines/reference/thisInSuperCall2.errors.txt
2014-09-12 13:35:07 -07:00

25 lines
630 B
Plaintext

tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be referenced in current location.
==== tests/cases/compiler/thisInSuperCall2.ts (1 errors) ====
class Base {
constructor(a: any) {}
}
class Foo extends Base {
public x: number;
constructor() {
super(this); // no error
}
}
class Foo2 extends Base {
public x: number = 0;
constructor() {
super(this); // error
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
}
}