Files
tsgo/testdata/baselines/reference/submoduleAccepted/compiler/constructorOverloads1.errors.txt.diff

42 lines
2.7 KiB
Diff

--- old.constructorOverloads1.errors.txt
+++ new.constructorOverloads1.errors.txt
@@= skipped -2, +2 lines =@@
constructorOverloads1.ts(4,5): error TS2392: Multiple constructor implementations are not allowed.
constructorOverloads1.ts(7,5): error TS2392: Multiple constructor implementations are not allowed.
constructorOverloads1.ts(16,18): error TS2769: No overload matches this call.
- Overload 1 of 2, '(s: string): Foo', gave the following error.
- Argument of type 'Foo' is not assignable to parameter of type 'string'.
- Overload 2 of 2, '(n: number): Foo', gave the following error.
+ The last overload gave the following error.
Argument of type 'Foo' is not assignable to parameter of type 'number'.
constructorOverloads1.ts(17,18): error TS2769: No overload matches this call.
- Overload 1 of 2, '(s: string): Foo', gave the following error.
- Argument of type 'Foo[]' is not assignable to parameter of type 'string'.
- Overload 2 of 2, '(n: number): Foo', gave the following error.
+ The last overload gave the following error.
Argument of type 'Foo[]' is not assignable to parameter of type 'number'.
@@= skipped -38, +34 lines =@@
var f3 = new Foo(f1);
~~
!!! error TS2769: No overload matches this call.
-!!! error TS2769: Overload 1 of 2, '(s: string): Foo', gave the following error.
-!!! error TS2769: Argument of type 'Foo' is not assignable to parameter of type 'string'.
-!!! error TS2769: Overload 2 of 2, '(n: number): Foo', gave the following error.
+!!! error TS2769: The last overload gave the following error.
!!! error TS2769: Argument of type 'Foo' is not assignable to parameter of type 'number'.
+!!! related TS2771 constructorOverloads1.ts:3:5: The last overload is declared here.
!!! related TS2793 constructorOverloads1.ts:4:5: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.
var f4 = new Foo([f1,f2,f3]);
~~~~~~~~~~
!!! error TS2769: No overload matches this call.
-!!! error TS2769: Overload 1 of 2, '(s: string): Foo', gave the following error.
-!!! error TS2769: Argument of type 'Foo[]' is not assignable to parameter of type 'string'.
-!!! error TS2769: Overload 2 of 2, '(n: number): Foo', gave the following error.
+!!! error TS2769: The last overload gave the following error.
!!! error TS2769: Argument of type 'Foo[]' is not assignable to parameter of type 'number'.
+!!! related TS2771 constructorOverloads1.ts:3:5: The last overload is declared here.
!!! related TS2793 constructorOverloads1.ts:4:5: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.
f1.bar1();