TypeScript/tests/baselines/reference/constructorDefaultValuesReferencingThis.errors.txt
2014-09-11 16:11:08 -07:00

18 lines
653 B
Plaintext

==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorDefaultValuesReferencingThis.ts (3 errors) ====
class C {
constructor(x = this) { }
~~~~
!!! error TS2333: 'this' cannot be referenced in constructor arguments.
}
class D<T> {
constructor(x = this) { }
~~~~
!!! error TS2333: 'this' cannot be referenced in constructor arguments.
}
class E<T> {
constructor(public x = this) { }
~~~~
!!! error TS2333: 'this' cannot be referenced in constructor arguments.
}