Updated baselines.

This commit is contained in:
Daniel
2020-05-22 01:02:37 +00:00
parent afe90f1314
commit a008792d01
10 changed files with 36 additions and 36 deletions

View File

@@ -44,11 +44,11 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(159,5): error TS2
Type '0 | (T extends string ? "" : false)' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '0 | (T extends string ? "" : false)'.
Type 'number' is not assignable to type 'T'.
'0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
Type 'string | number' is not assignable to type 'T'.
'"" | 0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
'string | number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
Type 'string' is not assignable to type 'T'.
'""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
tests/cases/conformance/types/conditional/conditionalTypes1.ts(160,5): error TS2322: Type 'T' is not assignable to type 'ZeroOf<T>'.
Type 'string | number' is not assignable to type 'ZeroOf<T>'.
Type 'string' is not assignable to type 'ZeroOf<T>'.
@@ -284,11 +284,11 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS
!!! error TS2322: Type '0 | (T extends string ? "" : false)' is not assignable to type 'T'.
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to '0 | (T extends string ? "" : false)'.
!!! error TS2322: Type 'number' is not assignable to type 'T'.
!!! error TS2322: '0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
!!! error TS2322: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
!!! error TS2322: Type 'string | number' is not assignable to type 'T'.
!!! error TS2322: '"" | 0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
!!! error TS2322: 'string | number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
!!! error TS2322: Type 'string' is not assignable to type 'T'.
!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
y = x; // Error
~
!!! error TS2322: Type 'T' is not assignable to type 'ZeroOf<T>'.

View File

@@ -1,6 +1,6 @@
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(3,17): error TS2322: Type 'number' is not assignable to type 'string'.
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,17): error TS2322: Type 'number' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,27): error TS2322: Type 'T' is not assignable to type 'U'.
'U' could be instantiated with an arbitrary type which could be unrelated to 'T'.
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(17,17): error TS2322: Type 'Date' is not assignable to type 'T'.
@@ -22,7 +22,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co
constructor(x: T = 1, public y: U = x) { // error
~~~~~~~~
!!! error TS2322: Type 'number' is not assignable to type 'T'.
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
~~~~~~~~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'U'.
!!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'T'.

View File

@@ -3,9 +3,9 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,18): error TS2322: Type 'string' is not assignable to type 'T'.
'""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(32,9): error TS2322: Type 'string' is not assignable to type 'T'.
'""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(41,1): error TS2322: Type 'E<string>' is not assignable to type 'C<number>'.
Types of property 'x' are incompatible.
Type 'string' is not assignable to type 'number'.
@@ -52,12 +52,12 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
~~~~~~~~~~
!!! error TS2322: Type 'string' is not assignable to type 'T'.
!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
foo(): T {
return ''; // error
~~~~~~~~~~
!!! error TS2322: Type 'string' is not assignable to type 'T'.
!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
}
}

View File

@@ -3,15 +3,15 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun
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'.
Types of parameters 'x' and 'a' are incompatible.
Type 'number' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
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'.
Types of parameters 'x' and 'a' are incompatible.
Type 'number' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
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'.
Types of parameters 'x' and 'a' are incompatible.
Type 'number' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
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'.
Type 'string' is not assignable to type '1'.
@@ -54,7 +54,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
!!! error TS2345: Type 'number' is not assignable to type 'T'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
var r10 = foo2(1, (x) => ''); // string
var r11 = foo3(1, (x: T) => '', ''); // error
@@ -62,13 +62,13 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
!!! error TS2345: Type 'number' is not assignable to type 'T'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
var r11b = foo3(1, (x: T) => '', 1); // error
~~~~~~~~~~~~
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
!!! error TS2345: Type 'number' is not assignable to type 'T'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
var r12 = foo3(1, function (a) { return '' }, 1); // error
~~~~~~~~
!!! error TS2345: Argument of type '(a: number) => string' is not assignable to parameter of type '(a: number) => 1'.

View File

@@ -4,7 +4,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(15,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'.
'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(16,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
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'.
Types of parameters 'a' and 'x' are incompatible.
Type 'Date' is not assignable to type 'T'.
@@ -13,7 +13,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(50,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'.
'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(51,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
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'.
Types of parameters 'a' and 'x' are incompatible.
Type 'Date' is not assignable to type 'T'.
@@ -48,7 +48,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
var r10 = r7(1); // error
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
}
function foo2<T extends Date>(a: (x: T) => T, b: (x: T) => T) {
@@ -97,7 +97,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
var r10 = r7(1);
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
}
function foo2<T extends Date, U extends Date>(a: (x: T) => T, b: (x: U) => U) {

View File

@@ -1,5 +1,5 @@
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(5,33): error TS2322: Type 'number' is not assignable to type 'T'.
'1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Number'.
'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Number'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(6,37): error TS2322: Type 'T' is not assignable to type 'U'.
'U' could be instantiated with an arbitrary type which could be unrelated to 'T'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,56): error TS2322: Type 'U' is not assignable to type 'V'.
@@ -16,7 +16,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericC
function foo3<T extends Number>(x: T = 1) { } // error
~~~~~~~~
!!! error TS2322: Type 'number' is not assignable to type 'T'.
!!! error TS2322: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Number'.
!!! error TS2322: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Number'.
function foo4<T, U extends T>(x: T, y: U = x) { } // error
~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'U'.

View File

@@ -1,6 +1,6 @@
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(2,16): error TS2558: Expected 0 type arguments, but got 1.
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(3,16): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(4,16): error TS2558: Expected 0 type arguments, but got 1.
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(8,17): error TS2558: Expected 0 type arguments, but got 1.
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(9,17): error TS2558: Expected 0 type arguments, but got 1.
@@ -18,7 +18,7 @@ tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(14,17
var r2 = f(1);
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
var r3 = f<any>(null);
~~~
!!! error TS2558: Expected 0 type arguments, but got 1.

View File

@@ -1,15 +1,15 @@
tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(57,29): error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
Types of parameters 'x' and 'a' are incompatible.
Type 'number' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(60,30): error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
Types of parameters 'x' and 'a' are incompatible.
Type 'number' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(61,31): error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
Types of parameters 'x' and 'a' are incompatible.
Type 'number' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(62,30): error TS2345: Argument of type '(a: number) => string' is not assignable to parameter of type '(a: number) => 1'.
Type 'string' is not assignable to type '1'.
@@ -76,7 +76,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFu
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
!!! error TS2345: Type 'number' is not assignable to type 'T'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
var r10 = c.foo2(1, (x) => ''); // string
var r11 = c3.foo3(1, (x: T) => '', ''); // error
@@ -84,13 +84,13 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFu
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
!!! error TS2345: Type 'number' is not assignable to type 'T'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
var r11b = c3.foo3(1, (x: T) => '', 1); // error
~~~~~~~~~~~~
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
!!! error TS2345: Type 'number' is not assignable to type 'T'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
var r12 = c3.foo3(1, function (a) { return '' }, 1); // error
~~~~~~~~
!!! error TS2345: Argument of type '(a: number) => string' is not assignable to parameter of type '(a: number) => 1'.

View File

@@ -1,5 +1,5 @@
tests/cases/compiler/genericWithOpenTypeParameters1.ts(7,40): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
tests/cases/compiler/genericWithOpenTypeParameters1.ts(8,41): error TS2558: Expected 0 type arguments, but got 1.
tests/cases/compiler/genericWithOpenTypeParameters1.ts(9,41): error TS2558: Expected 0 type arguments, but got 1.
@@ -14,7 +14,7 @@ tests/cases/compiler/genericWithOpenTypeParameters1.ts(9,41): error TS2558: Expe
var f = <T>(x: B<T>) => { return x.foo(1); } // error
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
var f2 = <T>(x: B<T>) => { return x.foo<T>(1); } // error
~
!!! error TS2558: Expected 0 type arguments, but got 1.

View File

@@ -1,6 +1,6 @@
tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts(2,15): error TS2558: Expected 0 type arguments, but got 1.
tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts(3,15): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts(4,15): error TS2558: Expected 0 type arguments, but got 1.
@@ -12,7 +12,7 @@ tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts(4,15): erro
var r2 = f(1);
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
var r3 = f<any>(null);
~~~
!!! error TS2558: Expected 0 type arguments, but got 1.