From e12e31b144d1b8807f5abab9d05257b210801ccb Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 5 Nov 2014 12:26:03 -0800 Subject: [PATCH] Removed duplicate diagnostic. --- .../diagnosticInformationMap.generated.ts | 2 +- src/compiler/diagnosticMessages.json | 4 - ...rs_spec_section-4.5_error-cases.errors.txt | 16 +- .../reference/aliasAssignments.errors.txt | 10 +- .../reference/ambiguousOverload.errors.txt | 8 +- ...indsToFunctionScopeArgumentList.errors.txt | 6 +- .../reference/arrayAssignmentTest1.errors.txt | 126 ++++++------- .../reference/arrayAssignmentTest2.errors.txt | 66 +++---- .../reference/arrayAssignmentTest4.errors.txt | 12 +- .../reference/arrayAssignmentTest5.errors.txt | 8 +- .../reference/arraySigChecking.errors.txt | 16 +- .../reference/arrayTypeOfTypeOf.errors.txt | 10 +- .../arrowFunctionContexts.errors.txt | 8 +- .../assignFromBooleanInterface.errors.txt | 4 +- .../assignFromBooleanInterface2.errors.txt | 8 +- .../assignFromNumberInterface.errors.txt | 4 +- .../assignFromNumberInterface2.errors.txt | 8 +- .../assignFromStringInterface.errors.txt | 4 +- .../assignFromStringInterface2.errors.txt | 8 +- .../baselines/reference/assignToFn.errors.txt | 4 +- .../reference/assignmentCompat1.errors.txt | 12 +- ...nmentCompatBetweenTupleAndArray.errors.txt | 18 +- .../reference/assignmentCompatBug2.errors.txt | 30 +-- ...ignmentCompatWithCallSignatures.errors.txt | 64 +++---- ...gnmentCompatWithCallSignatures2.errors.txt | 96 +++++----- ...gnmentCompatWithCallSignatures4.errors.txt | 24 +-- ...ignaturesWithOptionalParameters.errors.txt | 28 +-- ...allSignaturesWithRestParameters.errors.txt | 72 +++---- ...ntCompatWithConstructSignatures.errors.txt | 32 ++-- ...tCompatWithConstructSignatures2.errors.txt | 80 ++++---- ...tCompatWithConstructSignatures4.errors.txt | 56 +++--- ...ignaturesWithOptionalParameters.errors.txt | 20 +- ...ignaturesWithOptionalParameters.errors.txt | 24 +-- ...ignmentCompatWithNumericIndexer.errors.txt | 52 +++--- ...gnmentCompatWithNumericIndexer2.errors.txt | 52 +++--- ...gnmentCompatWithNumericIndexer3.errors.txt | 28 +-- ...ignmentCompatWithObjectMembers4.errors.txt | 142 +++++++------- ...ignmentCompatWithObjectMembers5.errors.txt | 12 +- ...tWithObjectMembersAccessibility.errors.txt | 144 +++++++------- ...patWithObjectMembersOptionality.errors.txt | 36 ++-- ...atWithObjectMembersOptionality2.errors.txt | 54 +++--- ...ObjectMembersStringNumericNames.errors.txt | 174 ++++++++--------- .../assignmentCompatWithOverloads.errors.txt | 28 +-- ...signmentCompatWithStringIndexer.errors.txt | 68 +++---- ...ignmentCompatWithStringIndexer2.errors.txt | 68 +++---- ...ignmentCompatWithStringIndexer3.errors.txt | 16 +- .../assignmentCompatability10.errors.txt | 6 +- .../assignmentCompatability11.errors.txt | 8 +- .../assignmentCompatability12.errors.txt | 8 +- .../assignmentCompatability13.errors.txt | 6 +- .../assignmentCompatability14.errors.txt | 8 +- .../assignmentCompatability15.errors.txt | 8 +- .../assignmentCompatability16.errors.txt | 10 +- .../assignmentCompatability17.errors.txt | 10 +- .../assignmentCompatability18.errors.txt | 10 +- .../assignmentCompatability19.errors.txt | 10 +- .../assignmentCompatability20.errors.txt | 10 +- .../assignmentCompatability21.errors.txt | 10 +- .../assignmentCompatability22.errors.txt | 10 +- .../assignmentCompatability23.errors.txt | 10 +- .../assignmentCompatability24.errors.txt | 4 +- .../assignmentCompatability25.errors.txt | 8 +- .../assignmentCompatability26.errors.txt | 8 +- .../assignmentCompatability27.errors.txt | 6 +- .../assignmentCompatability28.errors.txt | 8 +- .../assignmentCompatability29.errors.txt | 10 +- .../assignmentCompatability30.errors.txt | 10 +- .../assignmentCompatability31.errors.txt | 10 +- .../assignmentCompatability32.errors.txt | 10 +- .../assignmentCompatability33.errors.txt | 4 +- .../assignmentCompatability34.errors.txt | 4 +- .../assignmentCompatability35.errors.txt | 6 +- .../assignmentCompatability36.errors.txt | 6 +- .../assignmentCompatability37.errors.txt | 4 +- .../assignmentCompatability38.errors.txt | 4 +- .../assignmentCompatability39.errors.txt | 6 +- .../assignmentCompatability40.errors.txt | 6 +- .../assignmentCompatability41.errors.txt | 6 +- .../assignmentCompatability42.errors.txt | 6 +- .../assignmentCompatability43.errors.txt | 6 +- ...ember-off-of-function-interface.errors.txt | 24 +-- ...ember-off-of-function-interface.errors.txt | 24 +-- .../assignmentStricterConstraints.errors.txt | 4 +- .../reference/assignmentToObject.errors.txt | 8 +- .../assignmentToObjectAndFunction.errors.txt | 22 +-- ...nmentToParenthesizedIdentifiers.errors.txt | 72 +++---- ...eAssignmentCompatIndexSignature.errors.txt | 12 +- .../callConstructAssignment.errors.txt | 8 +- ...rloadViaElementAccessExpression.errors.txt | 8 +- ...OptionalParameterAndInitializer.errors.txt | 4 +- .../reference/chainedAssignment1.errors.txt | 16 +- .../reference/chainedAssignment3.errors.txt | 10 +- .../chainedAssignmentChecking.errors.txt | 12 +- ...onstrainedToOtherTypeParameter2.errors.txt | 12 +- .../classImplementsClass2.errors.txt | 6 +- .../classImplementsClass4.errors.txt | 6 +- .../classImplementsClass5.errors.txt | 12 +- .../classMemberInitializerScoping.errors.txt | 4 +- .../classSideInheritance3.errors.txt | 8 +- ...maOperatorInvalidAssignmentType.errors.txt | 24 +-- ...maOperatorOtherInvalidOperation.errors.txt | 8 +- ...onAssignmentLHSCannotBeAssigned.errors.txt | 22 +-- .../conditionalExpression1.errors.txt | 6 +- ...onalOperatorWithoutIdenticalBCT.errors.txt | 40 ++-- .../reference/constructorAsType.errors.txt | 4 +- ...mplementationWithDefaultValues2.errors.txt | 16 +- ...ctorParameterShadowsOuterScopes.errors.txt | 4 +- .../contextualTypeWithTuple.errors.txt | 46 ++--- .../reference/contextualTyping.errors.txt | 4 +- .../reference/contextualTyping11.errors.txt | 8 +- .../reference/contextualTyping21.errors.txt | 10 +- .../reference/contextualTyping24.errors.txt | 8 +- .../reference/contextualTyping5.errors.txt | 6 +- ...ontextualTypingOfArrayLiterals1.errors.txt | 12 +- ...lTypingOfConditionalExpression2.errors.txt | 12 +- ...ontextualTypingOfObjectLiterals.errors.txt | 6 +- ...ontextuallyTypingRestParameters.errors.txt | 8 +- ...ertyIsRelatableToTargetProperty.errors.txt | 6 +- ...efaultArgsInFunctionExpressions.errors.txt | 16 +- .../reference/deleteOperator1.errors.txt | 4 +- .../derivedClassTransitivity.errors.txt | 12 +- .../derivedClassTransitivity2.errors.txt | 12 +- .../derivedClassTransitivity3.errors.txt | 12 +- .../derivedClassTransitivity4.errors.txt | 12 +- .../reference/derivedClassWithAny.errors.txt | 8 +- .../derivedGenericClassWithAny.errors.txt | 16 +- ...ontShowCompilerGeneratedMembers.errors.txt | 6 +- .../reference/enumAssignability.errors.txt | 94 +++++----- .../reference/enumAssignmentCompat.errors.txt | 24 +-- .../enumAssignmentCompat2.errors.txt | 24 +-- .../baselines/reference/enumErrors.errors.txt | 24 +-- ...orOnContextuallyTypedReturnType.errors.txt | 6 +- .../errorWithTruncatedType.errors.txt | 4 +- ...AnnotationAndInvalidInitializer.errors.txt | 96 +++++----- ...endAndImplementTheSameBaseType2.errors.txt | 8 +- .../reference/extendGenericArray.errors.txt | 4 +- .../reference/extendGenericArray2.errors.txt | 4 +- .../reference/functionAssignment.errors.txt | 4 +- ...ctionSignatureAssignmentCompat1.errors.txt | 8 +- tests/baselines/reference/fuzzy.errors.txt | 8 +- .../genericArrayAssignment1.errors.txt | 6 +- .../reference/genericArrayMethods1.errors.txt | 6 +- ...AssignmentCompatWithInterfaces1.errors.txt | 40 ++-- ...ObjectTypeArgsAndIndexersErrors.errors.txt | 4 +- ...thObjectTypeArgsAndInitializers.errors.txt | 20 +- .../genericCallWithTupleType.errors.txt | 42 ++--- .../genericCloneReturnTypes.errors.txt | 6 +- .../genericCloneReturnTypes2.errors.txt | 6 +- ...cDerivedTypeWithSpecializedBase.errors.txt | 8 +- ...DerivedTypeWithSpecializedBase2.errors.txt | 10 +- .../reference/genericGetter.errors.txt | 4 +- .../reference/genericGetter3.errors.txt | 4 +- .../genericSpecializations3.errors.txt | 24 +-- .../genericTypeAssertions1.errors.txt | 12 +- .../genericTypeAssertions2.errors.txt | 18 +- .../genericTypeAssertions4.errors.txt | 12 +- .../genericTypeAssertions5.errors.txt | 12 +- ...cTypeWithNonGenericBaseMisMatch.errors.txt | 16 +- .../baselines/reference/generics4.errors.txt | 12 +- .../getAndSetNotIdenticalType2.errors.txt | 6 +- .../getAndSetNotIdenticalType3.errors.txt | 6 +- tests/baselines/reference/i3.errors.txt | 6 +- .../incompatibleGenericTypes.errors.txt | 6 +- .../reference/incompatibleTypes.errors.txt | 14 +- .../indexIntoArraySubclass.errors.txt | 4 +- .../reference/indexerAssignability.errors.txt | 18 +- .../reference/inferSetterParamType.errors.txt | 4 +- ...pingWithObjectLiteralProperties.errors.txt | 8 +- ...teExpansionThroughInstantiation.errors.txt | 16 +- .../reference/inheritance1.errors.txt | 56 +++--- .../innerTypeCheckOfLambdaArgument.errors.txt | 4 +- ...ceMemberAssignsToClassPrototype.errors.txt | 6 +- .../reference/intTypeCheck.errors.txt | 176 +++++++++--------- .../interfaceAssignmentCompat.errors.txt | 10 +- ...terfaceExtendsClassWithPrivate1.errors.txt | 18 +- .../interfaceImplementation1.errors.txt | 4 +- .../reference/interfaceInheritance.errors.txt | 22 +-- .../invalidAssignmentsToVoid.errors.txt | 40 ++-- .../invalidBooleanAssignments.errors.txt | 36 ++-- .../invalidEnumAssignments.errors.txt | 24 +-- .../invalidNumberAssignments.errors.txt | 40 ++-- .../invalidReturnStatements.errors.txt | 12 +- .../invalidStringAssignments.errors.txt | 44 ++--- .../invalidVoidAssignments.errors.txt | 48 ++--- .../reference/invalidVoidValues.errors.txt | 44 ++--- .../matchReturnTypeInAllBranches.errors.txt | 4 +- .../reference/memberOverride.errors.txt | 4 +- .../reference/multiLineErrors.errors.txt | 12 +- .../reference/numberToString.errors.txt | 4 +- .../numericIndexExpressions.errors.txt | 16 +- ...rConstrainsPropertyDeclarations.errors.txt | 10 +- ...ConstrainsPropertyDeclarations2.errors.txt | 10 +- .../numericIndexerConstraint1.errors.txt | 6 +- .../numericIndexerConstraint2.errors.txt | 6 +- .../numericIndexerConstraint5.errors.txt | 6 +- .../numericIndexerTyping1.errors.txt | 8 +- .../numericIndexerTyping2.errors.txt | 8 +- ...objectLitStructuralTypeMismatch.errors.txt | 6 +- .../reference/objectLiteralErrors.errors.txt | 4 +- .../objectLiteralIndexerErrors.errors.txt | 8 +- ...tLiteralWithNumericPropertyName.errors.txt | 8 +- ...MembersOfObjectAssignmentCompat.errors.txt | 30 +-- ...embersOfObjectAssignmentCompat2.errors.txt | 50 ++--- ...mbersOfFunctionAssignmentCompat.errors.txt | 8 +- ...mbersOfFunctionAssignmentCompat.errors.txt | 8 +- ...ypeWithRecursiveWrappedProperty.errors.txt | 6 +- ...peWithRecursiveWrappedProperty2.errors.txt | 6 +- ...WrappedPropertyCheckedNominally.errors.txt | 40 ++-- ...ptionalFunctionArgAssignability.errors.txt | 12 +- .../optionalParamAssignmentCompat.errors.txt | 8 +- .../optionalParamTypeComparison.errors.txt | 16 +- .../optionalPropertiesTest.errors.txt | 24 +-- ...erEagerReturnTypeSpecialization.errors.txt | 6 +- .../baselines/reference/overload1.errors.txt | 12 +- .../overloadingOnConstants1.errors.txt | 24 +-- ...nWithConstraintCheckingDeferred.errors.txt | 8 +- .../baselines/reference/parseTypes.errors.txt | 18 +- ...serAutomaticSemicolonInsertion1.errors.txt | 8 +- .../parserObjectCreation1.errors.txt | 6 +- .../reference/primitiveMembers.errors.txt | 4 +- .../reference/propertyAssignment.errors.txt | 8 +- ...opertyParameterWithQuestionMark.errors.txt | 12 +- .../reference/protectedMembers.errors.txt | 12 +- tests/baselines/reference/qualify.errors.txt | 44 ++--- .../recursiveFunctionTypes.errors.txt | 22 +-- .../reference/redefineArray.errors.txt | 6 +- .../restArgAssignmentCompat.errors.txt | 10 +- ...gnsToConstructorFunctionMembers.errors.txt | 6 +- ...cMemberOfAnotherClassAssignment.errors.txt | 24 +-- .../stringIndexerAssignments1.errors.txt | 14 +- .../stringIndexerAssignments2.errors.txt | 14 +- ...rConstrainsPropertyDeclarations.errors.txt | 10 +- ...ConstrainsPropertyDeclarations2.errors.txt | 10 +- .../superCallAssignResult.errors.txt | 4 +- .../switchAssignmentCompat.errors.txt | 4 +- ...itchCasesExpressionTypeMismatch.errors.txt | 12 +- .../reference/targetTypeBaseCalls.errors.txt | 12 +- .../reference/targetTypeTest3.errors.txt | 8 +- .../reference/targetTypeVoidFunc.errors.txt | 4 +- .../thisWhenTypeCheckFails.errors.txt | 4 +- .../baselines/reference/tupleTypes.errors.txt | 62 +++--- ...ouldDisallowNonGenericOverloads.errors.txt | 8 +- ...InsideFunctionExpressionInArray.errors.txt | 8 +- .../typeComparisonCaching.errors.txt | 16 +- .../typeIdentityConsidersBrands.errors.txt | 6 +- .../baselines/reference/typeInfer1.errors.txt | 6 +- .../baselines/reference/typeMatch1.errors.txt | 12 +- .../baselines/reference/typeMatch2.errors.txt | 42 ++--- .../baselines/reference/typeName1.errors.txt | 84 ++++----- .../reference/typeOfOperator1.errors.txt | 4 +- ...ypeParameterArgumentEquivalence.errors.txt | 16 +- ...peParameterArgumentEquivalence2.errors.txt | 16 +- ...peParameterArgumentEquivalence3.errors.txt | 12 +- ...peParameterArgumentEquivalence4.errors.txt | 12 +- ...peParameterArgumentEquivalence5.errors.txt | 16 +- .../typeParameterAssignability.errors.txt | 8 +- .../typeParameterAssignability2.errors.txt | 152 +++++++-------- .../typeParameterAssignability3.errors.txt | 16 +- .../typeParameterAssignmentCompat1.errors.txt | 24 +-- ...ameterAssignmentWithConstraints.errors.txt | 4 +- ...ypeParameterHasSelfAsConstraint.errors.txt | 4 +- ...erUsedAsTypeParameterConstraint.errors.txt | 48 ++--- ...rUsedAsTypeParameterConstraint2.errors.txt | 48 ++--- ...rUsedAsTypeParameterConstraint4.errors.txt | 28 +-- .../typeParametersShouldNotBeEqual.errors.txt | 8 +- ...typeParametersShouldNotBeEqual2.errors.txt | 24 +-- ...typeParametersShouldNotBeEqual3.errors.txt | 8 +- .../typeofAmbientExternalModules.errors.txt | 12 +- .../typeofExternalModules.errors.txt | 12 +- .../typeofInternalModules.errors.txt | 12 +- .../reference/typeofSimple.errors.txt | 4 +- ...yExternalModuleStillHasInstance.errors.txt | 6 +- .../typesWithPrivateConstructor.errors.txt | 4 +- .../typesWithPublicConstructor.errors.txt | 4 +- .../reference/widenToAny1.errors.txt | 4 +- .../reference/widenToAny2.errors.txt | 4 +- .../reference/widenedTypes.errors.txt | 22 +-- .../wrappedRecursiveGenericType.errors.txt | 10 +- 278 files changed, 2658 insertions(+), 2662 deletions(-) diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 0492ebeef45..349601a6db8 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -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." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7e2f2e2f0d2..7359abefb60 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -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 diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt index a3e8acd7d17..22fdeb099bc 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt @@ -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. diff --git a/tests/baselines/reference/aliasAssignments.errors.txt b/tests/baselines/reference/aliasAssignments.errors.txt index 54190485c3d..90a3672780f 100644 --- a/tests/baselines/reference/aliasAssignments.errors.txt +++ b/tests/baselines/reference/aliasAssignments.errors.txt @@ -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 { diff --git a/tests/baselines/reference/ambiguousOverload.errors.txt b/tests/baselines/reference/ambiguousOverload.errors.txt index 93d2fe848cc..936e6e71220 100644 --- a/tests/baselines/reference/ambiguousOverload.errors.txt +++ b/tests/baselines/reference/ambiguousOverload.errors.txt @@ -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'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt index 53caecf63cb..812bbe15da4 100644 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt @@ -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'. } \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest1.errors.txt b/tests/baselines/reference/arrayAssignmentTest1.errors.txt index 48037451fb2..d3a7fafed05 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest1.errors.txt @@ -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'. \ No newline at end of file +!!! error TS2322: Type 'I1' is not assignable to type 'any[]'. +!!! error TS2322: Property 'length' is missing in type 'I1'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest2.errors.txt b/tests/baselines/reference/arrayAssignmentTest2.errors.txt index d1bd15d6db5..a2cc6b3b954 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest2.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest4.errors.txt b/tests/baselines/reference/arrayAssignmentTest4.errors.txt index 2ef303cc2bb..ecded3a3bfd 100644 --- a/tests/baselines/reference/arrayAssignmentTest4.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest4.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest5.errors.txt b/tests/baselines/reference/arrayAssignmentTest5.errors.txt index 37252bbf1d1..3a45cad9ad7 100644 --- a/tests/baselines/reference/arrayAssignmentTest5.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest5.errors.txt @@ -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) } diff --git a/tests/baselines/reference/arraySigChecking.errors.txt b/tests/baselines/reference/arraySigChecking.errors.txt index 50eb6a0cc9d..b70b659773c 100644 --- a/tests/baselines/reference/arraySigChecking.errors.txt +++ b/tests/baselines/reference/arraySigChecking.errors.txt @@ -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; diff --git a/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt b/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt index 807227cc10b..0dcff3de422 100644 --- a/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt +++ b/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt @@ -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[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...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[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...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[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...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[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...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[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...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[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. +!!! error TS2322: Property 'isArray' is missing in type 'Number'. var xs4: typeof Array; ~ !!! error TS1005: '=' expected. ~ !!! error TS1109: Expression expected. ~~~ -!!! error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. \ No newline at end of file diff --git a/tests/baselines/reference/arrowFunctionContexts.errors.txt b/tests/baselines/reference/arrowFunctionContexts.errors.txt index 2f8a4f1a377..5ffe9d1ec34 100644 --- a/tests/baselines/reference/arrowFunctionContexts.errors.txt +++ b/tests/baselines/reference/arrowFunctionContexts.errors.txt @@ -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. diff --git a/tests/baselines/reference/assignFromBooleanInterface.errors.txt b/tests/baselines/reference/assignFromBooleanInterface.errors.txt index 48f06b7409e..4b06603a9bf 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface.errors.txt @@ -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; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt index 495f8cc432d..66d55e00d86 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignFromNumberInterface.errors.txt b/tests/baselines/reference/assignFromNumberInterface.errors.txt index 5a65c08de4a..0c8c4a5f5ac 100644 --- a/tests/baselines/reference/assignFromNumberInterface.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface.errors.txt @@ -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; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromNumberInterface2.errors.txt b/tests/baselines/reference/assignFromNumberInterface2.errors.txt index 45a600658c2..fa53d8facdf 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface2.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignFromStringInterface.errors.txt b/tests/baselines/reference/assignFromStringInterface.errors.txt index 93f28853c8a..6ec8afad120 100644 --- a/tests/baselines/reference/assignFromStringInterface.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface.errors.txt @@ -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; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromStringInterface2.errors.txt b/tests/baselines/reference/assignFromStringInterface2.errors.txt index b34366a7ce7..2e3e518f75b 100644 --- a/tests/baselines/reference/assignFromStringInterface2.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface2.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignToFn.errors.txt b/tests/baselines/reference/assignToFn.errors.txt index 6b1403b7df1..7f2c7855a35 100644 --- a/tests/baselines/reference/assignToFn.errors.txt +++ b/tests/baselines/reference/assignToFn.errors.txt @@ -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'. } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompat1.errors.txt b/tests/baselines/reference/assignmentCompat1.errors.txt index 6f5fc93d136..57ce797f5b2 100644 --- a/tests/baselines/reference/assignmentCompat1.errors.txt +++ b/tests/baselines/reference/assignmentCompat1.errors.txt @@ -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; }'. \ No newline at end of file +!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'. +!!! error TS2322: Index signature is missing in type '{ one: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt index 7b74aed499f..03dcee9baf3 100644 --- a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt +++ b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt @@ -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 '{}[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatBug2.errors.txt b/tests/baselines/reference/assignmentCompatBug2.errors.txt index 683846b26c1..15bf1111391 100644 --- a/tests/baselines/reference/assignmentCompatBug2.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug2.errors.txt @@ -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, diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt index 8ad90d773f4..6a221ef144e 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt index ff12410e875..e67f0a930c2 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt index 39735ec3844..e00d1eea042 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2323: Type '(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 '(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 '(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 '(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: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, { foo: number } and Base are incompatible ~~ -!!! error TS2323: Type '(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 '(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 '(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 '(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: (...x: T[]) => T; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt index 2bdd0ef61a9..f89bbfa5798 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt @@ -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 diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt index 79fa3452394..8eec8503e70 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt @@ -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'. \ No newline at end of file +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt index f37aca50710..9c0c0d6a8fd 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt index 7756bb82bda..5e8fc6dd3a4 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt index 60c1e7860be..804e31600e1 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt @@ -1,23 +1,23 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(52,9): error TS2323: Type 'new (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 (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 (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 (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 (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 (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 (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 (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 (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }'. Types of parameters 'x' and 'x' are incompatible. Type '(a: any) => any' is not assignable to type '{ new (a: T): T; new (a: T): T; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2323: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]'. Types of parameters 'x' and 'x' are incompatible. Type '{ new (a: T): T; new (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 (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, type mismatch ~~ -!!! error TS2323: Type 'new (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 (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 (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 (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 (...x: T[]) => T; @@ -113,26 +113,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme var b16: new (x: (a: T) => T) => T[]; a16 = b16; // error ~~~ -!!! error TS2323: Type 'new (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 (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 (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 (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 (x: (a: T) => T) => any[]; a17 = b17; // error ~~~ -!!! error TS2323: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (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 (a: T): T; new (a: T): T; }'. +!!! error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (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 (a: T): T; new (a: T): T; }'. b17 = a17; // error ~~~ -!!! error TS2323: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]'. -!!! error TS2323: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2323: Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. +!!! error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. } module WithGenericSignaturesInBaseType { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt index 3a477e0c9ec..df56af3ee98 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt @@ -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 diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt index 18d853f006f..a18da8fd8f7 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt @@ -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'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(66,9): error TS2323: Type '(x: T, y?: T) => T' is not assignable to type '() => T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(107,13): error TS2323: Type '(x: T) => any' is not assignable to type '() => T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(116,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(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'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(66,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '() => T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(107,13): error TS2322: Type '(x: T) => any' is not assignable to type '() => T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(116,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 (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'. +!!! error TS2322: Type '(x: T) => T' is not assignable to type '() => T'. b.a = t.a4; ~~~ -!!! error TS2323: Type '(x: T, y?: T) => T' is not assignable to type '() => T'. +!!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '() => T'. b.a = t.a5; b.a2 = t.a; @@ -123,7 +123,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 @@ -134,7 +134,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 diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt index 5e82ac41f11..0a9b50ff0b8 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt @@ -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'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. 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' is not assignable to type '{ [x: number]: Derived; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(33,9): error TS2322: Type 'A' 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'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A'. 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' is not assignable to type '{ [x: number]: Derived2; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A' 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 { @@ -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'. -!!! 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'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b = a; // error ~ -!!! error TS2323: Type 'A' 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' 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'. -!!! 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'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b2 = a; // error ~~ -!!! error TS2323: Type 'A' 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' 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 diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt index 2cbc15b4b70..b15f2f7905d 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt @@ -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'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. 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' is not assignable to type '{ [x: number]: Derived; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(33,9): error TS2322: Type 'A' 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'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A'. 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' is not assignable to type '{ [x: number]: Derived2; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A' 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 { @@ -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'. -!!! 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'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b = a; // error ~ -!!! error TS2323: Type 'A' 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' 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'. -!!! 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'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b2 = a; // error ~~ -!!! error TS2323: Type 'A' 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' 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 diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt index 966b5f1b55f..61f9e082a48 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt @@ -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'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(33,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. 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 { @@ -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'. -!!! 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'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b = a; // ok var b2: { [x: number]: T; }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt index 719aa2b3022..0fdae0b7cfa 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt @@ -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 diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt index 8c0a69c2663..f9f7e48c685 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt @@ -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'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'I'. +!!! error TS2322: Property 'fooo' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt index 8040ceb3003..c1093ab0ffe 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt @@ -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; } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt index 2f931d4fc89..b378086ca5e 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt @@ -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 diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt index 3bce83ada4b..de2751beaca 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt @@ -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 } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt index b70cee86a4d..d86c73f5cf8 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt @@ -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'. } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt index e5741c8601e..3bea0c46716 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt @@ -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'. \ No newline at end of file +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt index a560ddc5b68..f002c70e90b 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt @@ -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' is not assignable to type '{ [x: string]: Derived; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(33,5): error TS2322: Type 'A' 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' is not assignable to type '{ [x: string]: Derived2; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(41,5): error TS2322: Type 'A' 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'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. 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' is not assignable to type '{ [x: string]: Derived; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(47,9): error TS2322: Type 'A' 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'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A'. 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' is not assignable to type '{ [x: string]: Derived2; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A' 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 { @@ -71,9 +71,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a1 = b1; // ok b1 = a1; // 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 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'. class B2 extends A { [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' 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' 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() { var b3: { [x: string]: Derived; }; var a3: A; a3 = b3; // error ~~ -!!! error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. -!!! 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'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b3 = a3; // error ~~ -!!! error TS2323: Type 'A' 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' 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'. -!!! 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'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b4 = a3; // error ~~ -!!! error TS2323: Type 'A' 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' is not assignable to type '{ [x: string]: Derived2; }'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'T' is not assignable to type 'Derived2'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt index 672e51b74ae..c322364280e 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt @@ -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' is not assignable to type '{ [x: string]: Derived; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(33,5): error TS2322: Type 'A' 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' is not assignable to type '{ [x: string]: Derived2; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(41,5): error TS2322: Type 'A' 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'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. 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' is not assignable to type '{ [x: string]: Derived; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(47,9): error TS2322: Type 'A' 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'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A'. 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' is not assignable to type '{ [x: string]: Derived2; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A' 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 { @@ -71,9 +71,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a1 = b1; // ok b1 = a1; // 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 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'. interface B2 extends A { [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' 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' 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() { var b3: { [x: string]: Derived; }; var a3: A; a3 = b3; // error ~~ -!!! error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. -!!! 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'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b3 = a3; // error ~~ -!!! error TS2323: Type 'A' 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' 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'. -!!! 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'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b4 = a3; // error ~~ -!!! error TS2323: Type 'A' 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' is not assignable to type '{ [x: string]: Derived2; }'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'T' is not assignable to type 'Derived2'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt index 03f9a5de6b1..a31b2ef3025 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt @@ -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'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(20,9): error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A'. 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' is not assignable to type '{ [x: string]: string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(21,9): error TS2322: Type 'A' 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'. -!!! 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'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'T'. b = a; // error ~ -!!! error TS2323: Type 'A' 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' is not assignable to type '{ [x: string]: string; }'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'T' is not assignable to type 'string'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability10.errors.txt b/tests/baselines/reference/assignmentCompatability10.errors.txt index 6b553d2f5d4..883bf1c277c 100644 --- a/tests/baselines/reference/assignmentCompatability10.errors.txt +++ b/tests/baselines/reference/assignmentCompatability10.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicAndOptional'. +tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicAndOptional'. Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'classWithPublicAndOptional'. @@ -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' is not assignable to type 'classWithPublicAndOptional'. -!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'classWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicAndOptional'. +!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'classWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability11.errors.txt b/tests/baselines/reference/assignmentCompatability11.errors.txt index 135daf32d8e..21d49c6d3ae 100644 --- a/tests/baselines/reference/assignmentCompatability11.errors.txt +++ b/tests/baselines/reference/assignmentCompatability11.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }'. +tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability12.errors.txt b/tests/baselines/reference/assignmentCompatability12.errors.txt index f896763d608..07b65bdc463 100644 --- a/tests/baselines/reference/assignmentCompatability12.errors.txt +++ b/tests/baselines/reference/assignmentCompatability12.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }'. +tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability13.errors.txt b/tests/baselines/reference/assignmentCompatability13.errors.txt index 33434bd0c20..ea7e62c422f 100644 --- a/tests/baselines/reference/assignmentCompatability13.errors.txt +++ b/tests/baselines/reference/assignmentCompatability13.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. +tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. Property 'two' is optional in type 'interfaceWithPublicAndOptional' 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' is not assignable to type '{ two: string; }'. -!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type '{ two: string; }'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. +!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type '{ two: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability14.errors.txt b/tests/baselines/reference/assignmentCompatability14.errors.txt index a104fd73775..2ba77622f33 100644 --- a/tests/baselines/reference/assignmentCompatability14.errors.txt +++ b/tests/baselines/reference/assignmentCompatability14.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }'. +tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability15.errors.txt b/tests/baselines/reference/assignmentCompatability15.errors.txt index 6952d9780cc..c56719d0895 100644 --- a/tests/baselines/reference/assignmentCompatability15.errors.txt +++ b/tests/baselines/reference/assignmentCompatability15.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean; }'. +tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability16.errors.txt b/tests/baselines/reference/assignmentCompatability16.errors.txt index 7234065e263..266d72b3232 100644 --- a/tests/baselines/reference/assignmentCompatability16.errors.txt +++ b/tests/baselines/reference/assignmentCompatability16.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. +tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability17.errors.txt b/tests/baselines/reference/assignmentCompatability17.errors.txt index 306d3df4a90..b37f39d082f 100644 --- a/tests/baselines/reference/assignmentCompatability17.errors.txt +++ b/tests/baselines/reference/assignmentCompatability17.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: any[]; }'. +tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability18.errors.txt b/tests/baselines/reference/assignmentCompatability18.errors.txt index e19b8133556..2be4a037575 100644 --- a/tests/baselines/reference/assignmentCompatability18.errors.txt +++ b/tests/baselines/reference/assignmentCompatability18.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. +tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability19.errors.txt b/tests/baselines/reference/assignmentCompatability19.errors.txt index ab552ef2a29..ae97af6aa7e 100644 --- a/tests/baselines/reference/assignmentCompatability19.errors.txt +++ b/tests/baselines/reference/assignmentCompatability19.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number[]; }'. +tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability20.errors.txt b/tests/baselines/reference/assignmentCompatability20.errors.txt index 001331c1afd..750310ac5cc 100644 --- a/tests/baselines/reference/assignmentCompatability20.errors.txt +++ b/tests/baselines/reference/assignmentCompatability20.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. +tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability21.errors.txt b/tests/baselines/reference/assignmentCompatability21.errors.txt index 1ff8585b2f8..8da52fe42c6 100644 --- a/tests/baselines/reference/assignmentCompatability21.errors.txt +++ b/tests/baselines/reference/assignmentCompatability21.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string[]; }'. +tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability22.errors.txt b/tests/baselines/reference/assignmentCompatability22.errors.txt index 6ac985e5de0..f0799a92f5c 100644 --- a/tests/baselines/reference/assignmentCompatability22.errors.txt +++ b/tests/baselines/reference/assignmentCompatability22.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. +tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability23.errors.txt b/tests/baselines/reference/assignmentCompatability23.errors.txt index 315f3bc12bc..a005eaa02d1 100644 --- a/tests/baselines/reference/assignmentCompatability23.errors.txt +++ b/tests/baselines/reference/assignmentCompatability23.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean[]; }'. +tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability24.errors.txt b/tests/baselines/reference/assignmentCompatability24.errors.txt index 14cd2eb41d4..0f4a535d413 100644 --- a/tests/baselines/reference/assignmentCompatability24.errors.txt +++ b/tests/baselines/reference/assignmentCompatability24.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. +tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(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' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability25.errors.txt b/tests/baselines/reference/assignmentCompatability25.errors.txt index 76f462d635d..7f7e7f73ee0 100644 --- a/tests/baselines/reference/assignmentCompatability25.errors.txt +++ b/tests/baselines/reference/assignmentCompatability25.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }'. +tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability26.errors.txt b/tests/baselines/reference/assignmentCompatability26.errors.txt index 6b6497a5f6d..a005850e49c 100644 --- a/tests/baselines/reference/assignmentCompatability26.errors.txt +++ b/tests/baselines/reference/assignmentCompatability26.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }'. +tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability27.errors.txt b/tests/baselines/reference/assignmentCompatability27.errors.txt index 2751bd38f19..180a51b3cf0 100644 --- a/tests/baselines/reference/assignmentCompatability27.errors.txt +++ b/tests/baselines/reference/assignmentCompatability27.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. +tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. Property 'two' is optional in type 'interfaceWithPublicAndOptional' 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' is not assignable to type '{ two: string; }'. -!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type '{ two: string; }'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. +!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type '{ two: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability28.errors.txt b/tests/baselines/reference/assignmentCompatability28.errors.txt index 756411d654c..2360d0b1e9d 100644 --- a/tests/baselines/reference/assignmentCompatability28.errors.txt +++ b/tests/baselines/reference/assignmentCompatability28.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }'. +tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability29.errors.txt b/tests/baselines/reference/assignmentCompatability29.errors.txt index 88f936d1466..194ae4ab675 100644 --- a/tests/baselines/reference/assignmentCompatability29.errors.txt +++ b/tests/baselines/reference/assignmentCompatability29.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. +tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability30.errors.txt b/tests/baselines/reference/assignmentCompatability30.errors.txt index cba16799c66..b025705517c 100644 --- a/tests/baselines/reference/assignmentCompatability30.errors.txt +++ b/tests/baselines/reference/assignmentCompatability30.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. +tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability31.errors.txt b/tests/baselines/reference/assignmentCompatability31.errors.txt index c7f48f70835..8e19905eba7 100644 --- a/tests/baselines/reference/assignmentCompatability31.errors.txt +++ b/tests/baselines/reference/assignmentCompatability31.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. +tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability32.errors.txt b/tests/baselines/reference/assignmentCompatability32.errors.txt index 07e8b7de26f..6d6321f5e50 100644 --- a/tests/baselines/reference/assignmentCompatability32.errors.txt +++ b/tests/baselines/reference/assignmentCompatability32.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. +tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' 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' 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'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability33.errors.txt b/tests/baselines/reference/assignmentCompatability33.errors.txt index 27a87764b61..e2352625280 100644 --- a/tests/baselines/reference/assignmentCompatability33.errors.txt +++ b/tests/baselines/reference/assignmentCompatability33.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. +tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(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' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability34.errors.txt b/tests/baselines/reference/assignmentCompatability34.errors.txt index 9ac0a97011c..2dd9cba6470 100644 --- a/tests/baselines/reference/assignmentCompatability34.errors.txt +++ b/tests/baselines/reference/assignmentCompatability34.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. +tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(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' is not assignable to type '(a: Tnumber) => Tnumber'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability35.errors.txt b/tests/baselines/reference/assignmentCompatability35.errors.txt index 06f83c1e78f..faad78c10fc 100644 --- a/tests/baselines/reference/assignmentCompatability35.errors.txt +++ b/tests/baselines/reference/assignmentCompatability35.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: number]: number; }'. +tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: number]: number; }'. Index signature is missing in type 'interfaceWithPublicAndOptional'. @@ -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' is not assignable to type '{ [x: number]: number; }'. -!!! error TS2323: Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: number]: number; }'. +!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability36.errors.txt b/tests/baselines/reference/assignmentCompatability36.errors.txt index eb02058ad8b..d8c43a3f363 100644 --- a/tests/baselines/reference/assignmentCompatability36.errors.txt +++ b/tests/baselines/reference/assignmentCompatability36.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: string]: any; }'. +tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: string]: any; }'. Index signature is missing in type 'interfaceWithPublicAndOptional'. @@ -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' is not assignable to type '{ [x: string]: any; }'. -!!! error TS2323: Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: string]: any; }'. +!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability37.errors.txt b/tests/baselines/reference/assignmentCompatability37.errors.txt index 7ce5905816b..452b72fe8ff 100644 --- a/tests/baselines/reference/assignmentCompatability37.errors.txt +++ b/tests/baselines/reference/assignmentCompatability37.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. +tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (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' is not assignable to type 'new (param: Tnumber) => any'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability38.errors.txt b/tests/baselines/reference/assignmentCompatability38.errors.txt index d23685d9f99..5f7918374c1 100644 --- a/tests/baselines/reference/assignmentCompatability38.errors.txt +++ b/tests/baselines/reference/assignmentCompatability38.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. +tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (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' is not assignable to type 'new (param: Tstring) => any'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability39.errors.txt b/tests/baselines/reference/assignmentCompatability39.errors.txt index 4c7f14ba68f..6389a9ad87f 100644 --- a/tests/baselines/reference/assignmentCompatability39.errors.txt +++ b/tests/baselines/reference/assignmentCompatability39.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic'. +tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic'. Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'classWithTwoPublic'. @@ -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' is not assignable to type 'classWithTwoPublic'. -!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'classWithTwoPublic'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic'. +!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'classWithTwoPublic'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability40.errors.txt b/tests/baselines/reference/assignmentCompatability40.errors.txt index 9282af2c121..d60f7dcdeb6 100644 --- a/tests/baselines/reference/assignmentCompatability40.errors.txt +++ b/tests/baselines/reference/assignmentCompatability40.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate'. +tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate'. Property 'one' is private in type 'classWithPrivate' but not in type 'interfaceWithPublicAndOptional'. @@ -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' is not assignable to type 'classWithPrivate'. -!!! error TS2323: Property 'one' is private in type 'classWithPrivate' but not in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate'. +!!! error TS2322: Property 'one' is private in type 'classWithPrivate' but not in type 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability41.errors.txt b/tests/baselines/reference/assignmentCompatability41.errors.txt index 75c3ddd90bf..ad0b7b7cfe3 100644 --- a/tests/baselines/reference/assignmentCompatability41.errors.txt +++ b/tests/baselines/reference/assignmentCompatability41.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate'. +tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate'. Property 'one' is private in type 'classWithTwoPrivate' but not in type 'interfaceWithPublicAndOptional'. @@ -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' is not assignable to type 'classWithTwoPrivate'. -!!! error TS2323: Property 'one' is private in type 'classWithTwoPrivate' but not in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate'. +!!! error TS2322: Property 'one' is private in type 'classWithTwoPrivate' but not in type 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability42.errors.txt b/tests/baselines/reference/assignmentCompatability42.errors.txt index bd20a1d56b2..e86b261e682 100644 --- a/tests/baselines/reference/assignmentCompatability42.errors.txt +++ b/tests/baselines/reference/assignmentCompatability42.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate'. +tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate'. Property 'two' is private in type 'classWithPublicPrivate' but not in type 'interfaceWithPublicAndOptional'. @@ -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' is not assignable to type 'classWithPublicPrivate'. -!!! error TS2323: Property 'two' is private in type 'classWithPublicPrivate' but not in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate'. +!!! error TS2322: Property 'two' is private in type 'classWithPublicPrivate' but not in type 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability43.errors.txt b/tests/baselines/reference/assignmentCompatability43.errors.txt index 9cc919f34bf..a1f596ef7e2 100644 --- a/tests/baselines/reference/assignmentCompatability43.errors.txt +++ b/tests/baselines/reference/assignmentCompatability43.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo'. +tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo'. Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'interfaceTwo'. @@ -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' is not assignable to type 'interfaceTwo'. -!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'interfaceTwo'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo'. +!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'interfaceTwo'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt index 29764fec7a7..e5db4f9ab96 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt @@ -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() { }; diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt index 2abefbf7099..f3ff6f1b792 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt @@ -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() { }; diff --git a/tests/baselines/reference/assignmentStricterConstraints.errors.txt b/tests/baselines/reference/assignmentStricterConstraints.errors.txt index f5234a44fd1..bf3751dda74 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.errors.txt +++ b/tests/baselines/reference/assignmentStricterConstraints.errors.txt @@ -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 (x: T, y: S): void { } diff --git a/tests/baselines/reference/assignmentToObject.errors.txt b/tests/baselines/reference/assignmentToObject.errors.txt index 4be2392fce1..aa1222bd799 100644 --- a/tests/baselines/reference/assignmentToObject.errors.txt +++ b/tests/baselines/reference/assignmentToObject.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt index 82ca1be0cfc..2e85ee101f5 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt +++ b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt @@ -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'. \ No newline at end of file +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt index 67dee955566..a50ffdf72d7 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt @@ -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 { diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt index 8a5899d2377..a951a2b1a66 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt @@ -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 \ No newline at end of file diff --git a/tests/baselines/reference/callConstructAssignment.errors.txt b/tests/baselines/reference/callConstructAssignment.errors.txt index e3f850a1855..42949cf585d 100644 --- a/tests/baselines/reference/callConstructAssignment.errors.txt +++ b/tests/baselines/reference/callConstructAssignment.errors.txt @@ -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'. \ No newline at end of file +!!! error TS2322: Type '() => void' is not assignable to type 'new () => any'. \ No newline at end of file diff --git a/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt b/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt index 9c85dad20e9..cc8599ca91f 100644 --- a/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt +++ b/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt @@ -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'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt index 1f018be434a..35718ca9612 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt @@ -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. diff --git a/tests/baselines/reference/chainedAssignment1.errors.txt b/tests/baselines/reference/chainedAssignment1.errors.txt index 6c95a2f4362..3fa654c62cc 100644 --- a/tests/baselines/reference/chainedAssignment1.errors.txt +++ b/tests/baselines/reference/chainedAssignment1.errors.txt @@ -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'. \ No newline at end of file +!!! error TS2322: Type 'Z' is not assignable to type 'Y'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignment3.errors.txt b/tests/baselines/reference/chainedAssignment3.errors.txt index 1c760f9b37c..8a64a35cbc0 100644 --- a/tests/baselines/reference/chainedAssignment3.errors.txt +++ b/tests/baselines/reference/chainedAssignment3.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignmentChecking.errors.txt b/tests/baselines/reference/chainedAssignmentChecking.errors.txt index 957c088ab52..ac3bade0aae 100644 --- a/tests/baselines/reference/chainedAssignmentChecking.errors.txt +++ b/tests/baselines/reference/chainedAssignmentChecking.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt index 26df8a15ca0..e307cc9be89 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt @@ -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; } diff --git a/tests/baselines/reference/classImplementsClass2.errors.txt b/tests/baselines/reference/classImplementsClass2.errors.txt index 8287eb92ce7..49eeed75fe0 100644 --- a/tests/baselines/reference/classImplementsClass2.errors.txt +++ b/tests/baselines/reference/classImplementsClass2.errors.txt @@ -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'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C2'. +!!! error TS2322: Property 'foo' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass4.errors.txt b/tests/baselines/reference/classImplementsClass4.errors.txt index 2de30155c8d..ecc9d6d8582 100644 --- a/tests/baselines/reference/classImplementsClass4.errors.txt +++ b/tests/baselines/reference/classImplementsClass4.errors.txt @@ -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'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C2'. +!!! error TS2322: Property 'x' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass5.errors.txt b/tests/baselines/reference/classImplementsClass5.errors.txt index 6b5533e65f1..076120fdbaf 100644 --- a/tests/baselines/reference/classImplementsClass5.errors.txt +++ b/tests/baselines/reference/classImplementsClass5.errors.txt @@ -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'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C2'. +!!! error TS2322: Types have separate declarations of a private property 'x'. \ No newline at end of file diff --git a/tests/baselines/reference/classMemberInitializerScoping.errors.txt b/tests/baselines/reference/classMemberInitializerScoping.errors.txt index 7df3c0518b6..dddc7a82a3f 100644 --- a/tests/baselines/reference/classMemberInitializerScoping.errors.txt +++ b/tests/baselines/reference/classMemberInitializerScoping.errors.txt @@ -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'. } } diff --git a/tests/baselines/reference/classSideInheritance3.errors.txt b/tests/baselines/reference/classSideInheritance3.errors.txt index 48d7165adcd..c845defa5b8 100644 --- a/tests/baselines/reference/classSideInheritance3.errors.txt +++ b/tests/baselines/reference/classSideInheritance3.errors.txt @@ -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 \ No newline at end of file diff --git a/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt b/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt index 5d0d67067e5..ecf7e5ed1dc 100644 --- a/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt +++ b/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt @@ -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'. \ No newline at end of file diff --git a/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt b/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt index 75cd76e407e..32e8464a195 100644 --- a/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt +++ b/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts(6,5): error TS2323: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts(12,9): error TS2323: Type 'T2' is not assignable to type 'T1'. +tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts(6,5): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts(12,9): error TS2322: Type 'T2' is not assignable to type 'T1'. ==== tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts (2 errors) ==== @@ -10,7 +10,7 @@ tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOpera } var resultIsString: number = foo(1, "123"); //error here ~~~~~~~~~~~~~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. //TypeParameters function foo1() { @@ -18,5 +18,5 @@ tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOpera var y: T2; var result: T1 = (x, y); //error here ~~~~~~ -!!! error TS2323: Type 'T2' is not assignable to type 'T1'. +!!! error TS2322: Type 'T2' is not assignable to type 'T1'. } \ No newline at end of file diff --git a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt index bedfb8deba3..535e4eb1a30 100644 --- a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt +++ b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(5,1): error TS2323: Type 'string' is not assignable to type 'boolean'. -tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(8,1): error TS2323: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(11,1): error TS2323: Type 'string' is not assignable to type 'E'. -tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(14,1): error TS2323: Type 'string' is not assignable to type '{ a: string; }'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(5,1): error TS2322: Type 'string' is not assignable to type 'boolean'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(8,1): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(11,1): error TS2322: Type 'string' is not assignable to type 'E'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(14,1): error TS2322: Type 'string' is not assignable to type '{ a: string; }'. Property 'a' is missing in type 'String'. -tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(17,1): error TS2323: Type 'string' is not assignable to type 'void'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(17,1): error TS2322: Type 'string' is not assignable to type 'void'. ==== tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts (5 errors) ==== @@ -13,25 +13,25 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmen var x1: boolean; x1 += ''; ~~ -!!! error TS2323: Type 'string' is not assignable to type 'boolean'. +!!! error TS2322: Type 'string' is not assignable to type 'boolean'. var x2: number; x2 += ''; ~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var x3: E; x3 += ''; ~~ -!!! error TS2323: Type 'string' is not assignable to type 'E'. +!!! error TS2322: Type 'string' is not assignable to type 'E'. var x4: {a: string}; x4 += ''; ~~ -!!! error TS2323: Type 'string' is not assignable to type '{ a: string; }'. -!!! error TS2323: Property 'a' is missing in type 'String'. +!!! error TS2322: Type 'string' is not assignable to type '{ a: string; }'. +!!! error TS2322: Property 'a' is missing in type 'String'. var x5: void; x5 += ''; ~~ -!!! error TS2323: Type 'string' is not assignable to type 'void'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'void'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpression1.errors.txt b/tests/baselines/reference/conditionalExpression1.errors.txt index 35066561a38..0e291986785 100644 --- a/tests/baselines/reference/conditionalExpression1.errors.txt +++ b/tests/baselines/reference/conditionalExpression1.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2323: Type 'string | number' is not assignable to type 'boolean'. +tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2322: Type 'string | number' is not assignable to type 'boolean'. Type 'string' is not assignable to type 'boolean'. ==== tests/cases/compiler/conditionalExpression1.ts (1 errors) ==== var x: boolean = (true ? 1 : ""); // should be an error ~ -!!! error TS2323: Type 'string | number' is not assignable to type 'boolean'. -!!! error TS2323: Type 'string' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type 'string | number' is not assignable to type 'boolean'. +!!! error TS2322: Type 'string' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt index 27c08308c33..954e8af856f 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(15,5): error TS2323: Type 'A | B' is not assignable to type 'A'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(15,5): error TS2322: Type 'A | B' is not assignable to type 'A'. Type 'B' is not assignable to type 'A'. Property 'propertyA' is missing in type 'B'. -tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(16,5): error TS2323: Type 'A | B' is not assignable to type 'B'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(16,5): error TS2322: Type 'A | B' is not assignable to type 'B'. Type 'A' is not assignable to type 'B'. Property 'propertyB' is missing in type 'A'. -tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(18,5): error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(18,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number'. Type '(n: X) => string' is not assignable to type '(t: X) => number'. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(19,5): error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(19,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string'. Type '(m: X) => number' is not assignable to type '(t: X) => string'. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(20,5): error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(20,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean'. Type '(m: X) => number' is not assignable to type '(t: X) => boolean'. Type 'number' is not assignable to type 'boolean'. @@ -32,27 +32,27 @@ tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithou //Be contextually typed and and bct is not identical, results in errors that union type is not assignable to target var result2: A = true ? a : b; ~~~~~~~ -!!! error TS2323: Type 'A | B' is not assignable to type 'A'. -!!! error TS2323: Type 'B' is not assignable to type 'A'. -!!! error TS2323: Property 'propertyA' is missing in type 'B'. +!!! error TS2322: Type 'A | B' is not assignable to type 'A'. +!!! error TS2322: Type 'B' is not assignable to type 'A'. +!!! error TS2322: Property 'propertyA' is missing in type 'B'. var result3: B = true ? a : b; ~~~~~~~ -!!! error TS2323: Type 'A | B' is not assignable to type 'B'. -!!! error TS2323: Type 'A' is not assignable to type 'B'. -!!! error TS2323: Property 'propertyB' is missing in type 'A'. +!!! error TS2322: Type 'A | B' is not assignable to type 'B'. +!!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Property 'propertyB' is missing in type 'A'. var result4: (t: X) => number = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number'. -!!! error TS2323: Type '(n: X) => string' is not assignable to type '(t: X) => number'. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number'. +!!! error TS2322: Type '(n: X) => string' is not assignable to type '(t: X) => number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var result5: (t: X) => string = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string'. -!!! error TS2323: Type '(m: X) => number' is not assignable to type '(t: X) => string'. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string'. +!!! error TS2322: Type '(m: X) => number' is not assignable to type '(t: X) => string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var result6: (t: X) => boolean = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean'. -!!! error TS2323: Type '(m: X) => number' is not assignable to type '(t: X) => boolean'. -!!! error TS2323: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean'. +!!! error TS2322: Type '(m: X) => number' is not assignable to type '(t: X) => boolean'. +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/constructorAsType.errors.txt b/tests/baselines/reference/constructorAsType.errors.txt index ca17d41623d..b0d30295cde 100644 --- a/tests/baselines/reference/constructorAsType.errors.txt +++ b/tests/baselines/reference/constructorAsType.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/constructorAsType.ts(1,5): error TS2323: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. +tests/cases/compiler/constructorAsType.ts(1,5): error TS2322: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. ==== tests/cases/compiler/constructorAsType.ts (1 errors) ==== var Person:new () => {name: string;} = function () {return {name:"joe"};}; ~~~~~~ -!!! error TS2323: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. +!!! error TS2322: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. var Person2:{new() : {name:string;};}; diff --git a/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt b/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt index c241aa8096d..2fb24c0d5d8 100644 --- a/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt +++ b/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(3,17): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,17): error TS2323: Type 'number' is not assignable to type 'T'. -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,27): error TS2323: Type 'T' is not assignable to type 'U'. -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(17,17): error TS2323: Type 'Date' is not assignable to type 'T'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(3,17): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,17): error TS2322: Type 'number' is not assignable to type 'T'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,27): error TS2322: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(17,17): error TS2322: Type 'Date' is not assignable to type 'T'. ==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts (4 errors) ==== @@ -9,7 +9,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co constructor(x); constructor(public x: string = 1) { // error ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var y = x; } } @@ -18,9 +18,9 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co constructor(x: T, y: U); constructor(x: T = 1, public y: U = x) { // error ~~~~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'T'. +!!! error TS2322: Type 'number' is not assignable to type 'T'. ~~~~~~~~~~~~~~~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. var z = x; } } @@ -29,7 +29,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co constructor(x); constructor(x: T = new Date()) { // error ~~~~~~~~~~~~~~~~~ -!!! error TS2323: Type 'Date' is not assignable to type 'T'. +!!! error TS2322: Type 'Date' is not assignable to type 'T'. var y = x; } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt b/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt index 8bb04c59554..87af1b85f2d 100644 --- a/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt +++ b/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/classes/propertyMemberDeclarations/constructorParameterShadowsOuterScopes.ts(8,9): error TS2301: Initializer of instance member variable 'b' cannot reference identifier 'x' declared in the constructor. -tests/cases/conformance/classes/propertyMemberDeclarations/constructorParameterShadowsOuterScopes.ts(10,9): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/classes/propertyMemberDeclarations/constructorParameterShadowsOuterScopes.ts(10,9): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/conformance/classes/propertyMemberDeclarations/constructorParameterShadowsOuterScopes.ts(16,9): error TS2301: Initializer of instance member variable 'b' cannot reference identifier 'y' declared in the constructor. @@ -17,7 +17,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/constructorParameterS constructor(x: string) { x = 2; // error, x is string ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. } } diff --git a/tests/baselines/reference/contextualTypeWithTuple.errors.txt b/tests/baselines/reference/contextualTypeWithTuple.errors.txt index d093e176455..875d7b5e20a 100644 --- a/tests/baselines/reference/contextualTypeWithTuple.errors.txt +++ b/tests/baselines/reference/contextualTypeWithTuple.errors.txt @@ -1,17 +1,17 @@ -tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(3,5): error TS2323: Type '[number, string, boolean]' is not assignable to type '[number, string]'. +tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(3,5): error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]'. Types of property 'pop' are incompatible. Type '() => string | number | boolean' is not assignable to type '() => string | number'. Type 'string | number | boolean' is not assignable to type 'string | number'. Type 'boolean' is not assignable to type 'string | number'. Type 'boolean' is not assignable to type 'number'. -tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(8,1): error TS2323: Type '[number, string, boolean]' is not assignable to type '[number, string]'. -tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(11,1): error TS2323: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]'. +tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(8,1): error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]'. +tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(11,1): error TS2322: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]'. Types of property '0' are incompatible. Type '{}' is not assignable to type '{ a: string; }'. Property 'a' is missing in type '{}'. -tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(12,1): error TS2323: Type '[number, string]' is not assignable to type '[number, string, boolean]'. +tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(12,1): error TS2322: Type '[number, string]' is not assignable to type '[number, string, boolean]'. Property '2' is missing in type '[number, string]'. -tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS2323: Type '[string, string, number]' is not assignable to type '[string, string]'. +tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS2322: Type '[string, string, number]' is not assignable to type '[string, string]'. Types of property 'pop' are incompatible. Type '() => string | number' is not assignable to type '() => string'. Type 'string | number' is not assignable to type 'string'. @@ -23,36 +23,36 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS23 var numStrTuple: [number, string] = [5, "hello"]; var numStrTuple2: [number, string] = [5, "foo", true]; ~~~~~~~~~~~~ -!!! error TS2323: Type '[number, string, boolean]' is not assignable to type '[number, string]'. -!!! error TS2323: Types of property 'pop' are incompatible. -!!! error TS2323: Type '() => string | number | boolean' is not assignable to type '() => string | number'. -!!! error TS2323: Type 'string | number | boolean' is not assignable to type 'string | number'. -!!! error TS2323: Type 'boolean' is not assignable to type 'string | number'. -!!! error TS2323: Type 'boolean' is not assignable to type 'number'. +!!! error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]'. +!!! error TS2322: Types of property 'pop' are incompatible. +!!! error TS2322: Type '() => string | number | boolean' is not assignable to type '() => string | number'. +!!! error TS2322: Type 'string | number | boolean' is not assignable to type 'string | number'. +!!! error TS2322: Type 'boolean' is not assignable to type 'string | number'. +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. var numStrBoolTuple: [number, string, boolean] = [5, "foo", true]; var objNumTuple: [{ a: string }, number] = [{ a: "world" }, 5]; var strTupleTuple: [string, [number, {}]] = ["bar", [5, { x: 1, y: 1 }]]; numStrTuple = numStrTuple2; numStrTuple = numStrBoolTuple; ~~~~~~~~~~~ -!!! error TS2323: Type '[number, string, boolean]' is not assignable to type '[number, string]'. +!!! error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]'. // error objNumTuple = [ {}, 5]; ~~~~~~~~~~~ -!!! error TS2323: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]'. -!!! error TS2323: Types of property '0' are incompatible. -!!! error TS2323: Type '{}' is not assignable to type '{ a: string; }'. -!!! error TS2323: Property 'a' is missing in type '{}'. +!!! error TS2322: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type '{}' is not assignable to type '{ a: string; }'. +!!! error TS2322: Property 'a' is missing in type '{}'. numStrBoolTuple = numStrTuple; ~~~~~~~~~~~~~~~ -!!! error TS2323: Type '[number, string]' is not assignable to type '[number, string, boolean]'. -!!! error TS2323: Property '2' is missing in type '[number, string]'. +!!! error TS2322: Type '[number, string]' is not assignable to type '[number, string, boolean]'. +!!! error TS2322: Property '2' is missing in type '[number, string]'. var strStrTuple: [string, string] = ["foo", "bar", 5]; ~~~~~~~~~~~ -!!! error TS2323: Type '[string, string, number]' is not assignable to type '[string, string]'. -!!! error TS2323: Types of property 'pop' are incompatible. -!!! error TS2323: Type '() => string | number' is not assignable to type '() => string'. -!!! error TS2323: Type 'string | number' is not assignable to type 'string'. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '[string, string, number]' is not assignable to type '[string, string]'. +!!! error TS2322: Types of property 'pop' are incompatible. +!!! error TS2322: Type '() => string | number' is not assignable to type '() => string'. +!!! error TS2322: Type 'string | number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping.errors.txt b/tests/baselines/reference/contextualTyping.errors.txt index 5e415cf13a1..3dce1018e3e 100644 --- a/tests/baselines/reference/contextualTyping.errors.txt +++ b/tests/baselines/reference/contextualTyping.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. tests/cases/compiler/contextualTyping.ts(197,15): error TS2300: Duplicate identifier 'Point'. tests/cases/compiler/contextualTyping.ts(207,10): error TS2300: Duplicate identifier 'Point'. -tests/cases/compiler/contextualTyping.ts(230,5): error TS2323: Type '{}' is not assignable to type 'B'.\n Property 'x' is missing in type '{}'. +tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not assignable to type 'B'.\n Property 'x' is missing in type '{}'. ==== tests/cases/compiler/contextualTyping.ts (4 errors) ==== @@ -242,5 +242,5 @@ tests/cases/compiler/contextualTyping.ts(230,5): error TS2323: Type '{}' is not interface B extends A { } var x: B = { }; ~ -!!! error TS2323: Type '{}' is not assignable to type 'B'.\n Property 'x' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'B'.\n Property 'x' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping11.errors.txt b/tests/baselines/reference/contextualTyping11.errors.txt index c619258a20a..a7879725814 100644 --- a/tests/baselines/reference/contextualTyping11.errors.txt +++ b/tests/baselines/reference/contextualTyping11.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/contextualTyping11.ts(1,13): error TS2323: Type 'foo[]' is not assignable to type '{ id: number; }[]'. +tests/cases/compiler/contextualTyping11.ts(1,13): error TS2322: Type 'foo[]' is not assignable to type '{ id: number; }[]'. Type 'foo' is not assignable to type '{ id: number; }'. Property 'id' is missing in type 'foo'. @@ -6,6 +6,6 @@ tests/cases/compiler/contextualTyping11.ts(1,13): error TS2323: Type 'foo[]' is ==== tests/cases/compiler/contextualTyping11.ts (1 errors) ==== class foo { public bar:{id:number;}[] = [({})]; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2323: Type 'foo[]' is not assignable to type '{ id: number; }[]'. -!!! error TS2323: Type 'foo' is not assignable to type '{ id: number; }'. -!!! error TS2323: Property 'id' is missing in type 'foo'. \ No newline at end of file +!!! error TS2322: Type 'foo[]' is not assignable to type '{ id: number; }[]'. +!!! error TS2322: Type 'foo' is not assignable to type '{ id: number; }'. +!!! error TS2322: Property 'id' is missing in type 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping21.errors.txt b/tests/baselines/reference/contextualTyping21.errors.txt index 8b3522066d4..d40192c6240 100644 --- a/tests/baselines/reference/contextualTyping21.errors.txt +++ b/tests/baselines/reference/contextualTyping21.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/contextualTyping21.ts(1,36): error TS2323: Type '(number | { id: number; })[]' is not assignable to type '{ id: number; }[]'. +tests/cases/compiler/contextualTyping21.ts(1,36): error TS2322: Type '(number | { id: number; })[]' is not assignable to type '{ id: number; }[]'. Type 'number | { id: number; }' is not assignable to type '{ id: number; }'. Type 'number' is not assignable to type '{ id: number; }'. Property 'id' is missing in type 'Number'. @@ -7,7 +7,7 @@ tests/cases/compiler/contextualTyping21.ts(1,36): error TS2323: Type '(number | ==== tests/cases/compiler/contextualTyping21.ts (1 errors) ==== var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, 1]; ~~~ -!!! error TS2323: Type '(number | { id: number; })[]' is not assignable to type '{ id: number; }[]'. -!!! error TS2323: Type 'number | { id: number; }' is not assignable to type '{ id: number; }'. -!!! error TS2323: Type 'number' is not assignable to type '{ id: number; }'. -!!! error TS2323: Property 'id' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type '(number | { id: number; })[]' is not assignable to type '{ id: number; }[]'. +!!! error TS2322: Type 'number | { id: number; }' is not assignable to type '{ id: number; }'. +!!! error TS2322: Type 'number' is not assignable to type '{ id: number; }'. +!!! error TS2322: Property 'id' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping24.errors.txt b/tests/baselines/reference/contextualTyping24.errors.txt index 66161aa329e..a172600e1c5 100644 --- a/tests/baselines/reference/contextualTyping24.errors.txt +++ b/tests/baselines/reference/contextualTyping24.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/contextualTyping24.ts(1,55): error TS2323: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number'. +tests/cases/compiler/contextualTyping24.ts(1,55): error TS2322: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number'. Types of parameters 'a' and 'a' are incompatible. Type 'string' is not assignable to type '{ (): number; (i: number): number; }'. @@ -6,6 +6,6 @@ tests/cases/compiler/contextualTyping24.ts(1,55): error TS2323: Type '(a: string ==== tests/cases/compiler/contextualTyping24.ts (1 errors) ==== var foo:(a:{():number; (i:number):number; })=>number; foo = function(a:string){return 5}; ~~~ -!!! error TS2323: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number'. -!!! error TS2323: Types of parameters 'a' and 'a' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file +!!! error TS2322: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number'. +!!! error TS2322: Types of parameters 'a' and 'a' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping5.errors.txt b/tests/baselines/reference/contextualTyping5.errors.txt index f2f6cea14b1..5105f67190c 100644 --- a/tests/baselines/reference/contextualTyping5.errors.txt +++ b/tests/baselines/reference/contextualTyping5.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/contextualTyping5.ts(1,13): error TS2323: Type '{}' is not assignable to type '{ id: number; }'. +tests/cases/compiler/contextualTyping5.ts(1,13): error TS2322: Type '{}' is not assignable to type '{ id: number; }'. Property 'id' is missing in type '{}'. ==== tests/cases/compiler/contextualTyping5.ts (1 errors) ==== class foo { public bar:{id:number;} = { }; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2323: Type '{}' is not assignable to type '{ id: number; }'. -!!! error TS2323: Property 'id' is missing in type '{}'. \ No newline at end of file +!!! error TS2322: Type '{}' is not assignable to type '{ id: number; }'. +!!! error TS2322: Property 'id' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt b/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt index 8b14d0aa301..26b06abf782 100644 --- a/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt +++ b/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/contextualTypingOfArrayLiterals1.ts(5,5): error TS2323: Type '(number | Date)[]' is not assignable to type 'I'. +tests/cases/compiler/contextualTypingOfArrayLiterals1.ts(5,5): error TS2322: Type '(number | Date)[]' is not assignable to type 'I'. Index signatures are incompatible. Type 'number | Date' is not assignable to type 'Date'. Type 'number' is not assignable to type 'Date'. @@ -12,11 +12,11 @@ tests/cases/compiler/contextualTypingOfArrayLiterals1.ts(5,5): error TS2323: Typ var x3: I = [new Date(), 1]; ~~ -!!! error TS2323: Type '(number | Date)[]' is not assignable to type 'I'. -!!! error TS2323: Index signatures are incompatible. -!!! error TS2323: Type 'number | Date' is not assignable to type 'Date'. -!!! error TS2323: Type 'number' is not assignable to type 'Date'. -!!! error TS2323: Property 'toDateString' is missing in type 'Number'. +!!! error TS2322: Type '(number | Date)[]' is not assignable to type 'I'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'number | Date' is not assignable to type 'Date'. +!!! error TS2322: Type 'number' is not assignable to type 'Date'. +!!! error TS2322: Property 'toDateString' is missing in type 'Number'. var r2 = x3[1]; r2.getDate(); \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt b/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt index 9cd1475b6e8..08fe22c08e0 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS2323: Type '((a: C) => number) | ((b: number) => void)' is not assignable to type '(a: A) => void'. +tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS2322: Type '((a: C) => number) | ((b: number) => void)' is not assignable to type '(a: A) => void'. Type '(b: number) => void' is not assignable to type '(a: A) => void'. Types of parameters 'b' and 'a' are incompatible. Type 'number' is not assignable to type 'A'. @@ -18,9 +18,9 @@ tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; ~~ -!!! error TS2323: Type '((a: C) => number) | ((b: number) => void)' is not assignable to type '(a: A) => void'. -!!! error TS2323: Type '(b: number) => void' is not assignable to type '(a: A) => void'. -!!! error TS2323: Types of parameters 'b' and 'a' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'A'. -!!! error TS2323: Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type '((a: C) => number) | ((b: number) => void)' is not assignable to type '(a: A) => void'. +!!! error TS2322: Type '(b: number) => void' is not assignable to type '(a: A) => void'. +!!! error TS2322: Types of parameters 'b' and 'a' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'A'. +!!! error TS2322: Property 'foo' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt b/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt index 7f4d749a3a0..b388d1b0e4a 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/contextualTypingOfObjectLiterals.ts(4,1): error TS2323: Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }'. +tests/cases/compiler/contextualTypingOfObjectLiterals.ts(4,1): error TS2322: Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }'. Index signature is missing in type '{ x: string; }'. tests/cases/compiler/contextualTypingOfObjectLiterals.ts(10,3): error TS2345: Argument of type '{ x: string; }' is not assignable to parameter of type '{ [x: string]: string; }'. @@ -9,8 +9,8 @@ tests/cases/compiler/contextualTypingOfObjectLiterals.ts(10,3): error TS2345: Ar obj1 = {}; // Ok obj1 = obj2; // Error - indexer doesn't match ~~~~ -!!! error TS2323: Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }'. -!!! error TS2323: Index signature is missing in type '{ x: string; }'. +!!! error TS2322: Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }'. +!!! error TS2322: Index signature is missing in type '{ x: string; }'. function f(x: { [s: string]: string }) { } diff --git a/tests/baselines/reference/contextuallyTypingRestParameters.errors.txt b/tests/baselines/reference/contextuallyTypingRestParameters.errors.txt index 369d10e88c2..b64c255c867 100644 --- a/tests/baselines/reference/contextuallyTypingRestParameters.errors.txt +++ b/tests/baselines/reference/contextuallyTypingRestParameters.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/contextuallyTypingRestParameters.ts(3,9): error TS2323: Type 'string[]' is not assignable to type 'string'. -tests/cases/compiler/contextuallyTypingRestParameters.ts(5,9): error TS2323: Type 'string[]' is not assignable to type 'string'. +tests/cases/compiler/contextuallyTypingRestParameters.ts(3,9): error TS2322: Type 'string[]' is not assignable to type 'string'. +tests/cases/compiler/contextuallyTypingRestParameters.ts(5,9): error TS2322: Type 'string[]' is not assignable to type 'string'. ==== tests/cases/compiler/contextuallyTypingRestParameters.ts (2 errors) ==== @@ -7,10 +7,10 @@ tests/cases/compiler/contextuallyTypingRestParameters.ts(5,9): error TS2323: Typ var t = y; var x2: string = t; // This should be error ~~ -!!! error TS2323: Type 'string[]' is not assignable to type 'string'. +!!! error TS2322: Type 'string[]' is not assignable to type 'string'. var x3: string[] = t; // No error var y2: string = y; // This should be error ~~ -!!! error TS2323: Type 'string[]' is not assignable to type 'string'. +!!! error TS2322: Type 'string[]' is not assignable to type 'string'. var y3: string[] = y; // No error }; \ No newline at end of file diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt index a1ed83ada1b..717d76309a5 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(5,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): error TS2323: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'. +tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'. Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'. @@ -16,6 +16,6 @@ tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): e } var a: D = foo("hi", []); ~ -!!! error TS2323: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'. -!!! error TS2323: Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'. +!!! error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'. +!!! error TS2322: Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'. \ No newline at end of file diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt index ff1f29a695d..156fdcc4c7a 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/defaultArgsInFunctionExpressions.ts(4,19): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -tests/cases/compiler/defaultArgsInFunctionExpressions.ts(5,1): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/defaultArgsInFunctionExpressions.ts(8,20): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/defaultArgsInFunctionExpressions.ts(11,1): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(5,1): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(8,20): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(11,1): error TS2322: Type 'string' is not assignable to type 'number'. tests/cases/compiler/defaultArgsInFunctionExpressions.ts(14,51): error TS2352: Neither type 'string' nor type 'number' is assignable to the other. -tests/cases/compiler/defaultArgsInFunctionExpressions.ts(17,41): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(17,41): error TS2322: Type 'string' is not assignable to type 'number'. tests/cases/compiler/defaultArgsInFunctionExpressions.ts(20,62): error TS2352: Neither type 'string' nor type 'number' is assignable to the other. tests/cases/compiler/defaultArgsInFunctionExpressions.ts(28,15): error TS2304: Cannot find name 'T'. @@ -17,17 +17,17 @@ tests/cases/compiler/defaultArgsInFunctionExpressions.ts(28,15): error TS2304: C !!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. s = f(); ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. // Type check the default argument with the type annotation var f2 = function (a: string = 3) { return a; }; // Should error, but be of type (a: string) => string; ~~~~~~~~~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. s = f2(''); s = f2(); n = f2(); ~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. // Contextually type the default arg with the type annotation var f3 = function (a: (s: string) => any = (s) => s) { }; @@ -37,7 +37,7 @@ tests/cases/compiler/defaultArgsInFunctionExpressions.ts(28,15): error TS2304: C // Type check using the function's contextual type var f4: (a: number) => void = function (a = "") { }; ~~~~~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. // Contextually type the default arg using the function's contextual type var f5: (a: (s: string) => any) => void = function (a = s => s) { }; diff --git a/tests/baselines/reference/deleteOperator1.errors.txt b/tests/baselines/reference/deleteOperator1.errors.txt index 095d4c37100..964bdec9ea2 100644 --- a/tests/baselines/reference/deleteOperator1.errors.txt +++ b/tests/baselines/reference/deleteOperator1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/deleteOperator1.ts(4,5): error TS2323: Type 'boolean' is not assignable to type 'number'. +tests/cases/compiler/deleteOperator1.ts(4,5): error TS2322: Type 'boolean' is not assignable to type 'number'. ==== tests/cases/compiler/deleteOperator1.ts (1 errors) ==== @@ -7,4 +7,4 @@ tests/cases/compiler/deleteOperator1.ts(4,5): error TS2323: Type 'boolean' is no var y: any = delete a; var z: number = delete a; ~ -!!! error TS2323: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity.errors.txt b/tests/baselines/reference/derivedClassTransitivity.errors.txt index cd10113717d..c6b620beb18 100644 --- a/tests/baselines/reference/derivedClassTransitivity.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity.ts(18,1): error TS2323: Type 'E' is not assignable to type 'C'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity.ts(18,1): error TS2322: Type 'E' is not assignable to type 'C'. Types of property 'foo' are incompatible. Type '(x?: string) => void' is not assignable to type '(x: number) => void'. Types of parameters 'x' and 'x' are incompatible. @@ -25,10 +25,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'C'. -!!! error TS2323: Types of property 'foo' 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 'E' is not assignable to type 'C'. +!!! error TS2322: Types of property 'foo' 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'. var r = c.foo(1); var r2 = e.foo(''); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity2.errors.txt b/tests/baselines/reference/derivedClassTransitivity2.errors.txt index 7141b2fdc52..a8d2003c876 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity2.ts(18,1): error TS2323: Type 'E' is not assignable to type 'C'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity2.ts(18,1): error TS2322: Type 'E' is not assignable to type 'C'. Types of property 'foo' are incompatible. Type '(x: number, y?: string) => void' is not assignable to type '(x: number, y: number) => void'. Types of parameters 'y' and 'y' are incompatible. @@ -25,10 +25,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'C'. -!!! error TS2323: Types of property 'foo' are incompatible. -!!! error TS2323: Type '(x: number, y?: string) => void' is not assignable to type '(x: number, y: number) => void'. -!!! error TS2323: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type '(x: number, y?: string) => void' is not assignable to type '(x: number, y: number) => void'. +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(1, 1); var r2 = e.foo(1, ''); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity3.errors.txt b/tests/baselines/reference/derivedClassTransitivity3.errors.txt index eb3cea00e71..9d301255dfd 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts(18,1): error TS2323: Type 'E' is not assignable to type 'C'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts(18,1): error TS2322: Type 'E' is not assignable to type 'C'. Types of property 'foo' are incompatible. Type '(x: string, y?: number) => void' is not assignable to type '(x: string, y: string) => void'. Types of parameters 'y' and 'y' are incompatible. @@ -25,10 +25,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'C'. -!!! error TS2323: Types of property 'foo' are incompatible. -!!! error TS2323: Type '(x: string, y?: number) => void' is not assignable to type '(x: string, y: string) => void'. -!!! error TS2323: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type '(x: string, y?: number) => void' is not assignable to type '(x: string, y: string) => void'. +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var r = c.foo('', ''); var r2 = e.foo('', 1); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity4.errors.txt b/tests/baselines/reference/derivedClassTransitivity4.errors.txt index b6f9f9c8028..c1a80e0a1d7 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity4.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity4.ts(18,1): error TS2323: Type 'E' is not assignable to type 'C'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity4.ts(18,1): error TS2322: Type 'E' is not assignable to type 'C'. Types of property 'foo' are incompatible. Type '(x?: string) => void' is not assignable to type '(x: number) => void'. Types of parameters 'x' and 'x' are incompatible. @@ -26,11 +26,11 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'C'. -!!! error TS2323: Types of property 'foo' 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 'E' is not assignable to type 'C'. +!!! error TS2322: Types of property 'foo' 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'. var r = c.foo(1); ~~~~~ !!! error TS2445: Property 'foo' is protected and only accessible within class 'C' and its subclasses. diff --git a/tests/baselines/reference/derivedClassWithAny.errors.txt b/tests/baselines/reference/derivedClassWithAny.errors.txt index 42e7f1b38a1..aa91979706b 100644 --- a/tests/baselines/reference/derivedClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedClassWithAny.errors.txt @@ -4,7 +4,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(27,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(38,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(44,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(57,1): error TS2323: Type 'E' is not assignable to type 'C'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(57,1): error TS2322: Type 'E' is not assignable to type 'C'. Types of property 'x' are incompatible. Type 'string' is not assignable to type 'number'. @@ -80,8 +80,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit c = d; c = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'C'. -!!! error TS2323: Types of property 'x' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(); // e.foo would return string \ No newline at end of file diff --git a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt index 91111563a71..ab28ccc9c8d 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt @@ -2,9 +2,9 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,25): error TS2323: Type 'string' is not assignable to type 'T'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(32,16): error TS2323: Type 'string' is not assignable to type 'T'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(41,1): error TS2323: Type 'E' is not assignable to type 'C'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,25): error TS2322: Type 'string' is not assignable to type 'T'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(32,16): error TS2322: Type 'string' is not assignable to type 'T'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(41,1): error TS2322: Type 'E' is not assignable to type 'C'. Types of property 'x' are incompatible. Type 'string' is not assignable to type 'number'. @@ -49,11 +49,11 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~ -!!! error TS2323: Type 'string' is not assignable to type 'T'. +!!! error TS2322: Type 'string' is not assignable to type 'T'. foo(): T { return ''; // error ~~ -!!! error TS2323: Type 'string' is not assignable to type 'T'. +!!! error TS2322: Type 'string' is not assignable to type 'T'. } } @@ -64,7 +64,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC c = d; c = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'C'. -!!! error TS2323: Types of property 'x' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(); // e.foo would return string \ No newline at end of file diff --git a/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt b/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt index 241a90f0419..cd2402161c3 100644 --- a/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt +++ b/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt @@ -2,15 +2,15 @@ tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(3,5): error TS1098: Typ tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(3,6): error TS1005: '(' expected. tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(3,6): error TS1139: Type parameter declaration expected. tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(4,1): error TS1109: Expression expected. -tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(1,5): error TS2323: Type 'number' is not assignable to type '{ (): any; x: number; }'. +tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(1,5): error TS2322: Type 'number' is not assignable to type '{ (): any; x: number; }'. Property 'x' is missing in type 'Number'. ==== tests/cases/compiler/dontShowCompilerGeneratedMembers.ts (5 errors) ==== var f: { ~ -!!! error TS2323: Type 'number' is not assignable to type '{ (): any; x: number; }'. -!!! error TS2323: Property 'x' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ (): any; x: number; }'. +!!! error TS2322: Property 'x' is missing in type 'Number'. x: number; <- ~ diff --git a/tests/baselines/reference/enumAssignability.errors.txt b/tests/baselines/reference/enumAssignability.errors.txt index 8ea3b5a368c..4a060ac3456 100644 --- a/tests/baselines/reference/enumAssignability.errors.txt +++ b/tests/baselines/reference/enumAssignability.errors.txt @@ -1,31 +1,31 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(9,1): error TS2323: Type 'F' is not assignable to type 'E'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(10,1): error TS2323: Type 'E' is not assignable to type 'F'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(29,9): error TS2323: Type 'E' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(30,9): error TS2323: Type 'E' is not assignable to type 'boolean'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(31,9): error TS2323: Type 'E' is not assignable to type 'Date'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(9,1): error TS2322: Type 'F' is not assignable to type 'E'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(10,1): error TS2322: Type 'E' is not assignable to type 'F'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(29,9): error TS2322: Type 'E' is not assignable to type 'string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(30,9): error TS2322: Type 'E' is not assignable to type 'boolean'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(31,9): error TS2322: Type 'E' is not assignable to type 'Date'. Property 'toDateString' is missing in type 'Number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(33,9): error TS2323: Type 'E' is not assignable to type 'void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(36,9): error TS2323: Type 'E' is not assignable to type '() => {}'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(37,9): error TS2323: Type 'E' is not assignable to type 'Function'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(33,9): error TS2322: Type 'E' is not assignable to type 'void'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(36,9): error TS2322: Type 'E' is not assignable to type '() => {}'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(37,9): error TS2322: Type 'E' is not assignable to type 'Function'. Property 'apply' is missing in type 'Number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(38,9): error TS2323: Type 'E' is not assignable to type '(x: number) => string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(39,5): error TS2323: Type 'E' is not assignable to type 'C'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(38,9): error TS2322: Type 'E' is not assignable to type '(x: number) => string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(39,5): error TS2322: Type 'E' is not assignable to type 'C'. Property 'foo' is missing in type 'Number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(40,5): error TS2323: Type 'E' is not assignable to type 'I'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(40,5): error TS2322: Type 'E' is not assignable to type 'I'. Property 'foo' is missing in type 'Number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(41,9): error TS2323: Type 'E' is not assignable to type 'number[]'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(41,9): error TS2322: Type 'E' is not assignable to type 'number[]'. Property 'length' is missing in type 'Number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(42,9): error TS2323: Type 'E' is not assignable to type '{ foo: string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(42,9): error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. Property 'foo' is missing in type 'Number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(43,9): error TS2323: Type 'E' is not assignable to type '(x: T) => T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(45,9): error TS2323: Type 'E' is not assignable to type 'String'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(43,9): error TS2322: Type 'E' is not assignable to type '(x: T) => T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(45,9): error TS2322: Type 'E' is not assignable to type 'String'. Property 'charAt' is missing in type 'Number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(47,21): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(48,9): error TS2323: Type 'E' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(49,9): error TS2323: Type 'E' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(50,9): error TS2323: Type 'E' is not assignable to type 'V'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(51,13): error TS2323: Type 'E' is not assignable to type 'A'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(52,13): error TS2323: Type 'E' is not assignable to type 'B'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(48,9): error TS2322: Type 'E' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(49,9): error TS2322: Type 'E' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(50,9): error TS2322: Type 'E' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(51,13): error TS2322: Type 'E' is not assignable to type 'A'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(52,13): error TS2322: Type 'E' is not assignable to type 'B'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts (21 errors) ==== @@ -39,10 +39,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi e = f; ~ -!!! error TS2323: Type 'F' is not assignable to type 'E'. +!!! error TS2322: Type 'F' is not assignable to type 'E'. f = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'F'. +!!! error TS2322: Type 'E' is not assignable to type 'F'. e = 1; // ok f = 1; // ok var x: number = e; // ok @@ -63,72 +63,72 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi var b: number = e; // ok var c: string = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'string'. +!!! error TS2322: Type 'E' is not assignable to type 'string'. var d: boolean = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'boolean'. +!!! error TS2322: Type 'E' is not assignable to type 'boolean'. var ee: Date = e; ~~ -!!! error TS2323: Type 'E' is not assignable to type 'Date'. -!!! error TS2323: Property 'toDateString' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'Date'. +!!! error TS2322: Property 'toDateString' is missing in type 'Number'. var f: any = e; // ok var g: void = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'void'. +!!! error TS2322: Type 'E' is not assignable to type 'void'. var h: Object = e; var i: {} = e; var j: () => {} = e; ~ -!!! error TS2323: Type 'E' is not assignable to type '() => {}'. +!!! error TS2322: Type 'E' is not assignable to type '() => {}'. var k: Function = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'Function'. -!!! error TS2323: Property 'apply' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'Function'. +!!! error TS2322: Property 'apply' is missing in type 'Number'. var l: (x: number) => string = e; ~ -!!! error TS2323: Type 'E' is not assignable to type '(x: number) => string'. +!!! error TS2322: Type 'E' is not assignable to type '(x: number) => string'. ac = e; ~~ -!!! error TS2323: Type 'E' is not assignable to type 'C'. -!!! error TS2323: Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Property 'foo' is missing in type 'Number'. ai = e; ~~ -!!! error TS2323: Type 'E' is not assignable to type 'I'. -!!! error TS2323: Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'I'. +!!! error TS2322: Property 'foo' is missing in type 'Number'. var m: number[] = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'number[]'. -!!! error TS2323: Property 'length' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'number[]'. +!!! error TS2322: Property 'length' is missing in type 'Number'. var n: { foo: string } = e; ~ -!!! error TS2323: Type 'E' is not assignable to type '{ foo: string; }'. -!!! error TS2323: Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. +!!! error TS2322: Property 'foo' is missing in type 'Number'. var o: (x: T) => T = e; ~ -!!! error TS2323: Type 'E' is not assignable to type '(x: T) => T'. +!!! error TS2322: Type 'E' is not assignable to type '(x: T) => T'. var p: Number = e; var q: String = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'String'. -!!! error TS2323: Property 'charAt' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'String'. +!!! error TS2322: Property 'charAt' is missing in type 'Number'. function foo(x: T, y: U, z: V) { ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'T'. +!!! error TS2322: Type 'E' is not assignable to type 'T'. y = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'U'. +!!! error TS2322: Type 'E' is not assignable to type 'U'. z = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'V'. +!!! error TS2322: Type 'E' is not assignable to type 'V'. var a: A = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'A'. +!!! error TS2322: Type 'E' is not assignable to type 'A'. var b: B = e; ~ -!!! error TS2323: Type 'E' is not assignable to type 'B'. +!!! error TS2322: Type 'E' is not assignable to type 'B'. } } \ No newline at end of file diff --git a/tests/baselines/reference/enumAssignmentCompat.errors.txt b/tests/baselines/reference/enumAssignmentCompat.errors.txt index f2a093f2046..3cddaf45966 100644 --- a/tests/baselines/reference/enumAssignmentCompat.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/enumAssignmentCompat.ts(26,5): error TS2323: Type 'typeof W' is not assignable to type 'number'. -tests/cases/compiler/enumAssignmentCompat.ts(28,5): error TS2323: Type 'W' is not assignable to type 'typeof W'. +tests/cases/compiler/enumAssignmentCompat.ts(26,5): error TS2322: Type 'typeof W' is not assignable to type 'number'. +tests/cases/compiler/enumAssignmentCompat.ts(28,5): error TS2322: Type 'W' is not assignable to type 'typeof W'. Property 'D' is missing in type 'Number'. -tests/cases/compiler/enumAssignmentCompat.ts(30,5): error TS2323: Type 'number' is not assignable to type 'typeof W'. -tests/cases/compiler/enumAssignmentCompat.ts(32,5): error TS2323: Type 'W' is not assignable to type 'WStatic'. +tests/cases/compiler/enumAssignmentCompat.ts(30,5): error TS2322: Type 'number' is not assignable to type 'typeof W'. +tests/cases/compiler/enumAssignmentCompat.ts(32,5): error TS2322: Type 'W' is not assignable to type 'WStatic'. Property 'a' is missing in type 'Number'. -tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2323: Type 'number' is not assignable to type 'WStatic'. +tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2322: Type 'number' is not assignable to type 'WStatic'. ==== tests/cases/compiler/enumAssignmentCompat.ts (5 errors) ==== @@ -35,24 +35,24 @@ tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2323: Type 'number' var y: typeof W = W; var z: number = W; // error ~ -!!! error TS2323: Type 'typeof W' is not assignable to type 'number'. +!!! error TS2322: Type 'typeof W' is not assignable to type 'number'. var a: number = W.a; var b: typeof W = W.a; // error ~ -!!! error TS2323: Type 'W' is not assignable to type 'typeof W'. -!!! error TS2323: Property 'D' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'typeof W'. +!!! error TS2322: Property 'D' is missing in type 'Number'. var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ -!!! error TS2323: Type 'number' is not assignable to type 'typeof W'. +!!! error TS2322: Type 'number' is not assignable to type 'typeof W'. var e: typeof W.a = 4; var f: WStatic = W.a; // error ~ -!!! error TS2323: Type 'W' is not assignable to type 'WStatic'. -!!! error TS2323: Property 'a' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'WStatic'. +!!! error TS2322: Property 'a' is missing in type 'Number'. var g: WStatic = 5; // error ~ -!!! error TS2323: Type 'number' is not assignable to type 'WStatic'. +!!! error TS2322: Type 'number' is not assignable to type 'WStatic'. var h: W = 3; var i: W = W.a; i = W.a; diff --git a/tests/baselines/reference/enumAssignmentCompat2.errors.txt b/tests/baselines/reference/enumAssignmentCompat2.errors.txt index 9b2263455ec..d87d6acf6a0 100644 --- a/tests/baselines/reference/enumAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat2.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/enumAssignmentCompat2.ts(25,5): error TS2323: Type 'typeof W' is not assignable to type 'number'. -tests/cases/compiler/enumAssignmentCompat2.ts(27,5): error TS2323: Type 'W' is not assignable to type 'typeof W'. +tests/cases/compiler/enumAssignmentCompat2.ts(25,5): error TS2322: Type 'typeof W' is not assignable to type 'number'. +tests/cases/compiler/enumAssignmentCompat2.ts(27,5): error TS2322: Type 'W' is not assignable to type 'typeof W'. Property 'a' is missing in type 'Number'. -tests/cases/compiler/enumAssignmentCompat2.ts(29,5): error TS2323: Type 'number' is not assignable to type 'typeof W'. -tests/cases/compiler/enumAssignmentCompat2.ts(31,5): error TS2323: Type 'W' is not assignable to type 'WStatic'. +tests/cases/compiler/enumAssignmentCompat2.ts(29,5): error TS2322: Type 'number' is not assignable to type 'typeof W'. +tests/cases/compiler/enumAssignmentCompat2.ts(31,5): error TS2322: Type 'W' is not assignable to type 'WStatic'. Property 'a' is missing in type 'Number'. -tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2323: Type 'number' is not assignable to type 'WStatic'. +tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2322: Type 'number' is not assignable to type 'WStatic'. ==== tests/cases/compiler/enumAssignmentCompat2.ts (5 errors) ==== @@ -34,24 +34,24 @@ tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2323: Type 'number' var y: typeof W = W; var z: number = W; // error ~ -!!! error TS2323: Type 'typeof W' is not assignable to type 'number'. +!!! error TS2322: Type 'typeof W' is not assignable to type 'number'. var a: number = W.a; var b: typeof W = W.a; // error ~ -!!! error TS2323: Type 'W' is not assignable to type 'typeof W'. -!!! error TS2323: Property 'a' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'typeof W'. +!!! error TS2322: Property 'a' is missing in type 'Number'. var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ -!!! error TS2323: Type 'number' is not assignable to type 'typeof W'. +!!! error TS2322: Type 'number' is not assignable to type 'typeof W'. var e: typeof W.a = 4; var f: WStatic = W.a; // error ~ -!!! error TS2323: Type 'W' is not assignable to type 'WStatic'. -!!! error TS2323: Property 'a' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'WStatic'. +!!! error TS2322: Property 'a' is missing in type 'Number'. var g: WStatic = 5; // error ~ -!!! error TS2323: Type 'number' is not assignable to type 'WStatic'. +!!! error TS2322: Type 'number' is not assignable to type 'WStatic'. var h: W = 3; var i: W = W.a; i = W.a; diff --git a/tests/baselines/reference/enumErrors.errors.txt b/tests/baselines/reference/enumErrors.errors.txt index 4f930ef2ab9..ca13ceba4ae 100644 --- a/tests/baselines/reference/enumErrors.errors.txt +++ b/tests/baselines/reference/enumErrors.errors.txt @@ -2,13 +2,13 @@ tests/cases/conformance/enums/enumErrors.ts(2,6): error TS2431: Enum name cannot tests/cases/conformance/enums/enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number' tests/cases/conformance/enums/enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string' tests/cases/conformance/enums/enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean' -tests/cases/conformance/enums/enumErrors.ts(9,9): error TS2323: Type 'Number' is not assignable to type 'E5'. -tests/cases/conformance/enums/enumErrors.ts(20,9): error TS2323: Type 'E9' is not assignable to type 'E10'. -tests/cases/conformance/enums/enumErrors.ts(21,9): error TS2323: Type 'E9' is not assignable to type 'E10'. -tests/cases/conformance/enums/enumErrors.ts(26,9): error TS2323: Type 'string' is not assignable to type 'E11'. -tests/cases/conformance/enums/enumErrors.ts(27,9): error TS2323: Type 'Date' is not assignable to type 'E11'. +tests/cases/conformance/enums/enumErrors.ts(9,9): error TS2322: Type 'Number' is not assignable to type 'E5'. +tests/cases/conformance/enums/enumErrors.ts(20,9): error TS2322: Type 'E9' is not assignable to type 'E10'. +tests/cases/conformance/enums/enumErrors.ts(21,9): error TS2322: Type 'E9' is not assignable to type 'E10'. +tests/cases/conformance/enums/enumErrors.ts(26,9): error TS2322: Type 'string' is not assignable to type 'E11'. +tests/cases/conformance/enums/enumErrors.ts(27,9): error TS2322: Type 'Date' is not assignable to type 'E11'. tests/cases/conformance/enums/enumErrors.ts(28,9): error TS2304: Cannot find name 'window'. -tests/cases/conformance/enums/enumErrors.ts(29,9): error TS2323: Type '{}' is not assignable to type 'E11'. +tests/cases/conformance/enums/enumErrors.ts(29,9): error TS2322: Type '{}' is not assignable to type 'E11'. ==== tests/cases/conformance/enums/enumErrors.ts (11 errors) ==== @@ -30,7 +30,7 @@ tests/cases/conformance/enums/enumErrors.ts(29,9): error TS2323: Type '{}' is no enum E5 { C = new Number(30) ~~~~~~~~~~~~~~ -!!! error TS2323: Type 'Number' is not assignable to type 'E5'. +!!! error TS2322: Type 'Number' is not assignable to type 'E5'. } enum E9 { @@ -43,25 +43,25 @@ tests/cases/conformance/enums/enumErrors.ts(29,9): error TS2323: Type '{}' is no enum E10 { A = E9.A, ~~~~ -!!! error TS2323: Type 'E9' is not assignable to type 'E10'. +!!! error TS2322: Type 'E9' is not assignable to type 'E10'. B = E9.B ~~~~ -!!! error TS2323: Type 'E9' is not assignable to type 'E10'. +!!! error TS2322: Type 'E9' is not assignable to type 'E10'. } // Enum with computed member intializer of other types enum E11 { A = '', ~~ -!!! error TS2323: Type 'string' is not assignable to type 'E11'. +!!! error TS2322: Type 'string' is not assignable to type 'E11'. B = new Date(), ~~~~~~~~~~ -!!! error TS2323: Type 'Date' is not assignable to type 'E11'. +!!! error TS2322: Type 'Date' is not assignable to type 'E11'. C = window, ~~~~~~ !!! error TS2304: Cannot find name 'window'. D = {} ~~ -!!! error TS2323: Type '{}' is not assignable to type 'E11'. +!!! error TS2322: Type '{}' is not assignable to type 'E11'. } \ No newline at end of file diff --git a/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt b/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt index 757b311f3cd..5b66a377307 100644 --- a/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt +++ b/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/errorOnContextuallyTypedReturnType.ts(1,5): error TS2323: Type '() => void' is not assignable to type '() => boolean'. +tests/cases/compiler/errorOnContextuallyTypedReturnType.ts(1,5): error TS2322: Type '() => void' is not assignable to type '() => boolean'. Type 'void' is not assignable to type 'boolean'. tests/cases/compiler/errorOnContextuallyTypedReturnType.ts(2,37): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. @@ -6,8 +6,8 @@ tests/cases/compiler/errorOnContextuallyTypedReturnType.ts(2,37): error TS2355: ==== tests/cases/compiler/errorOnContextuallyTypedReturnType.ts (2 errors) ==== var n1: () => boolean = function () { }; // expect an error here ~~ -!!! error TS2323: Type '() => void' is not assignable to type '() => boolean'. -!!! error TS2323: Type 'void' is not assignable to type 'boolean'. +!!! error TS2322: Type '() => void' is not assignable to type '() => boolean'. +!!! error TS2322: Type 'void' is not assignable to type 'boolean'. var n2: () => boolean = function ():boolean { }; // expect an error here ~~~~~~~ !!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. diff --git a/tests/baselines/reference/errorWithTruncatedType.errors.txt b/tests/baselines/reference/errorWithTruncatedType.errors.txt index f16dce347a5..f073f7c50a4 100644 --- a/tests/baselines/reference/errorWithTruncatedType.errors.txt +++ b/tests/baselines/reference/errorWithTruncatedType.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/errorWithTruncatedType.ts(11,5): error TS2323: Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propert...' is not assignable to type 'string'. +tests/cases/compiler/errorWithTruncatedType.ts(11,5): error TS2322: Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propert...' is not assignable to type 'string'. ==== tests/cases/compiler/errorWithTruncatedType.ts (1 errors) ==== @@ -14,5 +14,5 @@ tests/cases/compiler/errorWithTruncatedType.ts(11,5): error TS2323: Type '{ prop // String representation of type of 'x' should be truncated in error message var s: string = x; ~ -!!! error TS2323: Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propert...' is not assignable to type 'string'. +!!! error TS2322: Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propert...' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt index 023569e0762..4ebb93b10a7 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt @@ -1,35 +1,35 @@ -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(34,5): error TS2323: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(35,5): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(36,5): error TS2323: Type 'number' is not assignable to type 'Date'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(34,5): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(35,5): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(36,5): error TS2322: Type 'number' is not assignable to type 'Date'. Property 'toDateString' is missing in type 'Number'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(38,5): error TS2323: Type 'number' is not assignable to type 'void'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(40,5): error TS2323: Type 'D<{}>' is not assignable to type 'I'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(38,5): error TS2322: Type 'number' is not assignable to type 'void'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(40,5): error TS2322: Type 'D<{}>' is not assignable to type 'I'. Property 'id' is missing in type 'D<{}>'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(41,5): error TS2323: Type 'D<{}>' is not assignable to type 'C'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(41,5): error TS2322: Type 'D<{}>' is not assignable to type 'C'. Property 'id' is missing in type 'D<{}>'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(42,5): error TS2323: Type 'C' is not assignable to type 'D'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(42,5): error TS2322: Type 'C' is not assignable to type 'D'. Property 'source' is missing in type 'C'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(43,5): error TS2323: Type '{ id: string; }' is not assignable to type 'I'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(43,5): error TS2322: Type '{ id: string; }' is not assignable to type 'I'. Types of property 'id' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(44,5): error TS2323: Type 'C' is not assignable to type '{ id: string; }'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(44,5): error TS2322: Type 'C' is not assignable to type '{ id: string; }'. Types of property 'id' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(46,5): error TS2323: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(46,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(47,5): error TS2323: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(47,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(48,5): error TS2323: Type '(x: string) => string' is not assignable to type '(x: string) => number'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(48,5): error TS2322: Type '(x: string) => string' is not assignable to type '(x: string) => number'. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(50,5): error TS2323: Type 'typeof N' is not assignable to type 'typeof M'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(50,5): error TS2322: Type 'typeof N' is not assignable to type 'typeof M'. Types of property 'A' are incompatible. Type 'typeof A' is not assignable to type 'typeof A'. Type 'A' is not assignable to type 'A'. Property 'name' is missing in type 'A'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(51,5): error TS2323: Type 'A' is not assignable to type 'A'. -tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(52,5): error TS2323: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(51,5): error TS2322: Type 'A' is not assignable to type 'A'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(52,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'. Type 'boolean' is not assignable to type 'string'. @@ -69,70 +69,70 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd var aNumber: number = 'this is a string'; ~~~~~~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var aString: string = 9.9; ~~~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var aDate: Date = 9.9; ~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'Date'. -!!! error TS2323: Property 'toDateString' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'Date'. +!!! error TS2322: Property 'toDateString' is missing in type 'Number'. var aVoid: void = 9.9; ~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'void'. +!!! error TS2322: Type 'number' is not assignable to type 'void'. var anInterface: I = new D(); ~~~~~~~~~~~ -!!! error TS2323: Type 'D<{}>' is not assignable to type 'I'. -!!! error TS2323: Property 'id' is missing in type 'D<{}>'. +!!! error TS2322: Type 'D<{}>' is not assignable to type 'I'. +!!! error TS2322: Property 'id' is missing in type 'D<{}>'. var aClass: C = new D(); ~~~~~~ -!!! error TS2323: Type 'D<{}>' is not assignable to type 'C'. -!!! error TS2323: Property 'id' is missing in type 'D<{}>'. +!!! error TS2322: Type 'D<{}>' is not assignable to type 'C'. +!!! error TS2322: Property 'id' is missing in type 'D<{}>'. var aGenericClass: D = new C(); ~~~~~~~~~~~~~ -!!! error TS2323: Type 'C' is not assignable to type 'D'. -!!! error TS2323: Property 'source' is missing in type 'C'. +!!! error TS2322: Type 'C' is not assignable to type 'D'. +!!! error TS2322: Property 'source' is missing in type 'C'. var anObjectLiteral: I = { id: 'a string' }; ~~~~~~~~~~~~~~~ -!!! error TS2323: Type '{ id: string; }' is not assignable to type 'I'. -!!! error TS2323: Types of property 'id' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ id: string; }' is not assignable to type 'I'. +!!! error TS2322: Types of property 'id' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var anOtherObjectLiteral: { id: string } = new C(); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2323: Type 'C' is not assignable to type '{ id: string; }'. -!!! error TS2323: Types of property 'id' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'C' is not assignable to type '{ id: string; }'. +!!! error TS2322: Types of property 'id' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var aFunction: typeof F = F2; ~~~~~~~~~ -!!! error TS2323: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'. -!!! error TS2323: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var anOtherFunction: (x: string) => number = F2; ~~~~~~~~~~~~~~~ -!!! error TS2323: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'. -!!! error TS2323: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var aLambda: typeof F = (x) => 'a string'; ~~~~~~~ -!!! error TS2323: Type '(x: string) => string' is not assignable to type '(x: string) => number'. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: string) => number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var aModule: typeof M = N; ~~~~~~~ -!!! error TS2323: Type 'typeof N' is not assignable to type 'typeof M'. -!!! error TS2323: Types of property 'A' are incompatible. -!!! error TS2323: Type 'typeof A' is not assignable to type 'typeof A'. -!!! error TS2323: Type 'A' is not assignable to type 'A'. -!!! error TS2323: Property 'name' is missing in type 'A'. +!!! error TS2322: Type 'typeof N' is not assignable to type 'typeof M'. +!!! error TS2322: Types of property 'A' are incompatible. +!!! error TS2322: Type 'typeof A' is not assignable to type 'typeof A'. +!!! error TS2322: Type 'A' is not assignable to type 'A'. +!!! error TS2322: Property 'name' is missing in type 'A'. var aClassInModule: M.A = new N.A(); ~~~~~~~~~~~~~~ -!!! error TS2323: Type 'A' is not assignable to type 'A'. +!!! error TS2322: Type 'A' is not assignable to type 'A'. var aFunctionInModule: typeof M.F2 = F2; ~~~~~~~~~~~~~~~~~ -!!! error TS2323: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'. -!!! error TS2323: Type 'boolean' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'. +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt b/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt index 049e91b9b3d..a44c95377dc 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt @@ -2,8 +2,8 @@ tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(7,7): error TS2420: C Types of property 'bar' are incompatible. Type '() => string' is not assignable to type '() => number'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(12,5): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(16,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(12,5): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(16,5): error TS2322: Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/extendAndImplementTheSameBaseType2.ts (3 errors) ==== @@ -25,10 +25,10 @@ tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(16,5): error TS2323: var d: D = new D(); var r: string = d.foo; ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var r2: number = d.foo; var r3: string = d.bar(); var r4: number = d.bar(); ~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/extendGenericArray.errors.txt b/tests/baselines/reference/extendGenericArray.errors.txt index 9a427267f1f..a524d522190 100644 --- a/tests/baselines/reference/extendGenericArray.errors.txt +++ b/tests/baselines/reference/extendGenericArray.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/extendGenericArray.ts(6,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/extendGenericArray.ts(6,5): error TS2322: Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/extendGenericArray.ts (1 errors) ==== @@ -9,4 +9,4 @@ tests/cases/compiler/extendGenericArray.ts(6,5): error TS2323: Type 'string' is var arr: string[] = []; var x: number = arr.foo(); ~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/extendGenericArray2.errors.txt b/tests/baselines/reference/extendGenericArray2.errors.txt index f411207b225..169020fc1b2 100644 --- a/tests/baselines/reference/extendGenericArray2.errors.txt +++ b/tests/baselines/reference/extendGenericArray2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/extendGenericArray2.ts(8,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/extendGenericArray2.ts(8,5): error TS2322: Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/extendGenericArray2.ts (1 errors) ==== @@ -11,4 +11,4 @@ tests/cases/compiler/extendGenericArray2.ts(8,5): error TS2323: Type 'string' is var arr: string[] = []; var y: number = arr.x; ~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/functionAssignment.errors.txt b/tests/baselines/reference/functionAssignment.errors.txt index c588d7fdc43..19fd0897f98 100644 --- a/tests/baselines/reference/functionAssignment.errors.txt +++ b/tests/baselines/reference/functionAssignment.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/functionAssignment.ts(22,5): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/functionAssignment.ts(22,5): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/compiler/functionAssignment.ts(34,17): error TS2339: Property 'length' does not exist on type 'number'. @@ -26,7 +26,7 @@ tests/cases/compiler/functionAssignment.ts(34,17): error TS2339: Property 'lengt var n = ''; n = 4; ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. }); function f3(a: { a: number; b: number; }) { } diff --git a/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt b/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt index dc46ff3ff1f..86c4728dda2 100644 --- a/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt +++ b/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/functionSignatureAssignmentCompat1.ts(10,5): error TS2323: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc'. +tests/cases/compiler/functionSignatureAssignmentCompat1.ts(10,5): error TS2322: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc'. Types of parameters 'delimiter' and 'eventEmitter' are incompatible. Type 'string' is not assignable to type 'number'. @@ -15,7 +15,7 @@ tests/cases/compiler/functionSignatureAssignmentCompat1.ts(10,5): error TS2323: var c: ParserFunc = parsers.raw; // ok! var d: ParserFunc = parsers.readline; // not ok ~ -!!! error TS2323: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc'. -!!! error TS2323: Types of parameters 'delimiter' and 'eventEmitter' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc'. +!!! error TS2322: Types of parameters 'delimiter' and 'eventEmitter' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var e: ParserFunc = parsers.readline(); // ok \ No newline at end of file diff --git a/tests/baselines/reference/fuzzy.errors.txt b/tests/baselines/reference/fuzzy.errors.txt index 22e1f48ae0f..699841f8870 100644 --- a/tests/baselines/reference/fuzzy.errors.txt +++ b/tests/baselines/reference/fuzzy.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/fuzzy.ts(13,18): error TS2420: Class 'C' incorrectly implements interface 'I'. Property 'alsoWorks' is missing in type 'C'. -tests/cases/compiler/fuzzy.ts(21,20): error TS2323: Type '{ anything: number; oneI: C; }' is not assignable to type 'R'. +tests/cases/compiler/fuzzy.ts(21,20): error TS2322: Type '{ anything: number; oneI: C; }' is not assignable to type 'R'. Types of property 'oneI' are incompatible. Type 'C' is not assignable to type 'I'. tests/cases/compiler/fuzzy.ts(25,20): error TS2352: Neither type '{ oneI: C; }' nor type 'R' is assignable to the other. @@ -33,9 +33,9 @@ tests/cases/compiler/fuzzy.ts(25,20): error TS2352: Neither type '{ oneI: C; }' doesntWork():R { return { anything:1, oneI:this }; ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2323: Type '{ anything: number; oneI: C; }' is not assignable to type 'R'. -!!! error TS2323: Types of property 'oneI' are incompatible. -!!! error TS2323: Type 'C' is not assignable to type 'I'. +!!! error TS2322: Type '{ anything: number; oneI: C; }' is not assignable to type 'R'. +!!! error TS2322: Types of property 'oneI' are incompatible. +!!! error TS2322: Type 'C' is not assignable to type 'I'. } worksToo():R { diff --git a/tests/baselines/reference/genericArrayAssignment1.errors.txt b/tests/baselines/reference/genericArrayAssignment1.errors.txt index e555bbcf3f7..a0a6b020542 100644 --- a/tests/baselines/reference/genericArrayAssignment1.errors.txt +++ b/tests/baselines/reference/genericArrayAssignment1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/genericArrayAssignment1.ts(4,1): error TS2323: Type 'number[]' is not assignable to type 'string[]'. +tests/cases/compiler/genericArrayAssignment1.ts(4,1): error TS2322: Type 'number[]' is not assignable to type 'string[]'. Type 'number' is not assignable to type 'string'. @@ -8,5 +8,5 @@ tests/cases/compiler/genericArrayAssignment1.ts(4,1): error TS2323: Type 'number s = n; ~ -!!! error TS2323: Type 'number[]' is not assignable to type 'string[]'. -!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'number[]' is not assignable to type 'string[]'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericArrayMethods1.errors.txt b/tests/baselines/reference/genericArrayMethods1.errors.txt index 7341cde82d3..b5e766c54c4 100644 --- a/tests/baselines/reference/genericArrayMethods1.errors.txt +++ b/tests/baselines/reference/genericArrayMethods1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/genericArrayMethods1.ts(1,5): error TS2323: Type 'number[]' is not assignable to type 'string[]'. +tests/cases/compiler/genericArrayMethods1.ts(1,5): error TS2322: Type 'number[]' is not assignable to type 'string[]'. Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/genericArrayMethods1.ts (1 errors) ==== var x:string[] = [0,1].slice(0); // this should be an error ~ -!!! error TS2323: Type 'number[]' is not assignable to type 'string[]'. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number[]' is not assignable to type 'string[]'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt index 965523476a7..f335319cafd 100644 --- a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt +++ b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt @@ -1,17 +1,17 @@ -tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(12,5): error TS2323: Type '{ x: A; }' is not assignable to type 'I'. +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(12,5): error TS2322: Type '{ x: A; }' is not assignable to type 'I'. Types of property 'x' are incompatible. Type 'A' is not assignable to type 'Comparable'. Types of property 'compareTo' are incompatible. Type '(other: number) => number' is not assignable to type '(other: string) => number'. Types of parameters 'other' and 'other' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(13,5): error TS2323: Type '{ x: A; }' is not assignable to type 'I'. +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(13,5): error TS2322: Type '{ x: A; }' is not assignable to type 'I'. Types of property 'x' are incompatible. Type 'A' is not assignable to type 'Comparable'. -tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(16,5): error TS2323: Type '{ x: A; }' is not assignable to type 'I'. +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(16,5): error TS2322: Type '{ x: A; }' is not assignable to type 'I'. Types of property 'x' are incompatible. Type 'A' is not assignable to type 'Comparable'. -tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(17,5): error TS2323: Type 'K' is not assignable to type 'I'. +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(17,5): error TS2322: Type 'K' is not assignable to type 'I'. Types of property 'x' are incompatible. Type 'A' is not assignable to type 'Comparable'. @@ -30,29 +30,29 @@ tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(17,5): error TS23 var z = { x: new A() }; var a1: I = { x: new A() }; ~~ -!!! error TS2323: Type '{ x: A; }' is not assignable to type 'I'. -!!! error TS2323: Types of property 'x' are incompatible. -!!! error TS2323: Type 'A' is not assignable to type 'Comparable'. -!!! error TS2323: Types of property 'compareTo' are incompatible. -!!! error TS2323: Type '(other: number) => number' is not assignable to type '(other: string) => number'. -!!! error TS2323: Types of parameters 'other' and 'other' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ x: A; }' is not assignable to type 'I'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'A' is not assignable to type 'Comparable'. +!!! error TS2322: Types of property 'compareTo' are incompatible. +!!! error TS2322: Type '(other: number) => number' is not assignable to type '(other: string) => number'. +!!! error TS2322: Types of parameters 'other' and 'other' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var a2: I = function (): { x: A } { ~~ -!!! error TS2323: Type '{ x: A; }' is not assignable to type 'I'. -!!! error TS2323: Types of property 'x' are incompatible. -!!! error TS2323: Type 'A' is not assignable to type 'Comparable'. +!!! error TS2322: Type '{ x: A; }' is not assignable to type 'I'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'A' is not assignable to type 'Comparable'. var z = { x: new A() }; return z; } (); var a3: I = z; ~~ -!!! error TS2323: Type '{ x: A; }' is not assignable to type 'I'. -!!! error TS2323: Types of property 'x' are incompatible. -!!! error TS2323: Type 'A' is not assignable to type 'Comparable'. +!!! error TS2322: Type '{ x: A; }' is not assignable to type 'I'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'A' is not assignable to type 'Comparable'. var a4: I = >z; ~~ -!!! error TS2323: Type 'K' is not assignable to type 'I'. -!!! error TS2323: Types of property 'x' are incompatible. -!!! error TS2323: Type 'A' is not assignable to type 'Comparable'. +!!! error TS2322: Type 'K' is not assignable to type 'I'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'A' is not assignable to type 'Comparable'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt index ec1f654863f..2a7bfd696cc 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts(15,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts(18,9): error TS2413: Numeric index type 'T' is not assignable to string index type 'Object'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts(23,9): error TS2323: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts(23,9): error TS2322: Type 'T' is not assignable to type 'U'. ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts (3 errors) ==== @@ -32,5 +32,5 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var e = r2['1']; var u: U = r2[1]; // ok ~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt index 45a64e62e5e..e9fae450377 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(5,33): error TS2323: Type 'number' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(5,33): error TS2322: Type 'number' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(6,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(6,37): error TS2323: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(6,37): error TS2322: Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(7,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(7,37): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(7,37): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,31): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,56): error TS2323: Type 'U' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,56): error TS2322: Type 'U' is not assignable to type 'V'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(9,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(9,31): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(9,50): error TS2323: Type 'V' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(9,50): error TS2322: Type 'V' is not assignable to type 'U'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts (11 errors) ==== @@ -18,28 +18,28 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericC function foo2(x: T = undefined) { return x; } // ok function foo3(x: T = 1) { } // error ~~~~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'T'. +!!! error TS2322: Type 'number' is not assignable to type 'T'. function foo4(x: T, y: U = x) { } // error ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. function foo5(x: U, y: T = x) { } // ok ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. function foo6(x: T, y: U, z: V = y) { } // error ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! error TS2323: Type 'U' is not assignable to type 'V'. +!!! error TS2322: Type 'U' is not assignable to type 'V'. function foo7(x: V, y: U = x) { } // should be ok ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! error TS2323: Type 'V' is not assignable to type 'U'. \ No newline at end of file +!!! error TS2322: Type 'V' is not assignable to type 'U'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithTupleType.errors.txt b/tests/baselines/reference/genericCallWithTupleType.errors.txt index 930d3128452..bcf580320e5 100644 --- a/tests/baselines/reference/genericCallWithTupleType.errors.txt +++ b/tests/baselines/reference/genericCallWithTupleType.errors.txt @@ -1,18 +1,18 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(12,1): error TS2323: Type '[string, number, boolean, boolean]' is not assignable to type '[string, number]'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(12,1): error TS2322: Type '[string, number, boolean, boolean]' is not assignable to type '[string, number]'. Types of property 'pop' are incompatible. Type '() => string | number | boolean' is not assignable to type '() => string | number'. Type 'string | number | boolean' is not assignable to type 'string | number'. Type 'boolean' is not assignable to type 'string | number'. Type 'boolean' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(14,1): error TS2323: Type '{ a: string; }' is not assignable to type 'string | number'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(14,1): error TS2322: Type '{ a: string; }' is not assignable to type 'string | number'. Type '{ a: string; }' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(22,1): error TS2323: Type '[number, string]' is not assignable to type '[string, number]'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(22,1): error TS2322: Type '[number, string]' is not assignable to type '[string, number]'. Types of property '0' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(23,1): error TS2323: Type '[{}, {}]' is not assignable to type '[string, number]'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(23,1): error TS2322: Type '[{}, {}]' is not assignable to type '[string, number]'. Types of property '0' are incompatible. Type '{}' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(24,1): error TS2323: Type '[{}]' is not assignable to type '[{}, {}]'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(24,1): error TS2322: Type '[{}]' is not assignable to type '[{}, {}]'. Property '1' is missing in type '[{}]'. @@ -30,17 +30,17 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTup var e2 = i1.tuple1[1]; // number i1.tuple1 = ["foo", 5, false, true]; ~~~~~~~~~ -!!! error TS2323: Type '[string, number, boolean, boolean]' is not assignable to type '[string, number]'. -!!! error TS2323: Types of property 'pop' are incompatible. -!!! error TS2323: Type '() => string | number | boolean' is not assignable to type '() => string | number'. -!!! error TS2323: Type 'string | number | boolean' is not assignable to type 'string | number'. -!!! error TS2323: Type 'boolean' is not assignable to type 'string | number'. -!!! error TS2323: Type 'boolean' is not assignable to type 'number'. +!!! error TS2322: Type '[string, number, boolean, boolean]' is not assignable to type '[string, number]'. +!!! error TS2322: Types of property 'pop' are incompatible. +!!! error TS2322: Type '() => string | number | boolean' is not assignable to type '() => string | number'. +!!! error TS2322: Type 'string | number | boolean' is not assignable to type 'string | number'. +!!! error TS2322: Type 'boolean' is not assignable to type 'string | number'. +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. var e3 = i1.tuple1[2]; // {} i1.tuple1[3] = { a: "string" }; ~~~~~~~~~~~~ -!!! error TS2323: Type '{ a: string; }' is not assignable to type 'string | number'. -!!! error TS2323: Type '{ a: string; }' is not assignable to type 'number'. +!!! error TS2322: Type '{ a: string; }' is not assignable to type 'string | number'. +!!! error TS2322: Type '{ a: string; }' is not assignable to type 'number'. var e4 = i1.tuple1[3]; // {} i2.tuple1 = ["foo", 5]; i2.tuple1 = ["foo", "bar"]; @@ -50,16 +50,16 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTup // error i1.tuple1 = [5, "foo"]; ~~~~~~~~~ -!!! error TS2323: Type '[number, string]' is not assignable to type '[string, number]'. -!!! error TS2323: Types of property '0' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '[number, string]' is not assignable to type '[string, number]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. i1.tuple1 = [{}, {}]; ~~~~~~~~~ -!!! error TS2323: Type '[{}, {}]' is not assignable to type '[string, number]'. -!!! error TS2323: Types of property '0' are incompatible. -!!! error TS2323: Type '{}' is not assignable to type 'string'. +!!! error TS2322: Type '[{}, {}]' is not assignable to type '[string, number]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type '{}' is not assignable to type 'string'. i2.tuple1 = [{}]; ~~~~~~~~~ -!!! error TS2323: Type '[{}]' is not assignable to type '[{}, {}]'. -!!! error TS2323: Property '1' is missing in type '[{}]'. +!!! error TS2322: Type '[{}]' is not assignable to type '[{}, {}]'. +!!! error TS2322: Property '1' is missing in type '[{}]'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCloneReturnTypes.errors.txt b/tests/baselines/reference/genericCloneReturnTypes.errors.txt index 626f53bddea..0e54ebc02cf 100644 --- a/tests/baselines/reference/genericCloneReturnTypes.errors.txt +++ b/tests/baselines/reference/genericCloneReturnTypes.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/genericCloneReturnTypes.ts(25,1): error TS2323: Type 'Bar' is not assignable to type 'Bar'. +tests/cases/compiler/genericCloneReturnTypes.ts(25,1): error TS2322: Type 'Bar' is not assignable to type 'Bar'. Type 'string' is not assignable to type 'number'. @@ -29,5 +29,5 @@ tests/cases/compiler/genericCloneReturnTypes.ts(25,1): error TS2323: Type 'Bar' is not assignable to type 'Bar'. -!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'Bar' is not assignable to type 'Bar'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCloneReturnTypes2.errors.txt b/tests/baselines/reference/genericCloneReturnTypes2.errors.txt index c531ea31ccc..1ac5a862075 100644 --- a/tests/baselines/reference/genericCloneReturnTypes2.errors.txt +++ b/tests/baselines/reference/genericCloneReturnTypes2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/genericCloneReturnTypes2.ts(15,5): error TS2323: Type 'MyList' is not assignable to type 'MyList'. +tests/cases/compiler/genericCloneReturnTypes2.ts(15,5): error TS2322: Type 'MyList' is not assignable to type 'MyList'. Type 'string' is not assignable to type 'number'. @@ -19,5 +19,5 @@ tests/cases/compiler/genericCloneReturnTypes2.ts(15,5): error TS2323: Type 'MyLi var c: MyList = a.clone(); // bug was there was an error on this line var d: MyList = a.clone(); // error ~ -!!! error TS2323: Type 'MyList' is not assignable to type 'MyList'. -!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'MyList' is not assignable to type 'MyList'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt index 51aac95daad..4ae63b6fc8e 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts(11,1): error TS2323: Type 'B' is not assignable to type 'A'. +tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts(11,1): error TS2322: Type 'B' is not assignable to type 'A'. Types of property 'x' are incompatible. Type 'string' is not assignable to type 'number'. @@ -16,7 +16,7 @@ tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts(11,1): error TS232 var y: B; x = y; // error ~ -!!! error TS2323: Type 'B' is not assignable to type 'A'. -!!! error TS2323: Types of property 'x' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'B' is not assignable to type 'A'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt index 798557ef72d..38818b59863 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts(11,1): error TS2323: Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>'. +tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts(11,1): error TS2322: Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>'. Types of property 'x' are incompatible. Type 'string' is not assignable to type '{ length: number; foo: number; }'. Property 'foo' is missing in type 'String'. @@ -17,8 +17,8 @@ tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts(11,1): error TS23 var y: B; x = y; // error ~ -!!! error TS2323: Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>'. -!!! error TS2323: Types of property 'x' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type '{ length: number; foo: number; }'. -!!! error TS2323: Property 'foo' is missing in type 'String'. +!!! error TS2322: Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type '{ length: number; foo: number; }'. +!!! error TS2322: Property 'foo' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/genericGetter.errors.txt b/tests/baselines/reference/genericGetter.errors.txt index 0b39758ad6c..3a8edb602e0 100644 --- a/tests/baselines/reference/genericGetter.errors.txt +++ b/tests/baselines/reference/genericGetter.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/genericGetter.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/genericGetter.ts(9,5): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/genericGetter.ts(9,5): error TS2322: Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/genericGetter.ts (2 errors) ==== @@ -15,4 +15,4 @@ tests/cases/compiler/genericGetter.ts(9,5): error TS2323: Type 'number' is not a var c = new C(); var r: string = c.x; ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericGetter3.errors.txt b/tests/baselines/reference/genericGetter3.errors.txt index a96a3cf8f5d..24b44af28ee 100644 --- a/tests/baselines/reference/genericGetter3.errors.txt +++ b/tests/baselines/reference/genericGetter3.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/genericGetter3.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/genericGetter3.ts(11,5): error TS2323: Type 'A' is not assignable to type 'string'. +tests/cases/compiler/genericGetter3.ts(11,5): error TS2322: Type 'A' is not assignable to type 'string'. ==== tests/cases/compiler/genericGetter3.ts (2 errors) ==== @@ -17,4 +17,4 @@ tests/cases/compiler/genericGetter3.ts(11,5): error TS2323: Type 'A' is var c = new C(); var r: string = c.x; ~ -!!! error TS2323: Type 'A' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'A' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericSpecializations3.errors.txt b/tests/baselines/reference/genericSpecializations3.errors.txt index e8e8804c0cc..ccaa839f9d0 100644 --- a/tests/baselines/reference/genericSpecializations3.errors.txt +++ b/tests/baselines/reference/genericSpecializations3.errors.txt @@ -3,12 +3,12 @@ tests/cases/compiler/genericSpecializations3.ts(8,7): error TS2420: Class 'IntFo Type '(x: string) => string' is not assignable to type '(x: number) => number'. Types of parameters 'x' and 'x' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/genericSpecializations3.ts(28,1): error TS2323: Type 'StringFoo2' is not assignable to type 'IntFoo'. +tests/cases/compiler/genericSpecializations3.ts(28,1): error TS2322: Type 'StringFoo2' is not assignable to type 'IntFoo'. Types of property 'foo' are incompatible. Type '(x: string) => string' is not assignable to type '(x: number) => number'. Types of parameters 'x' and 'x' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2323: Type 'IntFoo' is not assignable to type 'StringFoo2'. +tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2322: Type 'IntFoo' is not assignable to type 'StringFoo2'. Types of property 'foo' are incompatible. Type '(x: number) => number' is not assignable to type '(x: string) => string'. Types of parameters 'x' and 'x' are incompatible. @@ -51,18 +51,18 @@ tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2323: Type 'IntFo intFoo = stringFoo2; // error ~~~~~~ -!!! error TS2323: Type 'StringFoo2' is not assignable to type 'IntFoo'. -!!! error TS2323: Types of property 'foo' are incompatible. -!!! error TS2323: Type '(x: string) => string' is not assignable to type '(x: 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 'StringFoo2' is not assignable to type 'IntFoo'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => number'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. stringFoo2 = intFoo; // error ~~~~~~~~~~ -!!! error TS2323: Type 'IntFoo' is not assignable to type 'StringFoo2'. -!!! error TS2323: Types of property 'foo' are incompatible. -!!! error TS2323: Type '(x: number) => number' is not assignable to type '(x: string) => string'. -!!! error TS2323: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'IntFoo' is not assignable to type 'StringFoo2'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type '(x: number) => number' is not assignable to type '(x: string) => string'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. class StringFoo3 implements IFoo { // error diff --git a/tests/baselines/reference/genericTypeAssertions1.errors.txt b/tests/baselines/reference/genericTypeAssertions1.errors.txt index 4178b6730cd..5479c5f948e 100644 --- a/tests/baselines/reference/genericTypeAssertions1.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions1.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/genericTypeAssertions1.ts(3,5): error TS2323: Type 'A' is not assignable to type 'A'. +tests/cases/compiler/genericTypeAssertions1.ts(3,5): error TS2322: Type 'A' is not assignable to type 'A'. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/genericTypeAssertions1.ts(4,5): error TS2323: Type 'A>' is not assignable to type 'A'. +tests/cases/compiler/genericTypeAssertions1.ts(4,5): error TS2322: Type 'A>' is not assignable to type 'A'. Type 'A' is not assignable to type 'number'. tests/cases/compiler/genericTypeAssertions1.ts(4,21): error TS2352: Neither type 'A' nor type 'A>' is assignable to the other. Type 'number' is not assignable to type 'A'. @@ -11,12 +11,12 @@ tests/cases/compiler/genericTypeAssertions1.ts(4,21): error TS2352: Neither type var foo = new A(); var r: A = >new A(); // error ~ -!!! error TS2323: Type 'A' is not assignable to type 'A'. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'A' is not assignable to type 'A'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var r2: A = >>foo; // error ~~ -!!! error TS2323: Type 'A>' is not assignable to type 'A'. -!!! error TS2323: Type 'A' is not assignable to type 'number'. +!!! error TS2322: Type 'A>' is not assignable to type 'A'. +!!! error TS2322: Type 'A' is not assignable to type 'number'. ~~~~~~~~~~~~~~~~~ !!! error TS2352: Neither type 'A' nor type 'A>' is assignable to the other. !!! error TS2352: Type 'number' is not assignable to type 'A'. \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions2.errors.txt b/tests/baselines/reference/genericTypeAssertions2.errors.txt index e2f4fab7b7b..eda4c83646c 100644 --- a/tests/baselines/reference/genericTypeAssertions2.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions2.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/genericTypeAssertions2.ts(10,5): error TS2323: Type 'B' is not assignable to type 'A'. +tests/cases/compiler/genericTypeAssertions2.ts(10,5): error TS2322: Type 'B' is not assignable to type 'A'. Types of property 'foo' 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/compiler/genericTypeAssertions2.ts(11,5): error TS2323: Type 'A' is not assignable to type 'B'. +tests/cases/compiler/genericTypeAssertions2.ts(11,5): error TS2322: Type 'A' is not assignable to type 'B'. Property 'bar' is missing in type 'A'. tests/cases/compiler/genericTypeAssertions2.ts(13,21): error TS2352: Neither type 'undefined[]' nor type 'A' is assignable to the other. Property 'foo' is missing in type 'undefined[]'. @@ -21,15 +21,15 @@ tests/cases/compiler/genericTypeAssertions2.ts(13,21): error TS2352: Neither typ var r: A = >new B(); var r2: A = >new B(); // error ~~ -!!! error TS2323: Type 'B' is not assignable to type 'A'. -!!! error TS2323: Types of property 'foo' 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 'B' is not assignable to type 'A'. +!!! error TS2322: Types of property 'foo' 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'. var r3: B = >new B(); // error ~~ -!!! error TS2323: Type 'A' is not assignable to type 'B'. -!!! error TS2323: Property 'bar' is missing in type 'A'. +!!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Property 'bar' is missing in type 'A'. var r4: A = >new A(); var r5: A = >[]; // error ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/genericTypeAssertions4.errors.txt b/tests/baselines/reference/genericTypeAssertions4.errors.txt index 2a29eac6220..055de774b39 100644 --- a/tests/baselines/reference/genericTypeAssertions4.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions4.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/genericTypeAssertions4.ts(19,5): error TS2323: Type 'A' is not assignable to type 'T'. -tests/cases/compiler/genericTypeAssertions4.ts(20,5): error TS2323: Type 'B' is not assignable to type 'T'. -tests/cases/compiler/genericTypeAssertions4.ts(21,5): error TS2323: Type 'C' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions4.ts(19,5): error TS2322: Type 'A' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions4.ts(20,5): error TS2322: Type 'B' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions4.ts(21,5): error TS2322: Type 'C' is not assignable to type 'T'. tests/cases/compiler/genericTypeAssertions4.ts(23,9): error TS2352: Neither type 'B' nor type 'T' is assignable to the other. tests/cases/compiler/genericTypeAssertions4.ts(24,9): error TS2352: Neither type 'C' nor type 'T' is assignable to the other. @@ -26,13 +26,13 @@ tests/cases/compiler/genericTypeAssertions4.ts(24,9): error TS2352: Neither type var y = x; y = a; // error: cannot convert A to T ~ -!!! error TS2323: Type 'A' is not assignable to type 'T'. +!!! error TS2322: Type 'A' is not assignable to type 'T'. y = b; // error: cannot convert B to T ~ -!!! error TS2323: Type 'B' is not assignable to type 'T'. +!!! error TS2322: Type 'B' is not assignable to type 'T'. y = c; // error: cannot convert C to T ~ -!!! error TS2323: Type 'C' is not assignable to type 'T'. +!!! error TS2322: Type 'C' is not assignable to type 'T'. y = a; y = b; // error: cannot convert B to T ~~~~ diff --git a/tests/baselines/reference/genericTypeAssertions5.errors.txt b/tests/baselines/reference/genericTypeAssertions5.errors.txt index 3c53a791b9b..e315a7f122a 100644 --- a/tests/baselines/reference/genericTypeAssertions5.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions5.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/genericTypeAssertions5.ts(19,5): error TS2323: Type 'A' is not assignable to type 'T'. -tests/cases/compiler/genericTypeAssertions5.ts(20,5): error TS2323: Type 'B' is not assignable to type 'T'. -tests/cases/compiler/genericTypeAssertions5.ts(21,5): error TS2323: Type 'C' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions5.ts(19,5): error TS2322: Type 'A' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions5.ts(20,5): error TS2322: Type 'B' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions5.ts(21,5): error TS2322: Type 'C' is not assignable to type 'T'. tests/cases/compiler/genericTypeAssertions5.ts(23,9): error TS2352: Neither type 'B' nor type 'T' is assignable to the other. tests/cases/compiler/genericTypeAssertions5.ts(24,9): error TS2352: Neither type 'C' nor type 'T' is assignable to the other. @@ -26,13 +26,13 @@ tests/cases/compiler/genericTypeAssertions5.ts(24,9): error TS2352: Neither type var y = x; y = a; // error: cannot convert A to T ~ -!!! error TS2323: Type 'A' is not assignable to type 'T'. +!!! error TS2322: Type 'A' is not assignable to type 'T'. y = b; // error: cannot convert B to T ~ -!!! error TS2323: Type 'B' is not assignable to type 'T'. +!!! error TS2322: Type 'B' is not assignable to type 'T'. y = c; // error: cannot convert C to T ~ -!!! error TS2323: Type 'C' is not assignable to type 'T'. +!!! error TS2322: Type 'C' is not assignable to type 'T'. y = a; y = b; // error: cannot convert B to T ~~~~ diff --git a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt index 13ab681e4e5..ae93d059f9a 100644 --- a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt +++ b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt @@ -5,7 +5,7 @@ tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(4,7): error TS2420 Type 'T' is not assignable to type '{ a: number; }'. Types of property 'a' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(8,5): error TS2323: Type 'X<{ a: string; }>' is not assignable to type 'I'. +tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(8,5): error TS2322: Type 'X<{ a: string; }>' is not assignable to type 'I'. Types of property 'f' are incompatible. Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void'. Types of parameters 'a' and 'a' are incompatible. @@ -32,11 +32,11 @@ tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(8,5): error TS2323 var x = new X<{ a: string }>(); var i: I = x; // Should not be allowed -- type of 'f' is incompatible with 'I' ~ -!!! error TS2323: Type 'X<{ a: string; }>' is not assignable to type 'I'. -!!! error TS2323: Types of property 'f' are incompatible. -!!! error TS2323: Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void'. -!!! error TS2323: Types of parameters 'a' and 'a' are incompatible. -!!! error TS2323: Type '{ a: string; }' is not assignable to type '{ a: number; }'. -!!! error TS2323: Types of property 'a' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'X<{ a: string; }>' is not assignable to type 'I'. +!!! error TS2322: Types of property 'f' are incompatible. +!!! error TS2322: Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void'. +!!! error TS2322: Types of parameters 'a' and 'a' are incompatible. +!!! error TS2322: Type '{ a: string; }' is not assignable to type '{ a: number; }'. +!!! error TS2322: Types of property 'a' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/generics4.errors.txt b/tests/baselines/reference/generics4.errors.txt index 5824ce7958a..06bfa122901 100644 --- a/tests/baselines/reference/generics4.errors.txt +++ b/tests/baselines/reference/generics4.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/generics4.ts(7,1): error TS2323: Type 'C' is not assignable to type 'C'. +tests/cases/compiler/generics4.ts(7,1): error TS2322: Type 'C' is not assignable to type 'C'. Type 'Y' is not assignable to type 'X'. Types of property 'f' are incompatible. Type '() => boolean' is not assignable to type '() => string'. @@ -14,8 +14,8 @@ tests/cases/compiler/generics4.ts(7,1): error TS2323: Type 'C' is not assigna a = b; // Not ok - return types of "f" are different ~ -!!! error TS2323: Type 'C' is not assignable to type 'C'. -!!! error TS2323: Type 'Y' is not assignable to type 'X'. -!!! error TS2323: Types of property 'f' are incompatible. -!!! error TS2323: Type '() => boolean' is not assignable to type '() => string'. -!!! error TS2323: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C'. +!!! error TS2322: Type 'Y' is not assignable to type 'X'. +!!! error TS2322: Types of property 'f' are incompatible. +!!! error TS2322: Type '() => boolean' is not assignable to type '() => string'. +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt index 1c9d42c9abc..69d367bb21c 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt @@ -2,7 +2,7 @@ tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,9): error TS1056: Accessors tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,5): error TS2380: 'get' and 'set' accessor must have the same type. tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,5): error TS2380: 'get' and 'set' accessor must have the same type. -tests/cases/compiler/getAndSetNotIdenticalType2.ts(9,9): error TS2323: Type 'A' is not assignable to type 'A'. +tests/cases/compiler/getAndSetNotIdenticalType2.ts(9,9): error TS2322: Type 'A' is not assignable to type 'A'. Type 'string' is not assignable to type 'T'. @@ -27,8 +27,8 @@ tests/cases/compiler/getAndSetNotIdenticalType2.ts(9,9): error TS2323: Type 'A' is not assignable to type 'A'. -!!! error TS2323: Type 'string' is not assignable to type 'T'. +!!! error TS2322: Type 'A' is not assignable to type 'A'. +!!! error TS2322: Type 'string' is not assignable to type 'T'. } ~~~~~ !!! error TS2380: 'get' and 'set' accessor must have the same type. diff --git a/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt index 7590f50815d..bca86419f62 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt @@ -2,7 +2,7 @@ tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,9): error TS1056: Accessors tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,5): error TS2380: 'get' and 'set' accessor must have the same type. tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,5): error TS2380: 'get' and 'set' accessor must have the same type. -tests/cases/compiler/getAndSetNotIdenticalType3.ts(9,9): error TS2323: Type 'A' is not assignable to type 'A'. +tests/cases/compiler/getAndSetNotIdenticalType3.ts(9,9): error TS2322: Type 'A' is not assignable to type 'A'. Type 'string' is not assignable to type 'number'. @@ -27,8 +27,8 @@ tests/cases/compiler/getAndSetNotIdenticalType3.ts(9,9): error TS2323: Type 'A' is not assignable to type 'A'. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'A' is not assignable to type 'A'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. } ~~~~~ !!! error TS2380: 'get' and 'set' accessor must have the same type. diff --git a/tests/baselines/reference/i3.errors.txt b/tests/baselines/reference/i3.errors.txt index 39a62340d53..ef7aefa4598 100644 --- a/tests/baselines/reference/i3.errors.txt +++ b/tests/baselines/reference/i3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/i3.ts(6,1): error TS2323: Type 'I3' is not assignable to type '{ one: number; }'. +tests/cases/compiler/i3.ts(6,1): error TS2322: Type 'I3' is not assignable to type '{ one: number; }'. Property 'one' is optional in type 'I3' but required in type '{ one: number; }'. @@ -10,5 +10,5 @@ tests/cases/compiler/i3.ts(6,1): error TS2323: Type 'I3' is not assignable to ty i = x; x = i; ~ -!!! error TS2323: Type 'I3' is not assignable to type '{ one: number; }'. -!!! error TS2323: Property 'one' is optional in type 'I3' but required in type '{ one: number; }'. \ No newline at end of file +!!! error TS2322: Type 'I3' is not assignable to type '{ one: number; }'. +!!! error TS2322: Property 'one' is optional in type 'I3' but required in type '{ one: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleGenericTypes.errors.txt b/tests/baselines/reference/incompatibleGenericTypes.errors.txt index 04c00f4fa20..e5dc6ed5b3c 100644 --- a/tests/baselines/reference/incompatibleGenericTypes.errors.txt +++ b/tests/baselines/reference/incompatibleGenericTypes.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/incompatibleGenericTypes.ts(10,5): error TS2323: Type 'I1' is not assignable to type 'I1'. +tests/cases/compiler/incompatibleGenericTypes.ts(10,5): error TS2322: Type 'I1' is not assignable to type 'I1'. Type 'boolean' is not assignable to type 'number'. @@ -14,5 +14,5 @@ tests/cases/compiler/incompatibleGenericTypes.ts(10,5): error TS2323: Type 'I1 = v1; ~~ -!!! error TS2323: Type 'I1' is not assignable to type 'I1'. -!!! error TS2323: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'I1' is not assignable to type 'I1'. +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleTypes.errors.txt b/tests/baselines/reference/incompatibleTypes.errors.txt index 9b66a6e8c64..14dfa883f45 100644 --- a/tests/baselines/reference/incompatibleTypes.errors.txt +++ b/tests/baselines/reference/incompatibleTypes.errors.txt @@ -17,10 +17,10 @@ tests/cases/compiler/incompatibleTypes.ts(33,7): error TS2420: Class 'C4' incorr tests/cases/compiler/incompatibleTypes.ts(42,5): error TS2345: Argument of type 'C1' is not assignable to parameter of type 'IFoo2'. tests/cases/compiler/incompatibleTypes.ts(49,5): error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. Property 'c' is missing in type '{ e: number; f: number; }'. -tests/cases/compiler/incompatibleTypes.ts(66,5): error TS2323: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'. +tests/cases/compiler/incompatibleTypes.ts(66,5): error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'. Property 'a' is missing in type '{ e: number; f: number; }'. -tests/cases/compiler/incompatibleTypes.ts(72,5): error TS2323: Type 'number' is not assignable to type '() => string'. -tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2323: Type '(a: any) => number' is not assignable to type '() => any'. +tests/cases/compiler/incompatibleTypes.ts(72,5): error TS2322: Type 'number' is not assignable to type '() => string'. +tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => number' is not assignable to type '() => any'. ==== tests/cases/compiler/incompatibleTypes.ts (9 errors) ==== @@ -116,8 +116,8 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2323: Type '(a: any) => var o1: { a: { a: string; }; b: string; } = { e: 0, f: 0 }; ~~ -!!! error TS2323: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'. -!!! error TS2323: Property 'a' is missing in type '{ e: number; f: number; }'. +!!! error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'. +!!! error TS2322: Property 'a' is missing in type '{ e: number; f: number; }'. var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }]; @@ -125,9 +125,9 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2323: Type '(a: any) => var i1c1: { (): string; } = 5; ~~~~ -!!! error TS2323: Type 'number' is not assignable to type '() => string'. +!!! error TS2322: Type 'number' is not assignable to type '() => string'. var fp1: () =>any = a => 0; ~~~ -!!! error TS2323: Type '(a: any) => number' is not assignable to type '() => any'. +!!! error TS2322: Type '(a: any) => number' is not assignable to type '() => any'. \ No newline at end of file diff --git a/tests/baselines/reference/indexIntoArraySubclass.errors.txt b/tests/baselines/reference/indexIntoArraySubclass.errors.txt index 297ef6a960b..1628e12d22f 100644 --- a/tests/baselines/reference/indexIntoArraySubclass.errors.txt +++ b/tests/baselines/reference/indexIntoArraySubclass.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/indexIntoArraySubclass.ts(4,1): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/indexIntoArraySubclass.ts(4,1): error TS2322: Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/indexIntoArraySubclass.ts (1 errors) ==== @@ -7,4 +7,4 @@ tests/cases/compiler/indexIntoArraySubclass.ts(4,1): error TS2323: Type 'number' var r = x2[0]; // string r = 0; //error ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/indexerAssignability.errors.txt b/tests/baselines/reference/indexerAssignability.errors.txt index 8f7f1c11d6c..9f28fc1e9e0 100644 --- a/tests/baselines/reference/indexerAssignability.errors.txt +++ b/tests/baselines/reference/indexerAssignability.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/indexerAssignability.ts(5,1): error TS2323: Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }'. +tests/cases/compiler/indexerAssignability.ts(5,1): error TS2322: Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }'. Index signature is missing in type '{ [x: number]: string; }'. -tests/cases/compiler/indexerAssignability.ts(6,1): error TS2323: Type '{}' is not assignable to type '{ [x: string]: string; }'. +tests/cases/compiler/indexerAssignability.ts(6,1): error TS2322: Type '{}' is not assignable to type '{ [x: string]: string; }'. Index signature is missing in type '{}'. -tests/cases/compiler/indexerAssignability.ts(8,1): error TS2323: Type '{}' is not assignable to type '{ [x: number]: string; }'. +tests/cases/compiler/indexerAssignability.ts(8,1): error TS2322: Type '{}' is not assignable to type '{ [x: number]: string; }'. Index signature is missing in type '{}'. @@ -13,16 +13,16 @@ tests/cases/compiler/indexerAssignability.ts(8,1): error TS2323: Type '{}' is no a = b; ~ -!!! error TS2323: Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }'. -!!! error TS2323: Index signature is missing in type '{ [x: number]: string; }'. +!!! error TS2322: Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }'. +!!! error TS2322: Index signature is missing in type '{ [x: number]: string; }'. a = c; ~ -!!! error TS2323: Type '{}' is not assignable to type '{ [x: string]: string; }'. -!!! error TS2323: Index signature is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type '{ [x: string]: string; }'. +!!! error TS2322: Index signature is missing in type '{}'. b = a; b = c; ~ -!!! error TS2323: Type '{}' is not assignable to type '{ [x: number]: string; }'. -!!! error TS2323: Index signature is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type '{ [x: number]: string; }'. +!!! error TS2322: Index signature is missing in type '{}'. c = a; c = b; \ No newline at end of file diff --git a/tests/baselines/reference/inferSetterParamType.errors.txt b/tests/baselines/reference/inferSetterParamType.errors.txt index 9b01d9c4bc6..c9232d3fac7 100644 --- a/tests/baselines/reference/inferSetterParamType.errors.txt +++ b/tests/baselines/reference/inferSetterParamType.errors.txt @@ -2,7 +2,7 @@ tests/cases/compiler/inferSetterParamType.ts(3,9): error TS1056: Accessors are o tests/cases/compiler/inferSetterParamType.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/inferSetterParamType.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/inferSetterParamType.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inferSetterParamType.ts(13,16): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/inferSetterParamType.ts(13,16): error TS2322: Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/inferSetterParamType.ts (5 errors) ==== @@ -26,7 +26,7 @@ tests/cases/compiler/inferSetterParamType.ts(13,16): error TS2323: Type 'number' !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; // should be an error - can't coerce infered return type to match setter annotated type ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. } set bar(n:string) { ~~~ diff --git a/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt b/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt index 0c87fb6d22d..9dfb41c0fac 100644 --- a/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt +++ b/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/inferentialTypingWithObjectLiteralProperties.ts(4,1): error TS2323: Type 'string' is not assignable to type 'number'. -tests/cases/compiler/inferentialTypingWithObjectLiteralProperties.ts(5,1): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/inferentialTypingWithObjectLiteralProperties.ts(4,1): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/inferentialTypingWithObjectLiteralProperties.ts(5,1): error TS2322: Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/inferentialTypingWithObjectLiteralProperties.ts (2 errors) ==== @@ -8,8 +8,8 @@ tests/cases/compiler/inferentialTypingWithObjectLiteralProperties.ts(5,1): error } f({ x: [null] }, { x: [1] }).x[0] = "" // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. f({ x: [1] }, { x: [null] }).x[0] = "" // was error TS2011: Cannot convert 'string' to 'number'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt b/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt index adbc31af210..c8367bef57b 100644 --- a/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt +++ b/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts(16,1): error TS2323: Type 'OwnerList' is not assignable to type 'List'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts(16,1): error TS2322: Type 'OwnerList' is not assignable to type 'List'. Types of property 'data' are incompatible. Type 'List' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts(21,5): error TS2323: Type 'OwnerList' is not assignable to type 'List'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts(21,5): error TS2322: Type 'OwnerList' is not assignable to type 'List'. Types of property 'data' are incompatible. Type 'List' is not assignable to type 'T'. @@ -24,18 +24,18 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansion var ownerList: OwnerList; list = ownerList; ~~~~ -!!! error TS2323: Type 'OwnerList' is not assignable to type 'List'. -!!! error TS2323: Types of property 'data' are incompatible. -!!! error TS2323: Type 'List' is not assignable to type 'string'. +!!! error TS2322: Type 'OwnerList' is not assignable to type 'List'. +!!! error TS2322: Types of property 'data' are incompatible. +!!! error TS2322: Type 'List' is not assignable to type 'string'. function other(x: T) { var list: List; var ownerList: OwnerList; list = ownerList; ~~~~ -!!! error TS2323: Type 'OwnerList' is not assignable to type 'List'. -!!! error TS2323: Types of property 'data' are incompatible. -!!! error TS2323: Type 'List' is not assignable to type 'T'. +!!! error TS2322: Type 'OwnerList' is not assignable to type 'List'. +!!! error TS2322: Types of property 'data' are incompatible. +!!! error TS2322: Type 'List' is not assignable to type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/inheritance1.errors.txt b/tests/baselines/reference/inheritance1.errors.txt index 65cba48d34e..f33dd120e76 100644 --- a/tests/baselines/reference/inheritance1.errors.txt +++ b/tests/baselines/reference/inheritance1.errors.txt @@ -2,23 +2,23 @@ tests/cases/compiler/inheritance1.ts(14,7): error TS2420: Class 'ImageBase' inco Property 'select' is missing in type 'ImageBase'. tests/cases/compiler/inheritance1.ts(18,7): error TS2420: Class 'Locations' incorrectly implements interface 'SelectableControl'. Property 'state' is missing in type 'Locations'. -tests/cases/compiler/inheritance1.ts(31,1): error TS2323: Type 'Control' is not assignable to type 'Button'. +tests/cases/compiler/inheritance1.ts(31,1): error TS2322: Type 'Control' is not assignable to type 'Button'. Property 'select' is missing in type 'Control'. -tests/cases/compiler/inheritance1.ts(37,1): error TS2323: Type 'Control' is not assignable to type 'TextBox'. +tests/cases/compiler/inheritance1.ts(37,1): error TS2322: Type 'Control' is not assignable to type 'TextBox'. Property 'select' is missing in type 'Control'. -tests/cases/compiler/inheritance1.ts(40,1): error TS2323: Type 'ImageBase' is not assignable to type 'SelectableControl'. -tests/cases/compiler/inheritance1.ts(46,1): error TS2323: Type 'Image1' is not assignable to type 'SelectableControl'. +tests/cases/compiler/inheritance1.ts(40,1): error TS2322: Type 'ImageBase' is not assignable to type 'SelectableControl'. +tests/cases/compiler/inheritance1.ts(46,1): error TS2322: Type 'Image1' is not assignable to type 'SelectableControl'. Property 'select' is missing in type 'Image1'. -tests/cases/compiler/inheritance1.ts(52,1): error TS2323: Type 'Locations' is not assignable to type 'SelectableControl'. -tests/cases/compiler/inheritance1.ts(53,1): error TS2323: Type 'Locations' is not assignable to type 'Control'. +tests/cases/compiler/inheritance1.ts(52,1): error TS2322: Type 'Locations' is not assignable to type 'SelectableControl'. +tests/cases/compiler/inheritance1.ts(53,1): error TS2322: Type 'Locations' is not assignable to type 'Control'. Property 'state' is missing in type 'Locations'. -tests/cases/compiler/inheritance1.ts(55,1): error TS2323: Type 'Control' is not assignable to type 'Locations'. +tests/cases/compiler/inheritance1.ts(55,1): error TS2322: Type 'Control' is not assignable to type 'Locations'. Property 'select' is missing in type 'Control'. -tests/cases/compiler/inheritance1.ts(58,1): error TS2323: Type 'Locations1' is not assignable to type 'SelectableControl'. +tests/cases/compiler/inheritance1.ts(58,1): error TS2322: Type 'Locations1' is not assignable to type 'SelectableControl'. Property 'state' is missing in type 'Locations1'. -tests/cases/compiler/inheritance1.ts(59,1): error TS2323: Type 'Locations1' is not assignable to type 'Control'. +tests/cases/compiler/inheritance1.ts(59,1): error TS2322: Type 'Locations1' is not assignable to type 'Control'. Property 'state' is missing in type 'Locations1'. -tests/cases/compiler/inheritance1.ts(61,1): error TS2323: Type 'Control' is not assignable to type 'Locations1'. +tests/cases/compiler/inheritance1.ts(61,1): error TS2322: Type 'Control' is not assignable to type 'Locations1'. Property 'select' is missing in type 'Control'. @@ -61,8 +61,8 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2323: Type 'Control' is not b = sc; b = c; ~ -!!! error TS2323: Type 'Control' is not assignable to type 'Button'. -!!! error TS2323: Property 'select' is missing in type 'Control'. +!!! error TS2322: Type 'Control' is not assignable to type 'Button'. +!!! error TS2322: Property 'select' is missing in type 'Control'. var t: TextBox; sc = t; @@ -70,13 +70,13 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2323: Type 'Control' is not t = sc; t = c; ~ -!!! error TS2323: Type 'Control' is not assignable to type 'TextBox'. -!!! error TS2323: Property 'select' is missing in type 'Control'. +!!! error TS2322: Type 'Control' is not assignable to type 'TextBox'. +!!! error TS2322: Property 'select' is missing in type 'Control'. var i: ImageBase; sc = i; ~~ -!!! error TS2323: Type 'ImageBase' is not assignable to type 'SelectableControl'. +!!! error TS2322: Type 'ImageBase' is not assignable to type 'SelectableControl'. c = i; i = sc; i = c; @@ -84,8 +84,8 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2323: Type 'Control' is not var i1: Image1; sc = i1; ~~ -!!! error TS2323: Type 'Image1' is not assignable to type 'SelectableControl'. -!!! error TS2323: Property 'select' is missing in type 'Image1'. +!!! error TS2322: Type 'Image1' is not assignable to type 'SelectableControl'. +!!! error TS2322: Property 'select' is missing in type 'Image1'. c = i1; i1 = sc; i1 = c; @@ -93,28 +93,28 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2323: Type 'Control' is not var l: Locations; sc = l; ~~ -!!! error TS2323: Type 'Locations' is not assignable to type 'SelectableControl'. +!!! error TS2322: Type 'Locations' is not assignable to type 'SelectableControl'. c = l; ~ -!!! error TS2323: Type 'Locations' is not assignable to type 'Control'. -!!! error TS2323: Property 'state' is missing in type 'Locations'. +!!! error TS2322: Type 'Locations' is not assignable to type 'Control'. +!!! error TS2322: Property 'state' is missing in type 'Locations'. l = sc; l = c; ~ -!!! error TS2323: Type 'Control' is not assignable to type 'Locations'. -!!! error TS2323: Property 'select' is missing in type 'Control'. +!!! error TS2322: Type 'Control' is not assignable to type 'Locations'. +!!! error TS2322: Property 'select' is missing in type 'Control'. var l1: Locations1; sc = l1; ~~ -!!! error TS2323: Type 'Locations1' is not assignable to type 'SelectableControl'. -!!! error TS2323: Property 'state' is missing in type 'Locations1'. +!!! error TS2322: Type 'Locations1' is not assignable to type 'SelectableControl'. +!!! error TS2322: Property 'state' is missing in type 'Locations1'. c = l1; ~ -!!! error TS2323: Type 'Locations1' is not assignable to type 'Control'. -!!! error TS2323: Property 'state' is missing in type 'Locations1'. +!!! error TS2322: Type 'Locations1' is not assignable to type 'Control'. +!!! error TS2322: Property 'state' is missing in type 'Locations1'. l1 = sc; l1 = c; ~~ -!!! error TS2323: Type 'Control' is not assignable to type 'Locations1'. -!!! error TS2323: Property 'select' is missing in type 'Control'. \ No newline at end of file +!!! error TS2322: Type 'Control' is not assignable to type 'Locations1'. +!!! error TS2322: Property 'select' is missing in type 'Control'. \ No newline at end of file diff --git a/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt b/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt index 93f66768b35..b5e56d2f4e3 100644 --- a/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt +++ b/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/innerTypeCheckOfLambdaArgument.ts(10,7): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/innerTypeCheckOfLambdaArgument.ts(10,7): error TS2322: Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/innerTypeCheckOfLambdaArgument.ts (1 errors) ==== @@ -13,7 +13,7 @@ tests/cases/compiler/innerTypeCheckOfLambdaArgument.ts(10,7): error TS2323: Type // otherwise, there's a bug in overload resolution / partial typechecking var k: string = 10; ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. } ); \ No newline at end of file diff --git a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt index 4a52cbeecfc..080316f8daf 100644 --- a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt +++ b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/instanceMemberAssignsToClassPrototype.ts(7,9): error TS2323: Type '() => void' is not assignable to type '(x: number) => number'. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/instanceMemberAssignsToClassPrototype.ts(7,9): error TS2322: Type '() => void' is not assignable to type '(x: number) => number'. Type 'void' is not assignable to type 'number'. @@ -11,8 +11,8 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara bar(x: number): number { C.prototype.bar = () => { } // error ~~~~~~~~~~~~~~~ -!!! error TS2323: Type '() => void' is not assignable to type '(x: number) => number'. -!!! error TS2323: Type 'void' is not assignable to type 'number'. +!!! error TS2322: Type '() => void' is not assignable to type '(x: number) => number'. +!!! error TS2322: Type 'void' is not assignable to type 'number'. C.prototype.bar = (x) => x; // ok C.prototype.bar = (x: number) => 1; // ok return 1; diff --git a/tests/baselines/reference/intTypeCheck.errors.txt b/tests/baselines/reference/intTypeCheck.errors.txt index 01235160e2f..e6cfc73230a 100644 --- a/tests/baselines/reference/intTypeCheck.errors.txt +++ b/tests/baselines/reference/intTypeCheck.errors.txt @@ -13,79 +13,79 @@ tests/cases/compiler/intTypeCheck.ts(174,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(188,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(202,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(83,5): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/intTypeCheck.ts(97,5): error TS2323: Type 'Object' is not assignable to type 'i1'. +tests/cases/compiler/intTypeCheck.ts(97,5): error TS2322: Type 'Object' is not assignable to type 'i1'. Property 'p' is missing in type 'Object'. tests/cases/compiler/intTypeCheck.ts(98,16): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(99,5): error TS2323: Type 'Base' is not assignable to type 'i1'. +tests/cases/compiler/intTypeCheck.ts(99,5): error TS2322: Type 'Base' is not assignable to type 'i1'. Property 'p' is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(101,5): error TS2323: Type '() => void' is not assignable to type 'i1'. +tests/cases/compiler/intTypeCheck.ts(101,5): error TS2322: Type '() => void' is not assignable to type 'i1'. Property 'p' is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(104,5): error TS2323: Type 'boolean' is not assignable to type 'i1'. +tests/cases/compiler/intTypeCheck.ts(104,5): error TS2322: Type 'boolean' is not assignable to type 'i1'. Property 'p' is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(104,21): error TS2304: Cannot find name 'i1'. tests/cases/compiler/intTypeCheck.ts(105,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(110,5): error TS2323: Type '{}' is not assignable to type 'i2'. -tests/cases/compiler/intTypeCheck.ts(111,5): error TS2323: Type 'Object' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(110,5): error TS2322: Type '{}' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(111,5): error TS2322: Type 'Object' is not assignable to type 'i2'. tests/cases/compiler/intTypeCheck.ts(112,17): error TS2350: Only a void function can be called with the 'new' keyword. -tests/cases/compiler/intTypeCheck.ts(113,5): error TS2323: Type 'Base' is not assignable to type 'i2'. -tests/cases/compiler/intTypeCheck.ts(118,5): error TS2323: Type 'boolean' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(113,5): error TS2322: Type 'Base' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(118,5): error TS2322: Type 'boolean' is not assignable to type 'i2'. tests/cases/compiler/intTypeCheck.ts(118,22): error TS2304: Cannot find name 'i2'. tests/cases/compiler/intTypeCheck.ts(119,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(124,5): error TS2323: Type '{}' is not assignable to type 'i3'. -tests/cases/compiler/intTypeCheck.ts(125,5): error TS2323: Type 'Object' is not assignable to type 'i3'. -tests/cases/compiler/intTypeCheck.ts(127,5): error TS2323: Type 'Base' is not assignable to type 'i3'. -tests/cases/compiler/intTypeCheck.ts(129,5): error TS2323: Type '() => void' is not assignable to type 'i3'. -tests/cases/compiler/intTypeCheck.ts(132,5): error TS2323: Type 'boolean' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(124,5): error TS2322: Type '{}' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(125,5): error TS2322: Type 'Object' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(127,5): error TS2322: Type 'Base' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(129,5): error TS2322: Type '() => void' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(132,5): error TS2322: Type 'boolean' is not assignable to type 'i3'. tests/cases/compiler/intTypeCheck.ts(132,22): error TS2304: Cannot find name 'i3'. tests/cases/compiler/intTypeCheck.ts(133,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(139,5): error TS2323: Type 'Object' is not assignable to type 'i4'. +tests/cases/compiler/intTypeCheck.ts(139,5): error TS2322: Type 'Object' is not assignable to type 'i4'. Index signature is missing in type 'Object'. tests/cases/compiler/intTypeCheck.ts(140,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(141,5): error TS2323: Type 'Base' is not assignable to type 'i4'. +tests/cases/compiler/intTypeCheck.ts(141,5): error TS2322: Type 'Base' is not assignable to type 'i4'. Index signature is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(143,5): error TS2323: Type '() => void' is not assignable to type 'i4'. +tests/cases/compiler/intTypeCheck.ts(143,5): error TS2322: Type '() => void' is not assignable to type 'i4'. Index signature is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(146,5): error TS2323: Type 'boolean' is not assignable to type 'i4'. +tests/cases/compiler/intTypeCheck.ts(146,5): error TS2322: Type 'boolean' is not assignable to type 'i4'. Index signature is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(146,22): error TS2304: Cannot find name 'i4'. tests/cases/compiler/intTypeCheck.ts(147,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(152,5): error TS2323: Type '{}' is not assignable to type 'i5'. +tests/cases/compiler/intTypeCheck.ts(152,5): error TS2322: Type '{}' is not assignable to type 'i5'. Property 'p' is missing in type '{}'. -tests/cases/compiler/intTypeCheck.ts(153,5): error TS2323: Type 'Object' is not assignable to type 'i5'. +tests/cases/compiler/intTypeCheck.ts(153,5): error TS2322: Type 'Object' is not assignable to type 'i5'. Property 'p' is missing in type 'Object'. tests/cases/compiler/intTypeCheck.ts(154,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(155,5): error TS2323: Type 'Base' is not assignable to type 'i5'. +tests/cases/compiler/intTypeCheck.ts(155,5): error TS2322: Type 'Base' is not assignable to type 'i5'. Property 'p' is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(157,5): error TS2323: Type '() => void' is not assignable to type 'i5'. +tests/cases/compiler/intTypeCheck.ts(157,5): error TS2322: Type '() => void' is not assignable to type 'i5'. Property 'p' is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(160,5): error TS2323: Type 'boolean' is not assignable to type 'i5'. +tests/cases/compiler/intTypeCheck.ts(160,5): error TS2322: Type 'boolean' is not assignable to type 'i5'. Property 'p' is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(160,22): error TS2304: Cannot find name 'i5'. tests/cases/compiler/intTypeCheck.ts(161,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(166,5): error TS2323: Type '{}' is not assignable to type 'i6'. -tests/cases/compiler/intTypeCheck.ts(167,5): error TS2323: Type 'Object' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(166,5): error TS2322: Type '{}' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(167,5): error TS2322: Type 'Object' is not assignable to type 'i6'. tests/cases/compiler/intTypeCheck.ts(168,17): error TS2350: Only a void function can be called with the 'new' keyword. -tests/cases/compiler/intTypeCheck.ts(169,5): error TS2323: Type 'Base' is not assignable to type 'i6'. -tests/cases/compiler/intTypeCheck.ts(171,5): error TS2323: Type '() => void' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(169,5): error TS2322: Type 'Base' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(171,5): error TS2322: Type '() => void' is not assignable to type 'i6'. Type 'void' is not assignable to type 'number'. -tests/cases/compiler/intTypeCheck.ts(174,5): error TS2323: Type 'boolean' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(174,5): error TS2322: Type 'boolean' is not assignable to type 'i6'. tests/cases/compiler/intTypeCheck.ts(174,22): error TS2304: Cannot find name 'i6'. tests/cases/compiler/intTypeCheck.ts(175,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(180,5): error TS2323: Type '{}' is not assignable to type 'i7'. -tests/cases/compiler/intTypeCheck.ts(181,5): error TS2323: Type 'Object' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(180,5): error TS2322: Type '{}' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(181,5): error TS2322: Type 'Object' is not assignable to type 'i7'. tests/cases/compiler/intTypeCheck.ts(183,17): error TS2352: Neither type 'Base' nor type 'i7' is assignable to the other. -tests/cases/compiler/intTypeCheck.ts(185,5): error TS2323: Type '() => void' is not assignable to type 'i7'. -tests/cases/compiler/intTypeCheck.ts(188,5): error TS2323: Type 'boolean' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(185,5): error TS2322: Type '() => void' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(188,5): error TS2322: Type 'boolean' is not assignable to type 'i7'. tests/cases/compiler/intTypeCheck.ts(188,22): error TS2304: Cannot find name 'i7'. tests/cases/compiler/intTypeCheck.ts(189,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(195,5): error TS2323: Type 'Object' is not assignable to type 'i8'. +tests/cases/compiler/intTypeCheck.ts(195,5): error TS2322: Type 'Object' is not assignable to type 'i8'. Index signature is missing in type 'Object'. tests/cases/compiler/intTypeCheck.ts(196,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(197,5): error TS2323: Type 'Base' is not assignable to type 'i8'. +tests/cases/compiler/intTypeCheck.ts(197,5): error TS2322: Type 'Base' is not assignable to type 'i8'. Index signature is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(199,5): error TS2323: Type '() => void' is not assignable to type 'i8'. +tests/cases/compiler/intTypeCheck.ts(199,5): error TS2322: Type '() => void' is not assignable to type 'i8'. Index signature is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(202,5): error TS2323: Type 'boolean' is not assignable to type 'i8'. +tests/cases/compiler/intTypeCheck.ts(202,5): error TS2322: Type 'boolean' is not assignable to type 'i8'. Index signature is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(202,22): error TS2304: Cannot find name 'i8'. tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -204,28 +204,28 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit }; var obj2: i1 = new Object(); ~~~~ -!!! error TS2323: Type 'Object' is not assignable to type 'i1'. -!!! error TS2323: Property 'p' is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i1'. +!!! error TS2322: Property 'p' is missing in type 'Object'. var obj3: i1 = new obj0; ~~~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj4: i1 = new Base; ~~~~ -!!! error TS2323: Type 'Base' is not assignable to type 'i1'. -!!! error TS2323: Property 'p' is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i1'. +!!! error TS2322: Property 'p' is missing in type 'Base'. var obj5: i1 = null; var obj6: i1 = function () { }; ~~~~ -!!! error TS2323: Type '() => void' is not assignable to type 'i1'. -!!! error TS2323: Property 'p' is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i1'. +!!! error TS2322: Property 'p' is missing in type '() => void'. //var obj7: i1 = function foo() { }; var obj8: i1 = anyVar; var obj9: i1 = new anyVar; ~ !!! error TS1109: Expression expected. ~~~~ -!!! error TS2323: Type 'boolean' is not assignable to type 'i1'. -!!! error TS2323: Property 'p' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i1'. +!!! error TS2322: Property 'p' is missing in type 'Boolean'. ~~ !!! error TS2304: Cannot find name 'i1'. var obj10: i1 = new {}; @@ -237,16 +237,16 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit var obj11: i2; var obj12: i2 = {}; ~~~~~ -!!! error TS2323: Type '{}' is not assignable to type 'i2'. +!!! error TS2322: Type '{}' is not assignable to type 'i2'. var obj13: i2 = new Object(); ~~~~~ -!!! error TS2323: Type 'Object' is not assignable to type 'i2'. +!!! error TS2322: Type 'Object' is not assignable to type 'i2'. var obj14: i2 = new obj11; ~~~~~~~~~ !!! error TS2350: Only a void function can be called with the 'new' keyword. var obj15: i2 = new Base; ~~~~~ -!!! error TS2323: Type 'Base' is not assignable to type 'i2'. +!!! error TS2322: Type 'Base' is not assignable to type 'i2'. var obj16: i2 = null; var obj17: i2 = function ():any { return 0; }; //var obj18: i2 = function foo() { }; @@ -255,7 +255,7 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit ~ !!! error TS1109: Expression expected. ~~~~~ -!!! error TS2323: Type 'boolean' is not assignable to type 'i2'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i2'. ~~ !!! error TS2304: Cannot find name 'i2'. var obj21: i2 = new {}; @@ -267,25 +267,25 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit var obj22: i3; var obj23: i3 = {}; ~~~~~ -!!! error TS2323: Type '{}' is not assignable to type 'i3'. +!!! error TS2322: Type '{}' is not assignable to type 'i3'. var obj24: i3 = new Object(); ~~~~~ -!!! error TS2323: Type 'Object' is not assignable to type 'i3'. +!!! error TS2322: Type 'Object' is not assignable to type 'i3'. var obj25: i3 = new obj22; var obj26: i3 = new Base; ~~~~~ -!!! error TS2323: Type 'Base' is not assignable to type 'i3'. +!!! error TS2322: Type 'Base' is not assignable to type 'i3'. var obj27: i3 = null; var obj28: i3 = function () { }; ~~~~~ -!!! error TS2323: Type '() => void' is not assignable to type 'i3'. +!!! error TS2322: Type '() => void' is not assignable to type 'i3'. //var obj29: i3 = function foo() { }; var obj30: i3 = anyVar; var obj31: i3 = new anyVar; ~ !!! error TS1109: Expression expected. ~~~~~ -!!! error TS2323: Type 'boolean' is not assignable to type 'i3'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i3'. ~~ !!! error TS2304: Cannot find name 'i3'. var obj32: i3 = new {}; @@ -298,28 +298,28 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit var obj34: i4 = {}; var obj35: i4 = new Object(); ~~~~~ -!!! error TS2323: Type 'Object' is not assignable to type 'i4'. -!!! error TS2323: Index signature is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i4'. +!!! error TS2322: Index signature is missing in type 'Object'. var obj36: i4 = new obj33; ~~~~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj37: i4 = new Base; ~~~~~ -!!! error TS2323: Type 'Base' is not assignable to type 'i4'. -!!! error TS2323: Index signature is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i4'. +!!! error TS2322: Index signature is missing in type 'Base'. var obj38: i4 = null; var obj39: i4 = function () { }; ~~~~~ -!!! error TS2323: Type '() => void' is not assignable to type 'i4'. -!!! error TS2323: Index signature is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i4'. +!!! error TS2322: Index signature is missing in type '() => void'. //var obj40: i4 = function foo() { }; var obj41: i4 = anyVar; var obj42: i4 = new anyVar; ~ !!! error TS1109: Expression expected. ~~~~~ -!!! error TS2323: Type 'boolean' is not assignable to type 'i4'. -!!! error TS2323: Index signature is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i4'. +!!! error TS2322: Index signature is missing in type 'Boolean'. ~~ !!! error TS2304: Cannot find name 'i4'. var obj43: i4 = new {}; @@ -331,32 +331,32 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit var obj44: i5; var obj45: i5 = {}; ~~~~~ -!!! error TS2323: Type '{}' is not assignable to type 'i5'. -!!! error TS2323: Property 'p' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'i5'. +!!! error TS2322: Property 'p' is missing in type '{}'. var obj46: i5 = new Object(); ~~~~~ -!!! error TS2323: Type 'Object' is not assignable to type 'i5'. -!!! error TS2323: Property 'p' is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i5'. +!!! error TS2322: Property 'p' is missing in type 'Object'. var obj47: i5 = new obj44; ~~~~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj48: i5 = new Base; ~~~~~ -!!! error TS2323: Type 'Base' is not assignable to type 'i5'. -!!! error TS2323: Property 'p' is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i5'. +!!! error TS2322: Property 'p' is missing in type 'Base'. var obj49: i5 = null; var obj50: i5 = function () { }; ~~~~~ -!!! error TS2323: Type '() => void' is not assignable to type 'i5'. -!!! error TS2323: Property 'p' is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i5'. +!!! error TS2322: Property 'p' is missing in type '() => void'. //var obj51: i5 = function foo() { }; var obj52: i5 = anyVar; var obj53: i5 = new anyVar; ~ !!! error TS1109: Expression expected. ~~~~~ -!!! error TS2323: Type 'boolean' is not assignable to type 'i5'. -!!! error TS2323: Property 'p' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i5'. +!!! error TS2322: Property 'p' is missing in type 'Boolean'. ~~ !!! error TS2304: Cannot find name 'i5'. var obj54: i5 = new {}; @@ -368,28 +368,28 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit var obj55: i6; var obj56: i6 = {}; ~~~~~ -!!! error TS2323: Type '{}' is not assignable to type 'i6'. +!!! error TS2322: Type '{}' is not assignable to type 'i6'. var obj57: i6 = new Object(); ~~~~~ -!!! error TS2323: Type 'Object' is not assignable to type 'i6'. +!!! error TS2322: Type 'Object' is not assignable to type 'i6'. var obj58: i6 = new obj55; ~~~~~~~~~ !!! error TS2350: Only a void function can be called with the 'new' keyword. var obj59: i6 = new Base; ~~~~~ -!!! error TS2323: Type 'Base' is not assignable to type 'i6'. +!!! error TS2322: Type 'Base' is not assignable to type 'i6'. var obj60: i6 = null; var obj61: i6 = function () { }; ~~~~~ -!!! error TS2323: Type '() => void' is not assignable to type 'i6'. -!!! error TS2323: Type 'void' is not assignable to type 'number'. +!!! error TS2322: Type '() => void' is not assignable to type 'i6'. +!!! error TS2322: Type 'void' is not assignable to type 'number'. //var obj62: i6 = function foo() { }; var obj63: i6 = anyVar; var obj64: i6 = new anyVar; ~ !!! error TS1109: Expression expected. ~~~~~ -!!! error TS2323: Type 'boolean' is not assignable to type 'i6'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i6'. ~~ !!! error TS2304: Cannot find name 'i6'. var obj65: i6 = new {}; @@ -401,10 +401,10 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit var obj66: i7; var obj67: i7 = {}; ~~~~~ -!!! error TS2323: Type '{}' is not assignable to type 'i7'. +!!! error TS2322: Type '{}' is not assignable to type 'i7'. var obj68: i7 = new Object(); ~~~~~ -!!! error TS2323: Type 'Object' is not assignable to type 'i7'. +!!! error TS2322: Type 'Object' is not assignable to type 'i7'. var obj69: i7 = new obj66; var obj70: i7 = new Base; ~~~~~~~~~~~~ @@ -412,14 +412,14 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit var obj71: i7 = null; var obj72: i7 = function () { }; ~~~~~ -!!! error TS2323: Type '() => void' is not assignable to type 'i7'. +!!! error TS2322: Type '() => void' is not assignable to type 'i7'. //var obj73: i7 = function foo() { }; var obj74: i7 = anyVar; var obj75: i7 = new anyVar; ~ !!! error TS1109: Expression expected. ~~~~~ -!!! error TS2323: Type 'boolean' is not assignable to type 'i7'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i7'. ~~ !!! error TS2304: Cannot find name 'i7'. var obj76: i7 = new {}; @@ -432,28 +432,28 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit var obj78: i8 = {}; var obj79: i8 = new Object(); ~~~~~ -!!! error TS2323: Type 'Object' is not assignable to type 'i8'. -!!! error TS2323: Index signature is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i8'. +!!! error TS2322: Index signature is missing in type 'Object'. var obj80: i8 = new obj77; ~~~~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj81: i8 = new Base; ~~~~~ -!!! error TS2323: Type 'Base' is not assignable to type 'i8'. -!!! error TS2323: Index signature is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i8'. +!!! error TS2322: Index signature is missing in type 'Base'. var obj82: i8 = null; var obj83: i8 = function () { }; ~~~~~ -!!! error TS2323: Type '() => void' is not assignable to type 'i8'. -!!! error TS2323: Index signature is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i8'. +!!! error TS2322: Index signature is missing in type '() => void'. //var obj84: i8 = function foo() { }; var obj85: i8 = anyVar; var obj86: i8 = new anyVar; ~ !!! error TS1109: Expression expected. ~~~~~ -!!! error TS2323: Type 'boolean' is not assignable to type 'i8'. -!!! error TS2323: Index signature is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i8'. +!!! error TS2322: Index signature is missing in type 'Boolean'. ~~ !!! error TS2304: Cannot find name 'i8'. var obj87: i8 = new {}; diff --git a/tests/baselines/reference/interfaceAssignmentCompat.errors.txt b/tests/baselines/reference/interfaceAssignmentCompat.errors.txt index d9791d5e6b8..35cf2df71ff 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.errors.txt +++ b/tests/baselines/reference/interfaceAssignmentCompat.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/interfaceAssignmentCompat.ts(32,18): error TS2345: Argument of type '(a: IFrenchEye, b: IFrenchEye) => number' is not assignable to parameter of type '(a: IEye, b: IEye) => number'. tests/cases/compiler/interfaceAssignmentCompat.ts(37,29): error TS2339: Property '_map' does not exist on type 'typeof Color'. -tests/cases/compiler/interfaceAssignmentCompat.ts(42,13): error TS2323: Type 'IEye' is not assignable to type 'IFrenchEye'. -tests/cases/compiler/interfaceAssignmentCompat.ts(44,9): error TS2323: Type 'IEye[]' is not assignable to type 'IFrenchEye[]'. +tests/cases/compiler/interfaceAssignmentCompat.ts(42,13): error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye'. +tests/cases/compiler/interfaceAssignmentCompat.ts(44,9): error TS2322: Type 'IEye[]' is not assignable to type 'IFrenchEye[]'. Type 'IEye' is not assignable to type 'IFrenchEye'. @@ -53,12 +53,12 @@ tests/cases/compiler/interfaceAssignmentCompat.ts(44,9): error TS2323: Type 'IEy for (var j=z.length=1;j>=0;j--) { eeks[j]=z[j]; // nope: element assignment ~~~~~~~ -!!! error TS2323: Type 'IEye' is not assignable to type 'IFrenchEye'. +!!! error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye'. } eeks=z; // nope: array assignment ~~~~ -!!! error TS2323: Type 'IEye[]' is not assignable to type 'IFrenchEye[]'. -!!! error TS2323: Type 'IEye' is not assignable to type 'IFrenchEye'. +!!! error TS2322: Type 'IEye[]' is not assignable to type 'IFrenchEye[]'. +!!! error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye'. return result; } } diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt index daa91c8822b..f624560b7c0 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(21,1): error TS2323: Type 'C' is not assignable to type 'I'. +tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(21,1): error TS2322: Type 'C' is not assignable to type 'I'. Property 'other' is missing in type 'C'. -tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(24,1): error TS2323: Type 'I' is not assignable to type 'D'. +tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(24,1): error TS2322: Type 'I' is not assignable to type 'D'. Property 'bar' is missing in type 'I'. -tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(27,1): error TS2323: Type 'C' is not assignable to type 'D'. +tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(27,1): error TS2322: Type 'C' is not assignable to type 'D'. Property 'other' is missing in type 'C'. @@ -29,17 +29,17 @@ tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(27,1): error TS2323: T c = i; i = c; // error ~ -!!! error TS2323: Type 'C' is not assignable to type 'I'. -!!! error TS2323: Property 'other' is missing in type 'C'. +!!! error TS2322: Type 'C' is not assignable to type 'I'. +!!! error TS2322: Property 'other' is missing in type 'C'. i = d; d = i; // error ~ -!!! error TS2323: Type 'I' is not assignable to type 'D'. -!!! error TS2323: Property 'bar' is missing in type 'I'. +!!! error TS2322: Type 'I' is not assignable to type 'D'. +!!! error TS2322: Property 'bar' is missing in type 'I'. c = d; d = c; // error ~ -!!! error TS2323: Type 'C' is not assignable to type 'D'. -!!! error TS2323: Property 'other' is missing in type 'C'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'D'. +!!! error TS2322: Property 'other' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceImplementation1.errors.txt b/tests/baselines/reference/interfaceImplementation1.errors.txt index 5a6b870b55a..45b011c6929 100644 --- a/tests/baselines/reference/interfaceImplementation1.errors.txt +++ b/tests/baselines/reference/interfaceImplementation1.errors.txt @@ -2,7 +2,7 @@ tests/cases/compiler/interfaceImplementation1.ts(12,7): error TS2420: Class 'C1' Property 'iObj' is private in type 'C1' but not in type 'I1'. tests/cases/compiler/interfaceImplementation1.ts(12,7): error TS2420: Class 'C1' incorrectly implements interface 'I2'. Property 'iFn' is private in type 'C1' but not in type 'I2'. -tests/cases/compiler/interfaceImplementation1.ts(34,5): error TS2323: Type '() => C2' is not assignable to type 'I4'. +tests/cases/compiler/interfaceImplementation1.ts(34,5): error TS2322: Type '() => C2' is not assignable to type 'I4'. ==== tests/cases/compiler/interfaceImplementation1.ts (3 errors) ==== @@ -47,7 +47,7 @@ tests/cases/compiler/interfaceImplementation1.ts(34,5): error TS2323: Type '() = var a:I4 = function(){ ~ -!!! error TS2323: Type '() => C2' is not assignable to type 'I4'. +!!! error TS2322: Type '() => C2' is not assignable to type 'I4'. return new C2(); } new a(); diff --git a/tests/baselines/reference/interfaceInheritance.errors.txt b/tests/baselines/reference/interfaceInheritance.errors.txt index b598ba4a985..c96053b8a84 100644 --- a/tests/baselines/reference/interfaceInheritance.errors.txt +++ b/tests/baselines/reference/interfaceInheritance.errors.txt @@ -1,11 +1,11 @@ tests/cases/compiler/interfaceInheritance.ts(22,7): error TS2420: Class 'C1' incorrectly implements interface 'I2'. Property 'i1P1' is missing in type 'C1'. -tests/cases/compiler/interfaceInheritance.ts(30,1): error TS2323: Type 'I3' is not assignable to type 'I2'. +tests/cases/compiler/interfaceInheritance.ts(30,1): error TS2322: Type 'I3' is not assignable to type 'I2'. Property 'i1P1' is missing in type 'I3'. -tests/cases/compiler/interfaceInheritance.ts(37,1): error TS2323: Type 'I5' is not assignable to type 'I4'. +tests/cases/compiler/interfaceInheritance.ts(37,1): error TS2322: Type 'I5' is not assignable to type 'I4'. Types of property 'one' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/interfaceInheritance.ts(38,1): error TS2323: Type 'I4' is not assignable to type 'I5'. +tests/cases/compiler/interfaceInheritance.ts(38,1): error TS2322: Type 'I4' is not assignable to type 'I5'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'string'. @@ -45,8 +45,8 @@ tests/cases/compiler/interfaceInheritance.ts(38,1): error TS2323: Type 'I4' is n i1 = i2; i2 = i3; // should be an error - i3 does not implement the members of i1 ~~ -!!! error TS2323: Type 'I3' is not assignable to type 'I2'. -!!! error TS2323: Property 'i1P1' is missing in type 'I3'. +!!! error TS2322: Type 'I3' is not assignable to type 'I2'. +!!! error TS2322: Property 'i1P1' is missing in type 'I3'. var c1: C1; @@ -55,13 +55,13 @@ tests/cases/compiler/interfaceInheritance.ts(38,1): error TS2323: Type 'I4' is n i4 = i5; // should be an error ~~ -!!! error TS2323: Type 'I5' is not assignable to type 'I4'. -!!! error TS2323: Types of property 'one' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'I5' is not assignable to type 'I4'. +!!! error TS2322: Types of property 'one' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. i5 = i4; // should be an error ~~ -!!! error TS2323: Type 'I4' is not assignable to type 'I5'. -!!! error TS2323: Types of property 'one' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'I4' is not assignable to type 'I5'. +!!! error TS2322: Types of property 'one' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt b/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt index 2d800b4befd..3ac4f122e58 100644 --- a/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt +++ b/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt @@ -1,55 +1,55 @@ -tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(2,1): error TS2323: Type 'number' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(3,1): error TS2323: Type 'boolean' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(4,1): error TS2323: Type 'string' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(5,1): error TS2323: Type '{}' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(9,1): error TS2323: Type 'typeof C' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(10,1): error TS2323: Type 'C' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(14,1): error TS2323: Type 'I' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(17,1): error TS2323: Type 'typeof M' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(20,5): error TS2323: Type 'T' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(22,1): error TS2323: Type '(a: T) => void' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(2,1): error TS2322: Type 'number' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(3,1): error TS2322: Type 'boolean' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(4,1): error TS2322: Type 'string' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(5,1): error TS2322: Type '{}' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(9,1): error TS2322: Type 'typeof C' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(10,1): error TS2322: Type 'C' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(14,1): error TS2322: Type 'I' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(17,1): error TS2322: Type 'typeof M' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(20,5): error TS2322: Type 'T' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(22,1): error TS2322: Type '(a: T) => void' is not assignable to type 'void'. ==== tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts (10 errors) ==== var x: void; x = 1; ~ -!!! error TS2323: Type 'number' is not assignable to type 'void'. +!!! error TS2322: Type 'number' is not assignable to type 'void'. x = true; ~ -!!! error TS2323: Type 'boolean' is not assignable to type 'void'. +!!! error TS2322: Type 'boolean' is not assignable to type 'void'. x = ''; ~ -!!! error TS2323: Type 'string' is not assignable to type 'void'. +!!! error TS2322: Type 'string' is not assignable to type 'void'. x = {} ~ -!!! error TS2323: Type '{}' is not assignable to type 'void'. +!!! error TS2322: Type '{}' is not assignable to type 'void'. class C { foo: string; } var c: C; x = C; ~ -!!! error TS2323: Type 'typeof C' is not assignable to type 'void'. +!!! error TS2322: Type 'typeof C' is not assignable to type 'void'. x = c; ~ -!!! error TS2323: Type 'C' is not assignable to type 'void'. +!!! error TS2322: Type 'C' is not assignable to type 'void'. interface I { foo: string; } var i: I; x = i; ~ -!!! error TS2323: Type 'I' is not assignable to type 'void'. +!!! error TS2322: Type 'I' is not assignable to type 'void'. module M { export var x = 1; } x = M; ~ -!!! error TS2323: Type 'typeof M' is not assignable to type 'void'. +!!! error TS2322: Type 'typeof M' is not assignable to type 'void'. function f(a: T) { x = a; ~ -!!! error TS2323: Type 'T' is not assignable to type 'void'. +!!! error TS2322: Type 'T' is not assignable to type 'void'. } x = f; ~ -!!! error TS2323: Type '(a: T) => void' is not assignable to type 'void'. \ No newline at end of file +!!! error TS2322: Type '(a: T) => void' is not assignable to type 'void'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidBooleanAssignments.errors.txt b/tests/baselines/reference/invalidBooleanAssignments.errors.txt index 2a725e0f71d..84ced226113 100644 --- a/tests/baselines/reference/invalidBooleanAssignments.errors.txt +++ b/tests/baselines/reference/invalidBooleanAssignments.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(3,5): error TS2323: Type 'boolean' is not assignable to type 'number'. -tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(4,5): error TS2323: Type 'boolean' is not assignable to type 'string'. -tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(5,5): error TS2323: Type 'boolean' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(9,5): error TS2323: Type 'boolean' is not assignable to type 'E'. -tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(12,5): error TS2323: Type 'boolean' is not assignable to type 'C'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(3,5): error TS2322: Type 'boolean' is not assignable to type 'number'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(4,5): error TS2322: Type 'boolean' is not assignable to type 'string'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(5,5): error TS2322: Type 'boolean' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(9,5): error TS2322: Type 'boolean' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'C'. Property 'foo' is missing in type 'Boolean'. -tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(15,5): error TS2323: Type 'boolean' is not assignable to type 'I'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(15,5): error TS2322: Type 'boolean' is not assignable to type 'I'. Property 'bar' is missing in type 'Boolean'. -tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(17,5): error TS2323: Type 'boolean' is not assignable to type '() => string'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(17,5): error TS2322: Type 'boolean' is not assignable to type '() => string'. tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(21,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(24,5): error TS2323: Type 'boolean' is not assignable to type 'T'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(24,5): error TS2322: Type 'boolean' is not assignable to type 'T'. tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26,1): error TS2364: Invalid left-hand side of assignment expression. @@ -17,35 +17,35 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26 var a: number = x; ~ -!!! error TS2323: Type 'boolean' is not assignable to type 'number'. +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. var b: string = x; ~ -!!! error TS2323: Type 'boolean' is not assignable to type 'string'. +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. var c: void = x; ~ -!!! error TS2323: Type 'boolean' is not assignable to type 'void'. +!!! error TS2322: Type 'boolean' is not assignable to type 'void'. var d: typeof undefined = x; enum E { A } var e: E = x; ~ -!!! error TS2323: Type 'boolean' is not assignable to type 'E'. +!!! error TS2322: Type 'boolean' is not assignable to type 'E'. class C { foo: string } var f: C = x; ~ -!!! error TS2323: Type 'boolean' is not assignable to type 'C'. -!!! error TS2323: Property 'foo' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'C'. +!!! error TS2322: Property 'foo' is missing in type 'Boolean'. interface I { bar: string } var g: I = x; ~ -!!! error TS2323: Type 'boolean' is not assignable to type 'I'. -!!! error TS2323: Property 'bar' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'I'. +!!! error TS2322: Property 'bar' is missing in type 'Boolean'. var h: { (): string } = x; ~ -!!! error TS2323: Type 'boolean' is not assignable to type '() => string'. +!!! error TS2322: Type 'boolean' is not assignable to type '() => string'. var h2: { toString(): string } = x; // no error module M { export var a = 1; } @@ -56,7 +56,7 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26 function i(a: T) { a = x; ~ -!!! error TS2323: Type 'boolean' is not assignable to type 'T'. +!!! error TS2322: Type 'boolean' is not assignable to type 'T'. } i = x; ~ diff --git a/tests/baselines/reference/invalidEnumAssignments.errors.txt b/tests/baselines/reference/invalidEnumAssignments.errors.txt index 6e9c46d4239..962e4bf62d5 100644 --- a/tests/baselines/reference/invalidEnumAssignments.errors.txt +++ b/tests/baselines/reference/invalidEnumAssignments.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(14,1): error TS2323: Type 'E2' is not assignable to type 'E'. -tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(15,1): error TS2323: Type 'E' is not assignable to type 'E2'. -tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(16,1): error TS2323: Type 'void' is not assignable to type 'E'. -tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(17,1): error TS2323: Type '{}' is not assignable to type 'E'. -tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(18,1): error TS2323: Type 'string' is not assignable to type 'E'. -tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(21,5): error TS2323: Type 'T' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(14,1): error TS2322: Type 'E2' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(15,1): error TS2322: Type 'E' is not assignable to type 'E2'. +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(16,1): error TS2322: Type 'void' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(17,1): error TS2322: Type '{}' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(18,1): error TS2322: Type 'string' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(21,5): error TS2322: Type 'T' is not assignable to type 'E'. ==== tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts (6 errors) ==== @@ -22,22 +22,22 @@ tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(21,5): e e = E2.A; ~ -!!! error TS2323: Type 'E2' is not assignable to type 'E'. +!!! error TS2322: Type 'E2' is not assignable to type 'E'. e2 = E.A; ~~ -!!! error TS2323: Type 'E' is not assignable to type 'E2'. +!!! error TS2322: Type 'E' is not assignable to type 'E2'. e = null; ~ -!!! error TS2323: Type 'void' is not assignable to type 'E'. +!!! error TS2322: Type 'void' is not assignable to type 'E'. e = {}; ~ -!!! error TS2323: Type '{}' is not assignable to type 'E'. +!!! error TS2322: Type '{}' is not assignable to type 'E'. e = ''; ~ -!!! error TS2323: Type 'string' is not assignable to type 'E'. +!!! error TS2322: Type 'string' is not assignable to type 'E'. function f(a: T) { e = a; ~ -!!! error TS2323: Type 'T' is not assignable to type 'E'. +!!! error TS2322: Type 'T' is not assignable to type 'E'. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidNumberAssignments.errors.txt b/tests/baselines/reference/invalidNumberAssignments.errors.txt index b2f8123c911..7eb5e6cb897 100644 --- a/tests/baselines/reference/invalidNumberAssignments.errors.txt +++ b/tests/baselines/reference/invalidNumberAssignments.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(3,5): error TS2323: Type 'number' is not assignable to type 'boolean'. -tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(4,5): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(5,5): error TS2323: Type 'number' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(9,5): error TS2323: Type 'number' is not assignable to type 'C'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(3,5): error TS2322: Type 'number' is not assignable to type 'boolean'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(4,5): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(5,5): error TS2322: Type 'number' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(9,5): error TS2322: Type 'number' is not assignable to type 'C'. Property 'foo' is missing in type 'Number'. -tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(12,5): error TS2323: Type 'number' is not assignable to type 'I'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(12,5): error TS2322: Type 'number' is not assignable to type 'I'. Property 'bar' is missing in type 'Number'. -tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(14,5): error TS2323: Type 'number' is not assignable to type '{ baz: string; }'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. Property 'baz' is missing in type 'Number'. -tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(15,5): error TS2323: Type 'number' is not assignable to type '{ 0: number; }'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. Property '0' is missing in type 'Number'. tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(21,5): error TS2323: Type 'number' is not assignable to type 'T'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(21,5): error TS2322: Type 'number' is not assignable to type 'T'. tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression. @@ -19,35 +19,35 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1 var a: boolean = x; ~ -!!! error TS2323: Type 'number' is not assignable to type 'boolean'. +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. var b: string = x; ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var c: void = x; ~ -!!! error TS2323: Type 'number' is not assignable to type 'void'. +!!! error TS2322: Type 'number' is not assignable to type 'void'. var d: typeof undefined = x; class C { foo: string; } var e: C = x; ~ -!!! error TS2323: Type 'number' is not assignable to type 'C'. -!!! error TS2323: Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'C'. +!!! error TS2322: Property 'foo' is missing in type 'Number'. interface I { bar: string; } var f: I = x; ~ -!!! error TS2323: Type 'number' is not assignable to type 'I'. -!!! error TS2323: Property 'bar' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'I'. +!!! error TS2322: Property 'bar' is missing in type 'Number'. var g: { baz: string } = 1; ~ -!!! error TS2323: Type 'number' is not assignable to type '{ baz: string; }'. -!!! error TS2323: Property 'baz' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. +!!! error TS2322: Property 'baz' is missing in type 'Number'. var g2: { 0: number } = 1; ~~ -!!! error TS2323: Type 'number' is not assignable to type '{ 0: number; }'. -!!! error TS2323: Property '0' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. +!!! error TS2322: Property '0' is missing in type 'Number'. module M { export var x = 1; } M = x; @@ -57,7 +57,7 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1 function i(a: T) { a = x; ~ -!!! error TS2323: Type 'number' is not assignable to type 'T'. +!!! error TS2322: Type 'number' is not assignable to type 'T'. } i = x; ~ diff --git a/tests/baselines/reference/invalidReturnStatements.errors.txt b/tests/baselines/reference/invalidReturnStatements.errors.txt index c32f266c0e7..780166e07c2 100644 --- a/tests/baselines/reference/invalidReturnStatements.errors.txt +++ b/tests/baselines/reference/invalidReturnStatements.errors.txt @@ -2,9 +2,9 @@ tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(2 tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(3,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(4,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(5,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. -tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(16,29): error TS2323: Type '{ id: number; }' is not assignable to type 'D'. +tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(16,29): error TS2322: Type '{ id: number; }' is not assignable to type 'D'. Property 'name' is missing in type '{ id: number; }'. -tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(18,29): error TS2323: Type 'C' is not assignable to type 'D'. +tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(18,29): error TS2322: Type 'C' is not assignable to type 'D'. Property 'name' is missing in type 'C'. @@ -34,12 +34,12 @@ tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(1 } function fn10(): D { return { id: 12 }; } ~~~~~~~~~~ -!!! error TS2323: Type '{ id: number; }' is not assignable to type 'D'. -!!! error TS2323: Property 'name' is missing in type '{ id: number; }'. +!!! error TS2322: Type '{ id: number; }' is not assignable to type 'D'. +!!! error TS2322: Property 'name' is missing in type '{ id: number; }'. function fn11(): D { return new C(); } ~~~~~~~ -!!! error TS2323: Type 'C' is not assignable to type 'D'. -!!! error TS2323: Property 'name' is missing in type 'C'. +!!! error TS2322: Type 'C' is not assignable to type 'D'. +!!! error TS2322: Property 'name' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidStringAssignments.errors.txt b/tests/baselines/reference/invalidStringAssignments.errors.txt index 7e73f9b634b..e67106bef92 100644 --- a/tests/baselines/reference/invalidStringAssignments.errors.txt +++ b/tests/baselines/reference/invalidStringAssignments.errors.txt @@ -1,18 +1,18 @@ -tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(3,5): error TS2323: Type 'string' is not assignable to type 'boolean'. -tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(4,5): error TS2323: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(5,5): error TS2323: Type 'string' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(9,5): error TS2323: Type 'string' is not assignable to type 'C'. +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(3,5): error TS2322: Type 'string' is not assignable to type 'boolean'. +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(4,5): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(5,5): error TS2322: Type 'string' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(9,5): error TS2322: Type 'string' is not assignable to type 'C'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(12,5): error TS2323: Type 'string' is not assignable to type 'I'. +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(12,5): error TS2322: Type 'string' is not assignable to type 'I'. Property 'bar' is missing in type 'String'. -tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(14,5): error TS2323: Type 'number' is not assignable to type '{ baz: string; }'. +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. Property 'baz' is missing in type 'Number'. -tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(15,5): error TS2323: Type 'number' is not assignable to type '{ 0: number; }'. +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. Property '0' is missing in type 'Number'. tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(21,5): error TS2323: Type 'string' is not assignable to type 'T'. +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(21,5): error TS2322: Type 'string' is not assignable to type 'T'. tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5): error TS2323: Type 'string' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5): error TS2322: Type 'string' is not assignable to type 'E'. ==== tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts (11 errors) ==== @@ -20,35 +20,35 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5 var a: boolean = x; ~ -!!! error TS2323: Type 'string' is not assignable to type 'boolean'. +!!! error TS2322: Type 'string' is not assignable to type 'boolean'. var b: number = x; ~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var c: void = x; ~ -!!! error TS2323: Type 'string' is not assignable to type 'void'. +!!! error TS2322: Type 'string' is not assignable to type 'void'. var d: typeof undefined = x; class C { foo: string; } var e: C = x; ~ -!!! error TS2323: Type 'string' is not assignable to type 'C'. -!!! error TS2323: Property 'foo' is missing in type 'String'. +!!! error TS2322: Type 'string' is not assignable to type 'C'. +!!! error TS2322: Property 'foo' is missing in type 'String'. interface I { bar: string; } var f: I = x; ~ -!!! error TS2323: Type 'string' is not assignable to type 'I'. -!!! error TS2323: Property 'bar' is missing in type 'String'. +!!! error TS2322: Type 'string' is not assignable to type 'I'. +!!! error TS2322: Property 'bar' is missing in type 'String'. var g: { baz: string } = 1; ~ -!!! error TS2323: Type 'number' is not assignable to type '{ baz: string; }'. -!!! error TS2323: Property 'baz' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. +!!! error TS2322: Property 'baz' is missing in type 'Number'. var g2: { 0: number } = 1; ~~ -!!! error TS2323: Type 'number' is not assignable to type '{ 0: number; }'. -!!! error TS2323: Property '0' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. +!!! error TS2322: Property '0' is missing in type 'Number'. module M { export var x = 1; } M = x; @@ -58,7 +58,7 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5 function i(a: T) { a = x; ~ -!!! error TS2323: Type 'string' is not assignable to type 'T'. +!!! error TS2322: Type 'string' is not assignable to type 'T'. } i = x; ~ @@ -67,4 +67,4 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5 enum E { A } var j: E = x; ~ -!!! error TS2323: Type 'string' is not assignable to type 'E'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'E'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidVoidAssignments.errors.txt b/tests/baselines/reference/invalidVoidAssignments.errors.txt index 5dc20a63f3a..64decc2f5e2 100644 --- a/tests/baselines/reference/invalidVoidAssignments.errors.txt +++ b/tests/baselines/reference/invalidVoidAssignments.errors.txt @@ -1,18 +1,18 @@ -tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(3,5): error TS2323: Type 'void' is not assignable to type 'boolean'. -tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(4,5): error TS2323: Type 'void' is not assignable to type 'string'. -tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(5,5): error TS2323: Type 'void' is not assignable to type 'number'. -tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(9,5): error TS2323: Type 'void' is not assignable to type 'C'. -tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(12,5): error TS2323: Type 'void' is not assignable to type 'I'. -tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(14,5): error TS2323: Type 'number' is not assignable to type '{ baz: string; }'. +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(3,5): error TS2322: Type 'void' is not assignable to type 'boolean'. +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(4,5): error TS2322: Type 'void' is not assignable to type 'string'. +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(5,5): error TS2322: Type 'void' is not assignable to type 'number'. +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(9,5): error TS2322: Type 'void' is not assignable to type 'C'. +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(12,5): error TS2322: Type 'void' is not assignable to type 'I'. +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. Property 'baz' is missing in type 'Number'. -tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(15,5): error TS2323: Type 'number' is not assignable to type '{ 0: number; }'. +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. Property '0' is missing in type 'Number'. tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(21,5): error TS2323: Type 'void' is not assignable to type 'T'. +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(21,5): error TS2322: Type 'void' is not assignable to type 'T'. tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(26,1): error TS2323: Type 'typeof E' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(27,1): error TS2323: Type 'E' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): error TS2323: Type '{ f: () => void; }' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(26,1): error TS2322: Type 'typeof E' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(27,1): error TS2322: Type 'E' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): error TS2322: Type '{ f: () => void; }' is not assignable to type 'void'. ==== tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts (13 errors) ==== @@ -20,33 +20,33 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e var a: boolean = x; ~ -!!! error TS2323: Type 'void' is not assignable to type 'boolean'. +!!! error TS2322: Type 'void' is not assignable to type 'boolean'. var b: string = x; ~ -!!! error TS2323: Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type 'void' is not assignable to type 'string'. var c: number = x; ~ -!!! error TS2323: Type 'void' is not assignable to type 'number'. +!!! error TS2322: Type 'void' is not assignable to type 'number'. var d: typeof undefined = x; class C { foo: string; } var e: C = x; ~ -!!! error TS2323: Type 'void' is not assignable to type 'C'. +!!! error TS2322: Type 'void' is not assignable to type 'C'. interface I { bar: string; } var f: I = x; ~ -!!! error TS2323: Type 'void' is not assignable to type 'I'. +!!! error TS2322: Type 'void' is not assignable to type 'I'. var g: { baz: string } = 1; ~ -!!! error TS2323: Type 'number' is not assignable to type '{ baz: string; }'. -!!! error TS2323: Property 'baz' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. +!!! error TS2322: Property 'baz' is missing in type 'Number'. var g2: { 0: number } = 1; ~~ -!!! error TS2323: Type 'number' is not assignable to type '{ 0: number; }'. -!!! error TS2323: Property '0' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. +!!! error TS2322: Property '0' is missing in type 'Number'. module M { export var x = 1; } M = x; @@ -56,7 +56,7 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e function i(a: T) { a = x; ~ -!!! error TS2323: Type 'void' is not assignable to type 'T'. +!!! error TS2322: Type 'void' is not assignable to type 'T'. } i = x; ~ @@ -65,11 +65,11 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e enum E { A } x = E; ~ -!!! error TS2323: Type 'typeof E' is not assignable to type 'void'. +!!! error TS2322: Type 'typeof E' is not assignable to type 'void'. x = E.A; ~ -!!! error TS2323: Type 'E' is not assignable to type 'void'. +!!! error TS2322: Type 'E' is not assignable to type 'void'. x = { f() { } } ~ -!!! error TS2323: Type '{ f: () => void; }' is not assignable to type 'void'. \ No newline at end of file +!!! error TS2322: Type '{ f: () => void; }' is not assignable to type 'void'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidVoidValues.errors.txt b/tests/baselines/reference/invalidVoidValues.errors.txt index db20d7d7fcc..b8a4400e4e0 100644 --- a/tests/baselines/reference/invalidVoidValues.errors.txt +++ b/tests/baselines/reference/invalidVoidValues.errors.txt @@ -1,62 +1,62 @@ -tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(2,1): error TS2323: Type 'number' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(3,1): error TS2323: Type 'string' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(4,1): error TS2323: Type 'boolean' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(7,1): error TS2323: Type 'typeof E' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(8,1): error TS2323: Type 'E' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(12,1): error TS2323: Type 'C' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(16,1): error TS2323: Type 'I' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(18,1): error TS2323: Type '{ f: () => void; }' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(21,1): error TS2323: Type 'typeof M' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(24,5): error TS2323: Type 'T' is not assignable to type 'void'. -tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(26,1): error TS2323: Type '(a: T) => void' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(2,1): error TS2322: Type 'number' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(3,1): error TS2322: Type 'string' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(4,1): error TS2322: Type 'boolean' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(7,1): error TS2322: Type 'typeof E' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(8,1): error TS2322: Type 'E' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(12,1): error TS2322: Type 'C' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(16,1): error TS2322: Type 'I' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(18,1): error TS2322: Type '{ f: () => void; }' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(21,1): error TS2322: Type 'typeof M' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(24,5): error TS2322: Type 'T' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(26,1): error TS2322: Type '(a: T) => void' is not assignable to type 'void'. ==== tests/cases/conformance/types/primitives/void/invalidVoidValues.ts (11 errors) ==== var x: void; x = 1; ~ -!!! error TS2323: Type 'number' is not assignable to type 'void'. +!!! error TS2322: Type 'number' is not assignable to type 'void'. x = ''; ~ -!!! error TS2323: Type 'string' is not assignable to type 'void'. +!!! error TS2322: Type 'string' is not assignable to type 'void'. x = true; ~ -!!! error TS2323: Type 'boolean' is not assignable to type 'void'. +!!! error TS2322: Type 'boolean' is not assignable to type 'void'. enum E { A } x = E; ~ -!!! error TS2323: Type 'typeof E' is not assignable to type 'void'. +!!! error TS2322: Type 'typeof E' is not assignable to type 'void'. x = E.A; ~ -!!! error TS2323: Type 'E' is not assignable to type 'void'. +!!! error TS2322: Type 'E' is not assignable to type 'void'. class C { foo: string } var a: C; x = a; ~ -!!! error TS2323: Type 'C' is not assignable to type 'void'. +!!! error TS2322: Type 'C' is not assignable to type 'void'. interface I { foo: string } var b: I; x = b; ~ -!!! error TS2323: Type 'I' is not assignable to type 'void'. +!!! error TS2322: Type 'I' is not assignable to type 'void'. x = { f() {} } ~ -!!! error TS2323: Type '{ f: () => void; }' is not assignable to type 'void'. +!!! error TS2322: Type '{ f: () => void; }' is not assignable to type 'void'. module M { export var x = 1; } x = M; ~ -!!! error TS2323: Type 'typeof M' is not assignable to type 'void'. +!!! error TS2322: Type 'typeof M' is not assignable to type 'void'. function f(a: T) { x = a; ~ -!!! error TS2323: Type 'T' is not assignable to type 'void'. +!!! error TS2322: Type 'T' is not assignable to type 'void'. } x = f; ~ -!!! error TS2323: Type '(a: T) => void' is not assignable to type 'void'. \ No newline at end of file +!!! error TS2322: Type '(a: T) => void' is not assignable to type 'void'. \ No newline at end of file diff --git a/tests/baselines/reference/matchReturnTypeInAllBranches.errors.txt b/tests/baselines/reference/matchReturnTypeInAllBranches.errors.txt index b273526b4f1..744ebed7d08 100644 --- a/tests/baselines/reference/matchReturnTypeInAllBranches.errors.txt +++ b/tests/baselines/reference/matchReturnTypeInAllBranches.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/matchReturnTypeInAllBranches.ts(30,20): error TS2323: Type 'number' is not assignable to type 'boolean'. +tests/cases/compiler/matchReturnTypeInAllBranches.ts(30,20): error TS2322: Type 'number' is not assignable to type 'boolean'. ==== tests/cases/compiler/matchReturnTypeInAllBranches.ts (1 errors) ==== @@ -33,7 +33,7 @@ tests/cases/compiler/matchReturnTypeInAllBranches.ts(30,20): error TS2323: Type { return 12345; ~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'boolean'. +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. } } } diff --git a/tests/baselines/reference/memberOverride.errors.txt b/tests/baselines/reference/memberOverride.errors.txt index c63803f5aa1..0fd0fb57e67 100644 --- a/tests/baselines/reference/memberOverride.errors.txt +++ b/tests/baselines/reference/memberOverride.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/memberOverride.ts(4,5): error TS2300: Duplicate identifier 'a'. tests/cases/compiler/memberOverride.ts(5,5): error TS2300: Duplicate identifier 'a'. -tests/cases/compiler/memberOverride.ts(8,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/memberOverride.ts(8,5): error TS2322: Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/memberOverride.ts (3 errors) ==== @@ -17,4 +17,4 @@ tests/cases/compiler/memberOverride.ts(8,5): error TS2323: Type 'string' is not var n: number = x.a; ~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/multiLineErrors.errors.txt b/tests/baselines/reference/multiLineErrors.errors.txt index f0f5070269b..23a6278b4fb 100644 --- a/tests/baselines/reference/multiLineErrors.errors.txt +++ b/tests/baselines/reference/multiLineErrors.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/multiLineErrors.ts(3,22): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. -tests/cases/compiler/multiLineErrors.ts(21,1): error TS2323: Type 'A2' is not assignable to type 'A1'. +tests/cases/compiler/multiLineErrors.ts(21,1): error TS2322: Type 'A2' is not assignable to type 'A1'. Types of property 'x' are incompatible. Type '{ y: string; }' is not assignable to type '{ y: number; }'. Types of property 'y' are incompatible. @@ -34,9 +34,9 @@ tests/cases/compiler/multiLineErrors.ts(21,1): error TS2323: Type 'A2' is not as var t2: A2; t1 = t2; ~~ -!!! error TS2323: Type 'A2' is not assignable to type 'A1'. -!!! error TS2323: Types of property 'x' are incompatible. -!!! error TS2323: Type '{ y: string; }' is not assignable to type '{ y: number; }'. -!!! error TS2323: Types of property 'y' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'A2' is not assignable to type 'A1'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type '{ y: string; }' is not assignable to type '{ y: number; }'. +!!! error TS2322: Types of property 'y' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/numberToString.errors.txt b/tests/baselines/reference/numberToString.errors.txt index d703632d18b..07cc9009a67 100644 --- a/tests/baselines/reference/numberToString.errors.txt +++ b/tests/baselines/reference/numberToString.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/numberToString.ts(2,12): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/numberToString.ts(2,12): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/compiler/numberToString.ts(9,4): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. @@ -6,7 +6,7 @@ tests/cases/compiler/numberToString.ts(9,4): error TS2345: Argument of type 'num function f1(n:number):string { return n; // error return type mismatch ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. } function f2(s:string):void { diff --git a/tests/baselines/reference/numericIndexExpressions.errors.txt b/tests/baselines/reference/numericIndexExpressions.errors.txt index 5832cca76c6..2c3b8d76796 100644 --- a/tests/baselines/reference/numericIndexExpressions.errors.txt +++ b/tests/baselines/reference/numericIndexExpressions.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/numericIndexExpressions.ts(10,1): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/numericIndexExpressions.ts(11,1): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/numericIndexExpressions.ts(14,1): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/numericIndexExpressions.ts(15,1): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/numericIndexExpressions.ts(10,1): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/numericIndexExpressions.ts(11,1): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/numericIndexExpressions.ts(14,1): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/numericIndexExpressions.ts(15,1): error TS2322: Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/numericIndexExpressions.ts (4 errors) ==== @@ -16,15 +16,15 @@ tests/cases/compiler/numericIndexExpressions.ts(15,1): error TS2323: Type 'numbe var x: Numbers1; x[1] = 4; // error ~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. x['1'] = 4; // error ~~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var y: Strings1; y['1'] = 4; // should be error ~~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. y[1] = 4; // should be error ~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt index 6e3a7cf50c8..19f2c700ccf 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt @@ -7,7 +7,7 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(21,5): error TS2412: Property '3.0' of type 'MyNumber' is not assignable to numeric index type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(50,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(68,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2323: Type '{ [x: number]: string | number; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: any; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ [x: number]: string | number; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: any; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }'. Index signatures are incompatible. Type 'string | number' is not assignable to type 'string'. Type 'number' is not assignable to type 'string'. @@ -108,10 +108,10 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo // error var b: { [x: number]: string; } = { ~ -!!! error TS2323: Type '{ [x: number]: string | number; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: any; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }'. -!!! error TS2323: Index signatures are incompatible. -!!! error TS2323: Type 'string | number' is not assignable to type 'string'. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ [x: number]: string | number; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: any; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'string | number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. a: '', b: 1, c: () => { }, diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt index adda2ec61d5..7f73ac6da0a 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(16,5): error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(25,5): error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(34,5): error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(39,5): error TS2323: Type '{ [x: number]: number | A; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(39,5): error TS2322: Type '{ [x: number]: number | A; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }'. Index signatures are incompatible. Type 'number | A' is not assignable to type 'A'. Type 'number' is not assignable to type 'A'. @@ -54,10 +54,10 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo // error var b: { [x: number]: A } = { ~ -!!! error TS2323: Type '{ [x: number]: number | A; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }'. -!!! error TS2323: Index signatures are incompatible. -!!! error TS2323: Type 'number | A' is not assignable to type 'A'. -!!! error TS2323: Type 'number' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: number]: number | A; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'number | A' is not assignable to type 'A'. +!!! error TS2322: Type 'number' is not assignable to type 'A'. 1.0: new A(), 2.0: new B(), "2.5": new B(), diff --git a/tests/baselines/reference/numericIndexerConstraint1.errors.txt b/tests/baselines/reference/numericIndexerConstraint1.errors.txt index 15ab0d557b0..42cf293fe60 100644 --- a/tests/baselines/reference/numericIndexerConstraint1.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/numericIndexerConstraint1.ts(3,5): error TS2323: Type 'number' is not assignable to type 'Foo'. +tests/cases/compiler/numericIndexerConstraint1.ts(3,5): error TS2322: Type 'number' is not assignable to type 'Foo'. Property 'foo' is missing in type 'Number'. @@ -7,6 +7,6 @@ tests/cases/compiler/numericIndexerConstraint1.ts(3,5): error TS2323: Type 'numb var x: { [index: string]: number; }; var result: Foo = x["one"]; // error ~~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'Foo'. -!!! error TS2323: Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'Foo'. +!!! error TS2322: Property 'foo' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint2.errors.txt b/tests/baselines/reference/numericIndexerConstraint2.errors.txt index cb65a5bffcc..4260f60becf 100644 --- a/tests/baselines/reference/numericIndexerConstraint2.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/numericIndexerConstraint2.ts(4,1): error TS2323: Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }'. +tests/cases/compiler/numericIndexerConstraint2.ts(4,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }'. Index signature is missing in type '{ one: number; }'. @@ -8,5 +8,5 @@ tests/cases/compiler/numericIndexerConstraint2.ts(4,1): error TS2323: Type '{ on var a: { one: number; }; x = a; ~ -!!! error TS2323: Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }'. -!!! error TS2323: Index signature is missing in type '{ one: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }'. +!!! error TS2322: Index signature is missing in type '{ one: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint5.errors.txt b/tests/baselines/reference/numericIndexerConstraint5.errors.txt index 5bccc56ce0d..445fc771218 100644 --- a/tests/baselines/reference/numericIndexerConstraint5.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint5.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/numericIndexerConstraint5.ts(2,5): error TS2323: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }'. +tests/cases/compiler/numericIndexerConstraint5.ts(2,5): error TS2322: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }'. Index signature is missing in type '{ 0: Date; name: string; }'. @@ -6,5 +6,5 @@ tests/cases/compiler/numericIndexerConstraint5.ts(2,5): error TS2323: Type '{ 0: var x = { name: "x", 0: new Date() }; var z: { [name: number]: string } = x; ~ -!!! error TS2323: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }'. -!!! error TS2323: Index signature is missing in type '{ 0: Date; name: string; }'. \ No newline at end of file +!!! error TS2322: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }'. +!!! error TS2322: Index signature is missing in type '{ 0: Date; name: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerTyping1.errors.txt b/tests/baselines/reference/numericIndexerTyping1.errors.txt index 2c5217bf5c6..3717a79a0ad 100644 --- a/tests/baselines/reference/numericIndexerTyping1.errors.txt +++ b/tests/baselines/reference/numericIndexerTyping1.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/numericIndexerTyping1.ts(9,5): error TS2323: Type 'Date' is not assignable to type 'string'. -tests/cases/compiler/numericIndexerTyping1.ts(12,5): error TS2323: Type 'Date' is not assignable to type 'string'. +tests/cases/compiler/numericIndexerTyping1.ts(9,5): error TS2322: Type 'Date' is not assignable to type 'string'. +tests/cases/compiler/numericIndexerTyping1.ts(12,5): error TS2322: Type 'Date' is not assignable to type 'string'. ==== tests/cases/compiler/numericIndexerTyping1.ts (2 errors) ==== @@ -13,9 +13,9 @@ tests/cases/compiler/numericIndexerTyping1.ts(12,5): error TS2323: Type 'Date' i var i: I; var r: string = i[1]; // error: numeric indexer returns the type of the string indexer ~ -!!! error TS2323: Type 'Date' is not assignable to type 'string'. +!!! error TS2322: Type 'Date' is not assignable to type 'string'. var i2: I2; var r2: string = i2[1]; // error: numeric indexer returns the type of the string indexer ~~ -!!! error TS2323: Type 'Date' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'Date' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerTyping2.errors.txt b/tests/baselines/reference/numericIndexerTyping2.errors.txt index 2736c9d6789..5f2278c6ac1 100644 --- a/tests/baselines/reference/numericIndexerTyping2.errors.txt +++ b/tests/baselines/reference/numericIndexerTyping2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/numericIndexerTyping2.ts(9,5): error TS2323: Type 'Date' is not assignable to type 'string'. -tests/cases/compiler/numericIndexerTyping2.ts(12,5): error TS2323: Type 'Date' is not assignable to type 'string'. +tests/cases/compiler/numericIndexerTyping2.ts(9,5): error TS2322: Type 'Date' is not assignable to type 'string'. +tests/cases/compiler/numericIndexerTyping2.ts(12,5): error TS2322: Type 'Date' is not assignable to type 'string'. ==== tests/cases/compiler/numericIndexerTyping2.ts (2 errors) ==== @@ -13,9 +13,9 @@ tests/cases/compiler/numericIndexerTyping2.ts(12,5): error TS2323: Type 'Date' i var i: I; var r: string = i[1]; // error: numeric indexer returns the type of the string indexer ~ -!!! error TS2323: Type 'Date' is not assignable to type 'string'. +!!! error TS2322: Type 'Date' is not assignable to type 'string'. var i2: I2; var r2: string = i2[1]; // error: numeric indexer returns the type of the string indexere ~~ -!!! error TS2323: Type 'Date' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'Date' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt index 9fa3e39919a..0b218d3227b 100644 --- a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt +++ b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2323: Type '{ b: number; }' is not assignable to type '{ a: number; }'. +tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'. Property 'a' is missing in type '{ b: number; }'. @@ -6,5 +6,5 @@ tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2323: Type // Shouldn't compile var x: { a: number; } = { b: 5 }; ~ -!!! error TS2323: Type '{ b: number; }' is not assignable to type '{ a: number; }'. -!!! error TS2323: Property 'a' is missing in type '{ b: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'. +!!! error TS2322: Property 'a' is missing in type '{ b: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralErrors.errors.txt b/tests/baselines/reference/objectLiteralErrors.errors.txt index 1fc92ac5a48..91b9aaeecdc 100644 --- a/tests/baselines/reference/objectLiteralErrors.errors.txt +++ b/tests/baselines/reference/objectLiteralErrors.errors.txt @@ -92,7 +92,7 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,13) tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,46): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,12): error TS2380: 'get' and 'set' accessor must have the same type. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,43): error TS2380: 'get' and 'set' accessor must have the same type. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(44,29): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(44,29): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,12): error TS2380: 'get' and 'set' accessor must have the same type. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,51): error TS2380: 'get' and 'set' accessor must have the same type. @@ -331,7 +331,7 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,51) !!! error TS2380: 'get' and 'set' accessor must have the same type. var g2 = { get a() { return 4; }, set a(n: string) { } }; ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var g3 = { get a(): number { return undefined; }, set a(n: string) { } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2380: 'get' and 'set' accessor must have the same type. diff --git a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt index 534a5a46208..ef084477f6d 100644 --- a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt +++ b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2323: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [x: string]: A; [x: number]: B; }'. +tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [x: string]: A; [x: number]: B; }'. Index signatures are incompatible. Type 'A' is not assignable to type 'B'. @@ -18,7 +18,7 @@ tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2323: Type '{ var o1: { [s: string]: A;[n: number]: B; } = { x: b, 0: a }; // both indexers are A ~~ -!!! error TS2323: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [x: string]: A; [x: number]: B; }'. -!!! error TS2323: Index signatures are incompatible. -!!! error TS2323: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [x: string]: A; [x: number]: B; }'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'A' is not assignable to type 'B'. o1 = { x: c, 0: a }; // string indexer is any, number indexer is A \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt b/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt index b3b1c6ec6f0..3f499b0a580 100644 --- a/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt +++ b/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/objectLiteralWithNumericPropertyName.ts(4,5): error TS2323: Type '{ 0: number; }' is not assignable to type 'A'. +tests/cases/compiler/objectLiteralWithNumericPropertyName.ts(4,5): error TS2322: Type '{ 0: number; }' is not assignable to type 'A'. Types of property '0' are incompatible. Type 'number' is not assignable to type 'string'. @@ -9,9 +9,9 @@ tests/cases/compiler/objectLiteralWithNumericPropertyName.ts(4,5): error TS2323: } var x: A = { ~ -!!! error TS2323: Type '{ 0: number; }' is not assignable to type 'A'. -!!! error TS2323: Types of property '0' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ 0: number; }' is not assignable to type 'A'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. 0: 3 }; \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt index 3568899773e..c4ee3ea17b2 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(7,1): error TS2323: Type 'I' is not assignable to type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(7,1): error TS2322: Type 'I' is not assignable to type 'Object'. Types of property 'toString' are incompatible. Type '() => void' is not assignable to type '() => string'. Type 'void' is not assignable to type 'string'. -tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(14,1): error TS2323: Type 'C' is not assignable to type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(14,1): error TS2322: Type 'C' is not assignable to type 'Object'. Types of property 'toString' are incompatible. Type '() => void' is not assignable to type '() => string'. Type 'void' is not assignable to type 'string'. -tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(20,1): error TS2323: Type '{ toString: () => void; }' is not assignable to type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(20,1): error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object'. Types of property 'toString' are incompatible. Type '() => void' is not assignable to type '() => string'. Type 'void' is not assignable to type 'string'. @@ -21,10 +21,10 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC var o: Object; o = i; // error ~ -!!! error TS2323: Type 'I' is not assignable to type 'Object'. -!!! error TS2323: Types of property 'toString' are incompatible. -!!! error TS2323: Type '() => void' is not assignable to type '() => string'. -!!! error TS2323: Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type 'I' is not assignable to type 'Object'. +!!! error TS2322: Types of property 'toString' are incompatible. +!!! error TS2322: Type '() => void' is not assignable to type '() => string'. +!!! error TS2322: Type 'void' is not assignable to type 'string'. i = o; // ok class C { @@ -33,10 +33,10 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC var c: C; o = c; // error ~ -!!! error TS2323: Type 'C' is not assignable to type 'Object'. -!!! error TS2323: Types of property 'toString' are incompatible. -!!! error TS2323: Type '() => void' is not assignable to type '() => string'. -!!! error TS2323: Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type 'C' is not assignable to type 'Object'. +!!! error TS2322: Types of property 'toString' are incompatible. +!!! error TS2322: Type '() => void' is not assignable to type '() => string'. +!!! error TS2322: Type 'void' is not assignable to type 'string'. c = o; // ok var a = { @@ -44,8 +44,8 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC } o = a; // error ~ -!!! error TS2323: Type '{ toString: () => void; }' is not assignable to type 'Object'. -!!! error TS2323: Types of property 'toString' are incompatible. -!!! error TS2323: Type '() => void' is not assignable to type '() => string'. -!!! error TS2323: Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object'. +!!! error TS2322: Types of property 'toString' are incompatible. +!!! error TS2322: Type '() => void' is not assignable to type '() => string'. +!!! error TS2322: Type 'void' is not assignable to type 'string'. a = o; // ok \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt index 3eed6774826..a88796b390e 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(7,1): error TS2323: Type 'I' is not assignable to type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(7,1): error TS2322: Type 'I' is not assignable to type 'Object'. Types of property 'toString' are incompatible. Type '() => number' is not assignable to type '() => string'. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(8,1): error TS2323: Type 'Object' is not assignable to type 'I'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(8,1): error TS2322: Type 'Object' is not assignable to type 'I'. Types of property 'toString' are incompatible. Type '() => string' is not assignable to type '() => number'. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(14,1): error TS2323: Type 'C' is not assignable to type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(14,1): error TS2322: Type 'C' is not assignable to type 'Object'. Types of property 'toString' are incompatible. Type '() => number' is not assignable to type '() => string'. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(15,1): error TS2323: Type 'Object' is not assignable to type 'C'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(15,1): error TS2322: Type 'Object' is not assignable to type 'C'. Types of property 'toString' are incompatible. Type '() => string' is not assignable to type '() => number'. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(20,1): error TS2323: Type '{ toString: () => void; }' is not assignable to type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(20,1): error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object'. Types of property 'toString' are incompatible. Type '() => void' is not assignable to type '() => string'. Type 'void' is not assignable to type 'string'. @@ -29,16 +29,16 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC var o: Object; o = i; // error ~ -!!! error TS2323: Type 'I' 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 TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'I' is not assignable to type 'Object'. +!!! error TS2322: Types of property 'toString' are incompatible. +!!! error TS2322: Type '() => number' is not assignable to type '() => string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. i = o; // error ~ -!!! error TS2323: Type 'Object' is not assignable to type 'I'. -!!! error TS2323: Types of property 'toString' are incompatible. -!!! error TS2323: Type '() => string' is not assignable to type '() => number'. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'Object' is not assignable to type 'I'. +!!! error TS2322: Types of property 'toString' are incompatible. +!!! error TS2322: Type '() => string' is not assignable to type '() => number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. class C { toString(): number { return 1; } @@ -46,24 +46,24 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC var c: C; o = c; // error ~ -!!! error TS2323: Type 'C' 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 TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'C' is not assignable to type 'Object'. +!!! error TS2322: Types of property 'toString' are incompatible. +!!! error TS2322: Type '() => number' is not assignable to type '() => string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. c = o; // error ~ -!!! error TS2323: Type 'Object' is not assignable to type 'C'. -!!! error TS2323: Types of property 'toString' are incompatible. -!!! error TS2323: Type '() => string' is not assignable to type '() => number'. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'Object' is not assignable to type 'C'. +!!! error TS2322: Types of property 'toString' are incompatible. +!!! error TS2322: Type '() => string' is not assignable to type '() => number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var a = { toString: () => { } } o = a; // error ~ -!!! error TS2323: Type '{ toString: () => void; }' is not assignable to type 'Object'. -!!! error TS2323: Types of property 'toString' are incompatible. -!!! error TS2323: Type '() => void' is not assignable to type '() => string'. -!!! error TS2323: Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object'. +!!! error TS2322: Types of property 'toString' are incompatible. +!!! error TS2322: Type '() => void' is not assignable to type '() => string'. +!!! error TS2322: Type 'void' is not assignable to type 'string'. a = o; // ok \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt index 982fcf05b3b..30b40f431a7 100644 --- a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts(8,1): error TS2323: Type 'Object' is not assignable to type 'I'. -tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts(14,1): error TS2323: Type 'Object' is not assignable to type '() => void'. +tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts(8,1): error TS2322: Type 'Object' is not assignable to type 'I'. +tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts(14,1): error TS2322: Type 'Object' is not assignable to type '() => void'. ==== tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts (2 errors) ==== @@ -12,7 +12,7 @@ tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOf f = i; i = f; ~ -!!! error TS2323: Type 'Object' is not assignable to type 'I'. +!!! error TS2322: Type 'Object' is not assignable to type 'I'. var a: { (): void @@ -20,4 +20,4 @@ tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOf f = a; a = f; ~ -!!! error TS2323: Type 'Object' is not assignable to type '() => void'. \ No newline at end of file +!!! error TS2322: Type 'Object' is not assignable to type '() => void'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt index 1544fb5bebe..0faba936715 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts(8,1): error TS2323: Type 'Object' is not assignable to type 'I'. -tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts(14,1): error TS2323: Type 'Object' is not assignable to type 'new () => any'. +tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts(8,1): error TS2322: Type 'Object' is not assignable to type 'I'. +tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts(14,1): error TS2322: Type 'Object' is not assignable to type 'new () => any'. ==== tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts (2 errors) ==== @@ -12,7 +12,7 @@ tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMemb f = i; i = f; ~ -!!! error TS2323: Type 'Object' is not assignable to type 'I'. +!!! error TS2322: Type 'Object' is not assignable to type 'I'. var a: { new(): any @@ -20,4 +20,4 @@ tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMemb f = a; a = f; ~ -!!! error TS2323: Type 'Object' is not assignable to type 'new () => any'. \ No newline at end of file +!!! error TS2322: Type 'Object' is not assignable to type 'new () => any'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt index 11698f0a51c..582d7719a89 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty.ts(13,1): error TS2323: Type 'List' is not assignable to type 'List'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty.ts(13,1): error TS2322: Type 'List' is not assignable to type 'List'. Type 'string' is not assignable to type 'number'. @@ -17,5 +17,5 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec list1 = list2; // ok list1 = list3; // error ~~~~~ -!!! error TS2323: Type 'List' is not assignable to type 'List'. -!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'List' is not assignable to type 'List'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt index 53a32b6aad5..6349a452821 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty2.ts(13,1): error TS2323: Type 'List' is not assignable to type 'List'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty2.ts(13,1): error TS2322: Type 'List' is not assignable to type 'List'. Type 'string' is not assignable to type 'number'. @@ -17,5 +17,5 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec list1 = list2; // ok list1 = list3; // error ~~~~~ -!!! error TS2323: Type 'List' is not assignable to type 'List'. -!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'List' is not assignable to type 'List'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt index 20951b6571e..91a92dbd54c 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(20,1): error TS2323: Type 'MyList' is not assignable to type 'List'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(20,1): error TS2322: Type 'MyList' is not assignable to type 'List'. Types of property 'data' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(22,1): error TS2323: Type 'MyList' is not assignable to type 'List'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(22,1): error TS2322: Type 'MyList' is not assignable to type 'List'. Types of property 'data' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(30,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(31,5): error TS2323: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(30,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(31,5): error TS2322: Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(41,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(42,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(43,5): error TS2323: Type 'T' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(48,5): error TS2323: Type 'T' is not assignable to type 'List'. -tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(50,5): error TS2323: Type 'T' is not assignable to type 'MyList'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(42,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(43,5): error TS2322: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(48,5): error TS2322: Type 'T' is not assignable to type 'List'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(50,5): error TS2322: Type 'T' is not assignable to type 'MyList'. ==== tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts (9 errors) ==== @@ -35,15 +35,15 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec list1 = myList1; // error, not nominally equal list1 = myList2; // error, type mismatch ~~~~~ -!!! error TS2323: Type 'MyList' is not assignable to type 'List'. -!!! error TS2323: Types of property 'data' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'MyList' is not assignable to type 'List'. +!!! error TS2322: Types of property 'data' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. list2 = myList1; // error, not nominally equal ~~~~~ -!!! error TS2323: Type 'MyList' is not assignable to type 'List'. -!!! error TS2323: Types of property 'data' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'MyList' is not assignable to type 'List'. +!!! error TS2322: Types of property 'data' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. list2 = myList2; // error, type mismatch var rList1 = new List>(); @@ -53,10 +53,10 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec function foo, U extends MyList>(t: T, u: U) { t = u; // error ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. u = t; // error ~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. var a: List; var b: MyList; @@ -71,20 +71,20 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. t = u; // error ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. u = t; // was error, ok after constraint made illegal, doesn't matter ~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. var a: List; var b: MyList; a = t; // error ~ -!!! error TS2323: Type 'T' is not assignable to type 'List'. +!!! error TS2322: Type 'T' is not assignable to type 'List'. a = u; // error b = t; // ok ~ -!!! error TS2323: Type 'T' is not assignable to type 'MyList'. +!!! error TS2322: Type 'T' is not assignable to type 'MyList'. b = u; // ok } \ No newline at end of file diff --git a/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt b/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt index c1c687f345a..52fb45e40d2 100644 --- a/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt +++ b/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/optionalFunctionArgAssignability.ts(7,1): error TS2323: Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise'. +tests/cases/compiler/optionalFunctionArgAssignability.ts(7,1): error TS2322: Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise'. Types of parameters 'onFulFill' and 'onFulfill' are incompatible. Type '(value: number) => any' is not assignable to type '(value: string) => any'. Types of parameters 'value' and 'value' are incompatible. @@ -14,9 +14,9 @@ tests/cases/compiler/optionalFunctionArgAssignability.ts(7,1): error TS2323: Typ var b = function then(onFulFill?: (value: number) => U, onReject?: (reason: any) => U): Promise { return null }; a = b; // error because number is not assignable to string ~ -!!! error TS2323: Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise'. -!!! error TS2323: Types of parameters 'onFulFill' and 'onFulfill' are incompatible. -!!! error TS2323: Type '(value: number) => any' is not assignable to type '(value: string) => any'. -!!! error TS2323: Types of parameters 'value' and 'value' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise'. +!!! error TS2322: Types of parameters 'onFulFill' and 'onFulfill' are incompatible. +!!! error TS2322: Type '(value: number) => any' is not assignable to type '(value: string) => any'. +!!! error TS2322: Types of parameters 'value' and 'value' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt b/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt index a3c76815e30..de02509d124 100644 --- a/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt +++ b/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/optionalParamAssignmentCompat.ts(10,5): error TS2323: Type '(p1?: string) => I1' is not assignable to type 'I1'. +tests/cases/compiler/optionalParamAssignmentCompat.ts(10,5): error TS2322: Type '(p1?: string) => I1' is not assignable to type 'I1'. Types of parameters 'p1' and 'p1' are incompatible. Type 'string' is not assignable to type 'number'. @@ -15,7 +15,7 @@ tests/cases/compiler/optionalParamAssignmentCompat.ts(10,5): error TS2323: Type var c: I1 = i2.p1; // should be ok var d: I1 = i2.m1; // should error ~ -!!! error TS2323: Type '(p1?: string) => I1' is not assignable to type 'I1'. -!!! error TS2323: Types of parameters 'p1' and 'p1' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(p1?: string) => I1' is not assignable to type 'I1'. +!!! error TS2322: Types of parameters 'p1' and 'p1' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamTypeComparison.errors.txt b/tests/baselines/reference/optionalParamTypeComparison.errors.txt index c3fe7cc5d5d..98a07570c65 100644 --- a/tests/baselines/reference/optionalParamTypeComparison.errors.txt +++ b/tests/baselines/reference/optionalParamTypeComparison.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/optionalParamTypeComparison.ts(4,1): error TS2323: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void'. +tests/cases/compiler/optionalParamTypeComparison.ts(4,1): error TS2322: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void'. Types of parameters 'b' and 'n' are incompatible. Type 'boolean' is not assignable to type 'number'. -tests/cases/compiler/optionalParamTypeComparison.ts(5,1): error TS2323: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void'. +tests/cases/compiler/optionalParamTypeComparison.ts(5,1): error TS2322: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void'. Types of parameters 'n' and 'b' are incompatible. Type 'number' is not assignable to type 'boolean'. @@ -12,11 +12,11 @@ tests/cases/compiler/optionalParamTypeComparison.ts(5,1): error TS2323: Type '(s f = g; ~ -!!! error TS2323: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void'. -!!! error TS2323: Types of parameters 'b' and 'n' are incompatible. -!!! error TS2323: Type 'boolean' is not assignable to type 'number'. +!!! error TS2322: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void'. +!!! error TS2322: Types of parameters 'b' and 'n' are incompatible. +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. g = f; ~ -!!! error TS2323: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void'. -!!! error TS2323: Types of parameters 'n' and 'b' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void'. +!!! error TS2322: Types of parameters 'n' and 'b' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalPropertiesTest.errors.txt b/tests/baselines/reference/optionalPropertiesTest.errors.txt index 1059d05abea..a4b721e92ef 100644 --- a/tests/baselines/reference/optionalPropertiesTest.errors.txt +++ b/tests/baselines/reference/optionalPropertiesTest.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/optionalPropertiesTest.ts(14,1): error TS2323: Type '{ name: string; }' is not assignable to type 'IFoo'. +tests/cases/compiler/optionalPropertiesTest.ts(14,1): error TS2322: Type '{ name: string; }' is not assignable to type 'IFoo'. Property 'id' is missing in type '{ name: string; }'. -tests/cases/compiler/optionalPropertiesTest.ts(25,5): error TS2323: Type '{}' is not assignable to type 'i1'. +tests/cases/compiler/optionalPropertiesTest.ts(25,5): error TS2322: Type '{}' is not assignable to type 'i1'. Property 'M' is missing in type '{}'. -tests/cases/compiler/optionalPropertiesTest.ts(26,5): error TS2323: Type '{}' is not assignable to type 'i3'. +tests/cases/compiler/optionalPropertiesTest.ts(26,5): error TS2322: Type '{}' is not assignable to type 'i3'. Property 'M' is missing in type '{}'. -tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2323: Type 'i2' is not assignable to type 'i1'. +tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2322: Type 'i2' is not assignable to type 'i1'. Property 'M' is optional in type 'i2' but required in type 'i1'. @@ -24,8 +24,8 @@ tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2323: Type 'i2' is foo = { id: 1234, name: "test" }; // Ok foo = { name: "test" }; // Error, id missing ~~~ -!!! error TS2323: Type '{ name: string; }' is not assignable to type 'IFoo'. -!!! error TS2323: Property 'id' is missing in type '{ name: string; }'. +!!! error TS2322: Type '{ name: string; }' is not assignable to type 'IFoo'. +!!! error TS2322: Property 'id' is missing in type '{ name: string; }'. foo = {id: 1234, print:()=>{}} // Ok var s = foo.name || "default"; @@ -38,12 +38,12 @@ tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2323: Type 'i2' is var test1: i1 = {}; ~~~~~ -!!! error TS2323: Type '{}' is not assignable to type 'i1'. -!!! error TS2323: Property 'M' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'i1'. +!!! error TS2322: Property 'M' is missing in type '{}'. var test2: i3 = {}; ~~~~~ -!!! error TS2323: Type '{}' is not assignable to type 'i3'. -!!! error TS2323: Property 'M' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'i3'. +!!! error TS2322: Property 'M' is missing in type '{}'. var test3: i2 = {}; var test4: i4 = {}; var test5: i1 = { M: function () { } }; @@ -59,5 +59,5 @@ tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2323: Type 'i2' is var test10_2: i2; test10_1 = test10_2; ~~~~~~~~ -!!! error TS2323: Type 'i2' is not assignable to type 'i1'. -!!! error TS2323: Property 'M' is optional in type 'i2' but required in type 'i1'. \ No newline at end of file +!!! error TS2322: Type 'i2' is not assignable to type 'i1'. +!!! error TS2322: Property 'M' is optional in type 'i2' but required in type 'i1'. \ No newline at end of file diff --git a/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt b/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt index 241bbb5729d..c18a965a6dc 100644 --- a/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt +++ b/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/overEagerReturnTypeSpecialization.ts(8,5): error TS2323: Type 'I1' is not assignable to type 'I1'. +tests/cases/compiler/overEagerReturnTypeSpecialization.ts(8,5): error TS2322: Type 'I1' is not assignable to type 'I1'. Type 'number' is not assignable to type 'string'. @@ -12,8 +12,8 @@ tests/cases/compiler/overEagerReturnTypeSpecialization.ts(8,5): error TS2323: Ty declare var v1: I1; var r1: I1 = v1.func(num => num.toString()) // Correctly returns an I1 ~~ -!!! error TS2323: Type 'I1' is not assignable to type 'I1'. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'I1' is not assignable to type 'I1'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. .func(str => str.length); // should error var r2: I1 = v1.func(num => num.toString()) // Correctly returns an I1 diff --git a/tests/baselines/reference/overload1.errors.txt b/tests/baselines/reference/overload1.errors.txt index c4d3d999880..a1d8c5a6232 100644 --- a/tests/baselines/reference/overload1.errors.txt +++ b/tests/baselines/reference/overload1.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/overload1.ts(27,5): error TS2323: Type 'C' is not assignable to type 'string'. -tests/cases/compiler/overload1.ts(29,1): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/overload1.ts(27,5): error TS2322: Type 'C' is not assignable to type 'string'. +tests/cases/compiler/overload1.ts(29,1): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/compiler/overload1.ts(31,3): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/overload1.ts(32,3): error TS2346: Supplied parameters do not match any signature of call target. -tests/cases/compiler/overload1.ts(33,1): error TS2323: Type 'C' is not assignable to type 'string'. +tests/cases/compiler/overload1.ts(33,1): error TS2322: Type 'C' is not assignable to type 'string'. tests/cases/compiler/overload1.ts(34,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. @@ -35,11 +35,11 @@ tests/cases/compiler/overload1.ts(34,9): error TS2345: Argument of type 'number' var e:string=x.g(new O.A()); // matches overload but bad assignment ~ -!!! error TS2323: Type 'C' is not assignable to type 'string'. +!!! error TS2322: Type 'C' is not assignable to type 'string'. var y:string=x.f(3); // good y=x.f("nope"); // can't assign number to string ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var z:string=x.g(x.g(3,3)); // good z=x.g(2,2,2); // no match ~~~~~~~~~~ @@ -49,7 +49,7 @@ tests/cases/compiler/overload1.ts(34,9): error TS2345: Argument of type 'number' !!! error TS2346: Supplied parameters do not match any signature of call target. z=x.g(new O.B()); // ambiguous (up and down conversion) ~ -!!! error TS2323: Type 'C' is not assignable to type 'string'. +!!! error TS2322: Type 'C' is not assignable to type 'string'. z=x.h(2,2); // no match ~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. diff --git a/tests/baselines/reference/overloadingOnConstants1.errors.txt b/tests/baselines/reference/overloadingOnConstants1.errors.txt index e52a2a10e5b..f134a146500 100644 --- a/tests/baselines/reference/overloadingOnConstants1.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/overloadingOnConstants1.ts(22,5): error TS2323: Type 'Base' is not assignable to type 'Derived1'. +tests/cases/compiler/overloadingOnConstants1.ts(22,5): error TS2322: Type 'Base' is not assignable to type 'Derived1'. Property 'bar' is missing in type 'Base'. -tests/cases/compiler/overloadingOnConstants1.ts(23,5): error TS2323: Type 'Derived1' is not assignable to type 'Derived3'. +tests/cases/compiler/overloadingOnConstants1.ts(23,5): error TS2322: Type 'Derived1' is not assignable to type 'Derived3'. Property 'biz' is missing in type 'Derived1'. -tests/cases/compiler/overloadingOnConstants1.ts(24,5): error TS2323: Type 'Derived2' is not assignable to type 'Derived1'. +tests/cases/compiler/overloadingOnConstants1.ts(24,5): error TS2322: Type 'Derived2' is not assignable to type 'Derived1'. Property 'bar' is missing in type 'Derived2'. -tests/cases/compiler/overloadingOnConstants1.ts(25,5): error TS2323: Type 'Derived3' is not assignable to type 'Derived1'. +tests/cases/compiler/overloadingOnConstants1.ts(25,5): error TS2322: Type 'Derived3' is not assignable to type 'Derived1'. Property 'bar' is missing in type 'Derived3'. @@ -32,17 +32,17 @@ tests/cases/compiler/overloadingOnConstants1.ts(25,5): error TS2323: Type 'Deriv // these are errors var htmlElement2: Derived1 = d2.createElement("yo") ~~~~~~~~~~~~ -!!! error TS2323: Type 'Base' is not assignable to type 'Derived1'. -!!! error TS2323: Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'Derived1'. +!!! error TS2322: Property 'bar' is missing in type 'Base'. var htmlCanvasElement2: Derived3 = d2.createElement("canvas"); ~~~~~~~~~~~~~~~~~~ -!!! error TS2323: Type 'Derived1' is not assignable to type 'Derived3'. -!!! error TS2323: Property 'biz' is missing in type 'Derived1'. +!!! error TS2322: Type 'Derived1' is not assignable to type 'Derived3'. +!!! error TS2322: Property 'biz' is missing in type 'Derived1'. var htmlDivElement2: Derived1 = d2.createElement("div"); ~~~~~~~~~~~~~~~ -!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived1'. -!!! error TS2323: Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived1'. +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. var htmlSpanElement2: Derived1 = d2.createElement("span"); ~~~~~~~~~~~~~~~~ -!!! error TS2323: Type 'Derived3' is not assignable to type 'Derived1'. -!!! error TS2323: Property 'bar' is missing in type 'Derived3'. \ No newline at end of file +!!! error TS2322: Type 'Derived3' is not assignable to type 'Derived1'. +!!! error TS2322: Property 'bar' is missing in type 'Derived3'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt index 80472228380..4a119c5ca22 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(14,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(14,5): error TS2322: Type 'string' is not assignable to type 'number'. tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(14,37): error TS2345: Argument of type 'D' is not assignable to parameter of type 'A'. -tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,5): error TS2322: Type 'string' is not assignable to type 'number'. tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,38): error TS2344: Type 'D' does not satisfy the constraint 'A'. tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(18,27): error TS2345: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,12): error TS2344: Type 'D' does not satisfy the constraint 'A'. @@ -22,13 +22,13 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,12): var result: number = foo(x => new G(x)); // x has type D, new G(x) fails, so first overload is picked. ~~~~~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. ~ !!! error TS2345: Argument of type 'D' is not assignable to parameter of type 'A'. var result2: number = foo(x => new G(x)); // x has type D, new G(x) fails, so first overload is picked. ~~~~~~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. ~~~~~~~~ !!! error TS2344: Type 'D' does not satisfy the constraint 'A'. diff --git a/tests/baselines/reference/parseTypes.errors.txt b/tests/baselines/reference/parseTypes.errors.txt index ccaf7be59bf..baa5aaff738 100644 --- a/tests/baselines/reference/parseTypes.errors.txt +++ b/tests/baselines/reference/parseTypes.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/parseTypes.ts(9,1): error TS2323: Type '(s: string) => void' is not assignable to type '() => number'. -tests/cases/compiler/parseTypes.ts(10,1): error TS2323: Type '(s: string) => void' is not assignable to type '() => number'. -tests/cases/compiler/parseTypes.ts(11,1): error TS2323: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. +tests/cases/compiler/parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. +tests/cases/compiler/parseTypes.ts(10,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. +tests/cases/compiler/parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. Index signature is missing in type '(s: string) => void'. -tests/cases/compiler/parseTypes.ts(12,1): error TS2323: Type '(s: string) => void' is not assignable to type 'new () => number'. +tests/cases/compiler/parseTypes.ts(12,1): error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'. ==== tests/cases/compiler/parseTypes.ts (4 errors) ==== @@ -16,15 +16,15 @@ tests/cases/compiler/parseTypes.ts(12,1): error TS2323: Type '(s: string) => voi y=f; y=g; ~ -!!! error TS2323: Type '(s: string) => void' is not assignable to type '() => number'. +!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. x=g; ~ -!!! error TS2323: Type '(s: string) => void' is not assignable to type '() => number'. +!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. w=g; ~ -!!! error TS2323: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. -!!! error TS2323: Index signature is missing in type '(s: string) => void'. +!!! error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. +!!! error TS2322: Index signature is missing in type '(s: string) => void'. z=g; ~ -!!! error TS2323: Type '(s: string) => void' is not assignable to type 'new () => number'. +!!! error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'. \ No newline at end of file diff --git a/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt b/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt index 4e67a4e8641..ee17b6f82aa 100644 --- a/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt +++ b/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAutomaticSemicolonInsertion1.ts(8,1): error TS2323: Type 'Object' is not assignable to type 'I'. -tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAutomaticSemicolonInsertion1.ts(14,1): error TS2323: Type 'Object' is not assignable to type '() => void'. +tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAutomaticSemicolonInsertion1.ts(8,1): error TS2322: Type 'Object' is not assignable to type 'I'. +tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAutomaticSemicolonInsertion1.ts(14,1): error TS2322: Type 'Object' is not assignable to type '() => void'. ==== tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAutomaticSemicolonInsertion1.ts (2 errors) ==== @@ -12,7 +12,7 @@ tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAut o = i; i = o; ~ -!!! error TS2323: Type 'Object' is not assignable to type 'I'. +!!! error TS2322: Type 'Object' is not assignable to type 'I'. var a: { (): void @@ -20,5 +20,5 @@ tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAut o = a; a = o; ~ -!!! error TS2323: Type 'Object' is not assignable to type '() => void'. +!!! error TS2322: Type 'Object' is not assignable to type '() => void'. \ No newline at end of file diff --git a/tests/baselines/reference/parserObjectCreation1.errors.txt b/tests/baselines/reference/parserObjectCreation1.errors.txt index 876f49c5bed..0787d17c605 100644 --- a/tests/baselines/reference/parserObjectCreation1.errors.txt +++ b/tests/baselines/reference/parserObjectCreation1.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/parser/ecmascript5/Generics/parserObjectCreation1.ts(1,5): error TS2323: Type 'number[][]' is not assignable to type 'number[]'. +tests/cases/conformance/parser/ecmascript5/Generics/parserObjectCreation1.ts(1,5): error TS2322: Type 'number[][]' is not assignable to type 'number[]'. Type 'number[]' is not assignable to type 'number'. ==== tests/cases/conformance/parser/ecmascript5/Generics/parserObjectCreation1.ts (1 errors) ==== var autoToken: number[] = new Array(1); ~~~~~~~~~ -!!! error TS2323: Type 'number[][]' is not assignable to type 'number[]'. -!!! error TS2323: Type 'number[]' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'number[][]' is not assignable to type 'number[]'. +!!! error TS2322: Type 'number[]' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/primitiveMembers.errors.txt b/tests/baselines/reference/primitiveMembers.errors.txt index d0ed1da7cce..7a1ed5c8e53 100644 --- a/tests/baselines/reference/primitiveMembers.errors.txt +++ b/tests/baselines/reference/primitiveMembers.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/primitiveMembers.ts(24,35): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. tests/cases/compiler/primitiveMembers.ts(25,56): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. tests/cases/compiler/primitiveMembers.ts(5,3): error TS2339: Property 'toBAZ' does not exist on type 'number'. -tests/cases/compiler/primitiveMembers.ts(11,1): error TS2323: Type 'Number' is not assignable to type 'number'. +tests/cases/compiler/primitiveMembers.ts(11,1): error TS2322: Type 'Number' is not assignable to type 'number'. ==== tests/cases/compiler/primitiveMembers.ts (4 errors) ==== @@ -19,7 +19,7 @@ tests/cases/compiler/primitiveMembers.ts(11,1): error TS2323: Type 'Number' is n n = N; // should not work, as 'number' has a different brand ~ -!!! error TS2323: Type 'Number' is not assignable to type 'number'. +!!! error TS2322: Type 'Number' is not assignable to type 'number'. N = n; // should work var o: Object = {} diff --git a/tests/baselines/reference/propertyAssignment.errors.txt b/tests/baselines/reference/propertyAssignment.errors.txt index 3f5aca52c87..20894f159e0 100644 --- a/tests/baselines/reference/propertyAssignment.errors.txt +++ b/tests/baselines/reference/propertyAssignment.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/propertyAssignment.ts(6,14): error TS1022: An index signature parameter must have a type annotation. -tests/cases/compiler/propertyAssignment.ts(14,1): error TS2323: Type '{ x: number; }' is not assignable to type 'new () => any'. -tests/cases/compiler/propertyAssignment.ts(16,1): error TS2323: Type '{ x: number; }' is not assignable to type '() => void'. +tests/cases/compiler/propertyAssignment.ts(14,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. +tests/cases/compiler/propertyAssignment.ts(16,1): error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. ==== tests/cases/compiler/propertyAssignment.ts (3 errors) ==== @@ -21,8 +21,8 @@ tests/cases/compiler/propertyAssignment.ts(16,1): error TS2323: Type '{ x: numbe foo1 = bar1; // should be an error ~~~~ -!!! error TS2323: Type '{ x: number; }' is not assignable to type 'new () => any'. +!!! error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. foo2 = bar2; foo3 = bar3; // should be an error ~~~~ -!!! error TS2323: Type '{ x: number; }' is not assignable to type '() => void'. \ No newline at end of file +!!! error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. \ No newline at end of file diff --git a/tests/baselines/reference/propertyParameterWithQuestionMark.errors.txt b/tests/baselines/reference/propertyParameterWithQuestionMark.errors.txt index 681d2c5ea9a..b3970c216eb 100644 --- a/tests/baselines/reference/propertyParameterWithQuestionMark.errors.txt +++ b/tests/baselines/reference/propertyParameterWithQuestionMark.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/propertyParameterWithQuestionMark.ts(6,5): error TS2323: Type '{}' is not assignable to type 'C'. +tests/cases/compiler/propertyParameterWithQuestionMark.ts(6,5): error TS2322: Type '{}' is not assignable to type 'C'. Property 'x' is missing in type '{}'. -tests/cases/compiler/propertyParameterWithQuestionMark.ts(8,1): error TS2323: Type '{ x?: any; }' is not assignable to type 'C'. +tests/cases/compiler/propertyParameterWithQuestionMark.ts(8,1): error TS2322: Type '{ x?: any; }' is not assignable to type 'C'. Property 'x' is optional in type '{ x?: any; }' but required in type 'C'. @@ -12,11 +12,11 @@ tests/cases/compiler/propertyParameterWithQuestionMark.ts(8,1): error TS2323: Ty // x should not be an optional property var v: C = {}; // Should fail ~ -!!! error TS2323: Type '{}' is not assignable to type 'C'. -!!! error TS2323: Property 'x' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'C'. +!!! error TS2322: Property 'x' is missing in type '{}'. var v2: { x? } v = v2; // Should fail ~ -!!! error TS2323: Type '{ x?: any; }' is not assignable to type 'C'. -!!! error TS2323: Property 'x' is optional in type '{ x?: any; }' but required in type 'C'. +!!! error TS2322: Type '{ x?: any; }' is not assignable to type 'C'. +!!! error TS2322: Property 'x' is optional in type '{ x?: any; }' but required in type 'C'. var v3: { x } = new C; // Should succeed \ No newline at end of file diff --git a/tests/baselines/reference/protectedMembers.errors.txt b/tests/baselines/reference/protectedMembers.errors.txt index cab3a682400..10ea00cf10f 100644 --- a/tests/baselines/reference/protectedMembers.errors.txt +++ b/tests/baselines/reference/protectedMembers.errors.txt @@ -9,9 +9,9 @@ tests/cases/compiler/protectedMembers.ts(48,1): error TS2445: Property 'sx' is p tests/cases/compiler/protectedMembers.ts(49,1): error TS2445: Property 'sf' is protected and only accessible within class 'C2' and its subclasses. tests/cases/compiler/protectedMembers.ts(68,9): error TS2446: Property 'x' is protected and only accessible through an instance of class 'C'. tests/cases/compiler/protectedMembers.ts(69,9): error TS2446: Property 'x' is protected and only accessible through an instance of class 'C'. -tests/cases/compiler/protectedMembers.ts(98,1): error TS2323: Type 'B1' is not assignable to type 'A1'. +tests/cases/compiler/protectedMembers.ts(98,1): error TS2322: Type 'B1' is not assignable to type 'A1'. Property 'x' is protected but type 'B1' is not a class derived from 'A1'. -tests/cases/compiler/protectedMembers.ts(99,1): error TS2323: Type 'A1' is not assignable to type 'B1'. +tests/cases/compiler/protectedMembers.ts(99,1): error TS2322: Type 'A1' is not assignable to type 'B1'. Property 'x' is protected in type 'A1' but public in type 'B1'. tests/cases/compiler/protectedMembers.ts(112,7): error TS2415: Class 'B3' incorrectly extends base class 'A3'. Property 'x' is protected in type 'B3' but public in type 'A3'. @@ -139,12 +139,12 @@ tests/cases/compiler/protectedMembers.ts(112,7): error TS2415: Class 'B3' incorr var b1: B1; a1 = b1; // Error, B1 doesn't derive from A1 ~~ -!!! error TS2323: Type 'B1' is not assignable to type 'A1'. -!!! error TS2323: Property 'x' is protected but type 'B1' is not a class derived from 'A1'. +!!! error TS2322: Type 'B1' is not assignable to type 'A1'. +!!! error TS2322: Property 'x' is protected but type 'B1' is not a class derived from 'A1'. b1 = a1; // Error, x is protected in A1 but public in B1 ~~ -!!! error TS2323: Type 'A1' is not assignable to type 'B1'. -!!! error TS2323: Property 'x' is protected in type 'A1' but public in type 'B1'. +!!! error TS2322: Type 'A1' is not assignable to type 'B1'. +!!! error TS2322: Property 'x' is protected in type 'A1' but public in type 'B1'. class A2 { protected x; diff --git a/tests/baselines/reference/qualify.errors.txt b/tests/baselines/reference/qualify.errors.txt index 761dbab6b1b..a2f59733fae 100644 --- a/tests/baselines/reference/qualify.errors.txt +++ b/tests/baselines/reference/qualify.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/qualify.ts(21,13): error TS2323: Type 'number' is not assignable to type 'I'. +tests/cases/compiler/qualify.ts(21,13): error TS2322: Type 'number' is not assignable to type 'I'. Property 'p' is missing in type 'Number'. -tests/cases/compiler/qualify.ts(30,13): error TS2323: Type 'number' is not assignable to type 'I2'. +tests/cases/compiler/qualify.ts(30,13): error TS2322: Type 'number' is not assignable to type 'I2'. Property 'q' is missing in type 'Number'. -tests/cases/compiler/qualify.ts(45,13): error TS2323: Type 'I4' is not assignable to type 'I3'. +tests/cases/compiler/qualify.ts(45,13): error TS2322: Type 'I4' is not assignable to type 'I3'. Property 'zeep' is missing in type 'I4'. -tests/cases/compiler/qualify.ts(46,13): error TS2323: Type 'I4' is not assignable to type 'I3[]'. +tests/cases/compiler/qualify.ts(46,13): error TS2322: Type 'I4' is not assignable to type 'I3[]'. Property 'length' is missing in type 'I4'. -tests/cases/compiler/qualify.ts(47,13): error TS2323: Type 'I4' is not assignable to type '() => I3'. -tests/cases/compiler/qualify.ts(48,13): error TS2323: Type 'I4' is not assignable to type '(k: I3) => void'. -tests/cases/compiler/qualify.ts(49,13): error TS2323: Type 'I4' is not assignable to type '{ k: I3; }'. +tests/cases/compiler/qualify.ts(47,13): error TS2322: Type 'I4' is not assignable to type '() => I3'. +tests/cases/compiler/qualify.ts(48,13): error TS2322: Type 'I4' is not assignable to type '(k: I3) => void'. +tests/cases/compiler/qualify.ts(49,13): error TS2322: Type 'I4' is not assignable to type '{ k: I3; }'. Property 'k' is missing in type 'I4'. -tests/cases/compiler/qualify.ts(58,5): error TS2323: Type 'I' is not assignable to type 'I'. +tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable to type 'I'. Property 'p' is missing in type 'I'. @@ -37,8 +37,8 @@ tests/cases/compiler/qualify.ts(58,5): error TS2323: Type 'I' is not assignable export module U { var z:I=3; ~ -!!! error TS2323: Type 'number' is not assignable to type 'I'. -!!! error TS2323: Property 'p' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'I'. +!!! error TS2322: Property 'p' is missing in type 'Number'. export interface I2 { q; } @@ -49,8 +49,8 @@ tests/cases/compiler/qualify.ts(58,5): error TS2323: Type 'I' is not assignable export module U2 { var z:T.U.I2=3; ~ -!!! error TS2323: Type 'number' is not assignable to type 'I2'. -!!! error TS2323: Property 'q' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'I2'. +!!! error TS2322: Property 'q' is missing in type 'Number'. } } @@ -67,22 +67,22 @@ tests/cases/compiler/qualify.ts(58,5): error TS2323: Type 'I' is not assignable var v1:I4; var v2:K1.I3=v1; ~~ -!!! error TS2323: Type 'I4' is not assignable to type 'I3'. -!!! error TS2323: Property 'zeep' is missing in type 'I4'. +!!! error TS2322: Type 'I4' is not assignable to type 'I3'. +!!! error TS2322: Property 'zeep' is missing in type 'I4'. var v3:K1.I3[]=v1; ~~ -!!! error TS2323: Type 'I4' is not assignable to type 'I3[]'. -!!! error TS2323: Property 'length' is missing in type 'I4'. +!!! error TS2322: Type 'I4' is not assignable to type 'I3[]'. +!!! error TS2322: Property 'length' is missing in type 'I4'. var v4:()=>K1.I3=v1; ~~ -!!! error TS2323: Type 'I4' is not assignable to type '() => I3'. +!!! error TS2322: Type 'I4' is not assignable to type '() => I3'. var v5:(k:K1.I3)=>void=v1; ~~ -!!! error TS2323: Type 'I4' is not assignable to type '(k: I3) => void'. +!!! error TS2322: Type 'I4' is not assignable to type '(k: I3) => void'. var v6:{k:K1.I3;}=v1; ~~ -!!! error TS2323: Type 'I4' is not assignable to type '{ k: I3; }'. -!!! error TS2323: Property 'k' is missing in type 'I4'. +!!! error TS2322: Type 'I4' is not assignable to type '{ k: I3; }'. +!!! error TS2322: Property 'k' is missing in type 'I4'. } } @@ -93,7 +93,7 @@ tests/cases/compiler/qualify.ts(58,5): error TS2323: Type 'I' is not assignable var y:I; var x:T.I=y; ~ -!!! error TS2323: Type 'I' is not assignable to type 'I'. -!!! error TS2323: Property 'p' is missing in type 'I'. +!!! error TS2322: Type 'I' is not assignable to type 'I'. +!!! error TS2322: Property 'p' is missing in type 'I'. \ No newline at end of file diff --git a/tests/baselines/reference/recursiveFunctionTypes.errors.txt b/tests/baselines/reference/recursiveFunctionTypes.errors.txt index c287a713e2b..30f6c7aa41f 100644 --- a/tests/baselines/reference/recursiveFunctionTypes.errors.txt +++ b/tests/baselines/reference/recursiveFunctionTypes.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/recursiveFunctionTypes.ts(1,35): error TS2323: Type 'number' is not assignable to type '() => typeof fn'. -tests/cases/compiler/recursiveFunctionTypes.ts(3,5): error TS2323: Type '() => typeof fn' is not assignable to type 'number'. -tests/cases/compiler/recursiveFunctionTypes.ts(4,5): error TS2323: Type '() => typeof fn' is not assignable to type '() => number'. +tests/cases/compiler/recursiveFunctionTypes.ts(1,35): error TS2322: Type 'number' is not assignable to type '() => typeof fn'. +tests/cases/compiler/recursiveFunctionTypes.ts(3,5): error TS2322: Type '() => typeof fn' is not assignable to type 'number'. +tests/cases/compiler/recursiveFunctionTypes.ts(4,5): error TS2322: Type '() => typeof fn' is not assignable to type '() => number'. Type '() => typeof fn' is not assignable to type 'number'. tests/cases/compiler/recursiveFunctionTypes.ts(11,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. tests/cases/compiler/recursiveFunctionTypes.ts(12,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. -tests/cases/compiler/recursiveFunctionTypes.ts(17,5): error TS2323: Type '() => I' is not assignable to type 'number'. +tests/cases/compiler/recursiveFunctionTypes.ts(17,5): error TS2322: Type '() => I' is not assignable to type 'number'. tests/cases/compiler/recursiveFunctionTypes.ts(22,5): error TS2345: Argument of type 'number' is not assignable to parameter of type '(t: typeof g) => void'. -tests/cases/compiler/recursiveFunctionTypes.ts(25,1): error TS2323: Type 'number' is not assignable to type '() => any'. +tests/cases/compiler/recursiveFunctionTypes.ts(25,1): error TS2322: Type 'number' is not assignable to type '() => any'. tests/cases/compiler/recursiveFunctionTypes.ts(30,1): error TS2394: Overload signature is not compatible with function implementation. tests/cases/compiler/recursiveFunctionTypes.ts(33,1): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/recursiveFunctionTypes.ts(34,4): error TS2345: Argument of type 'string' is not assignable to parameter of type '{ (): typeof f6; (a: typeof f6): () => number; }'. @@ -17,15 +17,15 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,4): error TS2345: Argument of ==== tests/cases/compiler/recursiveFunctionTypes.ts (13 errors) ==== function fn(): typeof fn { return 1; } ~ -!!! error TS2323: Type 'number' is not assignable to type '() => typeof fn'. +!!! error TS2322: Type 'number' is not assignable to type '() => typeof fn'. var x: number = fn; // error ~ -!!! error TS2323: Type '() => typeof fn' is not assignable to type 'number'. +!!! error TS2322: Type '() => typeof fn' is not assignable to type 'number'. var y: () => number = fn; // ok ~ -!!! error TS2323: Type '() => typeof fn' is not assignable to type '() => number'. -!!! error TS2323: Type '() => typeof fn' is not assignable to type 'number'. +!!! error TS2322: Type '() => typeof fn' is not assignable to type '() => number'. +!!! error TS2322: Type '() => typeof fn' is not assignable to type 'number'. var f: () => typeof g; var g: () => typeof f; @@ -44,7 +44,7 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,4): error TS2345: Argument of var a: number = f3; // error ~ -!!! error TS2323: Type '() => I' is not assignable to type 'number'. +!!! error TS2322: Type '() => I' is not assignable to type 'number'. class C { static g(t: typeof C.g){ } @@ -56,7 +56,7 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,4): error TS2345: Argument of var f4: () => typeof f4; f4 = 3; // error ~~ -!!! error TS2323: Type 'number' is not assignable to type '() => any'. +!!! error TS2322: Type 'number' is not assignable to type '() => any'. function f5() { return f5; } diff --git a/tests/baselines/reference/redefineArray.errors.txt b/tests/baselines/reference/redefineArray.errors.txt index 86c8c8aee33..ad47f15c521 100644 --- a/tests/baselines/reference/redefineArray.errors.txt +++ b/tests/baselines/reference/redefineArray.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/redefineArray.ts(1,1): error TS2323: Type '(n: number, s: string) => number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. +tests/cases/compiler/redefineArray.ts(1,1): error TS2322: Type '(n: number, s: string) => number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. Property 'isArray' is missing in type '(n: number, s: string) => number'. ==== tests/cases/compiler/redefineArray.ts (1 errors) ==== Array = function (n:number, s:string) {return n;}; ~~~~~ -!!! error TS2323: Type '(n: number, s: string) => number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. -!!! error TS2323: Property 'isArray' is missing in type '(n: number, s: string) => number'. \ No newline at end of file +!!! error TS2322: Type '(n: number, s: string) => number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. +!!! error TS2322: Property 'isArray' is missing in type '(n: number, s: string) => number'. \ No newline at end of file diff --git a/tests/baselines/reference/restArgAssignmentCompat.errors.txt b/tests/baselines/reference/restArgAssignmentCompat.errors.txt index a7397ffc157..2ea07395099 100644 --- a/tests/baselines/reference/restArgAssignmentCompat.errors.txt +++ b/tests/baselines/reference/restArgAssignmentCompat.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/restArgAssignmentCompat.ts(7,1): error TS2323: Type '(...x: number[]) => void' is not assignable to type '(x: number[], y: string) => void'. +tests/cases/compiler/restArgAssignmentCompat.ts(7,1): error TS2322: Type '(...x: number[]) => void' is not assignable to type '(x: number[], y: string) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'number[]'. Property 'length' is missing in type 'Number'. @@ -13,9 +13,9 @@ tests/cases/compiler/restArgAssignmentCompat.ts(7,1): error TS2323: Type '(...x: var n = g; n = f; ~ -!!! error TS2323: Type '(...x: number[]) => void' is not assignable to type '(x: number[], y: string) => void'. -!!! error TS2323: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'number[]'. -!!! error TS2323: Property 'length' is missing in type 'Number'. +!!! error TS2322: Type '(...x: number[]) => void' is not assignable to type '(x: number[], y: string) => void'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'number[]'. +!!! error TS2322: Property 'length' is missing in type 'Number'. n([4], 'foo'); \ No newline at end of file diff --git a/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.errors.txt b/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.errors.txt index 4bb3baf2f84..db23c2a19f6 100644 --- a/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.errors.txt +++ b/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticMemberAssignsToConstructorFunctionMembers.ts(7,9): error TS2323: Type '() => void' is not assignable to type '(x: number) => number'. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticMemberAssignsToConstructorFunctionMembers.ts(7,9): error TS2322: Type '() => void' is not assignable to type '(x: number) => number'. Type 'void' is not assignable to type 'number'. @@ -11,8 +11,8 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara static bar(x: number): number { C.bar = () => { } // error ~~~~~ -!!! error TS2323: Type '() => void' is not assignable to type '(x: number) => number'. -!!! error TS2323: Type 'void' is not assignable to type 'number'. +!!! error TS2322: Type '() => void' is not assignable to type '(x: number) => number'. +!!! error TS2322: Type 'void' is not assignable to type 'number'. C.bar = (x) => x; // ok C.bar = (x: number) => 1; // ok return 1; diff --git a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.errors.txt b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.errors.txt index 6e855cdfeb2..59626540806 100644 --- a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.errors.txt +++ b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(12,1): error TS2323: Type 'C' is not assignable to type 'A'. +tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(12,1): error TS2322: Type 'C' is not assignable to type 'A'. Property 'name' is missing in type 'C'. -tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(13,1): error TS2323: Type 'typeof B' is not assignable to type 'A'. +tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(13,1): error TS2322: Type 'typeof B' is not assignable to type 'A'. Property 'name' is missing in type 'typeof B'. -tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(16,5): error TS2323: Type 'C' is not assignable to type 'B'. +tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(16,5): error TS2322: Type 'C' is not assignable to type 'B'. Property 'name' is missing in type 'C'. -tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(17,1): error TS2323: Type 'typeof B' is not assignable to type 'B'. +tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(17,1): error TS2322: Type 'typeof B' is not assignable to type 'B'. Property 'name' is missing in type 'typeof B'. @@ -22,22 +22,22 @@ tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment. var a: A = new B(); a = new C(); // error name is missing ~ -!!! error TS2323: Type 'C' is not assignable to type 'A'. -!!! error TS2323: Property 'name' is missing in type 'C'. +!!! error TS2322: Type 'C' is not assignable to type 'A'. +!!! error TS2322: Property 'name' is missing in type 'C'. a = B; // error name is missing ~ -!!! error TS2323: Type 'typeof B' is not assignable to type 'A'. -!!! error TS2323: Property 'name' is missing in type 'typeof B'. +!!! error TS2322: Type 'typeof B' is not assignable to type 'A'. +!!! error TS2322: Property 'name' is missing in type 'typeof B'. a = C; var b: B = new C(); // error name is missing ~ -!!! error TS2323: Type 'C' is not assignable to type 'B'. -!!! error TS2323: Property 'name' is missing in type 'C'. +!!! error TS2322: Type 'C' is not assignable to type 'B'. +!!! error TS2322: Property 'name' is missing in type 'C'. b = B; // error name is missing ~ -!!! error TS2323: Type 'typeof B' is not assignable to type 'B'. -!!! error TS2323: Property 'name' is missing in type 'typeof B'. +!!! error TS2322: Type 'typeof B' is not assignable to type 'B'. +!!! error TS2322: Property 'name' is missing in type 'typeof B'. b = C; b = a; diff --git a/tests/baselines/reference/stringIndexerAssignments1.errors.txt b/tests/baselines/reference/stringIndexerAssignments1.errors.txt index b4ca39eaa2f..3939ceba1bb 100644 --- a/tests/baselines/reference/stringIndexerAssignments1.errors.txt +++ b/tests/baselines/reference/stringIndexerAssignments1.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/stringIndexerAssignments1.ts(4,1): error TS2323: Type '{ one: string; }' is not assignable to type '{ [x: string]: string; one: string; }'. +tests/cases/compiler/stringIndexerAssignments1.ts(4,1): error TS2322: Type '{ one: string; }' is not assignable to type '{ [x: string]: string; one: string; }'. Index signature is missing in type '{ one: string; }'. -tests/cases/compiler/stringIndexerAssignments1.ts(5,1): error TS2323: Type '{ one: number; two: string; }' is not assignable to type '{ [x: string]: string; one: string; }'. +tests/cases/compiler/stringIndexerAssignments1.ts(5,1): error TS2322: Type '{ one: number; two: string; }' is not assignable to type '{ [x: string]: string; one: string; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'string'. @@ -11,11 +11,11 @@ tests/cases/compiler/stringIndexerAssignments1.ts(5,1): error TS2323: Type '{ on var b: { one: number; two: string; }; x = a; ~ -!!! error TS2323: Type '{ one: string; }' is not assignable to type '{ [x: string]: string; one: string; }'. -!!! error TS2323: Index signature is missing in type '{ one: string; }'. +!!! error TS2322: Type '{ one: string; }' is not assignable to type '{ [x: string]: string; one: string; }'. +!!! error TS2322: Index signature is missing in type '{ one: string; }'. x = b; // error ~ -!!! error TS2323: Type '{ one: number; two: string; }' is not assignable to type '{ [x: string]: string; one: string; }'. -!!! error TS2323: Types of property 'one' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ one: number; two: string; }' is not assignable to type '{ [x: string]: string; one: string; }'. +!!! error TS2322: Types of property 'one' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/stringIndexerAssignments2.errors.txt b/tests/baselines/reference/stringIndexerAssignments2.errors.txt index 73472081d9a..256a9820a0c 100644 --- a/tests/baselines/reference/stringIndexerAssignments2.errors.txt +++ b/tests/baselines/reference/stringIndexerAssignments2.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/stringIndexerAssignments2.ts(19,1): error TS2323: Type 'C2' is not assignable to type 'C1'. +tests/cases/compiler/stringIndexerAssignments2.ts(19,1): error TS2322: Type 'C2' is not assignable to type 'C1'. Index signature is missing in type 'C2'. -tests/cases/compiler/stringIndexerAssignments2.ts(20,1): error TS2323: Type 'C3' is not assignable to type 'C1'. +tests/cases/compiler/stringIndexerAssignments2.ts(20,1): error TS2322: Type 'C3' is not assignable to type 'C1'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'string'. @@ -26,10 +26,10 @@ tests/cases/compiler/stringIndexerAssignments2.ts(20,1): error TS2323: Type 'C3' x = a; ~ -!!! error TS2323: Type 'C2' is not assignable to type 'C1'. -!!! error TS2323: Index signature is missing in type 'C2'. +!!! error TS2322: Type 'C2' is not assignable to type 'C1'. +!!! error TS2322: Index signature is missing in type 'C2'. x = b; ~ -!!! error TS2323: Type 'C3' is not assignable to type 'C1'. -!!! error TS2323: Types of property 'one' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'C3' is not assignable to type 'C1'. +!!! error TS2322: Types of property 'one' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt index cc9d56cff57..e4e8de59185 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt @@ -24,7 +24,7 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(71,5): error TS2411: Property 'foo' of type '() => string' is not assignable to string index type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(73,5): error TS2411: Property '"4.0"' of type 'number' is not assignable to string index type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(74,5): error TS2411: Property 'f' of type 'MyString' is not assignable to string index type 'string'. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2323: Type '{ [x: string]: string | number | MyString | (() => void); 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo: () => string; }' is not assignable to type '{ [x: string]: string; }'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ [x: string]: string | number | MyString | (() => void); 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo: () => string; }' is not assignable to type '{ [x: string]: string; }'. Index signatures are incompatible. Type 'string | number | MyString | (() => void)' is not assignable to type 'string'. Type 'number' is not assignable to type 'string'. @@ -160,10 +160,10 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon // error var b: { [x: string]: string; } = { ~ -!!! error TS2323: Type '{ [x: string]: string | number | MyString | (() => void); 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo: () => string; }' is not assignable to type '{ [x: string]: string; }'. -!!! error TS2323: Index signatures are incompatible. -!!! error TS2323: Type 'string | number | MyString | (() => void)' is not assignable to type 'string'. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ [x: string]: string | number | MyString | (() => void); 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo: () => string; }' is not assignable to type '{ [x: string]: string; }'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'string | number | MyString | (() => void)' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. a: '', b: 1, c: () => { }, diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt index 4e3a0152b56..faef7905453 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt @@ -4,7 +4,7 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts(24,5): error TS2411: Property 'd' of type 'string' is not assignable to string index type 'A'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts(31,5): error TS2411: Property 'c' of type 'number' is not assignable to string index type 'A'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts(32,5): error TS2411: Property 'd' of type 'string' is not assignable to string index type 'A'. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts(36,5): error TS2323: Type '{ [x: string]: typeof A; a: typeof A; b: typeof B; }' is not assignable to type '{ [x: string]: A; }'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts(36,5): error TS2322: Type '{ [x: string]: typeof A; a: typeof A; b: typeof B; }' is not assignable to type '{ [x: string]: A; }'. Index signatures are incompatible. Type 'typeof A' is not assignable to type 'A'. Property 'foo' is missing in type 'typeof A'. @@ -60,10 +60,10 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon // error var b: { [x: string]: A } = { ~ -!!! error TS2323: Type '{ [x: string]: typeof A; a: typeof A; b: typeof B; }' is not assignable to type '{ [x: string]: A; }'. -!!! error TS2323: Index signatures are incompatible. -!!! error TS2323: Type 'typeof A' is not assignable to type 'A'. -!!! error TS2323: Property 'foo' is missing in type 'typeof A'. +!!! error TS2322: Type '{ [x: string]: typeof A; a: typeof A; b: typeof B; }' is not assignable to type '{ [x: string]: A; }'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'typeof A' is not assignable to type 'A'. +!!! error TS2322: Property 'foo' is missing in type 'typeof A'. a: A, b: B } \ No newline at end of file diff --git a/tests/baselines/reference/superCallAssignResult.errors.txt b/tests/baselines/reference/superCallAssignResult.errors.txt index 5a710c2327a..bc9e2a0dc55 100644 --- a/tests/baselines/reference/superCallAssignResult.errors.txt +++ b/tests/baselines/reference/superCallAssignResult.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/superCallAssignResult.ts(8,9): error TS2323: Type 'number' is not assignable to type 'void'. +tests/cases/compiler/superCallAssignResult.ts(8,9): error TS2322: Type 'number' is not assignable to type 'void'. ==== tests/cases/compiler/superCallAssignResult.ts (1 errors) ==== @@ -11,6 +11,6 @@ tests/cases/compiler/superCallAssignResult.ts(8,9): error TS2323: Type 'number' var x = super(5); // Should be of type void, not E. x = 5; ~ -!!! error TS2323: Type 'number' is not assignable to type 'void'. +!!! error TS2322: Type 'number' is not assignable to type 'void'. } } \ No newline at end of file diff --git a/tests/baselines/reference/switchAssignmentCompat.errors.txt b/tests/baselines/reference/switchAssignmentCompat.errors.txt index c4695a6e8eb..6a2755365ab 100644 --- a/tests/baselines/reference/switchAssignmentCompat.errors.txt +++ b/tests/baselines/reference/switchAssignmentCompat.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/switchAssignmentCompat.ts(4,10): error TS2323: Type 'typeof Foo' is not assignable to type 'number'. +tests/cases/compiler/switchAssignmentCompat.ts(4,10): error TS2322: Type 'typeof Foo' is not assignable to type 'number'. ==== tests/cases/compiler/switchAssignmentCompat.ts (1 errors) ==== @@ -7,6 +7,6 @@ tests/cases/compiler/switchAssignmentCompat.ts(4,10): error TS2323: Type 'typeof switch (0) { case Foo: break; // Error expected ~~~ -!!! error TS2323: Type 'typeof Foo' is not assignable to type 'number'. +!!! error TS2322: Type 'typeof Foo' is not assignable to type 'number'. } \ No newline at end of file diff --git a/tests/baselines/reference/switchCasesExpressionTypeMismatch.errors.txt b/tests/baselines/reference/switchCasesExpressionTypeMismatch.errors.txt index f5f5c6a3c64..de739af007d 100644 --- a/tests/baselines/reference/switchCasesExpressionTypeMismatch.errors.txt +++ b/tests/baselines/reference/switchCasesExpressionTypeMismatch.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(4,10): error TS2323: Type 'typeof Foo' is not assignable to type 'number'. -tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(5,10): error TS2323: Type 'string' is not assignable to type 'number'. -tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(7,10): error TS2323: Type 'boolean' is not assignable to type 'number'. +tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(4,10): error TS2322: Type 'typeof Foo' is not assignable to type 'number'. +tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(5,10): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(7,10): error TS2322: Type 'boolean' is not assignable to type 'number'. ==== tests/cases/compiler/switchCasesExpressionTypeMismatch.ts (3 errors) ==== @@ -9,14 +9,14 @@ tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(7,10): error TS2323: T switch (0) { case Foo: break; // Error ~~~ -!!! error TS2323: Type 'typeof Foo' is not assignable to type 'number'. +!!! error TS2322: Type 'typeof Foo' is not assignable to type 'number'. case "sss": break; // Error ~~~~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. case 123: break; // No Error case true: break; // Error ~~~~ -!!! error TS2323: Type 'boolean' is not assignable to type 'number'. +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. } var s: any = 0; diff --git a/tests/baselines/reference/targetTypeBaseCalls.errors.txt b/tests/baselines/reference/targetTypeBaseCalls.errors.txt index 60a98d2244e..37a00c9798d 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.errors.txt +++ b/tests/baselines/reference/targetTypeBaseCalls.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/targetTypeBaseCalls.ts(9,19): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/targetTypeBaseCalls.ts(13,23): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/targetTypeBaseCalls.ts(17,61): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/targetTypeBaseCalls.ts(9,19): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/targetTypeBaseCalls.ts(13,23): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/targetTypeBaseCalls.ts(17,61): error TS2322: Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/targetTypeBaseCalls.ts (3 errors) ==== @@ -14,17 +14,17 @@ tests/cases/compiler/targetTypeBaseCalls.ts(17,61): error TS2323: Type 'number' foo(function(s) { s = 5 }); // Error, can’t assign number to string ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. new Foo(function(s) { s = 5 }); // error, if types are applied correctly ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. class Bar extends Foo { constructor() { super(function(s) { s = 5 }) } } // error, if types are applied correctly ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/targetTypeTest3.errors.txt b/tests/baselines/reference/targetTypeTest3.errors.txt index af82adcace0..f5dab732ed3 100644 --- a/tests/baselines/reference/targetTypeTest3.errors.txt +++ b/tests/baselines/reference/targetTypeTest3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/targetTypeTest3.ts(4,5): error TS2323: Type '(string | number)[]' is not assignable to type 'string[]'. +tests/cases/compiler/targetTypeTest3.ts(4,5): error TS2322: Type '(string | number)[]' is not assignable to type 'string[]'. Type 'string | number' is not assignable to type 'string'. Type 'number' is not assignable to type 'string'. @@ -9,9 +9,9 @@ tests/cases/compiler/targetTypeTest3.ts(4,5): error TS2323: Type '(string | numb var a : string[] = [1,2,"3"]; // should produce an error ~ -!!! error TS2323: Type '(string | number)[]' is not assignable to type 'string[]'. -!!! error TS2323: Type 'string | number' is not assignable to type 'string'. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(string | number)[]' is not assignable to type 'string[]'. +!!! error TS2322: Type 'string | number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. function func1(stuff:any[]) { return stuff; } diff --git a/tests/baselines/reference/targetTypeVoidFunc.errors.txt b/tests/baselines/reference/targetTypeVoidFunc.errors.txt index b084bf10aef..14c3cb37c3a 100644 --- a/tests/baselines/reference/targetTypeVoidFunc.errors.txt +++ b/tests/baselines/reference/targetTypeVoidFunc.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/targetTypeVoidFunc.ts(2,12): error TS2323: Type '() => void' is not assignable to type 'new () => number'. +tests/cases/compiler/targetTypeVoidFunc.ts(2,12): error TS2322: Type '() => void' is not assignable to type 'new () => number'. ==== tests/cases/compiler/targetTypeVoidFunc.ts (1 errors) ==== function f1(): { new (): number; } { return function () { return; } ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2323: Type '() => void' is not assignable to type 'new () => number'. +!!! error TS2322: Type '() => void' is not assignable to type 'new () => number'. }; var x = f1(); diff --git a/tests/baselines/reference/thisWhenTypeCheckFails.errors.txt b/tests/baselines/reference/thisWhenTypeCheckFails.errors.txt index ae4603a1adb..aa12f7039b0 100644 --- a/tests/baselines/reference/thisWhenTypeCheckFails.errors.txt +++ b/tests/baselines/reference/thisWhenTypeCheckFails.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/thisWhenTypeCheckFails.ts(4,17): error TS2323: Type 'void' is not assignable to type 'string'. +tests/cases/compiler/thisWhenTypeCheckFails.ts(4,17): error TS2322: Type 'void' is not assignable to type 'string'. ==== tests/cases/compiler/thisWhenTypeCheckFails.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/thisWhenTypeCheckFails.ts(4,17): error TS2323: Type 'void' var k = () => { var s: string = this.n(); ~ -!!! error TS2323: Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type 'void' is not assignable to type 'string'. } } } diff --git a/tests/baselines/reference/tupleTypes.errors.txt b/tests/baselines/reference/tupleTypes.errors.txt index 6fdbd8a2f12..d1257be13ef 100644 --- a/tests/baselines/reference/tupleTypes.errors.txt +++ b/tests/baselines/reference/tupleTypes.errors.txt @@ -1,25 +1,25 @@ tests/cases/compiler/tupleTypes.ts(1,9): error TS1122: A tuple type element list cannot be empty. -tests/cases/compiler/tupleTypes.ts(14,1): error TS2323: Type 'undefined[]' is not assignable to type '[number, string]'. +tests/cases/compiler/tupleTypes.ts(14,1): error TS2322: Type 'undefined[]' is not assignable to type '[number, string]'. Property '0' is missing in type 'undefined[]'. -tests/cases/compiler/tupleTypes.ts(15,1): error TS2323: Type '[number]' is not assignable to type '[number, string]'. +tests/cases/compiler/tupleTypes.ts(15,1): error TS2322: Type '[number]' is not assignable to type '[number, string]'. Property '1' is missing in type '[number]'. -tests/cases/compiler/tupleTypes.ts(17,1): error TS2323: Type '[string, number]' is not assignable to type '[number, string]'. +tests/cases/compiler/tupleTypes.ts(17,1): error TS2322: Type '[string, number]' is not assignable to type '[number, string]'. Types of property '0' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/tupleTypes.ts(41,1): error TS2323: Type 'undefined[]' is not assignable to type '[number, string]'. -tests/cases/compiler/tupleTypes.ts(47,1): error TS2323: Type '[number, string]' is not assignable to type 'number[]'. +tests/cases/compiler/tupleTypes.ts(41,1): error TS2322: Type 'undefined[]' is not assignable to type '[number, string]'. +tests/cases/compiler/tupleTypes.ts(47,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/compiler/tupleTypes.ts(49,1): error TS2323: Type '[number, {}]' is not assignable to type 'number[]'. +tests/cases/compiler/tupleTypes.ts(49,1): error TS2322: Type '[number, {}]' is not assignable to type 'number[]'. Types of property 'pop' are incompatible. Type '() => {}' is not assignable to type '() => number'. Type '{}' is not assignable to type 'number'. -tests/cases/compiler/tupleTypes.ts(50,1): error TS2323: Type '[number, number]' is not assignable to type '[number, string]'. +tests/cases/compiler/tupleTypes.ts(50,1): error TS2322: Type '[number, number]' is not assignable to type '[number, string]'. Types of property '1' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/tupleTypes.ts(51,1): error TS2323: Type '[number, {}]' is not assignable to type '[number, string]'. +tests/cases/compiler/tupleTypes.ts(51,1): error TS2322: Type '[number, {}]' is not assignable to type '[number, string]'. Types of property '1' are incompatible. Type '{}' is not assignable to type 'string'. @@ -42,18 +42,18 @@ tests/cases/compiler/tupleTypes.ts(51,1): error TS2323: Type '[number, {}]' is n t = []; // Error ~ -!!! error TS2323: Type 'undefined[]' is not assignable to type '[number, string]'. -!!! error TS2323: Property '0' is missing in type 'undefined[]'. +!!! error TS2322: Type 'undefined[]' is not assignable to type '[number, string]'. +!!! error TS2322: Property '0' is missing in type 'undefined[]'. t = [1]; // Error ~ -!!! error TS2323: Type '[number]' is not assignable to type '[number, string]'. -!!! error TS2323: Property '1' is missing in type '[number]'. +!!! error TS2322: Type '[number]' is not assignable to type '[number, string]'. +!!! error TS2322: Property '1' is missing in type '[number]'. t = [1, "hello"]; // Ok t = ["hello", 1]; // Error ~ -!!! error TS2323: Type '[string, number]' is not assignable to type '[number, string]'. -!!! error TS2323: Types of property '0' are incompatible. -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '[string, number]' is not assignable to type '[number, string]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. t = [1, "hello", 2]; // Ok var tf: [string, (x: string) => number] = ["hello", x => x.length]; @@ -79,7 +79,7 @@ tests/cases/compiler/tupleTypes.ts(51,1): error TS2323: Type '[number, {}]' is n tt = [undefined, undefined]; tt = []; // Error ~~ -!!! error TS2323: Type 'undefined[]' is not assignable to type '[number, string]'. +!!! error TS2322: Type 'undefined[]' is not assignable to type '[number, string]'. var a: number[]; var a1: [number, string]; @@ -87,28 +87,28 @@ tests/cases/compiler/tupleTypes.ts(51,1): error TS2323: Type '[number, {}]' is n var a3: [number, {}]; a = a1; // Error ~ -!!! 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'. a = a2; a = a3; // Error ~ -!!! error TS2323: Type '[number, {}]' is not assignable to type 'number[]'. -!!! error TS2323: Types of property 'pop' are incompatible. -!!! error TS2323: Type '() => {}' is not assignable to type '() => number'. -!!! error TS2323: Type '{}' is not assignable to type 'number'. +!!! error TS2322: Type '[number, {}]' is not assignable to type 'number[]'. +!!! error TS2322: Types of property 'pop' are incompatible. +!!! error TS2322: Type '() => {}' is not assignable to type '() => number'. +!!! error TS2322: Type '{}' is not assignable to type 'number'. a1 = a2; // Error ~~ -!!! error TS2323: Type '[number, number]' is not assignable to type '[number, string]'. -!!! error TS2323: Types of property '1' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '[number, number]' is not assignable to type '[number, string]'. +!!! error TS2322: Types of property '1' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. a1 = a3; // Error ~~ -!!! error TS2323: Type '[number, {}]' is not assignable to type '[number, string]'. -!!! error TS2323: Types of property '1' are incompatible. -!!! error TS2323: Type '{}' is not assignable to type 'string'. +!!! error TS2322: Type '[number, {}]' is not assignable to type '[number, string]'. +!!! error TS2322: Types of property '1' are incompatible. +!!! error TS2322: Type '{}' is not assignable to type 'string'. a3 = a1; a3 = a2; \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentsShouldDisallowNonGenericOverloads.errors.txt b/tests/baselines/reference/typeArgumentsShouldDisallowNonGenericOverloads.errors.txt index c0d90304de0..1f1620ed3c1 100644 --- a/tests/baselines/reference/typeArgumentsShouldDisallowNonGenericOverloads.errors.txt +++ b/tests/baselines/reference/typeArgumentsShouldDisallowNonGenericOverloads.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/typeArgumentsShouldDisallowNonGenericOverloads.ts(10,5): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/typeArgumentsShouldDisallowNonGenericOverloads.ts(11,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/typeArgumentsShouldDisallowNonGenericOverloads.ts(10,5): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/typeArgumentsShouldDisallowNonGenericOverloads.ts(11,5): error TS2322: Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/typeArgumentsShouldDisallowNonGenericOverloads.ts (2 errors) ==== @@ -14,7 +14,7 @@ tests/cases/compiler/typeArgumentsShouldDisallowNonGenericOverloads.ts(11,5): er var w: string = foo("hi"); // should error ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var z: number = foo("hi"); // should error ~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.errors.txt b/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.errors.txt index dd7447d2148..e8c9bd6fc20 100644 --- a/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.errors.txt +++ b/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(2,7): error TS2323: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(3,5): error TS2323: Type 'Object' is not assignable to type 'string'. +tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(2,7): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(3,5): error TS2322: Type 'Object' is not assignable to type 'string'. tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(4,15): error TS2339: Property 'NonexistantMethod' does not exist on type 'number[]'. tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(5,5): error TS2304: Cannot find name 'derp'. @@ -8,10 +8,10 @@ tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(5,5): error var functions = [function () { var k: string = 10; ~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. k = new Object(); ~ -!!! error TS2323: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type 'Object' is not assignable to type 'string'. [1, 2, 3].NonexistantMethod(); ~~~~~~~~~~~~~~~~~ !!! error TS2339: Property 'NonexistantMethod' does not exist on type 'number[]'. diff --git a/tests/baselines/reference/typeComparisonCaching.errors.txt b/tests/baselines/reference/typeComparisonCaching.errors.txt index 3cbedebb7d2..8a94bdf835c 100644 --- a/tests/baselines/reference/typeComparisonCaching.errors.txt +++ b/tests/baselines/reference/typeComparisonCaching.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/typeComparisonCaching.ts(26,1): error TS2323: Type 'B' is not assignable to type 'A'. +tests/cases/compiler/typeComparisonCaching.ts(26,1): error TS2322: Type 'B' is not assignable to type 'A'. Types of property 's' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/typeComparisonCaching.ts(27,1): error TS2323: Type 'D' is not assignable to type 'C'. +tests/cases/compiler/typeComparisonCaching.ts(27,1): error TS2322: Type 'D' is not assignable to type 'C'. Types of property 'q' are incompatible. Type 'B' is not assignable to type 'A'. @@ -34,12 +34,12 @@ tests/cases/compiler/typeComparisonCaching.ts(27,1): error TS2323: Type 'D' is n a = b; ~ -!!! error TS2323: Type 'B' is not assignable to type 'A'. -!!! error TS2323: Types of property 's' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'B' is not assignable to type 'A'. +!!! error TS2322: Types of property 's' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. c = d; // Should not be allowed ~ -!!! error TS2323: Type 'D' is not assignable to type 'C'. -!!! error TS2323: Types of property 'q' are incompatible. -!!! error TS2323: Type 'B' is not assignable to type 'A'. +!!! error TS2322: Type 'D' is not assignable to type 'C'. +!!! error TS2322: Types of property 'q' are incompatible. +!!! error TS2322: Type 'B' is not assignable to type 'A'. \ No newline at end of file diff --git a/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt b/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt index 2cae46779a8..99264a00351 100644 --- a/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt +++ b/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeIdentityConsidersBrands.ts(30,1): error TS2323: Type 'X_1' is not assignable to type 'Y_1'. +tests/cases/compiler/typeIdentityConsidersBrands.ts(30,1): error TS2322: Type 'X_1' is not assignable to type 'Y_1'. Types have separate declarations of a private property 'name'. tests/cases/compiler/typeIdentityConsidersBrands.ts(31,6): error TS2345: Argument of type 'Y_1' is not assignable to parameter of type 'X_1'. @@ -35,8 +35,8 @@ tests/cases/compiler/typeIdentityConsidersBrands.ts(31,6): error TS2345: Argumen a2 = b2; // should error ~~ -!!! error TS2323: Type 'X_1' is not assignable to type 'Y_1'. -!!! error TS2323: Types have separate declarations of a private property 'name'. +!!! error TS2322: Type 'X_1' is not assignable to type 'Y_1'. +!!! error TS2322: Types have separate declarations of a private property 'name'. foo2(a2); // should error ~~ !!! error TS2345: Argument of type 'Y_1' is not assignable to parameter of type 'X_1'. diff --git a/tests/baselines/reference/typeInfer1.errors.txt b/tests/baselines/reference/typeInfer1.errors.txt index a56668e62f3..cce736e2531 100644 --- a/tests/baselines/reference/typeInfer1.errors.txt +++ b/tests/baselines/reference/typeInfer1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeInfer1.ts(11,5): error TS2323: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'. +tests/cases/compiler/typeInfer1.ts(11,5): error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'. Property 'Write' is missing in type '{ Moo: () => string; }'. @@ -15,7 +15,7 @@ tests/cases/compiler/typeInfer1.ts(11,5): error TS2323: Type '{ Moo: () => strin var yyyyyyyy: ITextWriter2 = { ~~~~~~~~ -!!! error TS2323: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'. -!!! error TS2323: Property 'Write' is missing in type '{ Moo: () => string; }'. +!!! error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'. +!!! error TS2322: Property 'Write' is missing in type '{ Moo: () => string; }'. Moo: function() { return "cow"; } } \ No newline at end of file diff --git a/tests/baselines/reference/typeMatch1.errors.txt b/tests/baselines/reference/typeMatch1.errors.txt index ae6eff78528..d0bcd71065e 100644 --- a/tests/baselines/reference/typeMatch1.errors.txt +++ b/tests/baselines/reference/typeMatch1.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/typeMatch1.ts(18,1): error TS2323: Type 'D' is not assignable to type 'C'. +tests/cases/compiler/typeMatch1.ts(18,1): error TS2322: Type 'D' is not assignable to type 'C'. Types have separate declarations of a private property 'x'. -tests/cases/compiler/typeMatch1.ts(19,1): error TS2323: Type 'typeof C' is not assignable to type 'C'. +tests/cases/compiler/typeMatch1.ts(19,1): error TS2322: Type 'typeof C' is not assignable to type 'C'. Property 'x' is missing in type 'typeof C'. tests/cases/compiler/typeMatch1.ts(20,1): error TS2365: Operator '==' cannot be applied to types 'typeof C' and 'typeof D'. @@ -25,12 +25,12 @@ tests/cases/compiler/typeMatch1.ts(20,1): error TS2365: Operator '==' cannot be x6 = x7; ~~ -!!! error TS2323: Type 'D' is not assignable to type 'C'. -!!! error TS2323: Types have separate declarations of a private property 'x'. +!!! error TS2322: Type 'D' is not assignable to type 'C'. +!!! error TS2322: Types have separate declarations of a private property 'x'. x6=C; ~~ -!!! error TS2323: Type 'typeof C' is not assignable to type 'C'. -!!! error TS2323: Property 'x' is missing in type 'typeof C'. +!!! error TS2322: Type 'typeof C' is not assignable to type 'C'. +!!! error TS2322: Property 'x' is missing in type 'typeof C'. C==D; ~~~~ !!! error TS2365: Operator '==' cannot be applied to types 'typeof C' and 'typeof D'. diff --git a/tests/baselines/reference/typeMatch2.errors.txt b/tests/baselines/reference/typeMatch2.errors.txt index 867ccb93387..4db4828064e 100644 --- a/tests/baselines/reference/typeMatch2.errors.txt +++ b/tests/baselines/reference/typeMatch2.errors.txt @@ -1,17 +1,17 @@ -tests/cases/compiler/typeMatch2.ts(3,2): error TS2323: Type '{}' is not assignable to type '{ x: number; y: number; }'. +tests/cases/compiler/typeMatch2.ts(3,2): error TS2322: Type '{}' is not assignable to type '{ x: number; y: number; }'. Property 'x' is missing in type '{}'. -tests/cases/compiler/typeMatch2.ts(4,5): error TS2323: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. +tests/cases/compiler/typeMatch2.ts(4,5): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. Property 'y' is missing in type '{ x: number; }'. -tests/cases/compiler/typeMatch2.ts(6,5): error TS2323: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. +tests/cases/compiler/typeMatch2.ts(6,5): error TS2322: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. Property 'y' is missing in type '{ x: number; z: number; }'. -tests/cases/compiler/typeMatch2.ts(18,5): error TS2323: Type 'Animal[]' is not assignable to type 'Giraffe[]'. +tests/cases/compiler/typeMatch2.ts(18,5): error TS2322: Type 'Animal[]' is not assignable to type 'Giraffe[]'. Type 'Animal' is not assignable to type 'Giraffe'. Property 'g' is missing in type 'Animal'. -tests/cases/compiler/typeMatch2.ts(22,5): error TS2323: Type '{ f1: number; f2: Animal[]; }' is not assignable to type '{ f1: number; f2: Giraffe[]; }'. +tests/cases/compiler/typeMatch2.ts(22,5): error TS2322: Type '{ f1: number; f2: Animal[]; }' is not assignable to type '{ f1: number; f2: Giraffe[]; }'. Types of property 'f2' are incompatible. Type 'Animal[]' is not assignable to type 'Giraffe[]'. Type 'Animal' is not assignable to type 'Giraffe'. -tests/cases/compiler/typeMatch2.ts(35,5): error TS2323: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. +tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. Property 'y' is missing in type '{ x: number; }'. @@ -20,17 +20,17 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2323: Type '{ x: number; }' is var a = { x: 1, y: 2 }; a = {}; // error ~ -!!! error TS2323: Type '{}' is not assignable to type '{ x: number; y: number; }'. -!!! error TS2323: Property 'x' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2322: Property 'x' is missing in type '{}'. a = { x: 1 }; // error ~ -!!! error TS2323: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. -!!! error TS2323: Property 'y' is missing in type '{ x: number; }'. +!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2322: Property 'y' is missing in type '{ x: number; }'. a = { x: 1, y: 2, z: 3 }; a = { x: 1, z: 3 }; // error ~ -!!! error TS2323: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. -!!! error TS2323: Property 'y' is missing in type '{ x: number; z: number; }'. +!!! error TS2322: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2322: Property 'y' is missing in type '{ x: number; z: number; }'. } class Animal { private a; } @@ -44,18 +44,18 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2323: Type '{ x: number; }' is aa = gg; gg = aa; // error ~~ -!!! error TS2323: Type 'Animal[]' is not assignable to type 'Giraffe[]'. -!!! error TS2323: Type 'Animal' is not assignable to type 'Giraffe'. -!!! error TS2323: Property 'g' is missing in type 'Animal'. +!!! error TS2322: Type 'Animal[]' is not assignable to type 'Giraffe[]'. +!!! error TS2322: Type 'Animal' is not assignable to type 'Giraffe'. +!!! error TS2322: Property 'g' is missing in type 'Animal'. var xa = { f1: 5, f2: aa }; var xb = { f1: 5, f2: gg }; xa = xb; // Should be ok xb = xa; // Not ok ~~ -!!! error TS2323: Type '{ f1: number; f2: Animal[]; }' is not assignable to type '{ f1: number; f2: Giraffe[]; }'. -!!! error TS2323: Types of property 'f2' are incompatible. -!!! error TS2323: Type 'Animal[]' is not assignable to type 'Giraffe[]'. -!!! error TS2323: Type 'Animal' is not assignable to type 'Giraffe'. +!!! error TS2322: Type '{ f1: number; f2: Animal[]; }' is not assignable to type '{ f1: number; f2: Giraffe[]; }'. +!!! error TS2322: Types of property 'f2' are incompatible. +!!! error TS2322: Type 'Animal[]' is not assignable to type 'Giraffe[]'. +!!! error TS2322: Type 'Animal' is not assignable to type 'Giraffe'. } function f4() { @@ -70,8 +70,8 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2323: Type '{ x: number; }' is a = { x: 1, y: _any, z:1 }; a = { x: 1 }; // error ~ -!!! error TS2323: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. -!!! error TS2323: Property 'y' is missing in type '{ x: number; }'. +!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2322: Property 'y' is missing in type '{ x: number; }'. var mf = function m(n) { return false; }; var zf = function z(n: number) { return true; }; mf=zf; diff --git a/tests/baselines/reference/typeName1.errors.txt b/tests/baselines/reference/typeName1.errors.txt index 6b896001b5a..64a32663875 100644 --- a/tests/baselines/reference/typeName1.errors.txt +++ b/tests/baselines/reference/typeName1.errors.txt @@ -1,32 +1,32 @@ -tests/cases/compiler/typeName1.ts(9,5): error TS2323: Type 'number' is not assignable to type '{ f(s: string): number; f(n: number): string; }'. +tests/cases/compiler/typeName1.ts(9,5): error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; f(n: number): string; }'. Property 'f' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(10,5): error TS2323: Type 'number' is not assignable to type '{ f(s: string): number; }'. +tests/cases/compiler/typeName1.ts(10,5): error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; }'. Property 'f' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(11,5): error TS2323: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; }'. -tests/cases/compiler/typeName1.ts(12,5): error TS2323: Type 'number' is not assignable to type '{ x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. +tests/cases/compiler/typeName1.ts(11,5): error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; }'. +tests/cases/compiler/typeName1.ts(12,5): error TS2322: Type 'number' is not assignable to type '{ x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. Property 'x' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(13,5): error TS2323: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. +tests/cases/compiler/typeName1.ts(13,5): error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. Property 'x' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(14,5): error TS2323: Type 'number' is not assignable to type '{ z: number; f: { (n: number): string; (s: string): number; }; }'. +tests/cases/compiler/typeName1.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ z: number; f: { (n: number): string; (s: string): number; }; }'. Property 'z' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(15,5): error TS2323: Type 'number' is not assignable to type '(s: string) => boolean'. -tests/cases/compiler/typeName1.ts(16,5): error TS2323: Type 'number' is not assignable to type '{ (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }'. +tests/cases/compiler/typeName1.ts(15,5): error TS2322: Type 'number' is not assignable to type '(s: string) => boolean'. +tests/cases/compiler/typeName1.ts(16,5): error TS2322: Type 'number' is not assignable to type '{ (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }'. Property 'z' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(16,10): error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'. -tests/cases/compiler/typeName1.ts(17,5): error TS2323: Type 'number' is not assignable to type 'I'. +tests/cases/compiler/typeName1.ts(17,5): error TS2322: Type 'number' is not assignable to type 'I'. Property 'k' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(18,5): error TS2323: Type 'number' is not assignable to type 'I[][][][]'. +tests/cases/compiler/typeName1.ts(18,5): error TS2322: Type 'number' is not assignable to type 'I[][][][]'. Property 'length' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(19,5): error TS2323: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]'. +tests/cases/compiler/typeName1.ts(19,5): error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]'. Property 'length' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(20,5): error TS2323: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }; }[][]'. +tests/cases/compiler/typeName1.ts(20,5): error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }; }[][]'. Property 'length' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(20,50): error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'. -tests/cases/compiler/typeName1.ts(21,5): error TS2323: Type 'number' is not assignable to type '{ (): {}; new (): number; new (n: number): number; x: string; w: { y: number; }; }'. +tests/cases/compiler/typeName1.ts(21,5): error TS2322: Type 'number' is not assignable to type '{ (): {}; new (): number; new (n: number): number; x: string; w: { y: number; }; }'. Property 'x' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(22,5): error TS2323: Type 'number' is not assignable to type '{ (): string; f(x: number): boolean; p: any; q: any; }'. +tests/cases/compiler/typeName1.ts(22,5): error TS2322: Type 'number' is not assignable to type '{ (): string; f(x: number): boolean; p: any; q: any; }'. Property 'f' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(23,5): error TS2323: Type 'typeof C' is not assignable to type 'number'. +tests/cases/compiler/typeName1.ts(23,5): error TS2322: Type 'typeof C' is not assignable to type 'number'. ==== tests/cases/compiler/typeName1.ts (17 errors) ==== @@ -40,65 +40,65 @@ tests/cases/compiler/typeName1.ts(23,5): error TS2323: Type 'typeof C' is not as var x1:{ f(s:string):number;f(n:number):string; }=3; ~~ -!!! error TS2323: Type 'number' is not assignable to type '{ f(s: string): number; f(n: number): string; }'. -!!! error TS2323: Property 'f' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; f(n: number): string; }'. +!!! error TS2322: Property 'f' is missing in type 'Number'. var x2:{ f(s:string):number; } =3; ~~ -!!! error TS2323: Type 'number' is not assignable to type '{ f(s: string): number; }'. -!!! error TS2323: Property 'f' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; }'. +!!! error TS2322: Property 'f' is missing in type 'Number'. var x3:{ (s:string):number;(n:number):string; }=3; ~~ -!!! error TS2323: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; }'. +!!! error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; }'. var x4:{ x;y;z:number;f(n:number):string;f(s:string):number; }=3; ~~ -!!! error TS2323: Type 'number' is not assignable to type '{ x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. -!!! error TS2323: Property 'x' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. +!!! error TS2322: Property 'x' is missing in type 'Number'. var x5:{ (s:string):number;(n:number):string;x;y;z:number;f(n:number):string;f(s:string):number; }=3; ~~ -!!! error TS2323: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. -!!! error TS2323: Property 'x' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. +!!! error TS2322: Property 'x' is missing in type 'Number'. var x6:{ z:number;f:{(n:number):string;(s:string):number;}; }=3; ~~ -!!! error TS2323: Type 'number' is not assignable to type '{ z: number; f: { (n: number): string; (s: string): number; }; }'. -!!! error TS2323: Property 'z' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ z: number; f: { (n: number): string; (s: string): number; }; }'. +!!! error TS2322: Property 'z' is missing in type 'Number'. var x7:(s:string)=>boolean=3; ~~ -!!! error TS2323: Type 'number' is not assignable to type '(s: string) => boolean'. +!!! error TS2322: Type 'number' is not assignable to type '(s: string) => boolean'. var x8:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; }=3; ~~ -!!! error TS2323: Type 'number' is not assignable to type '{ (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }'. -!!! error TS2323: Property 'z' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }'. +!!! error TS2322: Property 'z' is missing in type 'Number'. ~~~~ !!! error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'. var x9:I=3; ~~ -!!! error TS2323: Type 'number' is not assignable to type 'I'. -!!! error TS2323: Property 'k' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'I'. +!!! error TS2322: Property 'k' is missing in type 'Number'. var x10:I[][][][]=3; ~~~ -!!! error TS2323: Type 'number' is not assignable to type 'I[][][][]'. -!!! error TS2323: Property 'length' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'I[][][][]'. +!!! error TS2322: Property 'length' is missing in type 'Number'. var x11:{z:I;x:boolean;}[][]=3; ~~~ -!!! error TS2323: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]'. -!!! error TS2323: Property 'length' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]'. +!!! error TS2322: Property 'length' is missing in type 'Number'. var x12:{z:I;x:boolean;y:(s:string)=>boolean;w:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; };}[][]=3; ~~~ -!!! error TS2323: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }; }[][]'. -!!! error TS2323: Property 'length' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }; }[][]'. +!!! error TS2322: Property 'length' is missing in type 'Number'. ~~~~ !!! error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'. var x13:{ new(): number; new(n:number):number; x: string; w: {y: number;}; (): {}; } = 3; ~~~ -!!! error TS2323: Type 'number' is not assignable to type '{ (): {}; new (): number; new (n: number): number; x: string; w: { y: number; }; }'. -!!! error TS2323: Property 'x' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ (): {}; new (): number; new (n: number): number; x: string; w: { y: number; }; }'. +!!! error TS2322: Property 'x' is missing in type 'Number'. var x14:{ f(x:number):boolean; p; q; ():string; }=3; ~~~ -!!! error TS2323: Type 'number' is not assignable to type '{ (): string; f(x: number): boolean; p: any; q: any; }'. -!!! error TS2323: Property 'f' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ (): string; f(x: number): boolean; p: any; q: any; }'. +!!! error TS2322: Property 'f' is missing in type 'Number'. var x15:number=C; ~~~ -!!! error TS2323: Type 'typeof C' is not assignable to type 'number'. +!!! error TS2322: Type 'typeof C' is not assignable to type 'number'. diff --git a/tests/baselines/reference/typeOfOperator1.errors.txt b/tests/baselines/reference/typeOfOperator1.errors.txt index c703d3721db..764463a3087 100644 --- a/tests/baselines/reference/typeOfOperator1.errors.txt +++ b/tests/baselines/reference/typeOfOperator1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeOfOperator1.ts(3,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/typeOfOperator1.ts(3,5): error TS2322: Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/typeOfOperator1.ts (1 errors) ==== @@ -6,4 +6,4 @@ tests/cases/compiler/typeOfOperator1.ts(3,5): error TS2323: Type 'string' is not var y: string = typeof x; var z: number = typeof x; ~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt index 96db3e9110c..f47266f2850 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/typeParameterArgumentEquivalence.ts(4,5): error TS2323: Type '(item: T) => boolean' is not assignable to type '(item: number) => boolean'. +tests/cases/compiler/typeParameterArgumentEquivalence.ts(4,5): error TS2322: Type '(item: T) => boolean' is not assignable to type '(item: number) => boolean'. Types of parameters 'item' and 'item' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/compiler/typeParameterArgumentEquivalence.ts(5,5): error TS2323: Type '(item: number) => boolean' is not assignable to type '(item: T) => boolean'. +tests/cases/compiler/typeParameterArgumentEquivalence.ts(5,5): error TS2322: Type '(item: number) => boolean' is not assignable to type '(item: T) => boolean'. Types of parameters 'item' and 'item' are incompatible. Type 'number' is not assignable to type 'T'. @@ -12,13 +12,13 @@ tests/cases/compiler/typeParameterArgumentEquivalence.ts(5,5): error TS2323: Typ var y: (item: T) => boolean; x = y; // Should be an error ~ -!!! error TS2323: Type '(item: T) => boolean' is not assignable to type '(item: number) => boolean'. -!!! error TS2323: Types of parameters 'item' and 'item' are incompatible. -!!! error TS2323: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type '(item: T) => boolean' is not assignable to type '(item: number) => boolean'. +!!! error TS2322: Types of parameters 'item' and 'item' are incompatible. +!!! error TS2322: Type 'T' is not assignable to type 'number'. y = x; // Shound be an error ~ -!!! error TS2323: Type '(item: number) => boolean' is not assignable to type '(item: T) => boolean'. -!!! error TS2323: Types of parameters 'item' and 'item' are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'T'. +!!! error TS2322: Type '(item: number) => boolean' is not assignable to type '(item: T) => boolean'. +!!! error TS2322: Types of parameters 'item' and 'item' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt index f1350ebe853..2aa8d77ba6d 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/typeParameterArgumentEquivalence2.ts(4,5): error TS2323: Type '(item: T) => boolean' is not assignable to type '(item: U) => boolean'. +tests/cases/compiler/typeParameterArgumentEquivalence2.ts(4,5): error TS2322: Type '(item: T) => boolean' is not assignable to type '(item: U) => boolean'. Types of parameters 'item' and 'item' are incompatible. Type 'T' is not assignable to type 'U'. -tests/cases/compiler/typeParameterArgumentEquivalence2.ts(5,5): error TS2323: Type '(item: U) => boolean' is not assignable to type '(item: T) => boolean'. +tests/cases/compiler/typeParameterArgumentEquivalence2.ts(5,5): error TS2322: Type '(item: U) => boolean' is not assignable to type '(item: T) => boolean'. Types of parameters 'item' and 'item' are incompatible. Type 'U' is not assignable to type 'T'. @@ -12,13 +12,13 @@ tests/cases/compiler/typeParameterArgumentEquivalence2.ts(5,5): error TS2323: Ty var y: (item: T) => boolean; x = y; // Should be an error ~ -!!! error TS2323: Type '(item: T) => boolean' is not assignable to type '(item: U) => boolean'. -!!! error TS2323: Types of parameters 'item' and 'item' are incompatible. -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type '(item: T) => boolean' is not assignable to type '(item: U) => boolean'. +!!! error TS2322: Types of parameters 'item' and 'item' are incompatible. +!!! error TS2322: Type 'T' is not assignable to type 'U'. y = x; // Shound be an error ~ -!!! error TS2323: Type '(item: U) => boolean' is not assignable to type '(item: T) => boolean'. -!!! error TS2323: Types of parameters 'item' and 'item' are incompatible. -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type '(item: U) => boolean' is not assignable to type '(item: T) => boolean'. +!!! error TS2322: Types of parameters 'item' and 'item' are incompatible. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt index 59ac7d39e26..1f126d7c00d 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/typeParameterArgumentEquivalence3.ts(4,5): error TS2323: Type '(item: any) => boolean' is not assignable to type '(item: any) => T'. +tests/cases/compiler/typeParameterArgumentEquivalence3.ts(4,5): error TS2322: Type '(item: any) => boolean' is not assignable to type '(item: any) => T'. Type 'boolean' is not assignable to type 'T'. -tests/cases/compiler/typeParameterArgumentEquivalence3.ts(5,5): error TS2323: Type '(item: any) => T' is not assignable to type '(item: any) => boolean'. +tests/cases/compiler/typeParameterArgumentEquivalence3.ts(5,5): error TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => boolean'. Type 'T' is not assignable to type 'boolean'. @@ -10,11 +10,11 @@ tests/cases/compiler/typeParameterArgumentEquivalence3.ts(5,5): error TS2323: Ty var y: (item) => boolean; x = y; // Should be an error ~ -!!! error TS2323: Type '(item: any) => boolean' is not assignable to type '(item: any) => T'. -!!! error TS2323: Type 'boolean' is not assignable to type 'T'. +!!! error TS2322: Type '(item: any) => boolean' is not assignable to type '(item: any) => T'. +!!! error TS2322: Type 'boolean' is not assignable to type 'T'. y = x; // Shound be an error ~ -!!! error TS2323: Type '(item: any) => T' is not assignable to type '(item: any) => boolean'. -!!! error TS2323: Type 'T' is not assignable to type 'boolean'. +!!! error TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => boolean'. +!!! error TS2322: Type 'T' is not assignable to type 'boolean'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt index f62a5a0e4e7..c7b19e8725c 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/typeParameterArgumentEquivalence4.ts(4,5): error TS2323: Type '(item: any) => T' is not assignable to type '(item: any) => U'. +tests/cases/compiler/typeParameterArgumentEquivalence4.ts(4,5): error TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => U'. Type 'T' is not assignable to type 'U'. -tests/cases/compiler/typeParameterArgumentEquivalence4.ts(5,5): error TS2323: Type '(item: any) => U' is not assignable to type '(item: any) => T'. +tests/cases/compiler/typeParameterArgumentEquivalence4.ts(5,5): error TS2322: Type '(item: any) => U' is not assignable to type '(item: any) => T'. Type 'U' is not assignable to type 'T'. @@ -10,11 +10,11 @@ tests/cases/compiler/typeParameterArgumentEquivalence4.ts(5,5): error TS2323: Ty var y: (item) => T; x = y; // Should be an error ~ -!!! error TS2323: Type '(item: any) => T' is not assignable to type '(item: any) => U'. -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. y = x; // Shound be an error ~ -!!! error TS2323: Type '(item: any) => U' is not assignable to type '(item: any) => T'. -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type '(item: any) => U' is not assignable to type '(item: any) => T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt index 41d0162af5b..82290733a9e 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/typeParameterArgumentEquivalence5.ts(4,5): error TS2323: Type '() => (item: any) => T' is not assignable to type '() => (item: any) => U'. +tests/cases/compiler/typeParameterArgumentEquivalence5.ts(4,5): error TS2322: Type '() => (item: any) => T' is not assignable to type '() => (item: any) => U'. Type '(item: any) => T' is not assignable to type '(item: any) => U'. Type 'T' is not assignable to type 'U'. -tests/cases/compiler/typeParameterArgumentEquivalence5.ts(5,5): error TS2323: Type '() => (item: any) => U' is not assignable to type '() => (item: any) => T'. +tests/cases/compiler/typeParameterArgumentEquivalence5.ts(5,5): error TS2322: Type '() => (item: any) => U' is not assignable to type '() => (item: any) => T'. Type '(item: any) => U' is not assignable to type '(item: any) => T'. Type 'U' is not assignable to type 'T'. @@ -12,13 +12,13 @@ tests/cases/compiler/typeParameterArgumentEquivalence5.ts(5,5): error TS2323: Ty var y: () => (item) => T; x = y; // Should be an error ~ -!!! error TS2323: Type '() => (item: any) => T' is not assignable to type '() => (item: any) => U'. -!!! error TS2323: Type '(item: any) => T' is not assignable to type '(item: any) => U'. -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type '() => (item: any) => T' is not assignable to type '() => (item: any) => U'. +!!! error TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. y = x; // Shound be an error ~ -!!! error TS2323: Type '() => (item: any) => U' is not assignable to type '() => (item: any) => T'. -!!! error TS2323: Type '(item: any) => U' is not assignable to type '(item: any) => T'. -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type '() => (item: any) => U' is not assignable to type '() => (item: any) => T'. +!!! error TS2322: Type '(item: any) => U' is not assignable to type '(item: any) => T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAssignability.errors.txt b/tests/baselines/reference/typeParameterAssignability.errors.txt index 34032da1d06..0e8546097d0 100644 --- a/tests/baselines/reference/typeParameterAssignability.errors.txt +++ b/tests/baselines/reference/typeParameterAssignability.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts(4,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts(5,5): error TS2323: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts(4,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts(5,5): error TS2322: Type 'T' is not assignable to type 'U'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts (2 errors) ==== @@ -8,8 +8,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara function foo(t: T, u: U) { t = u; // error ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. u = t; // error ~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAssignability2.errors.txt b/tests/baselines/reference/typeParameterAssignability2.errors.txt index 8fe620cae88..b3cc924d419 100644 --- a/tests/baselines/reference/typeParameterAssignability2.errors.txt +++ b/tests/baselines/reference/typeParameterAssignability2.errors.txt @@ -1,50 +1,50 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(3,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(4,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(5,5): error TS2323: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(4,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(5,5): error TS2322: Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(8,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(9,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(10,5): error TS2323: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(9,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(10,5): error TS2322: Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(13,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(13,28): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(14,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(15,5): error TS2323: Type 'T' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(17,5): error TS2323: Type 'V' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(18,5): error TS2323: Type 'T' is not assignable to type 'V'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(20,5): error TS2323: Type 'V' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(21,5): error TS2323: Type 'U' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(14,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(15,5): error TS2322: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(17,5): error TS2322: Type 'V' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(18,5): error TS2322: Type 'T' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(20,5): error TS2322: Type 'V' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(21,5): error TS2322: Type 'U' is not assignable to type 'V'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(24,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(24,28): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(25,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(26,5): error TS2323: Type 'V' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(27,5): error TS2323: Type 'Date' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(29,5): error TS2323: Type 'T' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(30,5): error TS2323: Type 'V' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(31,5): error TS2323: Type 'Date' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(33,5): error TS2323: Type 'T' is not assignable to type 'V'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(34,5): error TS2323: Type 'U' is not assignable to type 'V'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(35,5): error TS2323: Type 'Date' is not assignable to type 'V'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(38,5): error TS2323: Type 'T' is not assignable to type 'Date'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(39,5): error TS2323: Type 'U' is not assignable to type 'Date'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(25,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(26,5): error TS2322: Type 'V' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(27,5): error TS2322: Type 'Date' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(29,5): error TS2322: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(30,5): error TS2322: Type 'V' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(31,5): error TS2322: Type 'Date' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(33,5): error TS2322: Type 'T' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(34,5): error TS2322: Type 'U' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(35,5): error TS2322: Type 'Date' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(38,5): error TS2322: Type 'T' is not assignable to type 'Date'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(39,5): error TS2322: Type 'U' is not assignable to type 'Date'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(44,31): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(44,44): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(45,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(46,5): error TS2323: Type 'V' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(47,5): error TS2323: Type 'Date' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(49,5): error TS2323: Type 'T' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(50,5): error TS2323: Type 'V' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(51,5): error TS2323: Type 'Date' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(53,5): error TS2323: Type 'T' is not assignable to type 'V'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(54,5): error TS2323: Type 'U' is not assignable to type 'V'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(55,5): error TS2323: Type 'Date' is not assignable to type 'V'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(58,5): error TS2323: Type 'T' is not assignable to type 'Date'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(59,5): error TS2323: Type 'U' is not assignable to type 'Date'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(45,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(46,5): error TS2322: Type 'V' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(47,5): error TS2322: Type 'Date' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(49,5): error TS2322: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(50,5): error TS2322: Type 'V' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(51,5): error TS2322: Type 'Date' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(53,5): error TS2322: Type 'T' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(54,5): error TS2322: Type 'U' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(55,5): error TS2322: Type 'Date' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(58,5): error TS2322: Type 'T' is not assignable to type 'Date'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(59,5): error TS2322: Type 'U' is not assignable to type 'Date'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(63,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(64,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(65,5): error TS2323: Type 'V' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(67,5): error TS2323: Type 'T' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(68,5): error TS2323: Type 'V' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(70,5): error TS2323: Type 'T' is not assignable to type 'V'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(71,5): error TS2323: Type 'U' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(64,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(65,5): error TS2322: Type 'V' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(67,5): error TS2322: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(68,5): error TS2322: Type 'V' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(70,5): error TS2322: Type 'T' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(71,5): error TS2322: Type 'U' is not assignable to type 'V'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts (47 errors) ==== @@ -55,10 +55,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. t = u; // error ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. u = t; // ok ~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } function foo2(t: T, u: U) { @@ -66,10 +66,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. t = u; // error ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. u = t; // ok ~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } function foo3(t: T, u: U, v: V) { @@ -79,24 +79,24 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. t = u; // error ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. u = t; ~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. t = v; // error ~ -!!! error TS2323: Type 'V' is not assignable to type 'T'. +!!! error TS2322: Type 'V' is not assignable to type 'T'. v = t; // ok ~ -!!! error TS2323: Type 'T' is not assignable to type 'V'. +!!! error TS2322: Type 'T' is not assignable to type 'V'. u = v; // error ~ -!!! error TS2323: Type 'V' is not assignable to type 'U'. +!!! error TS2322: Type 'V' is not assignable to type 'U'. v = u; // ok ~ -!!! error TS2323: Type 'U' is not assignable to type 'V'. +!!! error TS2322: Type 'U' is not assignable to type 'V'. } function foo4(t: T, u: U, v: V) { @@ -106,41 +106,41 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. t = u; // error ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. t = v; // error ~ -!!! error TS2323: Type 'V' is not assignable to type 'T'. +!!! error TS2322: Type 'V' is not assignable to type 'T'. t = new Date(); // error ~ -!!! error TS2323: Type 'Date' is not assignable to type 'T'. +!!! error TS2322: Type 'Date' is not assignable to type 'T'. u = t; ~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. u = v; // error ~ -!!! error TS2323: Type 'V' is not assignable to type 'U'. +!!! error TS2322: Type 'V' is not assignable to type 'U'. u = new Date(); // error ~ -!!! error TS2323: Type 'Date' is not assignable to type 'U'. +!!! error TS2322: Type 'Date' is not assignable to type 'U'. v = t; ~ -!!! error TS2323: Type 'T' is not assignable to type 'V'. +!!! error TS2322: Type 'T' is not assignable to type 'V'. v = u; ~ -!!! error TS2323: Type 'U' is not assignable to type 'V'. +!!! error TS2322: Type 'U' is not assignable to type 'V'. v = new Date(); // ok ~ -!!! error TS2323: Type 'Date' is not assignable to type 'V'. +!!! error TS2322: Type 'Date' is not assignable to type 'V'. var d: Date; d = t; // ok ~ -!!! error TS2323: Type 'T' is not assignable to type 'Date'. +!!! error TS2322: Type 'T' is not assignable to type 'Date'. d = u; // ok ~ -!!! error TS2323: Type 'U' is not assignable to type 'Date'. +!!! error TS2322: Type 'U' is not assignable to type 'Date'. d = v; // ok } @@ -152,41 +152,41 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. t = u; // error ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. t = v; // error ~ -!!! error TS2323: Type 'V' is not assignable to type 'T'. +!!! error TS2322: Type 'V' is not assignable to type 'T'. t = new Date(); // error ~ -!!! error TS2323: Type 'Date' is not assignable to type 'T'. +!!! error TS2322: Type 'Date' is not assignable to type 'T'. u = t; ~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. u = v; // error ~ -!!! error TS2323: Type 'V' is not assignable to type 'U'. +!!! error TS2322: Type 'V' is not assignable to type 'U'. u = new Date(); // error ~ -!!! error TS2323: Type 'Date' is not assignable to type 'U'. +!!! error TS2322: Type 'Date' is not assignable to type 'U'. v = t; ~ -!!! error TS2323: Type 'T' is not assignable to type 'V'. +!!! error TS2322: Type 'T' is not assignable to type 'V'. v = u; ~ -!!! error TS2323: Type 'U' is not assignable to type 'V'. +!!! error TS2322: Type 'U' is not assignable to type 'V'. v = new Date(); // ok ~ -!!! error TS2323: Type 'Date' is not assignable to type 'V'. +!!! error TS2322: Type 'Date' is not assignable to type 'V'. var d: Date; d = t; // ok ~ -!!! error TS2323: Type 'T' is not assignable to type 'Date'. +!!! error TS2322: Type 'T' is not assignable to type 'Date'. d = u; // ok ~ -!!! error TS2323: Type 'U' is not assignable to type 'Date'. +!!! error TS2322: Type 'U' is not assignable to type 'Date'. d = v; // ok } @@ -195,22 +195,22 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. t = u; // error ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. t = v; // error ~ -!!! error TS2323: Type 'V' is not assignable to type 'T'. +!!! error TS2322: Type 'V' is not assignable to type 'T'. u = t; // ok ~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. u = v; // error ~ -!!! error TS2323: Type 'V' is not assignable to type 'U'. +!!! error TS2322: Type 'V' is not assignable to type 'U'. v = t; // error ~ -!!! error TS2323: Type 'T' is not assignable to type 'V'. +!!! error TS2322: Type 'T' is not assignable to type 'V'. v = u; // error ~ -!!! error TS2323: Type 'U' is not assignable to type 'V'. +!!! error TS2322: Type 'U' is not assignable to type 'V'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAssignability3.errors.txt b/tests/baselines/reference/typeParameterAssignability3.errors.txt index c5152a1e3fd..7dbb24ef643 100644 --- a/tests/baselines/reference/typeParameterAssignability3.errors.txt +++ b/tests/baselines/reference/typeParameterAssignability3.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts(14,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts(15,5): error TS2323: Type 'T' is not assignable to type 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts(22,9): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts(23,9): error TS2323: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts(14,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts(15,5): error TS2322: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts(22,9): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts(23,9): error TS2322: Type 'T' is not assignable to type 'U'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts (4 errors) ==== @@ -20,10 +20,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara t = u; // error ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. u = t; // error ~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } class C { @@ -32,9 +32,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara r = () => { this.t = this.u; // error ~~~~~~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. this.u = this.t; // error ~~~~~~ -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt b/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt index a2692184aff..d3bc25c00b1 100644 --- a/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt +++ b/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/typeParameterAssignmentCompat1.ts(8,5): error TS2323: Type 'Foo' is not assignable to type 'Foo'. +tests/cases/compiler/typeParameterAssignmentCompat1.ts(8,5): error TS2322: Type 'Foo' is not assignable to type 'Foo'. Type 'U' is not assignable to type 'T'. -tests/cases/compiler/typeParameterAssignmentCompat1.ts(9,12): error TS2323: Type 'Foo' is not assignable to type 'Foo'. +tests/cases/compiler/typeParameterAssignmentCompat1.ts(9,12): error TS2322: Type 'Foo' is not assignable to type 'Foo'. Type 'T' is not assignable to type 'U'. -tests/cases/compiler/typeParameterAssignmentCompat1.ts(16,9): error TS2323: Type 'Foo' is not assignable to type 'Foo'. +tests/cases/compiler/typeParameterAssignmentCompat1.ts(16,9): error TS2322: Type 'Foo' is not assignable to type 'Foo'. Type 'U' is not assignable to type 'T'. -tests/cases/compiler/typeParameterAssignmentCompat1.ts(17,16): error TS2323: Type 'Foo' is not assignable to type 'Foo'. +tests/cases/compiler/typeParameterAssignmentCompat1.ts(17,16): error TS2322: Type 'Foo' is not assignable to type 'Foo'. Type 'T' is not assignable to type 'U'. @@ -18,12 +18,12 @@ tests/cases/compiler/typeParameterAssignmentCompat1.ts(17,16): error TS2323: Typ var y: Foo; x = y; // should be an error ~ -!!! error TS2323: Type 'Foo' is not assignable to type 'Foo'. -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'Foo' is not assignable to type 'Foo'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return x; ~ -!!! error TS2323: Type 'Foo' is not assignable to type 'Foo'. -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'Foo' is not assignable to type 'Foo'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } class C { @@ -32,11 +32,11 @@ tests/cases/compiler/typeParameterAssignmentCompat1.ts(17,16): error TS2323: Typ var y: Foo; x = y; // should be an error ~ -!!! error TS2323: Type 'Foo' is not assignable to type 'Foo'. -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'Foo' is not assignable to type 'Foo'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return x; ~ -!!! error TS2323: Type 'Foo' is not assignable to type 'Foo'. -!!! error TS2323: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'Foo' is not assignable to type 'Foo'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAssignmentWithConstraints.errors.txt b/tests/baselines/reference/typeParameterAssignmentWithConstraints.errors.txt index c3b552b2057..3ada2e3c375 100644 --- a/tests/baselines/reference/typeParameterAssignmentWithConstraints.errors.txt +++ b/tests/baselines/reference/typeParameterAssignmentWithConstraints.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/typeParameterAssignmentWithConstraints.ts(1,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/compiler/typeParameterAssignmentWithConstraints.ts(4,5): error TS2323: Type 'B' is not assignable to type 'A'. +tests/cases/compiler/typeParameterAssignmentWithConstraints.ts(4,5): error TS2322: Type 'B' is not assignable to type 'A'. ==== tests/cases/compiler/typeParameterAssignmentWithConstraints.ts (2 errors) ==== @@ -10,5 +10,5 @@ tests/cases/compiler/typeParameterAssignmentWithConstraints.ts(4,5): error TS232 var b: B; a = b; // Error: Can't convert B to A ~ -!!! error TS2323: Type 'B' is not assignable to type 'A'. +!!! error TS2322: Type 'B' is not assignable to type 'A'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterHasSelfAsConstraint.errors.txt b/tests/baselines/reference/typeParameterHasSelfAsConstraint.errors.txt index c109e612913..409aa5ebfb6 100644 --- a/tests/baselines/reference/typeParameterHasSelfAsConstraint.errors.txt +++ b/tests/baselines/reference/typeParameterHasSelfAsConstraint.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/typeParameterHasSelfAsConstraint.ts(1,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/compiler/typeParameterHasSelfAsConstraint.ts(2,12): error TS2323: Type 'T' is not assignable to type 'number'. +tests/cases/compiler/typeParameterHasSelfAsConstraint.ts(2,12): error TS2322: Type 'T' is not assignable to type 'number'. ==== tests/cases/compiler/typeParameterHasSelfAsConstraint.ts (2 errors) ==== @@ -8,7 +8,7 @@ tests/cases/compiler/typeParameterHasSelfAsConstraint.ts(2,12): error TS2323: Ty !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return x; ~ -!!! error TS2323: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type 'T' is not assignable to type 'number'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint.errors.txt b/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint.errors.txt index a1b2886911d..9860b9ac59f 100644 --- a/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint.errors.txt +++ b/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint.errors.txt @@ -1,21 +1,21 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(3,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(4,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(5,12): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(4,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(5,12): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(8,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(9,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(10,12): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(9,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(10,12): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(13,22): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(14,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(15,12): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(14,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(15,12): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(18,20): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(19,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(20,12): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(19,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(20,12): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(23,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(24,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(25,12): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(24,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(25,12): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(28,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(29,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(30,12): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(29,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts(30,12): error TS2322: Type 'U' is not assignable to type 'T'. ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts (18 errors) ==== @@ -26,10 +26,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } function foo2(x: T, y: U): T { @@ -37,10 +37,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } var f = function (x: T, y: U): T { @@ -48,10 +48,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } var f2 = function (x: T, y: U): T { @@ -59,10 +59,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } var f3 = (x: T, y: U): T => { @@ -70,10 +70,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } var f4 = (x: T, y: U): T => { @@ -81,8 +81,8 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint2.errors.txt b/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint2.errors.txt index e349962121f..12b90ac8525 100644 --- a/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint2.errors.txt +++ b/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint2.errors.txt @@ -1,21 +1,21 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(4,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(7,13): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(8,20): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(7,13): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(8,20): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(13,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(16,13): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(17,20): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(16,13): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(17,20): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(22,22): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(25,13): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(26,20): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(25,13): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(26,20): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(31,20): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(34,13): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(35,20): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(34,13): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(35,20): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(40,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(43,13): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(44,20): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(43,13): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(44,20): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(49,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(52,13): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(53,20): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(52,13): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts(53,20): error TS2322: Type 'U' is not assignable to type 'T'. ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts (18 errors) ==== @@ -29,10 +29,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed function baz(a: X, b: Y): T { x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } } } @@ -44,10 +44,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed function baz(a: X, b: Y): T { x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } } } @@ -59,10 +59,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed var g = function (a: X, b: Y): T { x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } } } @@ -74,10 +74,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed var g = function baz(a: X, b: Y): T { x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } } } @@ -89,10 +89,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed var g = (a: X, b: Y): T => { x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } } } @@ -104,10 +104,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed var g = (a: X, b: Y): T => { x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } } } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint4.errors.txt b/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint4.errors.txt index 97b4754a874..983f2798554 100644 --- a/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint4.errors.txt +++ b/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint4.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(4,12): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(4,25): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(5,8): error TS2304: Cannot find name 'W'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(8,16): error TS2323: Type 'W' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(8,16): error TS2322: Type 'W' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(12,16): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(12,29): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(15,8): error TS2304: Cannot find name 'W'. @@ -10,20 +10,20 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(19,43): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(20,47): error TS2304: Cannot find name 'X'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(20,47): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(22,13): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(23,20): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(22,13): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(23,20): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(28,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(28,44): error TS2304: Cannot find name 'W'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(28,44): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(29,47): error TS2304: Cannot find name 'Y'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(29,47): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(31,13): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(32,20): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(31,13): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(32,20): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(37,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(38,47): error TS2304: Cannot find name 'X'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(38,53): error TS2304: Cannot find name 'Y'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(40,13): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(41,20): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(40,13): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(41,20): error TS2322: Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(46,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(46,30): error TS2304: Cannot find name 'V'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts(46,36): error TS2304: Cannot find name 'X'. @@ -45,7 +45,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed var r: T; return x; ~ -!!! error TS2323: Type 'W' is not assignable to type 'T'. +!!! error TS2322: Type 'W' is not assignable to type 'T'. } } @@ -77,10 +77,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed function baz(a: X, b: Y): T { x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } } } @@ -100,10 +100,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed function baz(a: X, b: Y): T { x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } } } @@ -119,10 +119,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsed var g = (a: X, b: Y): T => { x = y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. return y; ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. } } } diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt b/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt index 77579ef752b..6f5e2766c8c 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/typeParametersShouldNotBeEqual.ts(4,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/compiler/typeParametersShouldNotBeEqual.ts(5,5): error TS2323: Type 'Object' is not assignable to type 'T'. +tests/cases/compiler/typeParametersShouldNotBeEqual.ts(4,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/compiler/typeParametersShouldNotBeEqual.ts(5,5): error TS2322: Type 'Object' is not assignable to type 'T'. ==== tests/cases/compiler/typeParametersShouldNotBeEqual.ts (2 errors) ==== @@ -8,10 +8,10 @@ tests/cases/compiler/typeParametersShouldNotBeEqual.ts(5,5): error TS2323: Type x = x; // Ok x = y; // Error ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. x = z; // Error ~ -!!! error TS2323: Type 'Object' is not assignable to type 'T'. +!!! error TS2322: Type 'Object' is not assignable to type 'T'. z = x; // Ok } \ No newline at end of file diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt b/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt index 7330fdb35f6..0d9375140ab 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(4,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(5,5): error TS2323: Type 'V' is not assignable to type 'T'. -tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(6,5): error TS2323: Type 'T' is not assignable to type 'V'. -tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(7,5): error TS2323: Type 'V' is not assignable to type 'U'. -tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(8,5): error TS2323: Type 'U' is not assignable to type 'V'. -tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(9,5): error TS2323: Type 'Object' is not assignable to type 'T'. +tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(4,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(5,5): error TS2322: Type 'V' is not assignable to type 'T'. +tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(6,5): error TS2322: Type 'T' is not assignable to type 'V'. +tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(7,5): error TS2322: Type 'V' is not assignable to type 'U'. +tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(8,5): error TS2322: Type 'U' is not assignable to type 'V'. +tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(9,5): error TS2322: Type 'Object' is not assignable to type 'T'. ==== tests/cases/compiler/typeParametersShouldNotBeEqual2.ts (6 errors) ==== @@ -12,22 +12,22 @@ tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(9,5): error TS2323: Type x = x; // Ok x = y; // Ok ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. x = z; // Error ~ -!!! error TS2323: Type 'V' is not assignable to type 'T'. +!!! error TS2322: Type 'V' is not assignable to type 'T'. z = x; // Error ~ -!!! error TS2323: Type 'T' is not assignable to type 'V'. +!!! error TS2322: Type 'T' is not assignable to type 'V'. y = z; // Error ~ -!!! error TS2323: Type 'V' is not assignable to type 'U'. +!!! error TS2322: Type 'V' is not assignable to type 'U'. z = y; // Error ~ -!!! error TS2323: Type 'U' is not assignable to type 'V'. +!!! error TS2322: Type 'U' is not assignable to type 'V'. x = zz; // Error ~ -!!! error TS2323: Type 'Object' is not assignable to type 'T'. +!!! error TS2322: Type 'Object' is not assignable to type 'T'. zz = x; // Ok } \ No newline at end of file diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt b/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt index 04509cd14a8..5b1a8e9ae7e 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/typeParametersShouldNotBeEqual3.ts(4,5): error TS2323: Type 'U' is not assignable to type 'T'. -tests/cases/compiler/typeParametersShouldNotBeEqual3.ts(5,5): error TS2323: Type 'Object' is not assignable to type 'T'. +tests/cases/compiler/typeParametersShouldNotBeEqual3.ts(4,5): error TS2322: Type 'U' is not assignable to type 'T'. +tests/cases/compiler/typeParametersShouldNotBeEqual3.ts(5,5): error TS2322: Type 'Object' is not assignable to type 'T'. ==== tests/cases/compiler/typeParametersShouldNotBeEqual3.ts (2 errors) ==== @@ -8,10 +8,10 @@ tests/cases/compiler/typeParametersShouldNotBeEqual3.ts(5,5): error TS2323: Type x = x; // Ok x = y; // Ok ~ -!!! error TS2323: Type 'U' is not assignable to type 'T'. +!!! error TS2322: Type 'U' is not assignable to type 'T'. x = z; // Ok ~ -!!! error TS2323: Type 'Object' is not assignable to type 'T'. +!!! error TS2322: Type 'Object' is not assignable to type 'T'. z = x; // Ok } \ No newline at end of file diff --git a/tests/baselines/reference/typeofAmbientExternalModules.errors.txt b/tests/baselines/reference/typeofAmbientExternalModules.errors.txt index 007581e54f2..cde3247b7cd 100644 --- a/tests/baselines/reference/typeofAmbientExternalModules.errors.txt +++ b/tests/baselines/reference/typeofAmbientExternalModules.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/typeofAmbientExternalModules_2.ts(7,1): error TS2323: Type 'typeof D' is not assignable to type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"'. +tests/cases/compiler/typeofAmbientExternalModules_2.ts(7,1): error TS2322: Type 'typeof D' is not assignable to type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"'. Property 'C' is missing in type 'typeof D'. -tests/cases/compiler/typeofAmbientExternalModules_2.ts(9,1): error TS2323: Type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"' is not assignable to type 'typeof D'. +tests/cases/compiler/typeofAmbientExternalModules_2.ts(9,1): error TS2322: Type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"' is not assignable to type 'typeof D'. Property 'prototype' is missing in type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"'. @@ -13,13 +13,13 @@ tests/cases/compiler/typeofAmbientExternalModules_2.ts(9,1): error TS2323: Type var y1: typeof ext = ext; y1 = exp; ~~ -!!! error TS2323: Type 'typeof D' is not assignable to type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"'. -!!! error TS2323: Property 'C' is missing in type 'typeof D'. +!!! error TS2322: Type 'typeof D' is not assignable to type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"'. +!!! error TS2322: Property 'C' is missing in type 'typeof D'. var y2: typeof exp = exp; y2 = ext; ~~ -!!! error TS2323: Type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"' is not assignable to type 'typeof D'. -!!! error TS2323: Property 'prototype' is missing in type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"'. +!!! error TS2322: Type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"' is not assignable to type 'typeof D'. +!!! error TS2322: Property 'prototype' is missing in type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"'. ==== tests/cases/compiler/typeofAmbientExternalModules_0.ts (0 errors) ==== export class C { foo: string; } diff --git a/tests/baselines/reference/typeofExternalModules.errors.txt b/tests/baselines/reference/typeofExternalModules.errors.txt index a7610f299da..05b56c9fe1b 100644 --- a/tests/baselines/reference/typeofExternalModules.errors.txt +++ b/tests/baselines/reference/typeofExternalModules.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/typeofExternalModules_core.ts(5,1): error TS2323: Type 'typeof D' is not assignable to type 'typeof "tests/cases/compiler/typeofExternalModules_external"'. +tests/cases/compiler/typeofExternalModules_core.ts(5,1): error TS2322: Type 'typeof D' is not assignable to type 'typeof "tests/cases/compiler/typeofExternalModules_external"'. Property 'C' is missing in type 'typeof D'. -tests/cases/compiler/typeofExternalModules_core.ts(7,1): error TS2323: Type 'typeof "tests/cases/compiler/typeofExternalModules_external"' is not assignable to type 'typeof D'. +tests/cases/compiler/typeofExternalModules_core.ts(7,1): error TS2322: Type 'typeof "tests/cases/compiler/typeofExternalModules_external"' is not assignable to type 'typeof D'. Property 'prototype' is missing in type 'typeof "tests/cases/compiler/typeofExternalModules_external"'. @@ -11,13 +11,13 @@ tests/cases/compiler/typeofExternalModules_core.ts(7,1): error TS2323: Type 'typ var y1: typeof ext = ext; y1 = exp; ~~ -!!! error TS2323: Type 'typeof D' is not assignable to type 'typeof "tests/cases/compiler/typeofExternalModules_external"'. -!!! error TS2323: Property 'C' is missing in type 'typeof D'. +!!! error TS2322: Type 'typeof D' is not assignable to type 'typeof "tests/cases/compiler/typeofExternalModules_external"'. +!!! error TS2322: Property 'C' is missing in type 'typeof D'. var y2: typeof exp = exp; y2 = ext; ~~ -!!! error TS2323: Type 'typeof "tests/cases/compiler/typeofExternalModules_external"' is not assignable to type 'typeof D'. -!!! error TS2323: Property 'prototype' is missing in type 'typeof "tests/cases/compiler/typeofExternalModules_external"'. +!!! error TS2322: Type 'typeof "tests/cases/compiler/typeofExternalModules_external"' is not assignable to type 'typeof D'. +!!! error TS2322: Property 'prototype' is missing in type 'typeof "tests/cases/compiler/typeofExternalModules_external"'. ==== tests/cases/compiler/typeofExternalModules_external.ts (0 errors) ==== export class C { } diff --git a/tests/baselines/reference/typeofInternalModules.errors.txt b/tests/baselines/reference/typeofInternalModules.errors.txt index 7743f70946f..c98456c3404 100644 --- a/tests/baselines/reference/typeofInternalModules.errors.txt +++ b/tests/baselines/reference/typeofInternalModules.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/typeofInternalModules.ts(15,16): error TS2304: Cannot find name 'importUninst'. tests/cases/compiler/typeofInternalModules.ts(17,9): error TS2304: Cannot find name 'Outer'. -tests/cases/compiler/typeofInternalModules.ts(19,1): error TS2323: Type 'typeof Outer' is not assignable to type 'typeof instantiated'. +tests/cases/compiler/typeofInternalModules.ts(19,1): error TS2322: Type 'typeof Outer' is not assignable to type 'typeof instantiated'. Property 'C' is missing in type 'typeof Outer'. tests/cases/compiler/typeofInternalModules.ts(21,16): error TS2304: Cannot find name 'importUninst'. -tests/cases/compiler/typeofInternalModules.ts(23,1): error TS2323: Type 'typeof instantiated' is not assignable to type 'typeof Outer'. +tests/cases/compiler/typeofInternalModules.ts(23,1): error TS2322: Type 'typeof instantiated' is not assignable to type 'typeof Outer'. Property 'instantiated' is missing in type 'typeof instantiated'. @@ -32,8 +32,8 @@ tests/cases/compiler/typeofInternalModules.ts(23,1): error TS2323: Type 'typeof var x5: typeof importInst; x5 = Outer; ~~ -!!! error TS2323: Type 'typeof Outer' is not assignable to type 'typeof instantiated'. -!!! error TS2323: Property 'C' is missing in type 'typeof Outer'. +!!! error TS2322: Type 'typeof Outer' is not assignable to type 'typeof instantiated'. +!!! error TS2322: Property 'C' is missing in type 'typeof Outer'. x5 = Outer.instantiated; var x6: typeof importUninst; ~~~~~~~~~~~~ @@ -41,6 +41,6 @@ tests/cases/compiler/typeofInternalModules.ts(23,1): error TS2323: Type 'typeof var x7: typeof Outer = Outer; x7 = importInst; ~~ -!!! error TS2323: Type 'typeof instantiated' is not assignable to type 'typeof Outer'. -!!! error TS2323: Property 'instantiated' is missing in type 'typeof instantiated'. +!!! error TS2322: Type 'typeof instantiated' is not assignable to type 'typeof Outer'. +!!! error TS2322: Property 'instantiated' is missing in type 'typeof instantiated'. \ No newline at end of file diff --git a/tests/baselines/reference/typeofSimple.errors.txt b/tests/baselines/reference/typeofSimple.errors.txt index a978782d399..845a9fbbce3 100644 --- a/tests/baselines/reference/typeofSimple.errors.txt +++ b/tests/baselines/reference/typeofSimple.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeofSimple.ts(3,5): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/typeofSimple.ts(3,5): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/compiler/typeofSimple.ts(8,21): error TS2304: Cannot find name 'J'. @@ -7,7 +7,7 @@ tests/cases/compiler/typeofSimple.ts(8,21): error TS2304: Cannot find name 'J'. var v2: typeof v; var v3: string = v2; // Not assignment compatible ~~ -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. interface I { x: T; } interface J { } diff --git a/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.errors.txt b/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.errors.txt index d90944c906a..4af38220c07 100644 --- a/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.errors.txt +++ b/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/foo_1.ts(5,5): error TS2323: Type 'typeof "tests/cases/conformance/externalModules/foo_0"' is not assignable to type '{ M2: Object; }'. +tests/cases/conformance/externalModules/foo_1.ts(5,5): error TS2322: Type 'typeof "tests/cases/conformance/externalModules/foo_0"' is not assignable to type '{ M2: Object; }'. Property 'M2' is missing in type 'typeof "tests/cases/conformance/externalModules/foo_0"'. @@ -9,8 +9,8 @@ tests/cases/conformance/externalModules/foo_1.ts(5,5): error TS2323: Type 'typeo var x: typeof foo0 = {}; var y: {M2: Object} = foo0; ~ -!!! error TS2323: Type 'typeof "tests/cases/conformance/externalModules/foo_0"' is not assignable to type '{ M2: Object; }'. -!!! error TS2323: Property 'M2' is missing in type 'typeof "tests/cases/conformance/externalModules/foo_0"'. +!!! error TS2322: Type 'typeof "tests/cases/conformance/externalModules/foo_0"' is not assignable to type '{ M2: Object; }'. +!!! error TS2322: Property 'M2' is missing in type 'typeof "tests/cases/conformance/externalModules/foo_0"'. ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== export interface Person { diff --git a/tests/baselines/reference/typesWithPrivateConstructor.errors.txt b/tests/baselines/reference/typesWithPrivateConstructor.errors.txt index 6e259a66925..010831effe8 100644 --- a/tests/baselines/reference/typesWithPrivateConstructor.errors.txt +++ b/tests/baselines/reference/typesWithPrivateConstructor.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/types/members/typesWithPrivateConstructor.ts(4,5): error TS1089: 'private' modifier cannot appear on a constructor declaration. tests/cases/conformance/types/members/typesWithPrivateConstructor.ts(11,5): error TS1089: 'private' modifier cannot appear on a constructor declaration. tests/cases/conformance/types/members/typesWithPrivateConstructor.ts(12,5): error TS1089: 'private' modifier cannot appear on a constructor declaration. -tests/cases/conformance/types/members/typesWithPrivateConstructor.ts(8,5): error TS2323: Type 'Function' is not assignable to type '() => void'. +tests/cases/conformance/types/members/typesWithPrivateConstructor.ts(8,5): error TS2322: Type 'Function' is not assignable to type '() => void'. tests/cases/conformance/types/members/typesWithPrivateConstructor.ts(15,10): error TS2346: Supplied parameters do not match any signature of call target. @@ -17,7 +17,7 @@ tests/cases/conformance/types/members/typesWithPrivateConstructor.ts(15,10): err var c = new C(); var r: () => void = c.constructor; ~ -!!! error TS2323: Type 'Function' is not assignable to type '() => void'. +!!! error TS2322: Type 'Function' is not assignable to type '() => void'. class C2 { private constructor(x: number); diff --git a/tests/baselines/reference/typesWithPublicConstructor.errors.txt b/tests/baselines/reference/typesWithPublicConstructor.errors.txt index 562d0b255eb..a3d66c3520a 100644 --- a/tests/baselines/reference/typesWithPublicConstructor.errors.txt +++ b/tests/baselines/reference/typesWithPublicConstructor.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/members/typesWithPublicConstructor.ts(8,5): error TS2323: Type 'Function' is not assignable to type '() => void'. +tests/cases/conformance/types/members/typesWithPublicConstructor.ts(8,5): error TS2322: Type 'Function' is not assignable to type '() => void'. tests/cases/conformance/types/members/typesWithPublicConstructor.ts(15,10): error TS2346: Supplied parameters do not match any signature of call target. @@ -12,7 +12,7 @@ tests/cases/conformance/types/members/typesWithPublicConstructor.ts(15,10): erro var c = new C(); var r: () => void = c.constructor; ~ -!!! error TS2323: Type 'Function' is not assignable to type '() => void'. +!!! error TS2322: Type 'Function' is not assignable to type '() => void'. class C2 { public constructor(x: number); diff --git a/tests/baselines/reference/widenToAny1.errors.txt b/tests/baselines/reference/widenToAny1.errors.txt index 940637008f4..082f93e00be 100644 --- a/tests/baselines/reference/widenToAny1.errors.txt +++ b/tests/baselines/reference/widenToAny1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/widenToAny1.ts(5,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/widenToAny1.ts(5,5): error TS2322: Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/widenToAny1.ts (1 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/widenToAny1.ts(5,5): error TS2323: Type 'string' is not ass } var z1: number = foo1({ x: undefined, y: "def" }); // Best common type is any ~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/widenToAny2.errors.txt b/tests/baselines/reference/widenToAny2.errors.txt index cdd5e53ec1a..a931c592762 100644 --- a/tests/baselines/reference/widenToAny2.errors.txt +++ b/tests/baselines/reference/widenToAny2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/widenToAny2.ts(4,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/widenToAny2.ts(4,5): error TS2322: Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/widenToAny2.ts (1 errors) ==== @@ -7,5 +7,5 @@ tests/cases/compiler/widenToAny2.ts(4,5): error TS2323: Type 'string' is not ass } var z3:number = foo3([undefined, "def"]); // Type is any, but should be string ~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/widenedTypes.errors.txt b/tests/baselines/reference/widenedTypes.errors.txt index c65e2873416..7374bd23b77 100644 --- a/tests/baselines/reference/widenedTypes.errors.txt +++ b/tests/baselines/reference/widenedTypes.errors.txt @@ -2,11 +2,11 @@ tests/cases/compiler/widenedTypes.ts(2,1): error TS2358: The left-hand side of a tests/cases/compiler/widenedTypes.ts(5,1): error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. tests/cases/compiler/widenedTypes.ts(6,7): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter tests/cases/compiler/widenedTypes.ts(8,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. -tests/cases/compiler/widenedTypes.ts(11,1): error TS2323: Type 'string' is not assignable to type 'number'. -tests/cases/compiler/widenedTypes.ts(18,1): error TS2323: Type 'string' is not assignable to type 'number'. -tests/cases/compiler/widenedTypes.ts(23,5): error TS2323: Type 'number[]' is not assignable to type 'string[]'. +tests/cases/compiler/widenedTypes.ts(11,1): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/widenedTypes.ts(18,1): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/widenedTypes.ts(23,5): error TS2322: Type 'number[]' is not assignable to type 'string[]'. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/widenedTypes.ts(24,5): error TS2323: Type '{ [x: string]: number; x: number; y: null; }' is not assignable to type '{ [x: string]: string; }'. +tests/cases/compiler/widenedTypes.ts(24,5): error TS2322: Type '{ [x: string]: number; x: number; y: null; }' is not assignable to type '{ [x: string]: string; }'. Index signatures are incompatible. Type 'number' is not assignable to type 'string'. @@ -32,7 +32,7 @@ tests/cases/compiler/widenedTypes.ts(24,5): error TS2323: Type '{ [x: string]: n var t = [3, (3, null)]; t[3] = ""; ~~~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var x: typeof undefined = 3; x = 3; @@ -41,17 +41,17 @@ tests/cases/compiler/widenedTypes.ts(24,5): error TS2323: Type '{ [x: string]: n var u = [3, (y = null)]; u[3] = ""; ~~~~ -!!! error TS2323: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var ob: { x: typeof undefined } = { x: "" }; // Highlights the difference between array literals and object literals var arr: string[] = [3, null]; // not assignable because null is not widened. BCT is {} ~~~ -!!! error TS2323: Type 'number[]' is not assignable to type 'string[]'. -!!! error TS2323: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number[]' is not assignable to type 'string[]'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. var obj: { [x: string]: string; } = { x: 3, y: null }; // assignable because null is widened, and therefore BCT is any ~~~ -!!! error TS2323: Type '{ [x: string]: number; x: number; y: null; }' is not assignable to type '{ [x: string]: string; }'. -!!! error TS2323: Index signatures are incompatible. -!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type '{ [x: string]: number; x: number; y: null; }' is not assignable to type '{ [x: string]: string; }'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt b/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt index 57a4d7e5bc2..5afc7361a23 100644 --- a/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt +++ b/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/wrappedRecursiveGenericType.ts(13,1): error TS2323: Type 'number' is not assignable to type 'X'. +tests/cases/compiler/wrappedRecursiveGenericType.ts(13,1): error TS2322: Type 'number' is not assignable to type 'X'. Property 'e' is missing in type 'Number'. -tests/cases/compiler/wrappedRecursiveGenericType.ts(14,1): error TS2323: Type 'number' is not assignable to type 'X'. +tests/cases/compiler/wrappedRecursiveGenericType.ts(14,1): error TS2322: Type 'number' is not assignable to type 'X'. ==== tests/cases/compiler/wrappedRecursiveGenericType.ts (2 errors) ==== @@ -18,8 +18,8 @@ tests/cases/compiler/wrappedRecursiveGenericType.ts(14,1): error TS2323: Type 'n x.a.val = 5; // val -> number x.a.b.val = 5; // val -> X (This should be an error) ~~~~~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'X'. -!!! error TS2323: Property 'e' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'X'. +!!! error TS2322: Property 'e' is missing in type 'Number'. x.a.b.a.val = 5; // val -> X (This should be an error) ~~~~~~~~~~~ -!!! error TS2323: Type 'number' is not assignable to type 'X'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'X'. \ No newline at end of file