18 lines
No EOL
861 B
Text
18 lines
No EOL
861 B
Text
tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts(3,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.
|
|
|
|
|
|
==== tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts (2 errors) ====
|
|
class C {
|
|
constructor() { }
|
|
constructor(x) { } // error
|
|
~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2392: Multiple constructor implementations are not allowed.
|
|
}
|
|
|
|
class D<T> {
|
|
constructor(x: T) { }
|
|
constructor(x: T, y: T) { } // error
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2392: Multiple constructor implementations are not allowed.
|
|
} |