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

18 lines
611 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== 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.
}