Skip to content

Commit b38b0c7

Browse files
Updated baselines.
1 parent a04ecb5 commit b38b0c7

13 files changed

+56
-56
lines changed

tests/baselines/reference/conditionalTypes1.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(159,5): error TS2
4343
'ZeroOf<T>' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
4444
Type '0 | (T extends string ? "" : false)' is not assignable to type 'T'.
4545
'T' could be instantiated with an arbitrary type which could be unrelated to '0 | (T extends string ? "" : false)'.
46-
Type '0' is not assignable to type 'T'.
46+
Type 'number' is not assignable to type 'T'.
4747
'0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
48-
Type '"" | 0' is not assignable to type 'T'.
48+
Type 'string | number' is not assignable to type 'T'.
4949
'"" | 0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
50-
Type '""' is not assignable to type 'T'.
50+
Type 'string' is not assignable to type 'T'.
5151
'""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
5252
tests/cases/conformance/types/conditional/conditionalTypes1.ts(160,5): error TS2322: Type 'T' is not assignable to type 'ZeroOf<T>'.
5353
Type 'string | number' is not assignable to type 'ZeroOf<T>'.
@@ -283,11 +283,11 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS
283283
!!! error TS2322: 'ZeroOf<T>' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
284284
!!! error TS2322: Type '0 | (T extends string ? "" : false)' is not assignable to type 'T'.
285285
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to '0 | (T extends string ? "" : false)'.
286-
!!! error TS2322: Type '0' is not assignable to type 'T'.
286+
!!! error TS2322: Type 'number' is not assignable to type 'T'.
287287
!!! error TS2322: '0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
288-
!!! error TS2322: Type '"" | 0' is not assignable to type 'T'.
288+
!!! error TS2322: Type 'string | number' is not assignable to type 'T'.
289289
!!! error TS2322: '"" | 0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
290-
!!! error TS2322: Type '""' is not assignable to type 'T'.
290+
!!! error TS2322: Type 'string' is not assignable to type 'T'.
291291
!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
292292
y = x; // Error
293293
~

tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(3,17): error TS2322: Type 'number' is not assignable to type 'string'.
2-
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,17): error TS2322: Type '1' is not assignable to type 'T'.
2+
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,17): error TS2322: Type 'number' is not assignable to type 'T'.
33
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
44
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,27): error TS2322: Type 'T' is not assignable to type 'U'.
55
'U' could be instantiated with an arbitrary type which could be unrelated to 'T'.
@@ -21,7 +21,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co
2121
constructor(x: T, y: U);
2222
constructor(x: T = 1, public y: U = x) { // error
2323
~~~~~~~~
24-
!!! error TS2322: Type '1' is not assignable to type 'T'.
24+
!!! error TS2322: Type 'number' is not assignable to type 'T'.
2525
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
2626
~~~~~~~~~~~~~~~
2727
!!! error TS2322: Type 'T' is not assignable to type 'U'.

tests/baselines/reference/derivedGenericClassWithAny.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC
22
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
33
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
44
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
5-
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,18): error TS2322: Type '""' is not assignable to type 'T'.
5+
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,18): error TS2322: Type 'string' is not assignable to type 'T'.
66
'""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
7-
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(32,9): error TS2322: Type '""' is not assignable to type 'T'.
7+
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(32,9): error TS2322: Type 'string' is not assignable to type 'T'.
88
'""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
99
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(41,1): error TS2322: Type 'E<string>' is not assignable to type 'C<number>'.
1010
Types of property 'x' are incompatible.
@@ -51,12 +51,12 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC
5151
~
5252
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
5353
~~~~~~~~~~
54-
!!! error TS2322: Type '""' is not assignable to type 'T'.
54+
!!! error TS2322: Type 'string' is not assignable to type 'T'.
5555
!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
5656
foo(): T {
5757
return ''; // error
5858
~~~~~~~~~~
59-
!!! error TS2322: Type '""' is not assignable to type 'T'.
59+
!!! error TS2322: Type 'string' is not assignable to type 'T'.
6060
!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
6161
}
6262
}

tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun
22
Type 'string' is not assignable to type '1'.
33
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'.
44
Types of parameters 'x' and 'a' are incompatible.
5-
Type '1' is not assignable to type 'T'.
5+
Type 'number' is not assignable to type 'T'.
66
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
77
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'.
88
Types of parameters 'x' and 'a' are incompatible.
9-
Type '1' is not assignable to type 'T'.
9+
Type 'number' is not assignable to type 'T'.
1010
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
1111
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'.
1212
Types of parameters 'x' and 'a' are incompatible.
13-
Type '1' is not assignable to type 'T'.
13+
Type 'number' is not assignable to type 'T'.
1414
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
1515
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'.
1616
Type 'string' is not assignable to type '1'.
@@ -53,21 +53,21 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun
5353
~~~~~~~~~~~~
5454
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
5555
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
56-
!!! error TS2345: Type '1' is not assignable to type 'T'.
56+
!!! error TS2345: Type 'number' is not assignable to type 'T'.
5757
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
5858
var r10 = foo2(1, (x) => ''); // string
5959

6060
var r11 = foo3(1, (x: T) => '', ''); // error
6161
~~~~~~~~~~~~
6262
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
6363
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
64-
!!! error TS2345: Type '1' is not assignable to type 'T'.
64+
!!! error TS2345: Type 'number' is not assignable to type 'T'.
6565
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
6666
var r11b = foo3(1, (x: T) => '', 1); // error
6767
~~~~~~~~~~~~
6868
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
6969
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
70-
!!! error TS2345: Type '1' is not assignable to type 'T'.
70+
!!! error TS2345: Type 'number' is not assignable to type 'T'.
7171
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
7272
var r12 = foo3(1, function (a) { return '' }, 1); // error
7373
~~~~~~~~

tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
33
Type 'number' is not assignable to type 'string'.
44
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(15,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'.
55
'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'.
6-
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(16,22): error TS2345: Argument of type '1' is not assignable to parameter of type 'T'.
6+
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(16,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
77
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
88
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(25,23): error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'.
99
Types of parameters 'a' and 'x' are incompatible.
@@ -12,7 +12,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
1212
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(37,43): error TS2322: Type 'F' is not assignable to type 'E'.
1313
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(50,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'.
1414
'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'.
15-
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(51,22): error TS2345: Argument of type '1' is not assignable to parameter of type 'T'.
15+
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(51,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
1616
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
1717
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(60,23): error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'.
1818
Types of parameters 'a' and 'x' are incompatible.
@@ -47,7 +47,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
4747
!!! error TS2345: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'.
4848
var r10 = r7(1); // error
4949
~
50-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'T'.
50+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
5151
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
5252
}
5353

@@ -96,7 +96,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
9696
!!! error TS2345: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'.
9797
var r10 = r7(1);
9898
~
99-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'T'.
99+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
100100
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
101101
}
102102

tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(5,33): error TS2322: Type '1' is not assignable to type 'T'.
1+
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(5,33): error TS2322: Type 'number' is not assignable to type 'T'.
22
'1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Number'.
33
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(6,37): error TS2322: Type 'T' is not assignable to type 'U'.
44
'U' could be instantiated with an arbitrary type which could be unrelated to 'T'.
@@ -15,7 +15,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericC
1515
function foo2<T>(x: T = undefined) { return x; } // ok
1616
function foo3<T extends Number>(x: T = 1) { } // error
1717
~~~~~~~~
18-
!!! error TS2322: Type '1' is not assignable to type 'T'.
18+
!!! error TS2322: Type 'number' is not assignable to type 'T'.
1919
!!! error TS2322: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Number'.
2020
function foo4<T, U extends T>(x: T, y: U = x) { } // error
2121
~~~~~~~~

tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(2,16): error TS2558: Expected 0 type arguments, but got 1.
2-
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(3,16): error TS2345: Argument of type '1' is not assignable to parameter of type 'T'.
2+
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(3,16): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
33
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
44
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(4,16): error TS2558: Expected 0 type arguments, but got 1.
55
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(8,17): error TS2558: Expected 0 type arguments, but got 1.
@@ -17,7 +17,7 @@ tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(14,17
1717
!!! error TS2558: Expected 0 type arguments, but got 1.
1818
var r2 = f(1);
1919
~
20-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'T'.
20+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
2121
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
2222
var r3 = f<any>(null);
2323
~~~

0 commit comments

Comments
 (0)