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

24 lines
1.4 KiB
Plaintext
Raw Normal View History

2014-10-01 02:15:18 +02:00
tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts(2,5): error TS2392: Multiple constructor implementations are not allowed.
tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts(3,5): error TS2392: Multiple constructor implementations are not allowed.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts(7,5): error TS2392: Multiple constructor implementations are not allowed.
tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts(8,5): error TS2392: Multiple constructor implementations are not allowed.
2014-10-01 02:15:18 +02:00
==== tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts (4 errors) ====
2014-07-13 01:04:16 +02:00
class C {
2014-10-01 20:27:20 +02:00
constructor() { } // error
2014-10-01 02:15:18 +02:00
~~~~~~~~~~~~~~~~~
!!! error TS2392: Multiple constructor implementations are not allowed.
2014-07-13 01:04:16 +02:00
constructor(x) { } // error
~~~~~~~~~~~~~~~~~~
!!! error TS2392: Multiple constructor implementations are not allowed.
2014-07-13 01:04:16 +02:00
}
class D<T> {
2014-10-01 20:27:20 +02:00
constructor(x: T) { } // error
2014-10-01 02:15:18 +02:00
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2392: Multiple constructor implementations are not allowed.
2014-07-13 01:04:16 +02:00
constructor(x: T, y: T) { } // error
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2392: Multiple constructor implementations are not allowed.
2014-07-13 01:04:16 +02:00
}