20 lines
589 B
Text
20 lines
589 B
Text
|
==== tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/classWithoutExplicitConstructor.ts (2 errors) ====
|
||
|
class C {
|
||
|
x = 1
|
||
|
y = 'hello';
|
||
|
}
|
||
|
|
||
|
var c = new C();
|
||
|
var c2 = new C(null); // error
|
||
|
~~~~~~~~~~~
|
||
|
!!! Supplied parameters do not match any signature of call target.
|
||
|
|
||
|
class D<T extends Date> {
|
||
|
x = 2
|
||
|
y: T = null;
|
||
|
}
|
||
|
|
||
|
var d = new D();
|
||
|
var d2 = new D(null); // error
|
||
|
~~~~~~~~~~~
|
||
|
!!! Supplied parameters do not match any signature of call target.
|