mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
66 lines
4.7 KiB
Diff
66 lines
4.7 KiB
Diff
--- old.overloadResolutionTest1.errors.txt
|
|
+++ new.overloadResolutionTest1.errors.txt
|
|
@@= skipped -0, +0 lines =@@
|
|
overloadResolutionTest1.ts(7,18): error TS2769: No overload matches this call.
|
|
- Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error.
|
|
- Type 'string' is not assignable to type 'number'.
|
|
- Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error.
|
|
+ The last overload gave the following error.
|
|
Type 'string' is not assignable to type 'boolean'.
|
|
overloadResolutionTest1.ts(18,16): error TS2769: No overload matches this call.
|
|
- Overload 1 of 2, '(bar: { a: number; }): string', gave the following error.
|
|
- Type 'string' is not assignable to type 'number'.
|
|
- Overload 2 of 2, '(bar: { a: boolean; }): number', gave the following error.
|
|
+ The last overload gave the following error.
|
|
Type 'string' is not assignable to type 'boolean'.
|
|
overloadResolutionTest1.ts(24,15): error TS2769: No overload matches this call.
|
|
- Overload 1 of 2, '(bar: { a: number; }): number', gave the following error.
|
|
- Type 'boolean' is not assignable to type 'number'.
|
|
- Overload 2 of 2, '(bar: { a: string; }): string', gave the following error.
|
|
+ The last overload gave the following error.
|
|
Type 'boolean' is not assignable to type 'string'.
|
|
|
|
|
|
@@= skipped -24, +18 lines =@@
|
|
var x111 = foo([{a:"s"}]); // error - does not match any signature
|
|
~
|
|
!!! error TS2769: No overload matches this call.
|
|
-!!! error TS2769: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error.
|
|
-!!! error TS2769: Type 'string' is not assignable to type 'number'.
|
|
-!!! error TS2769: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error.
|
|
+!!! error TS2769: The last overload gave the following error.
|
|
!!! error TS2769: Type 'string' is not assignable to type 'boolean'.
|
|
-!!! related TS6500 overloadResolutionTest1.ts:1:19: The expected type comes from property 'a' which is declared here on type '{ a: number; }'
|
|
!!! related TS6500 overloadResolutionTest1.ts:2:19: The expected type comes from property 'a' which is declared here on type '{ a: boolean; }'
|
|
+!!! related TS2771 overloadResolutionTest1.ts:2:10: The last overload is declared here.
|
|
!!! related TS2793 overloadResolutionTest1.ts:3:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.
|
|
var x1111 = foo([{a:null}]); // works - ambiguous call is resolved to be the first in the overload set so this returns a string
|
|
|
|
@@= skipped -20, +18 lines =@@
|
|
var x4 = foo2({a:"s"}); // error
|
|
~
|
|
!!! error TS2769: No overload matches this call.
|
|
-!!! error TS2769: Overload 1 of 2, '(bar: { a: number; }): string', gave the following error.
|
|
-!!! error TS2769: Type 'string' is not assignable to type 'number'.
|
|
-!!! error TS2769: Overload 2 of 2, '(bar: { a: boolean; }): number', gave the following error.
|
|
+!!! error TS2769: The last overload gave the following error.
|
|
!!! error TS2769: Type 'string' is not assignable to type 'boolean'.
|
|
-!!! related TS6500 overloadResolutionTest1.ts:12:20: The expected type comes from property 'a' which is declared here on type '{ a: number; }'
|
|
!!! related TS6500 overloadResolutionTest1.ts:13:20: The expected type comes from property 'a' which is declared here on type '{ a: boolean; }'
|
|
+!!! related TS2771 overloadResolutionTest1.ts:13:10: The last overload is declared here.
|
|
!!! related TS2793 overloadResolutionTest1.ts:14:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.
|
|
|
|
|
|
@@= skipped -15, +13 lines =@@
|
|
var x = foo4({a:true}); // error
|
|
~
|
|
!!! error TS2769: No overload matches this call.
|
|
-!!! error TS2769: Overload 1 of 2, '(bar: { a: number; }): number', gave the following error.
|
|
-!!! error TS2769: Type 'boolean' is not assignable to type 'number'.
|
|
-!!! error TS2769: Overload 2 of 2, '(bar: { a: string; }): string', gave the following error.
|
|
+!!! error TS2769: The last overload gave the following error.
|
|
!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
|
|
-!!! related TS6500 overloadResolutionTest1.ts:21:20: The expected type comes from property 'a' which is declared here on type '{ a: number; }'
|
|
!!! related TS6500 overloadResolutionTest1.ts:22:20: The expected type comes from property 'a' which is declared here on type '{ a: string; }'
|
|
+!!! related TS2771 overloadResolutionTest1.ts:22:10: The last overload is declared here.
|
|
!!! related TS2793 overloadResolutionTest1.ts:23:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.
|