|
1 |
| -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(26,10): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. |
2 |
| - Type argument candidate '1' is not a valid type argument because it is not a supertype of candidate 'string'. |
3 |
| -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(30,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. |
4 |
| - Type argument candidate '1' is not a valid type argument because it is not a supertype of candidate 'T'. |
5 |
| -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(33,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. |
6 |
| - Type argument candidate '1' is not a valid type argument because it is not a supertype of candidate 'T'. |
7 |
| -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(34,16): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. |
8 |
| - Type argument candidate '1' is not a valid type argument because it is not a supertype of candidate 'T'. |
9 |
| -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(35,15): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. |
10 |
| - Type argument candidate '1' is not a valid type argument because it is not a supertype of candidate 'string'. |
| 1 | +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(26,18): error TS2345: Argument of type '(a: number) => string' is not assignable to parameter of type '(a: number) => 1'. |
| 2 | + Type 'string' is not assignable to type '1'. |
| 3 | +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(30,23): error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. |
| 4 | + Types of parameters 'x' and 'a' are incompatible. |
| 5 | + Type '1' is not assignable to type 'T'. |
| 6 | +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(33,23): error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. |
| 7 | + Types of parameters 'x' and 'a' are incompatible. |
| 8 | + Type '1' is not assignable to type 'T'. |
| 9 | +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(34,24): error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. |
| 10 | + Types of parameters 'x' and 'a' are incompatible. |
| 11 | + Type '1' is not assignable to type 'T'. |
| 12 | +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(35,23): error TS2345: Argument of type '(a: number) => string' is not assignable to parameter of type '(a: number) => 1'. |
| 13 | + Type 'string' is not assignable to type '1'. |
11 | 14 |
|
12 | 15 |
|
13 | 16 | ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts (5 errors) ====
|
@@ -37,28 +40,31 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun
|
37 | 40 | var r7 = foo3(1, <Z>(a: Z) => '', ''); // string
|
38 | 41 |
|
39 | 42 | var r8 = foo3(1, function (a) { return '' }, 1); // error
|
40 |
| - ~~~~ |
41 |
| -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. |
42 |
| -!!! error TS2453: Type argument candidate '1' is not a valid type argument because it is not a supertype of candidate 'string'. |
| 43 | + ~~~~~~~~ |
| 44 | +!!! error TS2345: Argument of type '(a: number) => string' is not assignable to parameter of type '(a: number) => 1'. |
| 45 | +!!! error TS2345: Type 'string' is not assignable to type '1'. |
43 | 46 | var r9 = foo3<number, string>(1, (a) => '', ''); // string
|
44 | 47 |
|
45 | 48 | function other<T, U>(t: T, u: U) {
|
46 | 49 | var r10 = foo2(1, (x: T) => ''); // error
|
47 |
| - ~~~~ |
48 |
| -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. |
49 |
| -!!! error TS2453: Type argument candidate '1' is not a valid type argument because it is not a supertype of candidate 'T'. |
| 50 | + ~~~~~~~~~~~~ |
| 51 | +!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. |
| 52 | +!!! error TS2345: Types of parameters 'x' and 'a' are incompatible. |
| 53 | +!!! error TS2345: Type '1' is not assignable to type 'T'. |
50 | 54 | var r10 = foo2(1, (x) => ''); // string
|
51 | 55 |
|
52 | 56 | var r11 = foo3(1, (x: T) => '', ''); // error
|
53 |
| - ~~~~ |
54 |
| -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. |
55 |
| -!!! error TS2453: Type argument candidate '1' is not a valid type argument because it is not a supertype of candidate 'T'. |
| 57 | + ~~~~~~~~~~~~ |
| 58 | +!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. |
| 59 | +!!! error TS2345: Types of parameters 'x' and 'a' are incompatible. |
| 60 | +!!! error TS2345: Type '1' is not assignable to type 'T'. |
56 | 61 | var r11b = foo3(1, (x: T) => '', 1); // error
|
57 |
| - ~~~~ |
58 |
| -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. |
59 |
| -!!! error TS2453: Type argument candidate '1' is not a valid type argument because it is not a supertype of candidate 'T'. |
| 62 | + ~~~~~~~~~~~~ |
| 63 | +!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. |
| 64 | +!!! error TS2345: Types of parameters 'x' and 'a' are incompatible. |
| 65 | +!!! error TS2345: Type '1' is not assignable to type 'T'. |
60 | 66 | var r12 = foo3(1, function (a) { return '' }, 1); // error
|
61 |
| - ~~~~ |
62 |
| -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. |
63 |
| -!!! error TS2453: Type argument candidate '1' is not a valid type argument because it is not a supertype of candidate 'string'. |
| 67 | + ~~~~~~~~ |
| 68 | +!!! error TS2345: Argument of type '(a: number) => string' is not assignable to parameter of type '(a: number) => 1'. |
| 69 | +!!! error TS2345: Type 'string' is not assignable to type '1'. |
64 | 70 | }
|
0 commit comments