TypeScript/tests/baselines/reference/thisInSuperCall2.errors.txt

22 lines
499 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== 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
~~~~
!!! 'this' cannot be referenced in current location.
}
}