mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #1067 from Microsoft/deduplicateTypeNotAssignableMessage
Removed duplicate diagnostic message.
This commit is contained in:
@@ -144,7 +144,7 @@ module ts {
|
||||
Named_properties_0_of_types_1_and_2_are_not_identical: { code: 2319, category: DiagnosticCategory.Error, key: "Named properties '{0}' of types '{1}' and '{2}' are not identical." },
|
||||
Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: DiagnosticCategory.Error, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." },
|
||||
Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: DiagnosticCategory.Error, key: "Excessive stack depth comparing types '{0}' and '{1}'." },
|
||||
Type_0_is_not_assignable_to_type_1: { code: 2323, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}'." },
|
||||
Type_0_is_not_assignable_to_type_1: { code: 2322, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}'." },
|
||||
Property_0_is_missing_in_type_1: { code: 2324, category: DiagnosticCategory.Error, key: "Property '{0}' is missing in type '{1}'." },
|
||||
Property_0_is_private_in_type_1_but_not_in_type_2: { code: 2325, category: DiagnosticCategory.Error, key: "Property '{0}' is private in type '{1}' but not in type '{2}'." },
|
||||
Types_of_property_0_are_incompatible: { code: 2326, category: DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible." },
|
||||
|
||||
@@ -572,10 +572,6 @@
|
||||
"category": "Error",
|
||||
"code": 2322
|
||||
},
|
||||
"Type '{0}' is not assignable to type '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 2323
|
||||
},
|
||||
"Property '{0}' is missing in type '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 2324
|
||||
|
||||
@@ -6,10 +6,10 @@ tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(8,16): error TS10
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(3,55): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(5,54): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(9,52): error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,51): error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(3,55): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(5,54): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(9,52): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,51): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts (12 errors) ====
|
||||
@@ -21,13 +21,13 @@ tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,51): error TS2
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
public get AnnotatedSetter_SetterLast() { return ""; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
public set AnnotatedSetter_SetterLast(a: number) { }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
@@ -39,13 +39,13 @@ tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,51): error TS2
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~~~~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
public set AnnotatedGetter_GetterLast(aStr) { aStr = 0; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~~~~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
public get AnnotatedGetter_GetterLast(): string { return ""; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2323: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
|
||||
tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
|
||||
Property 'someClass' is missing in type 'Number'.
|
||||
tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2323: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
|
||||
tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2322: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/aliasAssignments_1.ts (2 errors) ====
|
||||
@@ -8,12 +8,12 @@ tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2323: Type 'typeof "tes
|
||||
var x = moduleA;
|
||||
x = 1; // Should be error
|
||||
~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
|
||||
!!! error TS2323: Property 'someClass' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
|
||||
!!! error TS2322: Property 'someClass' is missing in type 'Number'.
|
||||
var y = 1;
|
||||
y = moduleA; // should be error
|
||||
~
|
||||
!!! error TS2323: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
|
||||
|
||||
==== tests/cases/compiler/aliasAssignments_moduleA.ts (0 errors) ====
|
||||
export class someClass {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/ambiguousOverload.ts(5,5): error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/ambiguousOverload.ts(11,5): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/ambiguousOverload.ts(5,5): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/ambiguousOverload.ts(11,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/ambiguousOverload.ts (2 errors) ====
|
||||
@@ -9,7 +9,7 @@ tests/cases/compiler/ambiguousOverload.ts(11,5): error TS2323: Type 'string' is
|
||||
var x: number = foof("s", null);
|
||||
var y: string = foof("s", null);
|
||||
~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
function foof2(bar: string, x): string;
|
||||
function foof2(bar: string, y): number;
|
||||
@@ -17,4 +17,4 @@ tests/cases/compiler/ambiguousOverload.ts(11,5): error TS2323: Type 'string' is
|
||||
var x2: string = foof2("s", null);
|
||||
var y2: number = foof2("s", null);
|
||||
~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2323: Type 'number' is not assignable to type 'IArguments'.
|
||||
tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@ tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS
|
||||
function foo(a) {
|
||||
arguments = 10; /// This shouldnt be of type number and result in error.
|
||||
~~~~~~~~~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'IArguments'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'IArguments'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
}
|
||||
@@ -1,46 +1,46 @@
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2323: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2322: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
Property 'IM1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2323: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2322: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
Property 'IM1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2323: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2322: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2323: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2322: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(60,1): error TS2323: Type 'C3[]' is not assignable to type 'I1[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(60,1): error TS2322: Type 'C3[]' is not assignable to type 'I1[]'.
|
||||
Type 'C3' is not assignable to type 'I1'.
|
||||
Property 'IM1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(64,1): error TS2323: Type 'I1[]' is not assignable to type 'C1[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(64,1): error TS2322: Type 'I1[]' is not assignable to type 'C1[]'.
|
||||
Type 'I1' is not assignable to type 'C1'.
|
||||
Property 'C1M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(65,1): error TS2323: Type 'C3[]' is not assignable to type 'C1[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(65,1): error TS2322: Type 'C3[]' is not assignable to type 'C1[]'.
|
||||
Type 'C3' is not assignable to type 'C1'.
|
||||
Property 'IM1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(68,1): error TS2323: Type 'C1[]' is not assignable to type 'C2[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(68,1): error TS2322: Type 'C1[]' is not assignable to type 'C2[]'.
|
||||
Type 'C1' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(69,1): error TS2323: Type 'I1[]' is not assignable to type 'C2[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(69,1): error TS2322: Type 'I1[]' is not assignable to type 'C2[]'.
|
||||
Type 'I1' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2323: Type 'C3[]' is not assignable to type 'C2[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is not assignable to type 'C2[]'.
|
||||
Type 'C3' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(75,1): error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(75,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
Type 'C2' is not assignable to type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(76,1): error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(76,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
Type 'C1' is not assignable to type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(77,1): error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(77,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
Type 'I1' is not assignable to type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type '{ one: number; }'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(82,1): error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(82,1): error TS2322: Type 'C1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2322: Type 'C2' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2322: Type 'C3' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'I1'.
|
||||
|
||||
|
||||
@@ -92,20 +92,20 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2323: Type 'I1' is n
|
||||
|
||||
var i1_error: I1 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'undefined[]'.
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'.
|
||||
var c1_error: C1 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'undefined[]'.
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'.
|
||||
var c2_error: C2 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'undefined[]'.
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'undefined[]'.
|
||||
var c3_error: C3 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
|
||||
|
||||
arr_any = arr_i1; // should be ok - is
|
||||
@@ -118,78 +118,78 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2323: Type 'I1' is n
|
||||
arr_i1 = arr_c2; // should be ok - subtype relationship - is
|
||||
arr_i1 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'C3[]' is not assignable to type 'I1[]'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'I1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'C3'.
|
||||
!!! error TS2322: Type 'C3[]' is not assignable to type 'I1[]'.
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'I1'.
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'C3'.
|
||||
|
||||
arr_c1 = arr_c1; // should be ok - subtype relationship - is
|
||||
arr_c1 = arr_c2; // should be ok - subtype relationship - is
|
||||
arr_c1 = arr_i1; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C1[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C1'.
|
||||
!!! error TS2323: Property 'C1M1' is missing in type 'I1'.
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C1[]'.
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C1'.
|
||||
!!! error TS2322: Property 'C1M1' is missing in type 'I1'.
|
||||
arr_c1 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'C3[]' is not assignable to type 'C1[]'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'C1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'C3'.
|
||||
!!! error TS2322: Type 'C3[]' is not assignable to type 'C1[]'.
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'C1'.
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'C3'.
|
||||
|
||||
arr_c2 = arr_c2; // should be ok - subtype relationship - is
|
||||
arr_c2 = arr_c1; // should be an error - subtype relationship - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'C1[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'C1'.
|
||||
!!! error TS2322: Type 'C1[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'C2'.
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'C1'.
|
||||
arr_c2 = arr_i1; // should be an error - subtype relationship - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'I1'.
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C2'.
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'I1'.
|
||||
arr_c2 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'C3[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'C3'.
|
||||
!!! error TS2322: Type 'C3[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'C2'.
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'C3'.
|
||||
|
||||
// "clean up bug" occurs at this point
|
||||
// if you move these three expressions to another file, they raise an error
|
||||
// something to do with state from the above propagating forward?
|
||||
arr_c3 = arr_c2_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'C3'.
|
||||
!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'C3'.
|
||||
arr_c3 = arr_c1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'C3'.
|
||||
!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'C3'.
|
||||
arr_c3 = arr_i1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C3'.
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C3'.
|
||||
|
||||
arr_any = f1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => C1'.
|
||||
!!! error TS2322: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type '() => C1'.
|
||||
arr_any = o1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type '{ one: number; }'.
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type '{ one: number; }'.
|
||||
arr_any = a1; // should be ok - is
|
||||
arr_any = c1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C1'.
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C1'.
|
||||
arr_any = c2; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C2'.
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C2'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
arr_any = i1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'I1'.
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'I1'.
|
||||
@@ -1,25 +1,25 @@
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(47,1): error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(47,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
Type 'C2' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(48,1): error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(48,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
Type 'C1' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(49,1): error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(49,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
Type 'I1' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2322: Type '() => any' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => any'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type '{ one: number; }'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(55,1): error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(55,1): error TS2322: Type 'C1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2322: Type 'C2' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2322: Type 'C3' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2322: Type 'I1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'I1'.
|
||||
|
||||
|
||||
@@ -72,47 +72,47 @@ tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2323: Type 'I1' is n
|
||||
// "clean up error" occurs at this point
|
||||
arr_c3 = arr_c2_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'C2'.
|
||||
!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'C3'.
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'C2'.
|
||||
arr_c3 = arr_c1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'C1'.
|
||||
!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'C3'.
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'C1'.
|
||||
arr_c3 = arr_i1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'I1'.
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C3'.
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'I1'.
|
||||
|
||||
arr_any = f1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => C1'.
|
||||
!!! error TS2322: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type '() => C1'.
|
||||
arr_any = function () { return null;} // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => any'.
|
||||
!!! error TS2322: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type '() => any'.
|
||||
arr_any = o1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type '{ one: number; }'.
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type '{ one: number; }'.
|
||||
arr_any = a1; // should be ok - is
|
||||
arr_any = c1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C1'.
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C1'.
|
||||
arr_any = c2; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C2'.
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C2'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
arr_any = i1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'I1'.
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'I1'.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(24,1): error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(24,1): error TS2322: Type '() => any' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => any'.
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2322: Type 'C3' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C3'.
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2323: Type 'C3' is n
|
||||
|
||||
arr_any = function () { return null;} // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => any'.
|
||||
!!! error TS2322: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type '() => any'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2323: Type 'IToken[]' is not assignable to type 'IStateToken[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]'.
|
||||
Type 'IToken' is not assignable to type 'IStateToken'.
|
||||
Property 'state' is missing in type 'IToken'.
|
||||
|
||||
@@ -28,9 +28,9 @@ tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2323: Type 'IToken[
|
||||
var lineTokens:ILineTokens= this.tokenize(line, state, true);
|
||||
var tokens:IStateToken[]= lineTokens.tokens;
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'IToken[]' is not assignable to type 'IStateToken[]'.
|
||||
!!! error TS2323: Type 'IToken' is not assignable to type 'IStateToken'.
|
||||
!!! error TS2323: Property 'state' is missing in type 'IToken'.
|
||||
!!! error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]'.
|
||||
!!! error TS2322: Type 'IToken' is not assignable to type 'IStateToken'.
|
||||
!!! error TS2322: Property 'state' is missing in type 'IToken'.
|
||||
if (tokens.length === 0) {
|
||||
return this.onEnter(line, tokens, offset); // <== this should produce an error since onEnter can not be called with (string, IStateToken[], offset)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/arraySigChecking.ts(11,17): error TS1023: An index signature parameter type must be 'string' or 'number'.
|
||||
tests/cases/compiler/arraySigChecking.ts(18,5): error TS2323: Type 'void[]' is not assignable to type 'string[]'.
|
||||
tests/cases/compiler/arraySigChecking.ts(18,5): error TS2322: Type 'void[]' is not assignable to type 'string[]'.
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
tests/cases/compiler/arraySigChecking.ts(22,1): error TS2323: Type 'number[][]' is not assignable to type 'number[][][]'.
|
||||
tests/cases/compiler/arraySigChecking.ts(22,1): error TS2322: Type 'number[][]' is not assignable to type 'number[][][]'.
|
||||
Type 'number[]' is not assignable to type 'number[][]'.
|
||||
Type 'number' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -29,17 +29,17 @@ tests/cases/compiler/arraySigChecking.ts(22,1): error TS2323: Type 'number[][]'
|
||||
var myVar: myInt;
|
||||
var strArray: string[] = [myVar.voidFn()];
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'void[]' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Type 'void' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'void[]' is not assignable to type 'string[]'.
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
|
||||
|
||||
var myArray: number[][][];
|
||||
myArray = [[1, 2]];
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'number[][]' is not assignable to type 'number[][][]'.
|
||||
!!! error TS2323: Type 'number[]' is not assignable to type 'number[][]'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'number[][]' is not assignable to type 'number[][][]'.
|
||||
!!! error TS2322: Type 'number[]' is not assignable to type 'number[][]'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
|
||||
function isEmpty(l: { length: number }) {
|
||||
return l.length === 0;
|
||||
|
||||
@@ -2,9 +2,9 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,30): error TS1109: Expression expected.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,22): error TS1005: '=' expected.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,32): error TS1109: Expression expected.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
Property 'isArray' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,5): error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,5): error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts (6 errors) ====
|
||||
@@ -19,12 +19,12 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~~
|
||||
!!! error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
!!! error TS2323: Property 'isArray' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
!!! error TS2322: Property 'isArray' is missing in type 'Number'.
|
||||
var xs4: typeof Array<typeof x>;
|
||||
~
|
||||
!!! error TS1005: '=' expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~~
|
||||
!!! error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(3,7): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(3,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(19,1): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(31,9): error TS2323: Type '() => number' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(31,9): error TS2322: Type '() => number' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(32,16): error TS2332: 'this' cannot be referenced in current location.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(44,11): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(44,11): error TS2410: All symbols within a 'with' block will be resolved to 'any'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(60,5): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,13): error TS2323: Type '() => number' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,13): error TS2322: Type '() => number' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(73,20): error TS2332: 'this' cannot be referenced in current location.
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(73,20): e
|
||||
enum E {
|
||||
x = () => 4, // Error expected
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'E'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'E'.
|
||||
y = (() => this).length // error, can't use this in enum
|
||||
~~~~
|
||||
!!! error TS2332: 'this' cannot be referenced in current location.
|
||||
@@ -100,7 +100,7 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(73,20): e
|
||||
enum E {
|
||||
x = () => 4, // Error expected
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'E'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'E'.
|
||||
y = (() => this).length
|
||||
~~~~
|
||||
!!! error TS2332: 'this' cannot be referenced in current location.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts(3,1): error TS2323: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts(3,1): error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts(3
|
||||
var a: Boolean;
|
||||
x = a;
|
||||
~
|
||||
!!! error TS2323: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
a = x;
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(19,1): error TS2323: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(20,1): error TS2323: Type 'NotBoolean' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(19,1): error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(20,1): error TS2322: Type 'NotBoolean' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts (2 errors) ====
|
||||
@@ -23,9 +23,9 @@ tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(
|
||||
|
||||
x = a; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
x = b; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'NotBoolean' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'NotBoolean' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts(3,1): error TS2323: Type 'Number' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts(3,1): error TS2322: Type 'Number' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts(3,1
|
||||
var a: Number;
|
||||
x = a;
|
||||
~
|
||||
!!! error TS2323: Type 'Number' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'Number' is not assignable to type 'number'.
|
||||
a = x;
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(23,1): error TS2323: Type 'Number' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(24,1): error TS2323: Type 'NotNumber' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(23,1): error TS2322: Type 'Number' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(24,1): error TS2322: Type 'NotNumber' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts (2 errors) ====
|
||||
@@ -27,9 +27,9 @@ tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(24
|
||||
|
||||
x = a; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'Number' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'Number' is not assignable to type 'number'.
|
||||
x = b; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'NotNumber' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'NotNumber' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts(3,1): error TS2323: Type 'String' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts(3,1): error TS2322: Type 'String' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts(3,1
|
||||
var a: String;
|
||||
x = a;
|
||||
~
|
||||
!!! error TS2323: Type 'String' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'String' is not assignable to type 'string'.
|
||||
a = x;
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(46,1): error TS2323: Type 'String' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(47,1): error TS2323: Type 'NotString' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(46,1): error TS2322: Type 'String' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(47,1): error TS2322: Type 'NotString' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts (2 errors) ====
|
||||
@@ -50,9 +50,9 @@ tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(47
|
||||
|
||||
x = a; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'String' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'String' is not assignable to type 'string'.
|
||||
x = b; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'NotString' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'NotString' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignToFn.ts(8,5): error TS2323: Type 'string' is not assignable to type '(n: number) => boolean'.
|
||||
tests/cases/compiler/assignToFn.ts(8,5): error TS2322: Type 'string' is not assignable to type '(n: number) => boolean'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignToFn.ts (1 errors) ====
|
||||
@@ -11,6 +11,6 @@ tests/cases/compiler/assignToFn.ts(8,5): error TS2323: Type 'string' is not assi
|
||||
|
||||
x.f="hello";
|
||||
~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type '(n: number) => boolean'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type '(n: number) => boolean'.
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2323: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2323: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
Index signature is missing in type '{ one: number; }'.
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2323: Type '{ one: numbe
|
||||
|
||||
x = y;
|
||||
~
|
||||
!!! error TS2323: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
!!! error TS2323: Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
!!! error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
!!! error TS2322: Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
y = x;
|
||||
~
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2323: Index signature is missing in type '{ one: number; }'.
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{ one: number; }'.
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2323: Type '[number, string]' is not assignable to type 'number[]'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2322: Type '[number, string]' is not assignable to type 'number[]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number' is not assignable to type '() => number'.
|
||||
Type 'string | number' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2323: Type '{}[]' is not assignable to type '[{}]'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2322: Type '{}[]' is not assignable to type '[{}]'.
|
||||
Property '0' is missing in type '{}[]'.
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// error
|
||||
numArray = numStrTuple;
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type '[number, string]' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Types of property 'pop' are incompatible.
|
||||
!!! error TS2323: Type '() => string | number' is not assignable to type '() => number'.
|
||||
!!! error TS2323: Type 'string | number' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '[number, string]' is not assignable to type 'number[]'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => string | number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
emptyObjTuple = emptyObjArray;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type '{}[]' is not assignable to type '[{}]'.
|
||||
!!! error TS2323: Property '0' is missing in type '{}[]'.
|
||||
!!! error TS2322: Type '{}[]' is not assignable to type '[{}]'.
|
||||
!!! error TS2322: Property '0' is missing in type '{}[]'.
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
Property 'b' is missing in type '{ a: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
Property 'b' is missing in type '{ a: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2323: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatBug2.ts (5 errors) ====
|
||||
var b2: { b: number;} = { a: 0 }; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2323: Property 'b' is missing in type '{ a: number; }'.
|
||||
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2322: Property 'b' is missing in type '{ a: number; }'.
|
||||
|
||||
b2 = { a: 0 }; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2323: Property 'b' is missing in type '{ a: number; }'.
|
||||
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2322: Property 'b' is missing in type '{ a: number; }'.
|
||||
|
||||
b2 = {b: 0, a: 0 };
|
||||
|
||||
@@ -33,16 +33,16 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2323: Type '{ f: (n:
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2323: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
|
||||
!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
|
||||
f: (n) => { return 0; },
|
||||
g: (s) => { return 0; },
|
||||
}; // error
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! error TS2323: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2323: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
|
||||
!!! error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2322: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
|
||||
f: (n) => { return 0; },
|
||||
m: 0,
|
||||
}; // error
|
||||
@@ -57,8 +57,8 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2323: Type '{ f: (n:
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2323: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'.
|
||||
!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'.
|
||||
f: (n) => { return 0; },
|
||||
g: (s) => { return 0; },
|
||||
n: 0,
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(35,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(35,1): error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(36,1): error TS2323: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(36,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(37,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(37,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(38,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(38,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(39,1): error TS2323: Type 'S2' is not assignable to type '(x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(39,1): error TS2322: Type 'S2' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(40,1): error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(40,1): error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(41,1): error TS2323: Type '(x: string) => number' is not assignable to type '(x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(41,1): error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(42,1): error TS2323: Type '(x: string) => string' is not assignable to type '(x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(42,1): error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -61,42 +61,42 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(31,1): error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(31,1): error TS2322: Type '() => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(32,1): error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(32,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(33,1): error TS2323: Type '() => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(33,1): error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(34,1): error TS2323: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(34,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(42,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(42,1): error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(43,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(43,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(45,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(45,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(46,1): error TS2323: Type 'S2' is not assignable to type '{ f(x: number): void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(46,1): error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(47,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(47,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(48,1): error TS2323: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(48,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(49,1): error TS2323: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(49,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
|
||||
@@ -69,20 +69,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// errors
|
||||
t = () => 1;
|
||||
~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
t = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
a = () => 1;
|
||||
~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
a = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
|
||||
interface S2 {
|
||||
f(x: string): void;
|
||||
@@ -92,46 +92,46 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2323: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2323: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
|
||||
@@ -64,18 +64,18 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b8: <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U;
|
||||
a8 = b8; // error, { foo: number } and Base are incompatible
|
||||
~~
|
||||
!!! error TS2323: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2323: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
b8 = a8; // error, { foo: number } and Base are incompatible
|
||||
~~
|
||||
!!! error TS2323: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
!!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
|
||||
|
||||
var b10: <T extends Derived>(...x: T[]) => T;
|
||||
|
||||
+14
-14
@@ -1,10 +1,10 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(16,5): error TS2323: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(19,5): error TS2323: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(20,5): error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(22,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(33,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(39,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(16,5): error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(19,5): error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(20,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(22,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(33,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(39,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts (7 errors) ====
|
||||
@@ -25,19 +25,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = (x?: number) => 1; // ok, same number of required params
|
||||
a = (x: number) => 1; // error, too many required params
|
||||
~
|
||||
!!! error TS2323: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
a = b.a; // ok
|
||||
a = b.a2; // ok
|
||||
a = b.a3; // error
|
||||
~
|
||||
!!! error TS2323: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
a = b.a4; // error
|
||||
~
|
||||
!!! error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '() => number'.
|
||||
a = b.a5; // ok
|
||||
a = b.a6; // error
|
||||
~
|
||||
!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '() => number'.
|
||||
|
||||
var a2: (x?: number) => number;
|
||||
a2 = () => 1; // ok, same number of required params
|
||||
@@ -50,7 +50,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = b.a5; // ok
|
||||
a2 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'.
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'.
|
||||
|
||||
var a3: (x: number) => number;
|
||||
a3 = () => 1; // ok, fewer required params
|
||||
@@ -58,7 +58,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = (x: number) => 1; // ok, same number of required params
|
||||
a3 = (x: number, y: number) => 1; // error, too many required params
|
||||
~~
|
||||
!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
a3 = b.a; // ok
|
||||
a3 = b.a2; // ok
|
||||
a3 = b.a3; // ok
|
||||
@@ -66,7 +66,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = b.a5; // ok
|
||||
a3 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
|
||||
var a4: (x: number, y?: number) => number;
|
||||
a4 = () => 1; // ok, fewer required params
|
||||
|
||||
+36
-36
@@ -1,28 +1,28 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2323: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
Types of parameters 'args' and 'args' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2323: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
Types of parameters 'x' and 'args' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(26,5): error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(26,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'.
|
||||
Types of parameters 'args' and 'z' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(35,5): error TS2323: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(35,5): error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(36,5): error TS2323: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(36,5): error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'z' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(37,5): error TS2323: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(37,5): error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(41,5): error TS2323: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(41,5): error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(43,5): error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(43,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(45,5): error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(45,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'args' and 'z' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -42,17 +42,17 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = (...args: number[]) => 1; // ok, same number of required params
|
||||
a = (...args: string[]) => 1; // error, type mismatch
|
||||
~
|
||||
!!! error TS2323: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'args' and 'args' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
!!! error TS2322: Types of parameters 'args' and 'args' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = (x?: number) => 1; // ok, same number of required params
|
||||
a = (x?: number, y?: number, z?: number) => 1; // ok, same number of required params
|
||||
a = (x: number) => 1; // ok, rest param corresponds to infinite number of params
|
||||
a = (x?: string) => 1; // error, incompatible type
|
||||
~
|
||||
!!! error TS2323: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'args' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'args' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
var a2: (x: number, ...z: number[]) => number;
|
||||
@@ -63,9 +63,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = (x: number, ...args: number[]) => 1; // ok, same number of required params
|
||||
a2 = (x: number, ...args: string[]) => 1; // should be type mismatch error
|
||||
~~
|
||||
!!! error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'.
|
||||
!!! error TS2322: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a2 = (x: number, y: number) => 1; // ok, rest param corresponds to infinite number of params
|
||||
a2 = (x: number, y?: number) => 1; // ok, same number of required params
|
||||
|
||||
@@ -76,36 +76,36 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = (x: number, y: string) => 1; // ok, all present params match
|
||||
a3 = (x: number, y?: number, z?: number) => 1; // error
|
||||
~~
|
||||
!!! error TS2323: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
a3 = (x: number, ...z: number[]) => 1; // error
|
||||
~~
|
||||
!!! error TS2323: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'z' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Types of parameters 'z' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
a3 = (x: string, y?: string, z?: string) => 1; // error
|
||||
~~
|
||||
!!! error TS2323: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
var a4: (x?: number, y?: string, ...z: number[]) => number;
|
||||
a4 = () => 1; // ok, fewer required params
|
||||
a4 = (x?: number, y?: number) => 1; // error, type mismatch
|
||||
~~
|
||||
!!! error TS2323: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
a4 = (x: number) => 1; // ok, all present params match
|
||||
a4 = (x: number, y?: number) => 1; // error, second param has type mismatch
|
||||
~~
|
||||
!!! error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
a4 = (x?: number, y?: string) => 1; // ok, same number of required params with matching types
|
||||
a4 = (x: number, ...args: string[]) => 1; // error, rest params have type mismatch
|
||||
~~
|
||||
!!! error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(28,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(29,1): error TS2323: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(30,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(31,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(32,1): error TS2323: Type 'S2' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(33,1): error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(34,1): error TS2323: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(35,1): error TS2323: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(28,1): error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(29,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(30,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(31,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(32,1): error TS2322: Type 'S2' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(33,1): error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(34,1): error TS2322: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(35,1): error TS2322: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts (8 errors) ====
|
||||
@@ -38,26 +38,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'new (x: number) => void'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'.
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(23,1): error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(23,1): error TS2322: Type '() => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(24,1): error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(24,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(25,1): error TS2323: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(25,1): error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(26,1): error TS2323: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(26,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(34,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(34,1): error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(38,1): error TS2323: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(38,1): error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(39,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(39,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(40,1): error TS2323: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(40,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(41,1): error TS2323: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(41,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
|
||||
@@ -53,20 +53,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// errors
|
||||
t = () => 1;
|
||||
~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
t = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
a = () => 1;
|
||||
~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
a = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
|
||||
interface S2 {
|
||||
f(x: string): void;
|
||||
@@ -76,38 +76,38 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(52,9): error TS2323: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(52,9): error TS2322: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(53,9): error TS2323: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(53,9): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(77,9): error TS2323: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(77,9): error TS2322: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(78,9): error TS2323: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(78,9): error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2323: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2322: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2323: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2322: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
|
||||
@@ -76,18 +76,18 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b8: new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U;
|
||||
a8 = b8; // error, type mismatch
|
||||
~~
|
||||
!!! error TS2323: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2323: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
b8 = a8; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
!!! error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
|
||||
|
||||
var b10: new <T extends Derived>(...x: T[]) => T;
|
||||
@@ -113,26 +113,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b16: new <T>(x: (a: T) => T) => T[];
|
||||
a16 = b16; // error
|
||||
~~~
|
||||
!!! error TS2323: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
!!! error TS2322: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
b16 = a16; // error
|
||||
~~~
|
||||
!!! error TS2323: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
!!! error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
|
||||
var b17: new <T>(x: (a: T) => T) => any[];
|
||||
a17 = b17; // error
|
||||
~~~
|
||||
!!! error TS2323: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
!!! error TS2322: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
b17 = a17; // error
|
||||
~~~
|
||||
!!! error TS2323: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
!!! error TS2322: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
}
|
||||
|
||||
module WithGenericSignaturesInBaseType {
|
||||
|
||||
+10
-10
@@ -1,8 +1,8 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(16,5): error TS2323: Type 'new (x: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(17,5): error TS2323: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(19,5): error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(27,5): error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(16,5): error TS2322: Type 'new (x: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(17,5): error TS2322: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(19,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(27,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts (5 errors) ====
|
||||
@@ -23,14 +23,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b.a2; // ok
|
||||
a = b.a3; // error
|
||||
~
|
||||
!!! error TS2323: Type 'new (x: number) => number' is not assignable to type 'new () => number'.
|
||||
!!! error TS2322: Type 'new (x: number) => number' is not assignable to type 'new () => number'.
|
||||
a = b.a4; // error
|
||||
~
|
||||
!!! error TS2323: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'.
|
||||
!!! error TS2322: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'.
|
||||
a = b.a5; // ok
|
||||
a = b.a6; // error
|
||||
~
|
||||
!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'.
|
||||
!!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'.
|
||||
|
||||
var a2: new (x?: number) => number;
|
||||
a2 = b.a; // ok
|
||||
@@ -40,7 +40,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = b.a5; // ok
|
||||
a2 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'.
|
||||
!!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'.
|
||||
|
||||
var a3: new (x: number) => number;
|
||||
a3 = b.a; // ok
|
||||
@@ -50,7 +50,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = b.a5; // ok
|
||||
a3 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
|
||||
!!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
|
||||
|
||||
var a4: new (x: number, y?: number) => number;
|
||||
a4 = b.a; // ok
|
||||
|
||||
+12
-12
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(14,13): error TS2323: Type '(x: T) => any' is not assignable to type '() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(23,13): error TS2323: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(65,9): error TS2323: Type '(x: T) => T' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(66,9): error TS2323: Type '(x: T, y?: T) => T' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(107,13): error TS2323: Type '<T>(x: T) => any' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(116,13): error TS2323: Type '<T>(x: T, y: T) => any' is not assignable to type '<T>(x: T) => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(14,13): error TS2322: Type '(x: T) => any' is not assignable to type '() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(23,13): error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(65,9): error TS2322: Type '(x: T) => T' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(66,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(107,13): error TS2322: Type '<T>(x: T) => any' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(116,13): error TS2322: Type '<T>(x: T, y: T) => any' is not assignable to type '<T>(x: T) => T'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts (6 errors) ====
|
||||
@@ -22,7 +22,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a = (x?: T) => null; // ok, same T of required params
|
||||
this.a = (x: T) => null; // error, too many required params
|
||||
~~~~~~
|
||||
!!! error TS2323: Type '(x: T) => any' is not assignable to type '() => T'.
|
||||
!!! error TS2322: Type '(x: T) => any' is not assignable to type '() => T'.
|
||||
|
||||
this.a2 = () => null; // ok, same T of required params
|
||||
this.a2 = (x?: T) => null; // ok, same T of required params
|
||||
@@ -33,7 +33,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a3 = (x: T) => null; // ok, same T of required params
|
||||
this.a3 = (x: T, y: T) => null; // error, too many required params
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'.
|
||||
!!! error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'.
|
||||
|
||||
this.a4 = () => null; // ok, fewer required params
|
||||
this.a4 = (x?: T, y?: T) => null; // ok, fewer required params
|
||||
@@ -77,10 +77,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
b.a = t.a2;
|
||||
b.a = t.a3;
|
||||
~~~
|
||||
!!! error TS2323: Type '(x: T) => T' is not assignable to type '<T>() => T'.
|
||||
!!! error TS2322: Type '(x: T) => T' is not assignable to type '<T>() => T'.
|
||||
b.a = t.a4;
|
||||
~~~
|
||||
!!! error TS2323: Type '(x: T, y?: T) => T' is not assignable to type '<T>() => T'.
|
||||
!!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '<T>() => T'.
|
||||
b.a = t.a5;
|
||||
|
||||
b.a2 = t.a;
|
||||
@@ -123,7 +123,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a = <T>(x?: T) => null; // ok, same T of required params
|
||||
this.a = <T>(x: T) => null; // error, too many required params
|
||||
~~~~~~
|
||||
!!! error TS2323: Type '<T>(x: T) => any' is not assignable to type '<T>() => T'.
|
||||
!!! error TS2322: Type '<T>(x: T) => any' is not assignable to type '<T>() => T'.
|
||||
|
||||
this.a2 = <T>() => null; // ok, same T of required params
|
||||
this.a2 = <T>(x?: T) => null; // ok, same T of required params
|
||||
@@ -134,7 +134,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a3 = <T>(x: T) => null; // ok, same T of required params
|
||||
this.a3 = <T>(x: T, y: T) => null; // error, too many required params
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '<T>(x: T, y: T) => any' is not assignable to type '<T>(x: T) => T'.
|
||||
!!! error TS2322: Type '<T>(x: T, y: T) => any' is not assignable to type '<T>(x: T) => T'.
|
||||
|
||||
this.a4 = <T>() => null; // ok, fewer required params
|
||||
this.a4 = <T>(x?: T, y?: T) => null; // ok, fewer required params
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(14,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(18,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(32,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(33,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(33,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(36,9): error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(37,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
|
||||
@@ -36,19 +36,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b;
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2;
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
class A<T extends Base> {
|
||||
@@ -64,26 +64,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: number]: Derived; }
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2'.
|
||||
|
||||
var b3: { [x: number]: T; }
|
||||
a = b3; // ok
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(14,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(18,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(32,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(33,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(33,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(36,9): error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(37,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
|
||||
@@ -36,19 +36,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b;
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2;
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
interface A<T extends Base> {
|
||||
@@ -64,26 +64,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: number]: Derived; }
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2'.
|
||||
|
||||
var b3: { [x: number]: T; }
|
||||
a = b3; // ok
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(14,1): error TS2323: Type '{ [x: number]: Base; }' is not assignable to type 'A'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(14,1): error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(23,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(23,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(33,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(33,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
|
||||
@@ -27,10 +27,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ [x: number]: Base; }' is not assignable to type 'A'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
b = a; // ok
|
||||
|
||||
class B2 extends A {
|
||||
@@ -41,10 +41,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b2; // ok
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
|
||||
module Generics {
|
||||
class A<T extends Derived> {
|
||||
@@ -56,9 +56,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: number]: Derived; };
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
b = a; // ok
|
||||
|
||||
var b2: { [x: number]: T; };
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(24,5): error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(24,5): error TS2322: Type 'T' is not assignable to type 'S'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(25,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(25,5): error TS2322: Type 'S' is not assignable to type 'T'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(29,5): error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(29,5): error TS2322: Type 'T2' is not assignable to type 'S2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(30,5): error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(30,5): error TS2322: Type 'S2' is not assignable to type 'T2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(31,5): error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(31,5): error TS2322: Type 'T' is not assignable to type 'S2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(32,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(32,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(35,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(35,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(36,5): error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(36,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(41,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(41,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(42,5): error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(42,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(43,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(43,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(44,5): error TS2323: Type 'T2' is not assignable to type '{ foo: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(44,5): error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(45,5): error TS2323: Type 'T' is not assignable to type '{ foo: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(45,5): error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(70,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(70,5): error TS2322: Type 'S' is not assignable to type 'T'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(75,5): error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(75,5): error TS2322: Type 'S2' is not assignable to type 'T2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(81,5): error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(81,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(87,5): error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(87,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
|
||||
@@ -80,80 +80,80 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
s = t; // error
|
||||
~
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
t = s; // error
|
||||
~
|
||||
!!! error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
s = s2; // ok
|
||||
s = a2; // ok
|
||||
|
||||
s2 = t2; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type 'T2' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
t2 = s2; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
s2 = t; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
s2 = b; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
s2 = a2; // ok
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
a = s; // ok
|
||||
a = s2; // ok
|
||||
a = a2; // ok
|
||||
|
||||
a2 = b2; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
a2 = b; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
a2 = t2; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'T2' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
a2 = t; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'T' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
}
|
||||
|
||||
module WithBase {
|
||||
@@ -180,19 +180,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
s = t; // ok
|
||||
t = s; // error
|
||||
~
|
||||
!!! error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
s = s2; // ok
|
||||
s = a2; // ok
|
||||
|
||||
s2 = t2; // ok
|
||||
t2 = s2; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'.
|
||||
s2 = t; // ok
|
||||
s2 = b; // ok
|
||||
s2 = a2; // ok
|
||||
@@ -200,9 +200,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'.
|
||||
a = s; // ok
|
||||
a = s2; // ok
|
||||
a = a2; // ok
|
||||
@@ -210,9 +210,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = b2; // ok
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'.
|
||||
a2 = b; // ok
|
||||
a2 = t2; // ok
|
||||
a2 = t; // ok
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(13,1): error TS2323: Type 'I' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(13,1): error TS2322: Type 'I' is not assignable to type 'C'.
|
||||
Property 'foo' is missing in type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(14,1): error TS2323: Type 'C' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(14,1): error TS2322: Type 'C' is not assignable to type 'I'.
|
||||
Property 'fooo' is missing in type 'C'.
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
c = i; // error
|
||||
~
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'foo' is missing in type 'I'.
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'I'.
|
||||
i = c; // error
|
||||
~
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'fooo' is missing in type 'C'.
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'fooo' is missing in type 'C'.
|
||||
+72
-72
@@ -1,50 +1,50 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(36,5): error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(36,5): error TS2322: Type 'E' is not assignable to type 'Base'.
|
||||
Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(41,5): error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(41,5): error TS2322: Type 'E' is not assignable to type 'I'.
|
||||
Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(46,5): error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(46,5): error TS2322: Type 'E' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(48,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(48,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(49,5): error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(49,5): error TS2322: Type 'Base' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(50,5): error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(50,5): error TS2322: Type 'I' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(51,5): error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(51,5): error TS2322: Type 'D' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(81,5): error TS2323: Type 'Base' is not assignable to type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(81,5): error TS2322: Type 'Base' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(82,5): error TS2323: Type 'I' is not assignable to type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(82,5): error TS2322: Type 'I' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(84,5): error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(86,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(86,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'Base'.
|
||||
Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(88,5): error TS2323: Type 'D' is not assignable to type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(88,5): error TS2322: Type 'D' is not assignable to type 'Base'.
|
||||
Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(89,5): error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(89,5): error TS2322: Type 'E' is not assignable to type 'Base'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(92,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(92,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'I'.
|
||||
Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(94,5): error TS2323: Type 'D' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(94,5): error TS2322: Type 'D' is not assignable to type 'I'.
|
||||
Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(95,5): error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(95,5): error TS2322: Type 'E' is not assignable to type 'I'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(99,5): error TS2323: Type 'Base' is not assignable to type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(99,5): error TS2322: Type 'Base' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(100,5): error TS2323: Type 'I' is not assignable to type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(100,5): error TS2322: Type 'I' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(101,5): error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(101,5): error TS2322: Type 'E' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(103,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(103,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(104,5): error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(104,5): error TS2322: Type 'Base' is not assignable to type 'E'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(105,5): error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(105,5): error TS2322: Type 'I' is not assignable to type 'E'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2322: Type 'D' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
|
||||
|
||||
@@ -81,49 +81,49 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = d;
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
|
||||
b = a;
|
||||
b = i;
|
||||
b = d;
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
|
||||
i = a;
|
||||
i = b;
|
||||
i = d;
|
||||
i = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
|
||||
d = a;
|
||||
d = b;
|
||||
d = i;
|
||||
d = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
|
||||
e = a; // errror
|
||||
~
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
e = b; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
e = i; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
e = d; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
e = e;
|
||||
|
||||
}
|
||||
@@ -155,78 +155,78 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2323: Type 'Base' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
a = i; // error
|
||||
~
|
||||
!!! error TS2323: Type 'I' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
!!! error TS2322: Type 'I' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
a = d;
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
b = i;
|
||||
b = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
b = b;
|
||||
|
||||
i = a; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
i = b;
|
||||
i = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
i = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
i = i;
|
||||
|
||||
d = a;
|
||||
d = b; // error
|
||||
~
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
d = i; // error
|
||||
~
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
d = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
|
||||
e = a; // errror
|
||||
~
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
e = b; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
e = i; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
e = d; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
e = e;
|
||||
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(73,5): error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(73,5): error TS2322: Type 'D' is not assignable to type 'C'.
|
||||
Property 'opt' is optional in type 'D' but required in type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(74,5): error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(74,5): error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
Property 'opt' is optional in type 'E' but required in type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(78,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(78,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(79,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(79,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(83,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(83,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
|
||||
|
||||
@@ -87,34 +87,34 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
c = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'D' but required in type 'C'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'opt' is optional in type 'D' but required in type 'C'.
|
||||
c = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'E' but required in type 'C'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'opt' is optional in type 'E' but required in type 'C'.
|
||||
c = f; // ok
|
||||
c = a; // ok
|
||||
|
||||
a = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
a = f; // ok
|
||||
a = c; // ok
|
||||
|
||||
b = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
b = f; // ok
|
||||
b = a; // ok
|
||||
b = c; // ok
|
||||
|
||||
+27
-27
@@ -1,20 +1,20 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2322: Type 'D' is not assignable to type 'C'.
|
||||
Property 'opt' is missing in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
Property 'opt' is missing in type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(76,5): error TS2323: Type 'F' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(76,5): error TS2322: Type 'F' is not assignable to type 'C'.
|
||||
Property 'opt' is missing in type 'F'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(79,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(79,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(80,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(80,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(81,5): error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(81,5): error TS2322: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'F'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(84,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(84,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(85,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(85,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2322: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'F'.
|
||||
|
||||
|
||||
@@ -94,44 +94,44 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
c = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
c = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
c = f; // error
|
||||
~
|
||||
!!! error TS2323: Type 'F' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2322: Type 'F' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
c = a; // ok
|
||||
|
||||
a = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
a = f; // error
|
||||
~
|
||||
!!! error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
a = c; // ok
|
||||
|
||||
b = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
b = f; // error
|
||||
~
|
||||
!!! error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
b = a; // ok
|
||||
b = c; // ok
|
||||
}
|
||||
+87
-87
@@ -1,60 +1,60 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2322: Type 'T' is not assignable to type 'S'.
|
||||
Property ''1'' is missing in type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2322: Type 'S' is not assignable to type 'T'.
|
||||
Property ''1.'' is missing in type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2322: Type 'T2' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type 'T2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2322: Type 'S2' is not assignable to type 'T2'.
|
||||
Property ''1.0'' is missing in type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2322: Type 'T' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }'.
|
||||
Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2323: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type '{ '1': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }'.
|
||||
Property '1.0' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ 1.: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type '{ 1.: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
|
||||
Property '1.' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2323: Type 'T2' is not assignable to type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type 'T2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type 'T'.
|
||||
|
||||
|
||||
@@ -81,74 +81,74 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
s = t;
|
||||
~
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T'.
|
||||
t = s;
|
||||
~
|
||||
!!! error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
s = s2; // ok
|
||||
s = a2;
|
||||
~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
s2 = t2;
|
||||
~~
|
||||
!!! error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T2'.
|
||||
!!! error TS2322: Type 'T2' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T2'.
|
||||
t2 = s2;
|
||||
~~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'S2'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'S2'.
|
||||
s2 = t;
|
||||
~~
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T'.
|
||||
s2 = b;
|
||||
~~
|
||||
!!! error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
s2 = a2;
|
||||
~~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
a = b;
|
||||
~
|
||||
!!! error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
b = a;
|
||||
~
|
||||
!!! error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
a = s;
|
||||
~
|
||||
!!! error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S2'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S2'.
|
||||
a = a2;
|
||||
~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
a2 = b2;
|
||||
~~
|
||||
!!! error TS2323: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ '1': string; }'.
|
||||
!!! error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ '1': string; }'.
|
||||
b2 = a2;
|
||||
~~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
a2 = b; // ok
|
||||
a2 = t2; // ok
|
||||
a2 = t;
|
||||
~~
|
||||
!!! error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'T'.
|
||||
}
|
||||
|
||||
module NumbersAndStrings {
|
||||
@@ -173,8 +173,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
s = s2; // ok
|
||||
s = a2; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
s2 = t2; // ok
|
||||
t2 = s2; // ok
|
||||
@@ -182,52 +182,52 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
s2 = b; // ok
|
||||
s2 = a2; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }'.
|
||||
!!! error TS2323: Property '1.0' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }'.
|
||||
!!! error TS2322: Property '1.0' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
a = s; // error
|
||||
~
|
||||
!!! error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
a = s2; // error
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S2'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S2'.
|
||||
a = a2; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
a = b2; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ 1.: string; }'.
|
||||
!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ 1.: string; }'.
|
||||
|
||||
a2 = b2; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ 1.: string; }'.
|
||||
!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ 1.: string; }'.
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
|
||||
!!! error TS2323: Property '1.' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
|
||||
!!! error TS2322: Property '1.' is missing in type '{ '1.0': string; }'.
|
||||
a2 = b; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
a2 = t2; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'T2' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T2'.
|
||||
!!! error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'T2'.
|
||||
a2 = t; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'T'.
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2323: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(19,1): error TS2323: Type '(x: number) => number' is not assignable to type '(s1: string) => number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(19,1): error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number'.
|
||||
Types of parameters 'x' and 's1' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2323: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2323: Type 'typeof C' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -29,19 +29,19 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2323: Type
|
||||
|
||||
g = f2; // Error
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
g = f3; // Error
|
||||
~
|
||||
!!! error TS2323: Type '(x: number) => number' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2323: Types of parameters 'x' and 's1' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 's1' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
g = f4; // Error
|
||||
~
|
||||
!!! error TS2323: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
class C {
|
||||
constructor(x: string);
|
||||
@@ -52,6 +52,6 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2323: Type
|
||||
|
||||
d = C; // Error
|
||||
~
|
||||
!!! error TS2323: Type 'typeof C' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,27 +1,27 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(15,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(19,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(33,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(33,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(41,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(41,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(46,9): error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(47,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(47,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(50,9): error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(51,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
|
||||
@@ -43,19 +43,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: string]: Derived2; }
|
||||
a = b2; // ok
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
class A<T extends Base> {
|
||||
@@ -71,9 +71,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b1; // ok
|
||||
b1 = a1; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived'.
|
||||
|
||||
class B2 extends A<Base> {
|
||||
[x: string]: Derived2; // ok
|
||||
@@ -83,34 +83,34 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b2; // ok
|
||||
b2 = a1; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'.
|
||||
|
||||
function foo<T extends Base>() {
|
||||
var b3: { [x: string]: Derived; };
|
||||
var a3: A<T>;
|
||||
a3 = b3; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
b3 = a3; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived'.
|
||||
|
||||
var b4: { [x: string]: Derived2; };
|
||||
a3 = b4; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
b4 = a3; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2'.
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,27 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(15,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(19,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(33,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(33,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(41,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(41,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(46,9): error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(47,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(47,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(50,9): error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(51,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
|
||||
@@ -43,19 +43,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: string]: Derived2; }
|
||||
a = b2; // ok
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
interface A<T extends Base> {
|
||||
@@ -71,9 +71,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b1; // ok
|
||||
b1 = a1; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived'.
|
||||
|
||||
interface B2 extends A<Base> {
|
||||
[x: string]: Derived2; // ok
|
||||
@@ -83,34 +83,34 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b2; // ok
|
||||
b2 = a1; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'.
|
||||
|
||||
function foo<T extends Base>() {
|
||||
var b3: { [x: string]: Derived; };
|
||||
var a3: A<T>;
|
||||
a3 = b3; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
b3 = a3; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived'.
|
||||
|
||||
var b4: { [x: string]: Derived2; };
|
||||
a3 = b4; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
b4 = a3; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2'.
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(7,8): error TS2304: Cannot find name 'A'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(20,9): error TS2323: Type '{ [x: string]: string; }' is not assignable to type 'A<T>'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(20,9): error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(21,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(21,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: string; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'string'.
|
||||
|
||||
@@ -31,13 +31,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: string]: string; }
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ [x: string]: string; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'T'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: string; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: string; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'string'.
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>'.
|
||||
tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__x4 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
!!! error TS2322: Types of property 'two' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }'.
|
||||
tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'boolean'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }'.
|
||||
!!! error TS2322: Types of property 'two' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }'.
|
||||
!!! error TS2322: Types of property 'two' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'number[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }'.
|
||||
!!! error TS2322: Types of property 'two' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'string[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }'.
|
||||
!!! error TS2322: Types of property 'two' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'string[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'boolean[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }'.
|
||||
!!! error TS2322: Types of property 'two' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability24.ts (1 errors) ====
|
||||
@@ -12,4 +12,4 @@ tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
!!! error TS2322: Types of property 'two' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability33.ts (1 errors) ====
|
||||
@@ -12,4 +12,4 @@ tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tnumber>(a: Tnumber) => Tnumber'.
|
||||
tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tnumber>(a: Tnumber) => Tnumber'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability34.ts (1 errors) ====
|
||||
@@ -12,4 +12,4 @@ tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tnumber>(a: Tnumber) => Tnumber'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tnumber>(a: Tnumber) => Tnumber'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }'.
|
||||
tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }'.
|
||||
Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }'.
|
||||
!!! error TS2323: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }'.
|
||||
!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }'.
|
||||
tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }'.
|
||||
Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2323: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tnumber>(param: Tnumber) => any'.
|
||||
tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tnumber>(param: Tnumber) => any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability37.ts (1 errors) ====
|
||||
@@ -12,4 +12,4 @@ tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tnumber>(param: Tnumber) => any'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tnumber>(param: Tnumber) => any'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tstring>(param: Tstring) => any'.
|
||||
tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tstring>(param: Tstring) => any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability38.ts (1 errors) ====
|
||||
@@ -12,4 +12,4 @@ tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tstring>(param: Tstring) => any'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tstring>(param: Tstring) => any'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>'.
|
||||
tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithTwoPublic<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__x2 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithTwoPublic<number, string>'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>'.
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithTwoPublic<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>'.
|
||||
tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>'.
|
||||
Property 'one' is private in type 'classWithPrivate<number>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__x5 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>'.
|
||||
!!! error TS2323: Property 'one' is private in type 'classWithPrivate<number>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>'.
|
||||
!!! error TS2322: Property 'one' is private in type 'classWithPrivate<number>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>'.
|
||||
tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>'.
|
||||
Property 'one' is private in type 'classWithTwoPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__x6 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>'.
|
||||
!!! error TS2323: Property 'one' is private in type 'classWithTwoPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>'.
|
||||
!!! error TS2322: Property 'one' is private in type 'classWithTwoPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>'.
|
||||
tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>'.
|
||||
Property 'two' is private in type 'classWithPublicPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__x7 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>'.
|
||||
!!! error TS2323: Property 'two' is private in type 'classWithPublicPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>'.
|
||||
!!! error TS2322: Property 'two' is private in type 'classWithPublicPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>'.
|
||||
tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'interfaceTwo<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj2 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'interfaceTwo<number, string>'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>'.
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'interfaceTwo<number, string>'.
|
||||
+12
-12
@@ -1,10 +1,10 @@
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2323: Type 'string' is not assignable to type 'Applicable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type 'String'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2323: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2322: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type 'string[]'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2323: Type 'number' is not assignable to type 'Applicable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type 'Number'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2323: Type '{}' is not assignable to type 'Applicable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2322: Type '{}' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type '{}'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Applicable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Applicable'.
|
||||
@@ -25,20 +25,20 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-functi
|
||||
// Should fail
|
||||
x = '';
|
||||
~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'String'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Applicable'.
|
||||
!!! error TS2322: Property 'apply' is missing in type 'String'.
|
||||
x = [''];
|
||||
~
|
||||
!!! error TS2323: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'string[]'.
|
||||
!!! error TS2322: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
!!! error TS2322: Property 'apply' is missing in type 'string[]'.
|
||||
x = 4;
|
||||
~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Applicable'.
|
||||
!!! error TS2322: Property 'apply' is missing in type 'Number'.
|
||||
x = {};
|
||||
~
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type '{}'.
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Applicable'.
|
||||
!!! error TS2322: Property 'apply' is missing in type '{}'.
|
||||
|
||||
// Should work
|
||||
function f() { };
|
||||
|
||||
+12
-12
@@ -1,10 +1,10 @@
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2323: Type 'string' is not assignable to type 'Callable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type 'String'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2323: Type 'string[]' is not assignable to type 'Callable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2322: Type 'string[]' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type 'string[]'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2323: Type 'number' is not assignable to type 'Callable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type 'Number'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2323: Type '{}' is not assignable to type 'Callable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2322: Type '{}' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type '{}'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Callable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Callable'.
|
||||
@@ -25,20 +25,20 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-functio
|
||||
// Should fail
|
||||
x = '';
|
||||
~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'String'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Callable'.
|
||||
!!! error TS2322: Property 'call' is missing in type 'String'.
|
||||
x = [''];
|
||||
~
|
||||
!!! error TS2323: Type 'string[]' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'string[]'.
|
||||
!!! error TS2322: Type 'string[]' is not assignable to type 'Callable'.
|
||||
!!! error TS2322: Property 'call' is missing in type 'string[]'.
|
||||
x = 4;
|
||||
~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Callable'.
|
||||
!!! error TS2322: Property 'call' is missing in type 'Number'.
|
||||
x = {};
|
||||
~
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type '{}'.
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Callable'.
|
||||
!!! error TS2322: Property 'call' is missing in type '{}'.
|
||||
|
||||
// Should work
|
||||
function f() { };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentStricterConstraints.ts(1,22): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/assignmentStricterConstraints.ts(2,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
tests/cases/compiler/assignmentStricterConstraints.ts(2,5): error TS2322: Type 'S' is not assignable to type 'T'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentStricterConstraints.ts (2 errors) ====
|
||||
@@ -8,7 +8,7 @@ tests/cases/compiler/assignmentStricterConstraints.ts(2,5): error TS2323: Type '
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
x = y
|
||||
~
|
||||
!!! error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T'.
|
||||
}
|
||||
|
||||
var g = function <T, S>(x: T, y: S): void { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentToObject.ts(3,5): error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
tests/cases/compiler/assignmentToObject.ts(3,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type 'number' is not assignable to type '() => string'.
|
||||
|
||||
@@ -8,7 +8,7 @@ tests/cases/compiler/assignmentToObject.ts(3,5): error TS2323: Type '{ toString:
|
||||
var b: {} = a; // ok
|
||||
var c: Object = a; // should be error
|
||||
~
|
||||
!!! error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
!!! error TS2323: Types of property 'toString' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
!!! error TS2322: Types of property 'toString' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type '() => string'.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(1,5): error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(1,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type 'number' is not assignable to type '() => string'.
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(8,5): error TS2323: Type '{}' is not assignable to type 'Function'.
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(8,5): error TS2322: Type '{}' is not assignable to type 'Function'.
|
||||
Property 'apply' is missing in type '{}'.
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2323: Type 'typeof bad' is not assignable to type 'Function'.
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type 'typeof bad' is not assignable to type 'Function'.
|
||||
Types of property 'apply' are incompatible.
|
||||
Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'.
|
||||
|
||||
@@ -11,9 +11,9 @@ tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2323: Type
|
||||
==== tests/cases/compiler/assignmentToObjectAndFunction.ts (3 errors) ====
|
||||
var errObj: Object = { toString: 0 }; // Error, incompatible toString
|
||||
~~~~~~
|
||||
!!! error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
!!! error TS2323: Types of property 'toString' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
!!! error TS2322: Types of property 'toString' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type '() => string'.
|
||||
var goodObj: Object = {
|
||||
toString(x?) {
|
||||
return "";
|
||||
@@ -22,8 +22,8 @@ tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2323: Type
|
||||
|
||||
var errFun: Function = {}; // Error for no call signature
|
||||
~~~~~~
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'Function'.
|
||||
!!! error TS2323: Property 'apply' is missing in type '{}'.
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Function'.
|
||||
!!! error TS2322: Property 'apply' is missing in type '{}'.
|
||||
|
||||
function foo() { }
|
||||
module foo {
|
||||
@@ -46,6 +46,6 @@ tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2323: Type
|
||||
|
||||
var badFundule: Function = bad; // error
|
||||
~~~~~~~~~~
|
||||
!!! error TS2323: Type 'typeof bad' is not assignable to type 'Function'.
|
||||
!!! error TS2323: Types of property 'apply' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'.
|
||||
!!! error TS2322: Type 'typeof bad' is not assignable to type 'Function'.
|
||||
!!! error TS2322: Types of property 'apply' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'.
|
||||
@@ -1,29 +1,29 @@
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(4,1): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(5,1): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(13,1): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(14,1): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(15,1): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(4,1): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(5,1): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(13,1): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(14,1): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(15,1): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(17,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(18,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(25,5): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(37,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(38,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(43,5): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(44,5): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(48,5): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(49,5): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(54,5): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(55,5): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(56,5): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(43,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(44,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(48,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(49,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(54,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(55,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(56,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(62,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(63,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(69,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
@@ -36,10 +36,10 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
(x) = 3; // OK
|
||||
x = ''; // Error
|
||||
~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
(x) = ''; // Error
|
||||
~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
module M {
|
||||
export var y: number;
|
||||
@@ -49,13 +49,13 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
(M.y) = 3; // OK
|
||||
M.y = ''; // Error
|
||||
~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
(M).y = ''; // Error
|
||||
~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
(M.y) = ''; // Error
|
||||
~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
M = { y: 3 }; // Error
|
||||
~
|
||||
@@ -79,19 +79,19 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
|
||||
M2.M3 = { x: '' }; // Error
|
||||
~~~~~
|
||||
!!! error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2323: Types of property 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2322: Types of property 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
(M2).M3 = { x: '' }; // Error
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2323: Types of property 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2322: Types of property 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
(M2.M3) = { x: '' }; // Error
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2323: Types of property 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2322: Types of property 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
function fn() { }
|
||||
@@ -107,32 +107,32 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
(x) = 3; // OK
|
||||
x = ''; // Error
|
||||
~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
(x) = ''; // Error
|
||||
~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
(y).t = 3; // OK
|
||||
(y.t) = 3; // OK
|
||||
(y).t = ''; // Error
|
||||
~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
(y.t) = ''; // Error
|
||||
~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
y['t'] = 3; // OK
|
||||
(y)['t'] = 3; // OK
|
||||
(y['t']) = 3; // OK
|
||||
y['t'] = ''; // Error
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
(y)['t'] = ''; // Error
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
(y['t']) = ''; // Error
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
}
|
||||
|
||||
enum E {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(15,5): error TS2323: Type '{}' is not assignable to type '{ [x: number]: Foo; }'.
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(15,5): error TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }'.
|
||||
Index signature is missing in type '{}'.
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2323: Type '() => void' is not assignable to type '{ [x: number]: Bar; }'.
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }'.
|
||||
Index signature is missing in type '() => void'.
|
||||
|
||||
|
||||
@@ -21,14 +21,14 @@ tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignatur
|
||||
|
||||
var v1: {
|
||||
~~
|
||||
!!! error TS2323: Type '{}' is not assignable to type '{ [x: number]: Foo; }'.
|
||||
!!! error TS2323: Index signature is missing in type '{}'.
|
||||
!!! error TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{}'.
|
||||
[n: number]: Foo
|
||||
} = o; // Should be allowed
|
||||
|
||||
var v2: {
|
||||
~~
|
||||
!!! error TS2323: Type '() => void' is not assignable to type '{ [x: number]: Bar; }'.
|
||||
!!! error TS2323: Index signature is missing in type '() => void'.
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }'.
|
||||
!!! error TS2322: Index signature is missing in type '() => void'.
|
||||
[n: number]: Bar
|
||||
} = f; // Should be allowed
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/callConstructAssignment.ts(7,1): error TS2323: Type 'new () => any' is not assignable to type '() => void'.
|
||||
tests/cases/compiler/callConstructAssignment.ts(8,1): error TS2323: Type '() => void' is not assignable to type 'new () => any'.
|
||||
tests/cases/compiler/callConstructAssignment.ts(7,1): error TS2322: Type 'new () => any' is not assignable to type '() => void'.
|
||||
tests/cases/compiler/callConstructAssignment.ts(8,1): error TS2322: Type '() => void' is not assignable to type 'new () => any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/callConstructAssignment.ts (2 errors) ====
|
||||
@@ -11,7 +11,7 @@ tests/cases/compiler/callConstructAssignment.ts(8,1): error TS2323: Type '() =>
|
||||
|
||||
foo = bar; // error
|
||||
~~~
|
||||
!!! error TS2323: Type 'new () => any' is not assignable to type '() => void'.
|
||||
!!! error TS2322: Type 'new () => any' is not assignable to type '() => void'.
|
||||
bar = foo; // error
|
||||
~~~
|
||||
!!! error TS2323: Type '() => void' is not assignable to type 'new () => any'.
|
||||
!!! error TS2322: Type '() => void' is not assignable to type 'new () => any'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/callOverloadViaElementAccessExpression.ts(10,5): error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/callOverloadViaElementAccessExpression.ts(11,5): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/callOverloadViaElementAccessExpression.ts(10,5): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/callOverloadViaElementAccessExpression.ts(11,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/callOverloadViaElementAccessExpression.ts (2 errors) ====
|
||||
@@ -14,7 +14,7 @@ tests/cases/compiler/callOverloadViaElementAccessExpression.ts(11,5): error TS23
|
||||
var c = new C();
|
||||
var r: string = c['foo'](1);
|
||||
~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
var r2: number = c['foo']('');
|
||||
~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
+2
-2
@@ -13,7 +13,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWith
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(24,20): error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(34,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(35,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(45,32): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(45,32): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts (16 errors) ====
|
||||
@@ -91,7 +91,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWith
|
||||
~
|
||||
!!! error TS1015: Parameter cannot have question mark and initializer.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
b: (x?: any = '') => { }
|
||||
~
|
||||
!!! error TS1015: Parameter cannot have question mark and initializer.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,1): error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,1): error TS2322: Type 'Z' is not assignable to type 'X'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,6): error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,6): error TS2322: Type 'Z' is not assignable to type 'Y'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
tests/cases/compiler/chainedAssignment1.ts(22,1): error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
tests/cases/compiler/chainedAssignment1.ts(22,1): error TS2322: Type 'Z' is not assignable to type 'Y'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/chainedAssignment1.ts (3 errors) ====
|
||||
@@ -28,11 +28,11 @@ tests/cases/compiler/chainedAssignment1.ts(22,1): error TS2323: Type 'Z' is not
|
||||
var c3 = new Z();
|
||||
c1 = c2 = c3; // a bug made this not report the same error as below
|
||||
~~
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'X'.
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
~~
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'Y'.
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
c2 = c3; // Error TS111: Cannot convert Z to Y
|
||||
~~
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'Y'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/chainedAssignment3.ts(18,1): error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
tests/cases/compiler/chainedAssignment3.ts(18,1): error TS2322: Type 'A' is not assignable to type 'B'.
|
||||
Property 'value' is missing in type 'A'.
|
||||
tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2322: Type 'A' is not assignable to type 'B'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/chainedAssignment3.ts (2 errors) ====
|
||||
@@ -23,11 +23,11 @@ tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2323: Type 'A' is not
|
||||
// error cases
|
||||
b = a = new A();
|
||||
~
|
||||
!!! error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
!!! error TS2323: Property 'value' is missing in type 'A'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B'.
|
||||
!!! error TS2322: Property 'value' is missing in type 'A'.
|
||||
a = b = new A();
|
||||
~
|
||||
!!! error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B'.
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,1): error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,1): error TS2322: Type 'Z' is not assignable to type 'X'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2322: Type 'Z' is not assignable to type 'Y'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2323: Type 'Z'
|
||||
|
||||
c1 = c2 = c3; // Should be error
|
||||
~~
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'X'.
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
~~
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'Y'.
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
|
||||
+6
-6
@@ -1,8 +1,8 @@
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(7,43): error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'.
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(10,29): error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'.
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(32,9): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(36,9): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(32,9): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(36,9): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts (5 errors) ====
|
||||
@@ -43,16 +43,16 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParamete
|
||||
// Should get an error that we are assigning a string to a number
|
||||
(new Chain2(i)).then(ii => t).then(tt => s).value.x = "";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
// Staying at T or S should keep the constraint.
|
||||
// Get an error when we assign a string to a number in both cases
|
||||
(new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t).value.x = "";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
(new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s).value.x = "";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/classImplementsClass2.ts(2,7): error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
Property 'foo' is missing in type 'C'.
|
||||
tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2322: Type 'C' is not assignable to type 'C2'.
|
||||
Property 'foo' is missing in type 'C'.
|
||||
|
||||
|
||||
@@ -22,5 +22,5 @@ tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2323: Type 'C' is n
|
||||
c = c2;
|
||||
c2 = c;
|
||||
~~
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'foo' is missing in type 'C'.
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'C'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/classImplementsClass4.ts(5,7): error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
Property 'x' is missing in type 'C'.
|
||||
tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2322: Type 'C' is not assignable to type 'C2'.
|
||||
Property 'x' is missing in type 'C'.
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@ tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2323: Type 'C' is n
|
||||
c = c2;
|
||||
c2 = c;
|
||||
~~
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'x' is missing in type 'C'.
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2322: Property 'x' is missing in type 'C'.
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/compiler/classImplementsClass5.ts(5,7): error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
Types have separate declarations of a private property 'x'.
|
||||
tests/cases/compiler/classImplementsClass5.ts(16,1): error TS2323: Type 'C2' is not assignable to type 'C'.
|
||||
tests/cases/compiler/classImplementsClass5.ts(16,1): error TS2322: Type 'C2' is not assignable to type 'C'.
|
||||
Types have separate declarations of a private property 'x'.
|
||||
tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is not assignable to type 'C2'.
|
||||
Types have separate declarations of a private property 'x'.
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2323: Type 'C' is n
|
||||
var c2: C2;
|
||||
c = c2;
|
||||
~
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'C'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'x'.
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'C'.
|
||||
!!! error TS2322: Types have separate declarations of a private property 'x'.
|
||||
c2 = c;
|
||||
~~
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'x'.
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2322: Types have separate declarations of a private property 'x'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/classMemberInitializerScoping.ts(3,17): error TS2301: Initializer of instance member variable 'y' cannot reference identifier 'aaa' declared in the constructor.
|
||||
tests/cases/compiler/classMemberInitializerScoping.ts(6,9): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/classMemberInitializerScoping.ts(6,9): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classMemberInitializerScoping.ts (2 errors) ====
|
||||
@@ -12,7 +12,7 @@ tests/cases/compiler/classMemberInitializerScoping.ts(6,9): error TS2323: Type '
|
||||
constructor(aaa) {
|
||||
this.y = ''; // was: error, cannot assign string to number
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/classSideInheritance3.ts(16,5): error TS2323: Type 'typeof B' is not assignable to type 'typeof A'.
|
||||
tests/cases/compiler/classSideInheritance3.ts(17,5): error TS2323: Type 'typeof B' is not assignable to type 'new (x: string) => A'.
|
||||
tests/cases/compiler/classSideInheritance3.ts(16,5): error TS2322: Type 'typeof B' is not assignable to type 'typeof A'.
|
||||
tests/cases/compiler/classSideInheritance3.ts(17,5): error TS2322: Type 'typeof B' is not assignable to type 'new (x: string) => A'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classSideInheritance3.ts (2 errors) ====
|
||||
@@ -20,8 +20,8 @@ tests/cases/compiler/classSideInheritance3.ts(17,5): error TS2323: Type 'typeof
|
||||
|
||||
var r1: typeof A = B; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'typeof B' is not assignable to type 'typeof A'.
|
||||
!!! error TS2322: Type 'typeof B' is not assignable to type 'typeof A'.
|
||||
var r2: new (x: string) => A = B; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'typeof B' is not assignable to type 'new (x: string) => A'.
|
||||
!!! error TS2322: Type 'typeof B' is not assignable to type 'new (x: string) => A'.
|
||||
var r3: typeof A = C; // ok
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(10,1): error TS2323: Type 'string' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(11,1): error TS2323: Type 'number' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(13,1): error TS2323: Type 'boolean' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(14,1): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(16,1): error TS2323: Type 'boolean' is not assignable to type 'string'.
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(17,1): error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(10,1): error TS2322: Type 'string' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(11,1): error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(14,1): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(16,1): error TS2322: Type 'boolean' is not assignable to type 'string'.
|
||||
tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(17,1): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts (6 errors) ====
|
||||
@@ -18,22 +18,22 @@ tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignment
|
||||
//Expect errors when the results type is different form the second operand
|
||||
resultIsBoolean = (BOOLEAN, STRING);
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
|
||||
resultIsBoolean = (BOOLEAN, NUMBER);
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
resultIsNumber = (NUMBER, BOOLEAN);
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'boolean' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
resultIsNumber = (NUMBER, STRING);
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
resultIsString = (STRING, BOOLEAN);
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'boolean' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
|
||||
resultIsString = (STRING, NUMBER);
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user