TypeScript/tests/baselines/reference/constructorDefaultValuesReferencingThis.errors.txt
2014-07-12 17:30:19 -07:00

18 lines
611 B
Plaintext

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