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

22 lines
1.1 KiB
Plaintext
Raw Normal View History

tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorOverloadsWithDefaultValues.ts(3,17): error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorOverloadsWithDefaultValues.ts(10,17): error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
2014-07-13 01:04:16 +02:00
==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorOverloadsWithDefaultValues.ts (2 errors) ====
class C {
foo: string;
constructor(x = 1); // error
~~~~~
!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
2014-07-13 01:04:16 +02:00
constructor() {
}
}
class D<T> {
foo: string;
constructor(x = 1); // error
~~~~~
!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
2014-07-13 01:04:16 +02:00
constructor() {
}
}