From 6e77e2e81054c8e1aaa8ed720c2ec2e305f64085 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 28 Oct 2014 00:28:59 -0700 Subject: [PATCH] Removed colons from diagnostic messages. Also got rid of the 'terminalMessages' concept. --- src/compiler/checker.ts | 76 +++--- .../diagnosticInformationMap.generated.ts | 18 +- src/compiler/diagnosticMessages.json | 40 +-- ...addMoreOverloadsToBaseSignature.errors.txt | 10 +- .../reference/aliasAssignments.errors.txt | 6 +- .../apparentTypeSubtyping.errors.txt | 10 +- .../apparentTypeSupertype.errors.txt | 10 +- ...indsToFunctionScopeArgumentList.errors.txt | 6 +- .../reference/arrayAssignmentTest1.errors.txt | 150 +++++------ .../reference/arrayAssignmentTest2.errors.txt | 72 +++--- .../reference/arrayAssignmentTest4.errors.txt | 12 +- .../reference/arrayAssignmentTest5.errors.txt | 10 +- .../baselines/reference/arrayCast.errors.txt | 10 +- .../reference/arraySigChecking.errors.txt | 20 +- .../reference/arrayTypeOfTypeOf.errors.txt | 6 +- .../reference/assignmentCompat1.errors.txt | 12 +- ...nmentCompatBetweenTupleAndArray.errors.txt | 24 +- .../reference/assignmentCompatBug2.errors.txt | 30 +-- ...CompatFunctionsWithOptionalArgs.errors.txt | 4 +- ...ignmentCompatWithCallSignatures.errors.txt | 80 +++--- ...gnmentCompatWithCallSignatures2.errors.txt | 120 ++++----- ...gnmentCompatWithCallSignatures4.errors.txt | 52 ++-- ...allSignaturesWithRestParameters.errors.txt | 90 +++---- ...tCompatWithConstructSignatures2.errors.txt | 88 +++---- ...tCompatWithConstructSignatures4.errors.txt | 92 +++---- ...ignmentCompatWithNumericIndexer.errors.txt | 76 +++--- ...gnmentCompatWithNumericIndexer2.errors.txt | 76 +++--- ...gnmentCompatWithNumericIndexer3.errors.txt | 38 +-- ...ignmentCompatWithObjectMembers4.errors.txt | 238 +++++++++--------- ...ignmentCompatWithObjectMembers5.errors.txt | 12 +- ...tWithObjectMembersAccessibility.errors.txt | 144 +++++------ ...patWithObjectMembersOptionality.errors.txt | 36 +-- ...atWithObjectMembersOptionality2.errors.txt | 54 ++-- ...ObjectMembersStringNumericNames.errors.txt | 174 ++++++------- .../assignmentCompatWithOverloads.errors.txt | 32 +-- ...signmentCompatWithStringIndexer.errors.txt | 104 ++++---- ...ignmentCompatWithStringIndexer2.errors.txt | 104 ++++---- ...ignmentCompatWithStringIndexer3.errors.txt | 20 +- .../assignmentCompatability10.errors.txt | 6 +- .../assignmentCompatability11.errors.txt | 10 +- .../assignmentCompatability12.errors.txt | 10 +- .../assignmentCompatability13.errors.txt | 6 +- .../assignmentCompatability14.errors.txt | 10 +- .../assignmentCompatability15.errors.txt | 10 +- .../assignmentCompatability16.errors.txt | 14 +- .../assignmentCompatability17.errors.txt | 14 +- .../assignmentCompatability18.errors.txt | 14 +- .../assignmentCompatability19.errors.txt | 14 +- .../assignmentCompatability20.errors.txt | 14 +- .../assignmentCompatability21.errors.txt | 14 +- .../assignmentCompatability22.errors.txt | 14 +- .../assignmentCompatability23.errors.txt | 14 +- .../assignmentCompatability25.errors.txt | 10 +- .../assignmentCompatability26.errors.txt | 10 +- .../assignmentCompatability27.errors.txt | 6 +- .../assignmentCompatability28.errors.txt | 10 +- .../assignmentCompatability29.errors.txt | 14 +- .../assignmentCompatability30.errors.txt | 14 +- .../assignmentCompatability31.errors.txt | 14 +- .../assignmentCompatability32.errors.txt | 14 +- .../assignmentCompatability35.errors.txt | 6 +- .../assignmentCompatability36.errors.txt | 6 +- .../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 +- .../reference/assignmentToObject.errors.txt | 10 +- .../assignmentToObjectAndFunction.errors.txt | 26 +- ...nmentToParenthesizedIdentifiers.errors.txt | 30 +-- ...eAssignmentCompatIndexSignature.errors.txt | 12 +- .../baseTypePrivateMemberClash.errors.txt | 4 +- tests/baselines/reference/bases.errors.txt | 6 +- ...atureAssignabilityInInheritance.errors.txt | 14 +- ...tureAssignabilityInInheritance3.errors.txt | 52 ++-- ...uresThatDifferOnlyByReturnType2.errors.txt | 4 +- .../reference/castingTuple.errors.txt | 54 ++-- .../reference/chainedAssignment1.errors.txt | 12 +- .../reference/chainedAssignment3.errors.txt | 6 +- .../chainedAssignmentChecking.errors.txt | 12 +- ...ceThatExtendsClassWithPrivates1.errors.txt | 6 +- .../classImplementsClass2.errors.txt | 12 +- .../classImplementsClass4.errors.txt | 12 +- .../classImplementsClass5.errors.txt | 18 +- .../classIsSubtypeOfBaseType.errors.txt | 14 +- .../reference/classUpdateTests.errors.txt | 12 +- .../classWithMultipleBaseClasses.errors.txt | 6 +- .../clodulesDerivedClasses.errors.txt | 14 +- ...onAssignmentLHSCannotBeAssigned.errors.txt | 6 +- .../conditionalExpression1.errors.txt | 6 +- ...onalOperatorWithoutIdenticalBCT.errors.txt | 50 ++-- .../conflictingMemberTypesInBases.errors.txt | 4 +- .../reference/constraints0.errors.txt | 6 +- ...atureAssignabilityInInheritance.errors.txt | 14 +- ...tureAssignabilityInInheritance3.errors.txt | 52 ++-- .../contextualTypeWithTuple.errors.txt | 60 ++--- .../reference/contextualTyping.errors.txt | 4 +- .../reference/contextualTyping11.errors.txt | 10 +- .../reference/contextualTyping21.errors.txt | 14 +- .../reference/contextualTyping24.errors.txt | 10 +- .../reference/contextualTyping30.errors.txt | 4 +- .../reference/contextualTyping33.errors.txt | 4 +- .../reference/contextualTyping39.errors.txt | 6 +- .../reference/contextualTyping41.errors.txt | 6 +- .../reference/contextualTyping5.errors.txt | 6 +- ...ontextualTypingOfArrayLiterals1.errors.txt | 18 +- ...lTypingOfConditionalExpression2.errors.txt | 18 +- ...ontextualTypingOfObjectLiterals.errors.txt | 6 +- ...lTypingWithFixedTypeParameters1.errors.txt | 4 +- ...ertyIsRelatableToTargetProperty.errors.txt | 6 +- ...areClassInterfaceImplementation.errors.txt | 6 +- ...defaultBestCommonTypesHaveDecls.errors.txt | 4 +- ...ctionOverridesBaseClassAccessor.errors.txt | 10 +- ...dClassOverridesPrivateFunction1.errors.txt | 6 +- .../derivedClassOverridesPrivates.errors.txt | 12 +- ...ClassOverridesProtectedMembers3.errors.txt | 60 ++--- ...ClassOverridesProtectedMembers4.errors.txt | 6 +- .../derivedClassTransitivity.errors.txt | 18 +- .../derivedClassTransitivity2.errors.txt | 18 +- .../derivedClassTransitivity3.errors.txt | 18 +- .../derivedClassTransitivity4.errors.txt | 18 +- .../reference/derivedClassWithAny.errors.txt | 10 +- ...tanceShadowingProtectedInstance.errors.txt | 6 +- ...InstanceShadowingPublicInstance.errors.txt | 6 +- ...eStaticShadowingProtectedStatic.errors.txt | 6 +- ...vateStaticShadowingPublicStatic.errors.txt | 6 +- .../derivedGenericClassWithAny.errors.txt | 10 +- .../derivedInterfaceCallSignature.errors.txt | 10 +- ...rivedTypeIncompatibleSignatures.errors.txt | 20 +- ...ontShowCompilerGeneratedMembers.errors.txt | 6 +- .../reference/enumAssignability.errors.txt | 42 ++-- .../reference/enumAssignmentCompat.errors.txt | 12 +- .../enumAssignmentCompat2.errors.txt | 12 +- ...orOnContextuallyTypedReturnType.errors.txt | 6 +- ...AnnotationAndInvalidInitializer.errors.txt | 100 ++++---- ...endAndImplementTheSameBaseType2.errors.txt | 14 +- ...erInSignatureWithRestParameters.errors.txt | 4 +- .../reference/functionOverloads40.errors.txt | 8 +- .../reference/functionOverloads41.errors.txt | 4 +- ...ctionSignatureAssignmentCompat1.errors.txt | 10 +- tests/baselines/reference/fuzzy.errors.txt | 22 +- .../genericArrayAssignment1.errors.txt | 6 +- .../genericArrayExtenstions.errors.txt | 6 +- .../reference/genericArrayMethods1.errors.txt | 6 +- ...AssignmentCompatWithInterfaces1.errors.txt | 104 ++++---- ...cCallWithFunctionTypedArguments.errors.txt | 20 +- ...CallWithFunctionTypedArguments2.errors.txt | 8 +- ...CallWithFunctionTypedArguments5.errors.txt | 8 +- ...llWithGenericSignatureArguments.errors.txt | 8 +- ...lWithGenericSignatureArguments2.errors.txt | 4 +- ...lWithGenericSignatureArguments3.errors.txt | 8 +- ...ricCallWithNonSymmetricSubtypes.errors.txt | 8 +- ...enericCallWithObjectLiteralArgs.errors.txt | 4 +- ...CallWithObjectLiteralArguments1.errors.txt | 20 +- .../genericCallWithObjectTypeArgs.errors.txt | 4 +- ...thObjectTypeArgsAndConstraints3.errors.txt | 4 +- ...loadedConstructorTypedArguments.errors.txt | 4 +- .../genericCallWithTupleType.errors.txt | 54 ++-- ...ithFunctionTypedMemberArguments.errors.txt | 16 +- .../genericCloneReturnTypes.errors.txt | 6 +- .../genericCloneReturnTypes2.errors.txt | 6 +- .../reference/genericConstraint2.errors.txt | 6 +- .../genericConstraintSatisfaction1.errors.txt | 4 +- ...cDerivedTypeWithSpecializedBase.errors.txt | 10 +- ...DerivedTypeWithSpecializedBase2.errors.txt | 14 +- .../reference/genericRestArgs.errors.txt | 8 +- .../genericSpecializations3.errors.txt | 54 ++-- .../genericTypeAssertions1.errors.txt | 22 +- .../genericTypeAssertions2.errors.txt | 30 +-- ...cTypeWithNonGenericBaseMisMatch.errors.txt | 52 ++-- .../baselines/reference/generics1.errors.txt | 6 +- .../baselines/reference/generics2.errors.txt | 6 +- .../baselines/reference/generics4.errors.txt | 18 +- .../baselines/reference/generics5.errors.txt | 6 +- .../getAndSetNotIdenticalType2.errors.txt | 6 +- .../getAndSetNotIdenticalType3.errors.txt | 6 +- .../heterogeneousArrayAndOverloads.errors.txt | 4 +- tests/baselines/reference/i3.errors.txt | 6 +- ...implementClausePrecedingExtends.errors.txt | 6 +- ...ementGenericWithMismatchedTypes.errors.txt | 32 +-- ...mplementPublicPropertyAsPrivate.errors.txt | 6 +- ...rfaceExtendingClassWithPrivates.errors.txt | 24 +- ...faceExtendingClassWithPrivates2.errors.txt | 78 +++--- ...aceExtendingClassWithProtecteds.errors.txt | 36 +-- .../incompatibleGenericTypes.errors.txt | 6 +- .../reference/incompatibleTypes.errors.txt | 62 ++--- tests/baselines/reference/indexer2.errors.txt | 18 +- .../baselines/reference/indexer2A.errors.txt | 18 +- .../reference/indexerAssignability.errors.txt | 18 +- ...teExpansionThroughInstantiation.errors.txt | 20 +- ...ePropertiesFromDifferentOrigins.errors.txt | 4 +- ...pertiesWithDifferentOptionality.errors.txt | 4 +- ...opertiesWithDifferentVisibility.errors.txt | 4 +- .../reference/inheritance.errors.txt | 10 +- .../reference/inheritance1.errors.txt | 60 ++--- ...andParentPrivateMemberCollision.errors.txt | 6 +- ...MemberCollisionWithPublicMember.errors.txt | 6 +- ...emberCollisionWithPrivateMember.errors.txt | 6 +- ...eMemberAccessorOverridingMethod.errors.txt | 10 +- ...nceMemberFuncOverridingAccessor.errors.txt | 10 +- ...eStaticAccessorOverridingMethod.errors.txt | 10 +- ...nceStaticFuncOverridingAccessor.errors.txt | 10 +- ...nceStaticFuncOverridingProperty.errors.txt | 10 +- ...itanceStaticMembersIncompatible.errors.txt | 10 +- ...eStaticPropertyOverridingMethod.errors.txt | 10 +- ...nheritedModuleMembersForClodule.errors.txt | 14 +- ...gIndexersFromDifferentBaseTypes.errors.txt | 20 +- ...ceMemberAssignsToClassPrototype.errors.txt | 6 +- .../instanceSubtypeCheck2.errors.txt | 14 +- .../reference/intTypeCheck.errors.txt | 108 ++++---- .../interfaceAssignmentCompat.errors.txt | 12 +- .../interfaceDeclaration1.errors.txt | 10 +- .../interfaceDeclaration3.errors.txt | 30 +-- .../interfaceDeclaration4.errors.txt | 22 +- .../interfaceDeclaration6.errors.txt | 10 +- ...rfaceExtendingClassWithPrivates.errors.txt | 6 +- ...faceExtendingClassWithPrivates2.errors.txt | 16 +- ...aceExtendingClassWithProtecteds.errors.txt | 6 +- ...ceExtendingClassWithProtecteds2.errors.txt | 16 +- ...terfaceExtendsClassWithPrivate1.errors.txt | 18 +- ...terfaceExtendsClassWithPrivate2.errors.txt | 24 +- .../interfaceImplementation1.errors.txt | 12 +- .../interfaceImplementation2.errors.txt | 6 +- .../interfaceImplementation3.errors.txt | 6 +- .../interfaceImplementation4.errors.txt | 6 +- .../interfaceImplementation6.errors.txt | 12 +- .../interfaceImplementation7.errors.txt | 22 +- .../interfaceImplementation8.errors.txt | 18 +- .../reference/interfaceInheritance.errors.txt | 32 +-- .../interfaceMemberValidation.errors.txt | 10 +- ...nterfacePropertiesWithSameName2.errors.txt | 8 +- ...nterfacePropertiesWithSameName3.errors.txt | 8 +- ...interfaceThatHidesBaseProperty2.errors.txt | 18 +- .../interfaceWithMultipleBaseTypes.errors.txt | 86 +++---- ...interfaceWithMultipleBaseTypes2.errors.txt | 18 +- ...PropertyThatIsPrivateInBaseType.errors.txt | 12 +- ...ropertyThatIsPrivateInBaseType2.errors.txt | 12 +- .../invalidBooleanAssignments.errors.txt | 12 +- .../invalidNumberAssignments.errors.txt | 24 +- .../invalidReturnStatements.errors.txt | 12 +- .../invalidStringAssignments.errors.txt | 24 +- .../invalidVoidAssignments.errors.txt | 12 +- .../lastPropertyInLiteralWins.errors.txt | 12 +- ...InterfacesWithInheritedPrivates.errors.txt | 12 +- ...nterfacesWithInheritedPrivates2.errors.txt | 18 +- ...nterfacesWithInheritedPrivates3.errors.txt | 8 +- ...gedInterfacesWithMultipleBases4.errors.txt | 4 +- ...citTypeParameterAndArgumentType.errors.txt | 4 +- .../reference/multiLineErrors.errors.txt | 18 +- ...rfaesWithIncompatibleProperties.errors.txt | 4 +- .../reference/multipleInheritance.errors.txt | 10 +- .../noImplicitAnyInCastExpression.errors.txt | 6 +- ...rConstrainsPropertyDeclarations.errors.txt | 14 +- ...ConstrainsPropertyDeclarations2.errors.txt | 14 +- .../numericIndexerConstraint1.errors.txt | 6 +- .../numericIndexerConstraint2.errors.txt | 6 +- .../numericIndexerConstraint5.errors.txt | 6 +- ...objectLitStructuralTypeMismatch.errors.txt | 6 +- .../objectLitTargetTypeCallSite.errors.txt | 4 +- .../objectLiteralIndexerErrors.errors.txt | 14 +- ...tLiteralWithNumericPropertyName.errors.txt | 10 +- ...MembersOfObjectAssignmentCompat.errors.txt | 42 ++-- ...embersOfObjectAssignmentCompat2.errors.txt | 70 +++--- ...ypeWithRecursiveWrappedProperty.errors.txt | 6 +- ...peWithRecursiveWrappedProperty2.errors.txt | 6 +- ...WrappedPropertyCheckedNominally.errors.txt | 20 +- ...bjectTypesIdentityWithPrivates3.errors.txt | 6 +- ...ptionalFunctionArgAssignability.errors.txt | 18 +- .../optionalParamAssignmentCompat.errors.txt | 10 +- .../optionalParamTypeComparison.errors.txt | 20 +- .../optionalPropertiesInClasses.errors.txt | 6 +- .../optionalPropertiesTest.errors.txt | 24 +- ...erEagerReturnTypeSpecialization.errors.txt | 6 +- .../overloadOnConstInheritance2.errors.txt | 10 +- .../overloadOnConstInheritance3.errors.txt | 10 +- .../overloadResolutionTest1.errors.txt | 16 +- .../overloadingOnConstants1.errors.txt | 24 +- .../overridingPrivateStaticMembers.errors.txt | 6 +- .../baselines/reference/parseTypes.errors.txt | 6 +- .../reference/parser15.4.4.14-9-2.errors.txt | 4 +- .../parserObjectCreation1.errors.txt | 6 +- .../privateInterfaceProperties.errors.txt | 6 +- .../reference/promisePermutations.errors.txt | 28 +-- .../reference/promisePermutations2.errors.txt | 28 +-- .../reference/promisePermutations3.errors.txt | 28 +-- ...opertyParameterWithQuestionMark.errors.txt | 12 +- .../reference/protectedMembers.errors.txt | 18 +- ...lementedAsPrivateInDerivedClass.errors.txt | 6 +- tests/baselines/reference/qualify.errors.txt | 36 +-- .../recursiveFunctionTypes.errors.txt | 6 +- .../recursiveInheritance3.errors.txt | 6 +- .../reference/redefineArray.errors.txt | 6 +- .../restArgAssignmentCompat.errors.txt | 14 +- .../baselines/reference/scopeTests.errors.txt | 6 +- .../reference/shadowPrivateMembers.errors.txt | 6 +- ...gnsToConstructorFunctionMembers.errors.txt | 6 +- ...cMemberOfAnotherClassAssignment.errors.txt | 24 +- .../stringIndexerAssignments1.errors.txt | 16 +- .../stringIndexerAssignments2.errors.txt | 16 +- ...rConstrainsPropertyDeclarations.errors.txt | 14 +- ...ConstrainsPropertyDeclarations2.errors.txt | 14 +- .../subtypesOfTypeParameter.errors.txt | 10 +- ...sOfTypeParameterWithConstraints.errors.txt | 200 +++++++-------- ...OfTypeParameterWithConstraints4.errors.txt | 54 ++-- ...rameterWithRecursiveConstraints.errors.txt | 60 ++--- ...ignaturesWithOptionalParameters.errors.txt | 20 +- ...allSignaturesWithRestParameters.errors.txt | 198 +++++++-------- ...aturesWithSpecializedSignatures.errors.txt | 14 +- ...ignaturesWithOptionalParameters.errors.txt | 20 +- ...aturesWithSpecializedSignatures.errors.txt | 14 +- ...ignaturesWithOptionalParameters.errors.txt | 60 ++--- ...ignaturesWithOptionalParameters.errors.txt | 60 ++--- .../subtypingWithNumericIndexer.errors.txt | 20 +- .../subtypingWithNumericIndexer2.errors.txt | 50 ++-- .../subtypingWithNumericIndexer3.errors.txt | 50 ++-- .../subtypingWithNumericIndexer4.errors.txt | 44 ++-- .../subtypingWithNumericIndexer5.errors.txt | 44 ++-- .../subtypingWithObjectMembers.errors.txt | 84 +++---- .../subtypingWithObjectMembers2.errors.txt | 84 +++---- .../subtypingWithObjectMembers3.errors.txt | 84 +++---- .../subtypingWithObjectMembers5.errors.txt | 18 +- ...gWithObjectMembersAccessibility.errors.txt | 18 +- ...WithObjectMembersAccessibility2.errors.txt | 36 +-- ...ngWithObjectMembersOptionality2.errors.txt | 18 +- .../subtypingWithStringIndexer.errors.txt | 20 +- .../subtypingWithStringIndexer2.errors.txt | 50 ++-- .../subtypingWithStringIndexer3.errors.txt | 50 ++-- .../subtypingWithStringIndexer4.errors.txt | 44 ++-- .../reference/targetTypeTest3.errors.txt | 10 +- ...ommaInHeterogenousArrayLiteral1.errors.txt | 8 +- .../baselines/reference/tupleTypes.errors.txt | 74 +++--- .../reference/typeArgInference2.errors.txt | 4 +- .../typeArgInference2WithError.errors.txt | 4 +- .../typeArgumentInference.errors.txt | 8 +- ...entInferenceConstructSignatures.errors.txt | 8 +- ...renceWithConstraintAsCommonRoot.errors.txt | 4 +- ...rgumentInferenceWithConstraints.errors.txt | 8 +- .../reference/typeAssertions.errors.txt | 12 +- .../typeIdentityConsidersBrands.errors.txt | 6 +- .../baselines/reference/typeInfer1.errors.txt | 6 +- ...eInferenceConflictingCandidates.errors.txt | 4 +- .../baselines/reference/typeMatch1.errors.txt | 12 +- .../baselines/reference/typeMatch2.errors.txt | 48 ++-- .../baselines/reference/typeName1.errors.txt | 72 +++--- ...ypeParameterArgumentEquivalence.errors.txt | 20 +- ...peParameterArgumentEquivalence2.errors.txt | 20 +- ...peParameterArgumentEquivalence3.errors.txt | 12 +- ...peParameterArgumentEquivalence4.errors.txt | 12 +- ...peParameterArgumentEquivalence5.errors.txt | 20 +- .../typeParameterAssignmentCompat1.errors.txt | 24 +- .../typeofAmbientExternalModules.errors.txt | 12 +- .../typeofExternalModules.errors.txt | 12 +- .../typeofInternalModules.errors.txt | 12 +- ...yExternalModuleStillHasInstance.errors.txt | 6 +- ...unctionCallsWithTypeParameters1.errors.txt | 6 +- .../reference/widenedTypes.errors.txt | 16 +- .../wrappedRecursiveGenericType.errors.txt | 6 +- 359 files changed, 4016 insertions(+), 4062 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index be0ae42b848..ab5064e6776 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3182,18 +3182,17 @@ module ts { target: Type, errorNode: Node, chainedMessage?: DiagnosticMessage, - terminalMessage?: DiagnosticMessage, containingMessageChain?: DiagnosticMessageChain): boolean { - return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, chainedMessage, terminalMessage, containingMessageChain); + return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, chainedMessage, containingMessageChain); } function isTypeAssignableTo(source: Type, target: Type): boolean { return checkTypeAssignableTo(source, target, /*errorNode*/ undefined); } - function checkTypeAssignableTo(source: Type, target: Type, errorNode: Node, chainedMessage?: DiagnosticMessage, terminalMessage?: DiagnosticMessage): boolean { - return checkTypeRelatedTo(source, target, assignableRelation, errorNode, chainedMessage, terminalMessage); + function checkTypeAssignableTo(source: Type, target: Type, errorNode: Node, chainedMessage?: DiagnosticMessage): boolean { + return checkTypeRelatedTo(source, target, assignableRelation, errorNode, chainedMessage); } function isTypeRelatedTo(source: Type, target: Type, relation: Map): boolean { @@ -3237,7 +3236,7 @@ module ts { var typeName2 = typeToString(base); var errorInfo = chainDiagnosticMessages(undefined, Diagnostics.Named_properties_0_of_types_1_and_2_are_not_identical, prop.name, typeName1, typeName2); - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2_Colon, typeToString(type), typeName1, typeName2); + errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2); addDiagnostic(createDiagnosticForNodeFromMessageChain(typeNode, errorInfo, program.getCompilerHost().getNewLine())); } } @@ -3273,7 +3272,6 @@ module ts { relation: Map, errorNode: Node, chainedMessage?: DiagnosticMessage, - terminalMessage?: DiagnosticMessage, containingMessageChain?: DiagnosticMessageChain): boolean { var errorInfo: DiagnosticMessageChain; @@ -3285,7 +3283,7 @@ module ts { Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); - var result = isRelatedToWithCustomErrors(source, target, errorNode !== undefined, chainedMessage, terminalMessage); + var result = isRelatedToWithCustomErrors(source, target, errorNode !== undefined, chainedMessage); if (overflow) { error(errorNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); } @@ -3302,10 +3300,10 @@ module ts { } function isRelatedTo(source: Type, target: Type, reportErrors?: boolean): boolean { - return isRelatedToWithCustomErrors(source, target, reportErrors, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined); + return isRelatedToWithCustomErrors(source, target, reportErrors, /*chainedMessage*/ undefined); } - function isRelatedToWithCustomErrors(source: Type, target: Type, reportErrors: boolean, chainedMessage: DiagnosticMessage, terminalMessage: DiagnosticMessage): boolean { + function isRelatedToWithCustomErrors(source: Type, target: Type, reportErrors: boolean, chainedMessage: DiagnosticMessage): boolean { if (relation === identityRelation) { // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases if (source === target) return true; @@ -3357,15 +3355,9 @@ module ts { } } if (reportErrors) { - // The error should end in a period when this is the deepest error in the chain - // (when errorInfo is undefined). Otherwise, it has a colon before the nested - // error. - - chainedMessage = chainedMessage || Diagnostics.Type_0_is_not_assignable_to_type_1_Colon; - terminalMessage = terminalMessage || Diagnostics.Type_0_is_not_assignable_to_type_1; - var diagnosticKey = errorInfo ? chainedMessage : terminalMessage; - Debug.assert(diagnosticKey); - reportError(diagnosticKey, typeToString(source), typeToString(target)); + chainedMessage = chainedMessage || Diagnostics.Type_0_is_not_assignable_to_type_1; + Debug.assert(chainedMessage); + reportError(chainedMessage, typeToString(source), typeToString(target)); } return false; } @@ -3545,7 +3537,7 @@ module ts { } if (!isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors)) { if (reportErrors) { - reportError(Diagnostics.Types_of_property_0_are_incompatible_Colon, symbolToString(targetProp)); + reportError(Diagnostics.Types_of_property_0_are_incompatible, symbolToString(targetProp)); } return false; } @@ -3651,7 +3643,7 @@ module ts { if (!isRelatedTo(s, t, reportErrors)) { if (!isRelatedTo(t, s, false)) { if (reportErrors) { - reportError(Diagnostics.Types_of_parameters_0_and_1_are_incompatible_Colon, + reportError(Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name); } @@ -3695,7 +3687,7 @@ module ts { } if (!isRelatedTo(sourceType, targetType, reportErrors)) { if (reportErrors) { - reportError(Diagnostics.Index_signatures_are_incompatible_Colon); + reportError(Diagnostics.Index_signatures_are_incompatible); } return false; } @@ -3726,7 +3718,7 @@ module ts { } if (!compatible) { if (reportErrors) { - reportError(Diagnostics.Index_signatures_are_incompatible_Colon); + reportError(Diagnostics.Index_signatures_are_incompatible); } return false; } @@ -3819,8 +3811,7 @@ module ts { // In the following errors, the {1} slot is before the {0} slot because checkTypeSubtypeOf supplies the // subtype as the first argument to the error - checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation, - Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_Colon, + checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation, Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0, errorMessageChainHead); } @@ -3932,8 +3923,8 @@ module ts { callback(s, t); } } - - function createInferenceContext(typeParameters: TypeParameter[], inferUnionTypes: boolean): InferenceContext { + + function createInferenceContext(typeParameters: TypeParameter[], inferUnionTypes: boolean): InferenceContext { var inferences: Type[][] = []; for (var i = 0; i < typeParameters.length; i++) inferences.push([]); return { @@ -5158,8 +5149,8 @@ module ts { } function inferTypeArguments(signature: Signature, args: Expression[], excludeArgument?: boolean[]): InferenceContext { - var typeParameters = signature.typeParameters; - var context = createInferenceContext(typeParameters, /*inferUnionTypes*/ false); + var typeParameters = signature.typeParameters; + var context = createInferenceContext(typeParameters, /*inferUnionTypes*/ false); var mapper = createInferenceMapper(context); // First infer from arguments that are not context sensitive for (var i = 0; i < args.length; i++) { @@ -5209,7 +5200,7 @@ module ts { var constraint = getConstraintOfTypeParameter(typeParameters[i]); if (constraint) { typeArgumentsAreAssignable = checkTypeAssignableTo(typeArgument, constraint, reportErrors ? typeArgNode : undefined, - Diagnostics.Type_0_does_not_satisfy_the_constraint_1_Colon, Diagnostics.Type_0_does_not_satisfy_the_constraint_1); + Diagnostics.Type_0_does_not_satisfy_the_constraint_1); } } } @@ -5230,7 +5221,6 @@ module ts { checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); // Use argument expression as error location when reporting errors var isValidArgument = checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, - Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1, Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1); if (!isValidArgument) { return false; @@ -5330,7 +5320,7 @@ module ts { var inferenceCandidates = resultOfFailedInference.inferences[resultOfFailedInference.failedTypeParameterIndex]; var diagnosticChainHead = chainDiagnosticMessages(/*details*/ undefined, // details will be provided by call to reportNoCommonSupertypeError - Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly_Colon, + Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter)); reportNoCommonSupertypeError(inferenceCandidates, node.func, diagnosticChainHead); @@ -5607,7 +5597,7 @@ module ts { if (fullTypeCheck && targetType !== unknownType) { var widenedType = getWidenedType(exprType, /*supressNoImplicitAnyErrors*/ true); if (!(isTypeAssignableTo(targetType, widenedType))) { - checkTypeAssignableTo(exprType, targetType, node, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other_Colon, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); + checkTypeAssignableTo(exprType, targetType, node, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); } } return targetType; @@ -5788,7 +5778,7 @@ module ts { else { var exprType = checkExpression(node.body); if (node.type) { - checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, undefined, undefined); + checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, /*chainedMessage*/ undefined); } checkFunctionExpressionBodies(node.body); } @@ -6094,7 +6084,7 @@ module ts { // Use default messages if (ok) { // to avoid cascading errors check assignability only if 'isReference' check succeeded and no errors were reported - checkTypeAssignableTo(valueType, leftType, node.left, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined); + checkTypeAssignableTo(valueType, leftType, node.left, /*chainedMessage*/ undefined); } } } @@ -6475,7 +6465,7 @@ module ts { var constraint = getConstraintOfTypeParameter((type).target.typeParameters[i]); if (fullTypeCheck && constraint) { var typeArgument = (type).typeArguments[i]; - checkTypeAssignableTo(typeArgument, constraint, node, Diagnostics.Type_0_does_not_satisfy_the_constraint_1_Colon, Diagnostics.Type_0_does_not_satisfy_the_constraint_1); + checkTypeAssignableTo(typeArgument, constraint, node, Diagnostics.Type_0_does_not_satisfy_the_constraint_1); } } } @@ -7117,7 +7107,7 @@ module ts { if (node.initializer) { if (!(getNodeLinks(node.initializer).flags & NodeCheckFlags.TypeChecked)) { // Use default messages - checkTypeAssignableTo(checkAndMarkExpression(node.initializer), type, node, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined); + checkTypeAssignableTo(checkAndMarkExpression(node.initializer), type, node, /*chainedMessage*/ undefined); } checkCollisionWithConstDeclarations(node); } @@ -7230,7 +7220,7 @@ module ts { func.type || (func.kind === SyntaxKind.GetAccessor && getSetAccessorTypeAnnotationNode(getDeclarationOfKind(func.symbol, SyntaxKind.SetAccessor))); if (checkAssignability) { - checkTypeAssignableTo(checkExpression(node.expression), returnType, node.expression, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined); + checkTypeAssignableTo(checkExpression(node.expression), returnType, node.expression, /*chainedMessage*/ undefined); } else if (func.kind == SyntaxKind.Constructor) { // constructor doesn't have explicit return type annotation and yet its return type is known - declaring type @@ -7258,7 +7248,7 @@ module ts { var caseType = checkExpression(clause.expression); if (!isTypeAssignableTo(expressionType, caseType)) { // check 'expressionType isAssignableTo caseType' failed, try the reversed check and report errors if it fails - checkTypeAssignableTo(caseType, expressionType, clause.expression, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined); + checkTypeAssignableTo(caseType, expressionType, clause.expression, /*chainedMessage*/ undefined); } } checkBlock(clause); @@ -7395,10 +7385,10 @@ module ts { if (type.baseTypes.length) { if (fullTypeCheck) { var baseType = type.baseTypes[0]; - checkTypeAssignableTo(type, baseType, node.name, Diagnostics.Class_0_incorrectly_extends_base_class_1_Colon, Diagnostics.Class_0_incorrectly_extends_base_class_1); + checkTypeAssignableTo(type, baseType, node.name, Diagnostics.Class_0_incorrectly_extends_base_class_1); var staticBaseType = getTypeOfSymbol(baseType.symbol); checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name, - Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1_Colon, Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); + Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); if (baseType.symbol !== resolveEntityName(node, node.baseType.typeName, SymbolFlags.Value)) { error(node.baseType, Diagnostics.Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0, typeToString(baseType)); } @@ -7417,7 +7407,7 @@ module ts { if (t !== unknownType) { var declaredType = (t.flags & TypeFlags.Reference) ? (t).target : t; if (declaredType.flags & (TypeFlags.Class | TypeFlags.Interface)) { - checkTypeAssignableTo(type, t, node.name, Diagnostics.Class_0_incorrectly_implements_interface_1_Colon, Diagnostics.Class_0_incorrectly_implements_interface_1); + checkTypeAssignableTo(type, t, node.name, Diagnostics.Class_0_incorrectly_implements_interface_1); } else { error(typeRefNode, Diagnostics.A_class_may_only_implement_another_class_or_interface); @@ -7562,7 +7552,7 @@ module ts { // run subsequent checks only if first set succeeded if (checkInheritedPropertiesAreIdentical(type, node.name)) { forEach(type.baseTypes, baseType => { - checkTypeAssignableTo(type, baseType, node.name, Diagnostics.Interface_0_incorrectly_extends_interface_1_Colon, Diagnostics.Interface_0_incorrectly_extends_interface_1); + checkTypeAssignableTo(type, baseType, node.name , Diagnostics.Interface_0_incorrectly_extends_interface_1); }); checkIndexConstraints(type); } @@ -7614,7 +7604,7 @@ module ts { // If it is a constant value (not undefined), it is syntactically constrained to be a number. // Also, we do not need to check this for ambients because there is already // a syntax error if it is not a constant. - checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined); + checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, /*chainedMessage*/ undefined); } } else if (ambient) { diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 52cf4d77ff9..cf0600ca453 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -140,17 +140,16 @@ module ts { Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: DiagnosticCategory.Error, key: "Global type '{0}' must have {1} type parameter(s)." }, Cannot_find_global_type_0: { code: 2318, category: DiagnosticCategory.Error, key: "Cannot find global type '{0}'." }, 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_Colon: { code: 2320, category: DiagnosticCategory.Error, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}':" }, + 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_Colon: { code: 2322, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}':" }, Type_0_is_not_assignable_to_type_1: { code: 2323, 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_Colon: { code: 2326, category: DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible:" }, + Types_of_property_0_are_incompatible: { code: 2326, category: DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible." }, Property_0_is_optional_in_type_1_but_required_in_type_2: { code: 2327, category: DiagnosticCategory.Error, key: "Property '{0}' is optional in type '{1}' but required in type '{2}'." }, - Types_of_parameters_0_and_1_are_incompatible_Colon: { code: 2328, category: DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible:" }, + Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible." }, Index_signature_is_missing_in_type_0: { code: 2329, category: DiagnosticCategory.Error, key: "Index signature is missing in type '{0}'." }, - Index_signatures_are_incompatible_Colon: { code: 2330, category: DiagnosticCategory.Error, key: "Index signatures are incompatible:" }, + Index_signatures_are_incompatible: { code: 2330, category: DiagnosticCategory.Error, key: "Index signatures are incompatible." }, this_cannot_be_referenced_in_a_module_body: { code: 2331, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a module body." }, this_cannot_be_referenced_in_current_location: { code: 2332, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in current location." }, this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in constructor arguments." }, @@ -163,7 +162,6 @@ module ts { Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: DiagnosticCategory.Error, key: "Only public and protected methods of the base class are accessible via the 'super' keyword" }, Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: DiagnosticCategory.Error, key: "Property '{0}' is private and only accessible within class '{1}'." }, An_index_expression_argument_must_be_of_type_string_number_or_any: { code: 2342, category: DiagnosticCategory.Error, key: "An index expression argument must be of type 'string', 'number', or 'any'." }, - Type_0_does_not_satisfy_the_constraint_1_Colon: { code: 2343, category: DiagnosticCategory.Error, key: "Type '{0}' does not satisfy the constraint '{1}':" }, Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: DiagnosticCategory.Error, key: "Type '{0}' does not satisfy the constraint '{1}'." }, Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: DiagnosticCategory.Error, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." }, Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: DiagnosticCategory.Error, key: "Supplied parameters do not match any signature of call target." }, @@ -173,7 +171,6 @@ module ts { Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: DiagnosticCategory.Error, key: "Only a void function can be called with the 'new' keyword." }, Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: DiagnosticCategory.Error, key: "Cannot use 'new' with an expression whose type lacks a call or construct signature." }, Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 2352, category: DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other." }, - Neither_type_0_nor_type_1_is_assignable_to_the_other_Colon: { code: 2353, category: DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other:" }, No_best_common_type_exists_among_return_expressions: { code: 2354, category: DiagnosticCategory.Error, key: "No best common type exists among return expressions." }, A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2355, category: DiagnosticCategory.Error, key: "A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement." }, An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: DiagnosticCategory.Error, key: "An arithmetic operand must be of type 'any', 'number' or an enum type." }, @@ -234,12 +231,9 @@ module ts { Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: DiagnosticCategory.Error, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." }, Class_name_cannot_be_0: { code: 2414, category: DiagnosticCategory.Error, key: "Class name cannot be '{0}'" }, Class_0_incorrectly_extends_base_class_1: { code: 2415, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}'." }, - Class_0_incorrectly_extends_base_class_1_Colon: { code: 2416, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}':" }, Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: DiagnosticCategory.Error, key: "Class static side '{0}' incorrectly extends base class static side '{1}'." }, - Class_static_side_0_incorrectly_extends_base_class_static_side_1_Colon: { code: 2418, category: DiagnosticCategory.Error, key: "Class static side '{0}' incorrectly extends base class static side '{1}':" }, Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0: { code: 2419, category: DiagnosticCategory.Error, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." }, Class_0_incorrectly_implements_interface_1: { code: 2420, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}'." }, - Class_0_incorrectly_implements_interface_1_Colon: { code: 2421, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}':" }, A_class_may_only_implement_another_class_or_interface: { code: 2422, category: DiagnosticCategory.Error, key: "A class may only implement another class or interface." }, Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." }, Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." }, @@ -247,7 +241,6 @@ module ts { Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: DiagnosticCategory.Error, key: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." }, Interface_name_cannot_be_0: { code: 2427, category: DiagnosticCategory.Error, key: "Interface name cannot be '{0}'" }, All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: DiagnosticCategory.Error, key: "All declarations of an interface must have identical type parameters." }, - Interface_0_incorrectly_extends_interface_1_Colon: { code: 2429, category: DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}':" }, Interface_0_incorrectly_extends_interface_1: { code: 2430, category: DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}'." }, Enum_name_cannot_be_0: { code: 2431, category: DiagnosticCategory.Error, key: "Enum name cannot be '{0}'" }, In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: DiagnosticCategory.Error, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." }, @@ -271,8 +264,7 @@ module ts { Left_hand_side_of_assignment_expression_cannot_be_a_constant: { code: 2450, category: DiagnosticCategory.Error, key: "Left-hand side of assignment expression cannot be a constant.", isEarly: true }, Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: DiagnosticCategory.Error, key: "Cannot redeclare block-scoped variable '{0}'.", isEarly: true }, An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: DiagnosticCategory.Error, key: "An enum member cannot have a numeric name." }, - The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly_Colon: { code: 2453, category: DiagnosticCategory.Error, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly:" }, - Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_Colon: { code: 2454, category: DiagnosticCategory.Error, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}':" }, + The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: DiagnosticCategory.Error, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." }, Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: DiagnosticCategory.Error, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4001, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 00888a68761..f198ea5482f 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -552,7 +552,7 @@ "category": "Error", "code": 2319 }, - "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}':": { + "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'.": { "category": "Error", "code": 2320 }, @@ -560,7 +560,7 @@ "category": "Error", "code": 2321 }, - "Type '{0}' is not assignable to type '{1}':": { + "Type '{0}' is not assignable to type '{1}'.": { "category": "Error", "code": 2322 }, @@ -576,7 +576,7 @@ "category": "Error", "code": 2325 }, - "Types of property '{0}' are incompatible:": { + "Types of property '{0}' are incompatible.": { "category": "Error", "code": 2326 }, @@ -584,7 +584,7 @@ "category": "Error", "code": 2327 }, - "Types of parameters '{0}' and '{1}' are incompatible:": { + "Types of parameters '{0}' and '{1}' are incompatible.": { "category": "Error", "code": 2328 }, @@ -592,7 +592,7 @@ "category": "Error", "code": 2329 }, - "Index signatures are incompatible:": { + "Index signatures are incompatible.": { "category": "Error", "code": 2330 }, @@ -644,10 +644,6 @@ "category": "Error", "code": 2342 }, - "Type '{0}' does not satisfy the constraint '{1}':": { - "category": "Error", - "code": 2343 - }, "Type '{0}' does not satisfy the constraint '{1}'.": { "category": "Error", "code": 2344 @@ -684,10 +680,6 @@ "category": "Error", "code": 2352 }, - "Neither type '{0}' nor type '{1}' is assignable to the other:": { - "category": "Error", - "code": 2353 - }, "No best common type exists among return expressions.": { "category": "Error", "code": 2354 @@ -928,18 +920,10 @@ "category": "Error", "code": 2415 }, - "Class '{0}' incorrectly extends base class '{1}':": { - "category": "Error", - "code": 2416 - }, "Class static side '{0}' incorrectly extends base class static side '{1}'.": { "category": "Error", "code": 2417 }, - "Class static side '{0}' incorrectly extends base class static side '{1}':": { - "category": "Error", - "code": 2418 - }, "Type name '{0}' in extends clause does not reference constructor function for '{0}'.": { "category": "Error", "code": 2419 @@ -948,10 +932,6 @@ "category": "Error", "code": 2420 }, - "Class '{0}' incorrectly implements interface '{1}':": { - "category": "Error", - "code": 2421 - }, "A class may only implement another class or interface.": { "category": "Error", "code": 2422 @@ -980,10 +960,6 @@ "category": "Error", "code": 2428 }, - "Interface '{0}' incorrectly extends interface '{1}':": { - "category": "Error", - "code": 2429 - }, "Interface '{0}' incorrectly extends interface '{1}'.": { "category": "Error", "code": 2430 @@ -1080,14 +1056,10 @@ "category": "Error", "code": 2452 }, - "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly:": { + "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly.": { "category": "Error", "code": 2453 }, - "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}':": { - "category": "Error", - "code": 2454 - }, "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'.": { "category": "Error", "code": 2455 diff --git a/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt b/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt index 6fca82a677f..4b6255688f8 100644 --- a/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt +++ b/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2429: Interface 'Bar' incorrectly extends interface 'Foo': - Types of property 'f' are incompatible: +tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2430: Interface 'Bar' incorrectly extends interface 'Foo'. + Types of property 'f' are incompatible. Type '(key: string) => string' is not assignable to type '() => string'. @@ -10,9 +10,9 @@ tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2429: Int interface Bar extends Foo { ~~~ -!!! error TS2429: Interface 'Bar' incorrectly extends interface 'Foo': -!!! error TS2429: Types of property 'f' are incompatible: -!!! error TS2429: Type '(key: string) => string' is not assignable to type '() => string'. +!!! error TS2430: Interface 'Bar' incorrectly extends interface 'Foo'. +!!! error TS2430: Types of property 'f' are incompatible. +!!! error TS2430: Type '(key: string) => string' is not assignable to type '() => string'. f(key: string): string; } \ No newline at end of file diff --git a/tests/baselines/reference/aliasAssignments.errors.txt b/tests/baselines/reference/aliasAssignments.errors.txt index 1c49a377356..54190485c3d 100644 --- a/tests/baselines/reference/aliasAssignments.errors.txt +++ b/tests/baselines/reference/aliasAssignments.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"': +tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2323: 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'. @@ -8,8 +8,8 @@ tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2323: Type 'typeof "tes var x = moduleA; x = 1; // Should be error ~ -!!! error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"': -!!! error TS2322: Property 'someClass' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'. +!!! error TS2323: Property 'someClass' is missing in type 'Number'. var y = 1; y = moduleA; // should be error ~ diff --git a/tests/baselines/reference/apparentTypeSubtyping.errors.txt b/tests/baselines/reference/apparentTypeSubtyping.errors.txt index a9a97c22722..e1a53ef6a73 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.errors.txt +++ b/tests/baselines/reference/apparentTypeSubtyping.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts(9,7): error TS2416: Class 'Derived' incorrectly extends base class 'Base': - Types of property 'x' are incompatible: +tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts(9,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. + Types of property 'x' are incompatible. Type 'String' is not assignable to type 'string'. @@ -14,9 +14,9 @@ tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtypi // is String (S) a subtype of U extends String (T)? Would only be true if we used the apparent type of U (T) class Derived extends Base { // error ~~~~~~~ -!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': -!!! error TS2416: Types of property 'x' are incompatible: -!!! error TS2416: Type 'String' is not assignable to type 'string'. +!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. +!!! error TS2415: Types of property 'x' are incompatible. +!!! error TS2415: Type 'String' is not assignable to type 'string'. x: String; } diff --git a/tests/baselines/reference/apparentTypeSupertype.errors.txt b/tests/baselines/reference/apparentTypeSupertype.errors.txt index 78c667541d6..7d653f34bf9 100644 --- a/tests/baselines/reference/apparentTypeSupertype.errors.txt +++ b/tests/baselines/reference/apparentTypeSupertype.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts(9,7): error TS2416: Class 'Derived' incorrectly extends base class 'Base': - Types of property 'x' are incompatible: +tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts(9,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. + Types of property 'x' are incompatible. Type 'U' is not assignable to type 'string'. @@ -14,8 +14,8 @@ tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSuperty // is String (S) a subtype of U extends String (T)? Would only be true if we used the apparent type of U (T) class Derived extends Base { // error ~~~~~~~ -!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': -!!! error TS2416: Types of property 'x' are incompatible: -!!! error TS2416: Type 'U' is not assignable to type 'string'. +!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. +!!! error TS2415: Types of property 'x' are incompatible. +!!! error TS2415: Type 'U' is not assignable to type 'string'. x: U; } \ No newline at end of file diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt index 9d5847a77b0..53caecf63cb 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 TS2322: Type 'number' is not assignable to type 'IArguments': +tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2323: 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 TS2322: Type 'number' is not assignable to type 'IArguments': -!!! error TS2322: Property 'length' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'IArguments'. +!!! error TS2323: 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 926bf0d4316..9d606ec6d90 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest1.errors.txt @@ -1,49 +1,49 @@ -tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2322: Type 'undefined[]' is not assignable to type 'I1': +tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2323: Type 'undefined[]' is not assignable to type 'I1'. Property 'IM1' is missing in type 'undefined[]'. -tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2322: Type 'undefined[]' is not assignable to type 'C1': +tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2323: Type 'undefined[]' is not assignable to type 'C1'. Property 'IM1' is missing in type 'undefined[]'. -tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2322: Type 'undefined[]' is not assignable to type 'C2': +tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2323: Type 'undefined[]' is not assignable to type 'C2'. Property 'C2M1' is missing in type 'undefined[]'. -tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2322: Type 'undefined[]' is not assignable to type 'C3': +tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2323: Type 'undefined[]' is not assignable to type 'C3'. Property 'CM3M1' is missing in type 'undefined[]'. -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': +tests/cases/compiler/arrayAssignmentTest1.ts(60,1): error TS2323: 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 TS2322: Type 'I1[]' is not assignable to type 'C1[]': - Type 'I1' is not assignable to type 'C1': +tests/cases/compiler/arrayAssignmentTest1.ts(64,1): error TS2323: 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 TS2322: Type 'C3[]' is not assignable to type 'C1[]': - Type 'C3' is not assignable to type 'C1': +tests/cases/compiler/arrayAssignmentTest1.ts(65,1): error TS2323: 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 TS2322: Type 'C1[]' is not assignable to type 'C2[]': - Type 'C1' is not assignable to type 'C2': +tests/cases/compiler/arrayAssignmentTest1.ts(68,1): error TS2323: 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 TS2322: Type 'I1[]' is not assignable to type 'C2[]': - Type 'I1' is not assignable to type 'C2': +tests/cases/compiler/arrayAssignmentTest1.ts(69,1): error TS2323: 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 TS2322: Type 'C3[]' is not assignable to type 'C2[]': - Type 'C3' is not assignable to type 'C2': +tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2323: 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 TS2322: Type 'C2[]' is not assignable to type 'C3[]': - Type 'C2' is not assignable to type 'C3': +tests/cases/compiler/arrayAssignmentTest1.ts(75,1): error TS2323: 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/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(76,1): error TS2323: 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/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(77,1): error TS2323: 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/arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2323: Type '() => C1' is not assignable to type 'any[]'. Property 'push' is missing in type '() => C1'. -tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2323: 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 TS2322: Type 'C1' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest1.ts(82,1): error TS2323: Type 'C1' is not assignable to type 'any[]'. Property 'length' is missing in type 'C1'. -tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2322: Type 'C2' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2323: Type 'C2' is not assignable to type 'any[]'. Property 'length' is missing in type 'C2'. -tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2322: Type 'C3' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2323: Type 'C3' is not assignable to type 'any[]'. Property 'length' is missing in type 'C3'. -tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2323: Type 'I1' is not assignable to type 'any[]'. Property 'length' is missing in type 'I1'. @@ -95,20 +95,20 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is n var i1_error: I1 = []; // should be an error - is ~~~~~~~~ -!!! error TS2322: Type 'undefined[]' is not assignable to type 'I1': -!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'. +!!! error TS2323: Type 'undefined[]' is not assignable to type 'I1'. +!!! error TS2323: Property 'IM1' is missing in type 'undefined[]'. var c1_error: C1 = []; // should be an error - is ~~~~~~~~ -!!! error TS2322: Type 'undefined[]' is not assignable to type 'C1': -!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'. +!!! error TS2323: Type 'undefined[]' is not assignable to type 'C1'. +!!! error TS2323: Property 'IM1' is missing in type 'undefined[]'. var c2_error: C2 = []; // should be an error - is ~~~~~~~~ -!!! error TS2322: Type 'undefined[]' is not assignable to type 'C2': -!!! error TS2322: Property 'C2M1' is missing in type 'undefined[]'. +!!! error TS2323: Type 'undefined[]' is not assignable to type 'C2'. +!!! error TS2323: Property 'C2M1' is missing in type 'undefined[]'. var c3_error: C3 = []; // should be an error - is ~~~~~~~~ -!!! error TS2322: Type 'undefined[]' is not assignable to type 'C3': -!!! error TS2322: Property 'CM3M1' is missing in type 'undefined[]'. +!!! error TS2323: Type 'undefined[]' is not assignable to type 'C3'. +!!! error TS2323: Property 'CM3M1' is missing in type 'undefined[]'. arr_any = arr_i1; // should be ok - is @@ -121,81 +121,81 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is n arr_i1 = arr_c2; // should be ok - subtype relationship - is arr_i1 = arr_c3; // should be an error - is ~~~~~~ -!!! 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'. +!!! 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'. 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 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'. +!!! 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'. arr_c1 = arr_c3; // should be an error - is ~~~~~~ -!!! 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'. +!!! 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'. arr_c2 = arr_c2; // should be ok - subtype relationship - is arr_c2 = arr_c1; // should be an error - subtype relationship - is ~~~~~~ -!!! 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'. +!!! 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'. arr_c2 = arr_i1; // should be an error - subtype relationship - is ~~~~~~ -!!! 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'. +!!! 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'. arr_c2 = arr_c3; // should be an error - is ~~~~~~ -!!! 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'. +!!! 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'. // "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 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'. +!!! 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'. arr_c3 = arr_c1_2; // should be an error - is ~~~~~~ -!!! 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'. +!!! 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'. arr_c3 = arr_i1_2; // should be an error - is ~~~~~~ -!!! 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'. +!!! 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'. arr_any = f1; // should be an error - is ~~~~~~~ -!!! error TS2322: Type '() => C1' is not assignable to type 'any[]': -!!! error TS2322: Property 'push' is missing in type '() => C1'. +!!! error TS2323: Type '() => C1' is not assignable to type 'any[]'. +!!! error TS2323: Property 'push' is missing in type '() => C1'. arr_any = o1; // should be an error - is ~~~~~~~ -!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]': -!!! error TS2322: Property 'length' is missing in type '{ one: number; }'. +!!! error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'. +!!! error TS2323: Property 'length' is missing in type '{ one: number; }'. arr_any = a1; // should be ok - is arr_any = c1; // should be an error - is ~~~~~~~ -!!! error TS2322: Type 'C1' is not assignable to type 'any[]': -!!! error TS2322: Property 'length' is missing in type 'C1'. +!!! error TS2323: Type 'C1' is not assignable to type 'any[]'. +!!! error TS2323: Property 'length' is missing in type 'C1'. arr_any = c2; // should be an error - is ~~~~~~~ -!!! error TS2322: Type 'C2' is not assignable to type 'any[]': -!!! error TS2322: Property 'length' is missing in type 'C2'. +!!! error TS2323: Type 'C2' is not assignable to type 'any[]'. +!!! error TS2323: Property 'length' is missing in type 'C2'. arr_any = c3; // should be an error - is ~~~~~~~ -!!! error TS2322: Type 'C3' is not assignable to type 'any[]': -!!! error TS2322: Property 'length' is missing in type 'C3'. +!!! error TS2323: Type 'C3' is not assignable to type 'any[]'. +!!! error TS2323: Property 'length' is missing in type 'C3'. arr_any = i1; // should be an error - is ~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/arrayAssignmentTest2.errors.txt b/tests/baselines/reference/arrayAssignmentTest2.errors.txt index c9364ab555b..d1bd15d6db5 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 TS2322: Type 'C2[]' is not assignable to type 'C3[]': - Type 'C2' is not assignable to type 'C3': +tests/cases/compiler/arrayAssignmentTest2.ts(47,1): error TS2323: 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 TS2322: Type 'C1[]' is not assignable to type 'C3[]': - Type 'C1' is not assignable to type 'C3': +tests/cases/compiler/arrayAssignmentTest2.ts(48,1): error TS2323: 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 TS2322: Type 'I1[]' is not assignable to type 'C3[]': - Type 'I1' is not assignable to type 'C3': +tests/cases/compiler/arrayAssignmentTest2.ts(49,1): error TS2323: 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 TS2322: Type '() => C1' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2323: Type '() => C1' is not assignable to type 'any[]'. Property 'push' is missing in type '() => C1'. -tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2322: Type '() => any' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2323: Type '() => any' is not assignable to type 'any[]'. Property 'push' is missing in type '() => any'. -tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2323: 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 TS2322: Type 'C1' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest2.ts(55,1): error TS2323: Type 'C1' is not assignable to type 'any[]'. Property 'length' is missing in type 'C1'. -tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2322: Type 'C2' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2323: Type 'C2' is not assignable to type 'any[]'. Property 'length' is missing in type 'C2'. -tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2322: Type 'C3' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2323: Type 'C3' is not assignable to type 'any[]'. Property 'length' is missing in type 'C3'. -tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2322: Type 'I1' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2323: 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 TS2322: Type 'I1' is n // "clean up error" occurs at this point arr_c3 = arr_c2_2; // should be an error - is ~~~~~~ -!!! 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'. +!!! 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'. arr_c3 = arr_c1_2; // should be an error - is ~~~~~~ -!!! 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'. +!!! 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'. arr_c3 = arr_i1_2; // should be an error - is ~~~~~~ -!!! 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'. +!!! 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'. arr_any = f1; // should be an error - is ~~~~~~~ -!!! error TS2322: Type '() => C1' is not assignable to type 'any[]': -!!! error TS2322: Property 'push' is missing in type '() => C1'. +!!! error TS2323: Type '() => C1' is not assignable to type 'any[]'. +!!! error TS2323: Property 'push' is missing in type '() => C1'. arr_any = function () { return null;} // should be an error - is ~~~~~~~ -!!! error TS2322: Type '() => any' is not assignable to type 'any[]': -!!! error TS2322: Property 'push' is missing in type '() => any'. +!!! error TS2323: Type '() => any' is not assignable to type 'any[]'. +!!! error TS2323: Property 'push' is missing in type '() => any'. arr_any = o1; // should be an error - is ~~~~~~~ -!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]': -!!! error TS2322: Property 'length' is missing in type '{ one: number; }'. +!!! error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'. +!!! error TS2323: Property 'length' is missing in type '{ one: number; }'. arr_any = a1; // should be ok - is arr_any = c1; // should be an error - is ~~~~~~~ -!!! error TS2322: Type 'C1' is not assignable to type 'any[]': -!!! error TS2322: Property 'length' is missing in type 'C1'. +!!! error TS2323: Type 'C1' is not assignable to type 'any[]'. +!!! error TS2323: Property 'length' is missing in type 'C1'. arr_any = c2; // should be an error - is ~~~~~~~ -!!! error TS2322: Type 'C2' is not assignable to type 'any[]': -!!! error TS2322: Property 'length' is missing in type 'C2'. +!!! error TS2323: Type 'C2' is not assignable to type 'any[]'. +!!! error TS2323: Property 'length' is missing in type 'C2'. arr_any = c3; // should be an error - is ~~~~~~~ -!!! error TS2322: Type 'C3' is not assignable to type 'any[]': -!!! error TS2322: Property 'length' is missing in type 'C3'. +!!! error TS2323: Type 'C3' is not assignable to type 'any[]'. +!!! error TS2323: Property 'length' is missing in type 'C3'. arr_any = i1; // should be an error - is ~~~~~~~ -!!! error TS2322: Type 'I1' is not assignable to type 'any[]': -!!! error TS2322: Property 'length' is missing in type 'I1'. +!!! 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 diff --git a/tests/baselines/reference/arrayAssignmentTest4.errors.txt b/tests/baselines/reference/arrayAssignmentTest4.errors.txt index 0d346e48293..2ef303cc2bb 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 TS2322: Type '() => any' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest4.ts(24,1): error TS2323: Type '() => any' is not assignable to type 'any[]'. Property 'push' is missing in type '() => any'. -tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2322: Type 'C3' is not assignable to type 'any[]': +tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2323: 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 TS2322: Type 'C3' is n arr_any = function () { return null;} // should be an error - is ~~~~~~~ -!!! error TS2322: Type '() => any' is not assignable to type 'any[]': -!!! error TS2322: Property 'push' is missing in type '() => any'. +!!! error TS2323: Type '() => any' is not assignable to type 'any[]'. +!!! error TS2323: Property 'push' is missing in type '() => any'. arr_any = c3; // should be an error - is ~~~~~~~ -!!! error TS2322: Type 'C3' is not assignable to type 'any[]': -!!! error TS2322: Property 'length' is missing in type 'C3'. +!!! error TS2323: Type 'C3' is not assignable to type 'any[]'. +!!! error TS2323: 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 417430b8e43..37252bbf1d1 100644 --- a/tests/baselines/reference/arrayAssignmentTest5.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest5.errors.txt @@ -1,5 +1,5 @@ -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': +tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2323: 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 TS2322: Type 'IToken[ var lineTokens:ILineTokens= this.tokenize(line, state, true); var tokens:IStateToken[]= lineTokens.tokens; ~~~~~~ -!!! 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'. +!!! 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'. 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/arrayCast.errors.txt b/tests/baselines/reference/arrayCast.errors.txt index 2218bbf5a75..10562cc57e4 100644 --- a/tests/baselines/reference/arrayCast.errors.txt +++ b/tests/baselines/reference/arrayCast.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/arrayCast.ts(3,1): error TS2353: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other: - Type '{ foo: string; }' is not assignable to type '{ id: number; }': +tests/cases/compiler/arrayCast.ts(3,1): error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other. + Type '{ foo: string; }' is not assignable to type '{ id: number; }'. Property 'id' is missing in type '{ foo: string; }'. @@ -8,9 +8,9 @@ tests/cases/compiler/arrayCast.ts(3,1): error TS2353: Neither type '{ foo: strin // has type { foo: string }[], which is not assignable to { id: number }[]. <{ id: number; }[]>[{ foo: "s" }]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other: -!!! error TS2353: Type '{ foo: string; }' is not assignable to type '{ id: number; }': -!!! error TS2353: Property 'id' is missing in type '{ foo: string; }'. +!!! error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other. +!!! error TS2352: Type '{ foo: string; }' is not assignable to type '{ id: number; }'. +!!! error TS2352: Property 'id' is missing in type '{ foo: string; }'. // Should succeed, as the {} element causes the type of the array to be {}[] <{ id: number; }[]>[{ foo: "s" }, {}]; \ No newline at end of file diff --git a/tests/baselines/reference/arraySigChecking.errors.txt b/tests/baselines/reference/arraySigChecking.errors.txt index 055c62c479b..50eb6a0cc9d 100644 --- a/tests/baselines/reference/arraySigChecking.errors.txt +++ b/tests/baselines/reference/arraySigChecking.errors.txt @@ -1,9 +1,9 @@ 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 TS2322: Type 'void[]' is not assignable to type 'string[]': +tests/cases/compiler/arraySigChecking.ts(18,5): error TS2323: Type 'void[]' is not assignable to type 'string[]'. Type 'void' is not assignable to type 'string'. -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[]': +tests/cases/compiler/arraySigChecking.ts(22,1): error TS2323: 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 TS2322: Type 'number[][]' var myVar: myInt; var strArray: string[] = [myVar.voidFn()]; ~~~~~~~~ -!!! error TS2322: Type 'void[]' is not assignable to type 'string[]': -!!! error TS2322: Type 'void' is not assignable to type 'string'. +!!! error TS2323: Type 'void[]' is not assignable to type 'string[]'. +!!! error TS2323: Type 'void' is not assignable to type 'string'. var myArray: number[][][]; myArray = [[1, 2]]; ~~~~~~~ -!!! 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'. +!!! 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'. 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 bb4867702ec..807227cc10b 100644 --- a/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt +++ b/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt @@ -2,7 +2,7 @@ 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 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,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[]; }'. 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[]; }'. @@ -19,8 +19,8 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts( ~ !!! error TS1109: Expression expected. ~~~ -!!! 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'. +!!! 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'. var xs4: typeof Array; ~ !!! error TS1005: '=' expected. diff --git a/tests/baselines/reference/assignmentCompat1.errors.txt b/tests/baselines/reference/assignmentCompat1.errors.txt index 0e22bd1b391..6f5fc93d136 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 TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }': +tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2323: 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 TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }': +tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2323: 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 TS2322: Type '{ one: numbe x = y; ~ -!!! error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }': -!!! error TS2322: Property 'one' is missing in type '{ [x: string]: any; }'. +!!! error TS2323: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'. +!!! error TS2323: Property 'one' is missing in type '{ [x: string]: any; }'. y = x; ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt index 2395f2bf364..7b74aed499f 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 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': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2323: 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 TS2322: Type '{}[]' is not assignable to type '[{}]': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2323: 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 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'. +!!! 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'. emptyObjTuple = emptyObjArray; ~~~~~~~~~~~~~ -!!! error TS2322: Type '{}[]' is not assignable to type '[{}]': -!!! error TS2322: Property '0' is missing in type '{}[]'. +!!! error TS2323: Type '{}[]' is not assignable to type '[{}]'. +!!! error TS2323: 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 260aa868dfd..683846b26c1 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 TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }': +tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2323: 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 TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }': +tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2323: 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 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; }': +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; }'. Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'. -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; }': +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; }'. Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'. -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; }': +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; }'. 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 TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }': -!!! error TS2322: Property 'b' is missing in type '{ a: number; }'. +!!! error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'. +!!! error TS2323: Property 'b' is missing in type '{ a: number; }'. b2 = { a: 0 }; // error ~~ -!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }': -!!! error TS2322: Property 'b' is missing in type '{ a: number; }'. +!!! error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'. +!!! error TS2323: 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 TS2322: Type '{ f: (n: b3 = { ~~ -!!! 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; }'. +!!! 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; }'. f: (n) => { return 0; }, g: (s) => { return 0; }, }; // error b3 = { ~~ -!!! 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; }'. +!!! 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; }'. f: (n) => { return 0; }, m: 0, }; // error @@ -57,8 +57,8 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n: b3 = { ~~ -!!! 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; }'. +!!! 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; }'. f: (n) => { return 0; }, g: (s) => { return 0; }, n: 0, diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt index a17c09988a3..2316320f480 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(4,5): error TS2345: Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'. - Types of property 'name' are incompatible: + Types of property 'name' are incompatible. Type 'boolean' is not assignable to type 'string'. tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'. Property 'id' is missing in type '{ name: string; }'. @@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS foo({ id: 1234, name: false }); // Error, name of wrong type ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'. -!!! error TS2345: Types of property 'name' are incompatible: +!!! error TS2345: Types of property 'name' are incompatible. !!! error TS2345: Type 'boolean' is not assignable to type 'string'. foo({ name: "hello" }); // Error, id required but missing ~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt index e2016fb7029..8ad90d773f4 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt @@ -1,26 +1,26 @@ -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: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(35,1): error TS2323: 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 TS2322: Type '(x: string) => void' is not assignable to type 'T': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(36,1): error TS2323: 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 TS2322: Type '(x: string) => number' is not assignable to type 'T': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(37,1): error TS2323: 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 TS2322: Type '(x: string) => string' is not assignable to type 'T': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(38,1): error TS2323: 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 TS2322: Type 'S2' is not assignable to type '(x: number) => void': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(39,1): error TS2323: 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 TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(40,1): error TS2323: 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 TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(41,1): error TS2323: 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 TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(42,1): error TS2323: 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 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'. +!!! 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'. t = a3; ~ -!!! 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'. +!!! 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'. t = (x: string) => 1; ~ -!!! 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'. +!!! 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'. t = function (x: string) { return ''; } ~ -!!! 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'. +!!! 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'. a = s2; ~ -!!! 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'. +!!! 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'. a = a3; ~ -!!! 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'. +!!! 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'. a = (x: string) => 1; ~ -!!! 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'. +!!! 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'. a = function (x: string) { return ''; } ~ -!!! 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt index 1aed50f25f1..ff12410e875 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 TS2322: Type '() => number' is not assignable to type 'T': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(31,1): error TS2323: 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 TS2322: Type '(x: number) => string' is not assignable to type 'T': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(32,1): error TS2323: 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 TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(33,1): error TS2323: 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 TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }': +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; }'. Property 'f' is missing in type '(x: number) => string'. -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: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(42,1): error TS2323: 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 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: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(43,1): error TS2323: 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 TS2322: Type '(x: string) => number' is not assignable to type 'T': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2323: 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 TS2322: Type '(x: string) => string' is not assignable to type 'T': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(45,1): error TS2323: 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 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: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(46,1): error TS2323: 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 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: +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; }'. + 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 TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }': +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; }'. Property 'f' is missing in type '(x: string) => number'. -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; }': +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; }'. Property 'f' is missing in type '(x: string) => string'. @@ -69,20 +69,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // errors t = () => 1; ~ -!!! error TS2322: Type '() => number' is not assignable to type 'T': -!!! error TS2322: Property 'f' is missing in type '() => number'. +!!! error TS2323: Type '() => number' is not assignable to type 'T'. +!!! error TS2323: Property 'f' is missing in type '() => number'. t = function (x: number) { return ''; } ~ -!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T': -!!! error TS2322: Property 'f' is missing in type '(x: number) => string'. +!!! error TS2323: Type '(x: number) => string' is not assignable to type 'T'. +!!! error TS2323: Property 'f' is missing in type '(x: number) => string'. a = () => 1; ~ -!!! error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }': -!!! error TS2322: Property 'f' is missing in type '() => number'. +!!! error TS2323: Type '() => number' is not assignable to type '{ f(x: number): void; }'. +!!! error TS2323: Property 'f' is missing in type '() => number'. a = function (x: number) { return ''; } ~ -!!! 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'. +!!! 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'. interface S2 { f(x: string): void; @@ -92,46 +92,46 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // these are errors t = s2; ~ -!!! 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'. +!!! 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'. t = a3; ~ -!!! 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'. +!!! 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'. t = (x: string) => 1; ~ -!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T': -!!! error TS2322: Property 'f' is missing in type '(x: string) => number'. +!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'. +!!! error TS2323: Property 'f' is missing in type '(x: string) => number'. t = function (x: string) { return ''; } ~ -!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T': -!!! error TS2322: Property 'f' is missing in type '(x: string) => string'. +!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'. +!!! error TS2323: Property 'f' is missing in type '(x: string) => string'. a = s2; ~ -!!! 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'. +!!! 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'. a = a3; ~ -!!! 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'. +!!! 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'. a = (x: string) => 1; ~ -!!! 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'. +!!! 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'. a = function (x: string) { return ''; } ~ -!!! 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt index 92bc30a7144..65b0a55a386 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt @@ -1,16 +1,16 @@ -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: +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'. + 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 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': - Types of parameters 'arg2' and 'arg2' are incompatible: - Type 'Base' is not assignable to type '{ foo: number; }': - Types of property 'foo' are incompatible: +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'. + Types of parameters 'y' and 'y' are incompatible. + Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'. + Types of parameters 'arg2' and 'arg2' are incompatible. + Type 'Base' is not assignable to type '{ foo: number; }'. + Types of property 'foo' are incompatible. Type 'string' is not assignable to type 'number'. @@ -68,22 +68,22 @@ 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 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'. +!!! 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'. b8 = a8; // error, { foo: number } and Base are incompatible ~~ -!!! 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': -!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible: -!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }': -!!! error TS2322: Types of property 'foo' are incompatible: -!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! 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 TS2323: Types of parameters 'arg2' and 'arg2' are incompatible. +!!! error TS2323: Type 'Base' is not assignable to type '{ foo: number; }'. +!!! error TS2323: Types of property 'foo' are incompatible. +!!! error TS2323: Type 'string' is not assignable to type 'number'. var b10: (...x: T[]) => T; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt index 117f6cae0e9..79fa3452394 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt @@ -1,29 +1,29 @@ -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: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2323: 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 TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number': - Types of parameters 'x' and 'args' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2323: 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 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: +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'. + 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 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: +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'. + 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 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: +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'. + 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 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: +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'. + 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 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: +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'. + 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 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: +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'. + 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 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: +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'. + 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 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'. +!!! 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'. 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 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'. +!!! 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'. 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 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'. +!!! 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'. 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 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'. +!!! 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'. a3 = (x: number, ...z: number[]) => 1; // error ~~ -!!! 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'. +!!! 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'. a3 = (x: string, y?: string, z?: string) => 1; // error ~~ -!!! 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'. +!!! 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'. 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 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'. +!!! 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'. a4 = (x: number) => 1; // ok, all present params match a4 = (x: number, y?: number) => 1; // error, second param has type mismatch ~~ -!!! 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'. +!!! 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'. 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 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt index 6213a2c27ce..7756bb82bda 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 TS2322: Type '() => number' is not assignable to type 'T': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(23,1): error TS2323: 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 TS2322: Type '(x: number) => string' is not assignable to type 'T': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(24,1): error TS2323: 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 TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(25,1): error TS2323: 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 TS2322: 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 TS2323: 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 TS2322: Type 'S2' is not assignable to type 'T': - Types of property 'f' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(34,1): error TS2323: 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 TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T': - Types of property 'f' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2323: 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 TS2322: Type '(x: string) => number' is not assignable to type 'T': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2323: 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 TS2322: Type '(x: string) => string' is not assignable to type 'T': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2323: 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 TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }': - Types of property 'f' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(38,1): error TS2323: 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 TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }': - Types of property 'f' are incompatible: +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; }'. + 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 TS2322: 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 TS2323: 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 TS2322: 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 TS2323: 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 TS2322: Type '() => number' is not assignable to type 'T': -!!! error TS2322: Property 'f' is missing in type '() => number'. +!!! error TS2323: Type '() => number' is not assignable to type 'T'. +!!! error TS2323: Property 'f' is missing in type '() => number'. t = function (x: number) { return ''; } ~ -!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T': -!!! error TS2322: Property 'f' is missing in type '(x: number) => string'. +!!! error TS2323: Type '(x: number) => string' is not assignable to type 'T'. +!!! error TS2323: Property 'f' is missing in type '(x: number) => string'. a = () => 1; ~ -!!! error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }': -!!! error TS2322: Property 'f' is missing in type '() => number'. +!!! error TS2323: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'. +!!! error TS2323: Property 'f' is missing in type '() => number'. a = function (x: number) { return ''; } ~ -!!! 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'. +!!! 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'. interface S2 { f(x: string): void; @@ -76,38 +76,38 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // these are errors t = s2; ~ -!!! 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'. +!!! 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'. t = a3; ~ -!!! 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'. +!!! 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'. t = (x: string) => 1; ~ -!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T': -!!! error TS2322: Property 'f' is missing in type '(x: string) => number'. +!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'. +!!! error TS2323: Property 'f' is missing in type '(x: string) => number'. t = function (x: string) { return ''; } ~ -!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T': -!!! error TS2322: Property 'f' is missing in type '(x: string) => string'. +!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'. +!!! error TS2323: Property 'f' is missing in type '(x: string) => string'. a = s2; ~ -!!! 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'. +!!! 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'. a = a3; ~ -!!! 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'. +!!! 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'. a = (x: string) => 1; ~ -!!! 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'. +!!! 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'. a = function (x: string) { return ''; } ~ -!!! 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt index b88beac6099..a701b2834d1 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt @@ -1,28 +1,28 @@ -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: +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'. + 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 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': - Types of parameters 'arg2' and 'arg2' are incompatible: - Type 'Base' is not assignable to type '{ foo: number; }': - Types of property 'foo' are incompatible: +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'. + Types of parameters 'y' and 'y' are incompatible. + Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'. + Types of parameters 'arg2' and 'arg2' are incompatible. + Type 'Base' is not assignable to type '{ foo: number; }'. + Types of property 'foo' are incompatible. Type 'string' is not assignable to type 'number'. -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: +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[]; }'. + 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 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: +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[]'. + 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 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: +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[]; }'. + 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 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: +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[]'. + 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'. @@ -80,22 +80,22 @@ 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 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'. +!!! 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'. b8 = a8; // error ~~ -!!! 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': -!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible: -!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }': -!!! error TS2322: Types of property 'foo' are incompatible: -!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! 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 TS2323: Types of parameters 'arg2' and 'arg2' are incompatible. +!!! error TS2323: Type 'Base' is not assignable to type '{ foo: number; }'. +!!! error TS2323: Types of property 'foo' are incompatible. +!!! error TS2323: Type 'string' is not assignable to type 'number'. var b10: new (...x: T[]) => T; @@ -121,26 +121,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme var b16: new (x: (a: T) => T) => T[]; a16 = b16; // error ~~~ -!!! 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; }'. +!!! 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; }'. b16 = a16; // error ~~~ -!!! 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'. +!!! 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'. var b17: new (x: (a: T) => T) => any[]; a17 = b17; // error ~~~ -!!! 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; }'. +!!! 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; }'. b17 = a17; // error ~~~ -!!! 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'. +!!! 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'. } module WithGenericSignaturesInBaseType { diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt index c4111661b14..04816fdfc9c 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt @@ -1,24 +1,24 @@ -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': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(14,1): error TS2323: 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 TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': - Index signatures are incompatible: - Type 'Base' is not assignable to type 'Derived2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(18,1): error TS2323: 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 TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(32,9): error TS2323: 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 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(33,9): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. + Index signatures are incompatible. + Type 'T' is not assignable to type 'Derived'. Property 'bar' is missing in type 'Base'. -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: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(36,9): error TS2323: 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 TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': - Index signatures are incompatible: - Type 'T' is not assignable to type 'Derived2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(37,9): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. + Index signatures are incompatible. + Type 'T' is not assignable to type 'Derived2'. Property 'baz' is missing in type 'Base'. @@ -38,19 +38,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; b = a; // error ~ -!!! 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'. +!!! 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'. var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error ~~ -!!! 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'. +!!! 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'. module Generics { class A { @@ -66,28 +66,28 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme var b: { [x: number]: Derived; } a = b; // error ~ -!!! 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'. +!!! 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'. b = a; // error ~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Base'. +!!! 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 TS2323: Property 'bar' is missing in type 'Base'. var b2: { [x: number]: Derived2; } a = b2; // error ~ -!!! 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'. +!!! 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'. b2 = a; // error ~~ -!!! 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': -!!! error TS2322: Property 'baz' is missing in type 'Base'. +!!! 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 TS2323: Property 'baz' is missing in type 'Base'. 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 fcd337ee615..0c6bba73489 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt @@ -1,24 +1,24 @@ -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': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(14,1): error TS2323: 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 TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': - Index signatures are incompatible: - Type 'Base' is not assignable to type 'Derived2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(18,1): error TS2323: 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 TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(32,9): error TS2323: 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 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(33,9): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. + Index signatures are incompatible. + Type 'T' is not assignable to type 'Derived'. Property 'bar' is missing in type 'Base'. -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: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(36,9): error TS2323: 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 TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': - Index signatures are incompatible: - Type 'T' is not assignable to type 'Derived2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(37,9): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. + Index signatures are incompatible. + Type 'T' is not assignable to type 'Derived2'. Property 'baz' is missing in type 'Base'. @@ -38,19 +38,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; b = a; // error ~ -!!! 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'. +!!! 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'. var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error ~~ -!!! 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'. +!!! 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'. module Generics { interface A { @@ -66,28 +66,28 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme var b: { [x: number]: Derived; } a = b; // error ~ -!!! 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'. +!!! 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'. b = a; // error ~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Base'. +!!! 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 TS2323: Property 'bar' is missing in type 'Base'. var b2: { [x: number]: Derived2; } a = b2; // error ~ -!!! 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'. +!!! 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'. b2 = a; // error ~~ -!!! 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': -!!! error TS2322: Property 'baz' is missing in type 'Base'. +!!! 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 TS2323: Property 'baz' is missing in type 'Base'. 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 84b51350785..966b5f1b55f 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt @@ -1,13 +1,13 @@ -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': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(14,1): error TS2323: 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 TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': - Index signatures are incompatible: - Type 'Derived' is not assignable to type 'Derived2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(23,1): error TS2323: 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 TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(33,9): error TS2323: 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 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'. +!!! 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'. 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 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'. +!!! 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'. module Generics { class A { @@ -56,9 +56,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme var b: { [x: number]: Derived; }; a = b; // error ~ -!!! 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'. +!!! 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'. 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 606eef809f0..90d2c9fb6f9 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt @@ -1,70 +1,70 @@ -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': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(24,5): error TS2323: 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 TS2322: Type 'S' is not assignable to type 'T': - Types of property 'foo' are incompatible: - Type 'Derived' is not assignable to type 'Derived2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(25,5): error TS2323: 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 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(29,5): error TS2323: Type 'T2' is not assignable to type 'S2'. + 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(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(30,5): error TS2323: Type 'S2' is not assignable to type 'T2'. + 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(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(31,5): error TS2323: Type 'T' is not assignable to type 'S2'. + 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(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(32,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type 'S2'. + 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(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(35,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. + 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(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(36,5): error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'. + 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(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(41,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. + 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(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(42,5): error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'. + 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(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(43,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. + 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(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(44,5): error TS2323: Type 'T2' is not assignable to type '{ foo: Derived; }'. + 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(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(45,5): error TS2323: Type 'T' is not assignable to type '{ foo: Derived; }'. + 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(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': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(70,5): error TS2323: 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 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(75,5): error TS2323: Type 'S2' is not assignable to type 'T2'. + 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(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(81,5): error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'. + 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(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': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(87,5): error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'. + Types of property 'foo' are incompatible. + Type 'Base' is not assignable to type 'Derived2'. Property 'baz' is missing in type 'Base'. @@ -94,91 +94,91 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme s = t; // error ~ -!!! 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'. +!!! 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'. t = s; // error ~ -!!! 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'. +!!! 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'. s = s2; // ok s = a2; // ok s2 = t2; // error ~~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Derived2'. +!!! 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 TS2323: Property 'bar' is missing in type 'Derived2'. t2 = s2; // error ~~ -!!! 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': -!!! error TS2322: Property 'baz' is missing in type 'Derived'. +!!! 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 TS2323: Property 'baz' is missing in type 'Derived'. s2 = t; // error ~~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Derived2'. +!!! 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 TS2323: Property 'bar' is missing in type 'Derived2'. s2 = b; // error ~~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Derived2'. +!!! 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 TS2323: Property 'bar' is missing in type 'Derived2'. s2 = a2; // ok a = b; // error ~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Derived2'. +!!! 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 TS2323: Property 'bar' is missing in type 'Derived2'. b = a; // error ~ -!!! 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': -!!! error TS2322: Property 'baz' is missing in type 'Derived'. +!!! 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 TS2323: Property 'baz' is missing in type 'Derived'. a = s; // ok a = s2; // ok a = a2; // ok a2 = b2; // error ~~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Derived2'. +!!! 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 TS2323: Property 'bar' is missing in type 'Derived2'. b2 = a2; // error ~~ -!!! 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': -!!! error TS2322: Property 'baz' is missing in type 'Derived'. +!!! 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 TS2323: Property 'baz' is missing in type 'Derived'. a2 = b; // error ~~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Derived2'. +!!! 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 TS2323: Property 'bar' is missing in type 'Derived2'. a2 = t2; // error ~~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Derived2'. +!!! 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 TS2323: Property 'bar' is missing in type 'Derived2'. a2 = t; // error ~~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Derived2'. +!!! 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 TS2323: Property 'bar' is missing in type 'Derived2'. } module WithBase { @@ -205,20 +205,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme s = t; // ok t = s; // error ~ -!!! 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'. +!!! 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'. s = s2; // ok s = a2; // ok s2 = t2; // ok t2 = s2; // error ~~ -!!! 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': -!!! error TS2322: Property 'baz' is missing in type 'Base'. +!!! 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 TS2323: Property 'baz' is missing in type 'Base'. s2 = t; // ok s2 = b; // ok s2 = a2; // ok @@ -226,10 +226,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; // ok b = a; // error ~ -!!! 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': -!!! error TS2322: Property 'baz' is missing in type 'Base'. +!!! 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 TS2323: Property 'baz' is missing in type 'Base'. a = s; // ok a = s2; // ok a = a2; // ok @@ -237,10 +237,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a2 = b2; // ok b2 = a2; // error ~~ -!!! 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': -!!! error TS2322: Property 'baz' is missing in type 'Base'. +!!! 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 TS2323: Property 'baz' is missing in type 'Base'. 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 c63813d343d..8c0a69c2663 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 TS2322: Type 'I' is not assignable to type 'C': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(13,1): error TS2323: 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 TS2322: Type 'C' is not assignable to type 'I': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(14,1): error TS2323: 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 TS2322: Type 'I' is not assignable to type 'C': -!!! error TS2322: Property 'foo' is missing in type 'I'. +!!! error TS2323: Type 'I' is not assignable to type 'C'. +!!! error TS2323: Property 'foo' is missing in type 'I'. i = c; // error ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt index ab9ddb553d3..8040ceb3003 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 TS2322: Type 'E' is not assignable to type '{ foo: string; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(36,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'I': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(41,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'D': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(46,5): error TS2323: 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 TS2322: Type '{ foo: string; }' is not assignable to type 'E': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(48,5): error TS2323: 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 TS2322: Type 'Base' is not assignable to type 'E': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(49,5): error TS2323: 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 TS2322: Type 'I' is not assignable to type 'E': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(50,5): error TS2323: 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 TS2322: Type 'D' is not assignable to type 'E': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(51,5): error TS2323: 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 TS2322: Type 'Base' is not assignable to type '{ foo: string; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(81,5): error TS2323: 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 TS2322: Type 'I' is not assignable to type '{ foo: string; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(82,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type '{ foo: string; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(84,5): error TS2323: 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 TS2322: Type '{ foo: string; }' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(86,5): error TS2323: 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 TS2322: Type 'D' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(88,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(89,5): error TS2323: 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 TS2322: Type '{ foo: string; }' is not assignable to type 'I': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(92,5): error TS2323: 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 TS2322: Type 'D' is not assignable to type 'I': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(94,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'I': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(95,5): error TS2323: 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 TS2322: Type 'Base' is not assignable to type 'D': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(99,5): error TS2323: 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 TS2322: Type 'I' is not assignable to type 'D': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(100,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'D': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(101,5): error TS2323: 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 TS2322: Type '{ foo: string; }' is not assignable to type 'E': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(103,5): error TS2323: 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 TS2322: Type 'Base' is not assignable to type 'E': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(104,5): error TS2323: 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 TS2322: Type 'I' is not assignable to type 'E': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(105,5): error TS2323: 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 TS2322: Type 'D' is not assignable to type 'E': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2323: 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 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; }'. +!!! 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; }'. b = a; b = i; b = d; b = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'Base': -!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'. +!!! error TS2323: Type 'E' is not assignable to type 'Base'. +!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'Base'. i = a; i = b; i = d; i = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'I': -!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'. +!!! error TS2323: Type 'E' is not assignable to type 'I'. +!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'I'. d = a; d = b; d = i; d = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'D': -!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'. +!!! error TS2323: Type 'E' is not assignable to type 'D'. +!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'. e = a; // errror ~ -!!! 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; }'. +!!! 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; }'. e = b; // errror ~ -!!! error TS2322: Type 'Base' is not assignable to type 'E': -!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'. +!!! error TS2323: Type 'Base' is not assignable to type 'E'. +!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'Base'. e = i; // errror ~ -!!! error TS2322: Type 'I' is not assignable to type 'E': -!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'. +!!! error TS2323: Type 'I' is not assignable to type 'E'. +!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'I'. e = d; // errror ~ -!!! error TS2322: Type 'D' is not assignable to type 'E': -!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'. +!!! error TS2323: Type 'D' is not assignable to type 'E'. +!!! error TS2323: 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 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; }'. +!!! 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; }'. a = i; // error ~ -!!! 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; }'. +!!! 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; }'. a = d; a = e; // error ~ -!!! 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; }'. +!!! 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; }'. b = a; // error ~ -!!! 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; }'. +!!! 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; }'. b = i; b = d; // error ~ -!!! error TS2322: Type 'D' is not assignable to type 'Base': -!!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'. +!!! error TS2323: Type 'D' is not assignable to type 'Base'. +!!! error TS2323: Property 'foo' is private in type 'Base' but not in type 'D'. b = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'Base': -!!! error TS2322: Types have separate declarations of a private property 'foo'. +!!! error TS2323: Type 'E' is not assignable to type 'Base'. +!!! error TS2323: Types have separate declarations of a private property 'foo'. b = b; i = a; // error ~ -!!! 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; }'. +!!! 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; }'. i = b; i = d; // error ~ -!!! error TS2322: Type 'D' is not assignable to type 'I': -!!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'. +!!! error TS2323: Type 'D' is not assignable to type 'I'. +!!! error TS2323: Property 'foo' is private in type 'I' but not in type 'D'. i = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'I': -!!! error TS2322: Types have separate declarations of a private property 'foo'. +!!! error TS2323: Type 'E' is not assignable to type 'I'. +!!! error TS2323: Types have separate declarations of a private property 'foo'. i = i; d = a; d = b; // error ~ -!!! error TS2322: Type 'Base' is not assignable to type 'D': -!!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'. +!!! error TS2323: Type 'Base' is not assignable to type 'D'. +!!! error TS2323: Property 'foo' is private in type 'Base' but not in type 'D'. d = i; // error ~ -!!! error TS2322: Type 'I' is not assignable to type 'D': -!!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'. +!!! error TS2323: Type 'I' is not assignable to type 'D'. +!!! error TS2323: Property 'foo' is private in type 'I' but not in type 'D'. d = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'D': -!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'. +!!! error TS2323: Type 'E' is not assignable to type 'D'. +!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'. e = a; // errror ~ -!!! 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; }'. +!!! 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; }'. e = b; // errror ~ -!!! error TS2322: Type 'Base' is not assignable to type 'E': -!!! error TS2322: Types have separate declarations of a private property 'foo'. +!!! error TS2323: Type 'Base' is not assignable to type 'E'. +!!! error TS2323: Types have separate declarations of a private property 'foo'. e = i; // errror ~ -!!! error TS2322: Type 'I' is not assignable to type 'E': -!!! error TS2322: Types have separate declarations of a private property 'foo'. +!!! error TS2323: Type 'I' is not assignable to type 'E'. +!!! error TS2323: Types have separate declarations of a private property 'foo'. e = d; // errror ~ -!!! error TS2322: Type 'D' is not assignable to type 'E': -!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'. +!!! error TS2323: Type 'D' is not assignable to type 'E'. +!!! error TS2323: 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 44577bf1c8d..2f931d4fc89 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 TS2322: Type 'D' is not assignable to type 'C': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(73,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'C': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(74,5): error TS2323: 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 TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(78,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(79,5): error TS2323: 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 TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(83,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2323: 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 TS2322: Type 'D' is not assignable to type 'C': -!!! error TS2322: Property 'opt' is optional in type 'D' but required in type 'C'. +!!! error TS2323: Type 'D' is not assignable to type 'C'. +!!! error TS2323: Property 'opt' is optional in type 'D' but required in type 'C'. c = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'C': -!!! error TS2322: Property 'opt' is optional in type 'E' but required in type 'C'. +!!! error TS2323: Type 'E' is not assignable to type 'C'. +!!! error TS2323: Property 'opt' is optional in type 'E' but required in type 'C'. c = f; // ok c = a; // ok a = d; // error ~ -!!! 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; }'. +!!! 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; }'. a = e; // error ~ -!!! 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; }'. +!!! 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; }'. a = f; // ok a = c; // ok b = d; // error ~ -!!! 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; }'. +!!! 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; }'. b = e; // error ~ -!!! 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; }'. +!!! 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; }'. 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 e1bf35ef2c2..3bce83ada4b 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 TS2322: Type 'D' is not assignable to type 'C': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'C': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2323: 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 TS2322: Type 'F' is not assignable to type 'C': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(76,5): error TS2323: 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 TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(79,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(80,5): error TS2323: 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 TS2322: Type 'F' is not assignable to type '{ opt: Base; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(81,5): error TS2323: 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 TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(84,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(85,5): error TS2323: 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 TS2322: Type 'F' is not assignable to type '{ opt: Base; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2323: 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 TS2322: Type 'D' is not assignable to type 'C': -!!! error TS2322: Property 'opt' is missing in type 'D'. +!!! error TS2323: Type 'D' is not assignable to type 'C'. +!!! error TS2323: Property 'opt' is missing in type 'D'. c = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'C': -!!! error TS2322: Property 'opt' is missing in type 'E'. +!!! error TS2323: Type 'E' is not assignable to type 'C'. +!!! error TS2323: Property 'opt' is missing in type 'E'. c = f; // error ~ -!!! error TS2322: Type 'F' is not assignable to type 'C': -!!! error TS2322: Property 'opt' is missing in type 'F'. +!!! error TS2323: Type 'F' is not assignable to type 'C'. +!!! error TS2323: Property 'opt' is missing in type 'F'. c = a; // ok a = d; // error ~ -!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': -!!! error TS2322: Property 'opt' is missing in type 'D'. +!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'. +!!! error TS2323: Property 'opt' is missing in type 'D'. a = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': -!!! error TS2322: Property 'opt' is missing in type 'E'. +!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'. +!!! error TS2323: Property 'opt' is missing in type 'E'. a = f; // error ~ -!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }': -!!! error TS2322: Property 'opt' is missing in type 'F'. +!!! error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'. +!!! error TS2323: Property 'opt' is missing in type 'F'. a = c; // ok b = d; // error ~ -!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': -!!! error TS2322: Property 'opt' is missing in type 'D'. +!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'. +!!! error TS2323: Property 'opt' is missing in type 'D'. b = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': -!!! error TS2322: Property 'opt' is missing in type 'E'. +!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'. +!!! error TS2323: Property 'opt' is missing in type 'E'. b = f; // error ~ -!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }': -!!! error TS2322: Property 'opt' is missing in type 'F'. +!!! error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'. +!!! error TS2323: 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 370355a7373..b70cee86a4d 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 TS2322: Type 'T' is not assignable to type 'S': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2323: 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 TS2322: Type 'S' is not assignable to type 'T': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2323: 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 TS2322: Type '{ '1.0': string; }' is not assignable to type 'S': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2323: 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 TS2322: Type 'T2' is not assignable to type 'S2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2323: 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 TS2322: Type 'S2' is not assignable to type 'T2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2323: 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 TS2322: Type 'T' is not assignable to type 'S2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2323: 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 TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2323: 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 TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2323: 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 TS2322: 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 TS2323: 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 TS2322: 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 TS2323: 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 TS2322: Type 'S' is not assignable to 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; }'. Property ''1.'' is missing in type 'S'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2323: 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 TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': +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; }'. Property ''1.'' is missing in 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; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2323: 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 TS2322: Type '{ '1.0': string; }' is not assignable to 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; }'. Property ''1'' is missing in 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; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2323: 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 TS2322: Type '{ '1.0': string; }' is not assignable to type 'S': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2323: 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 TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2323: 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 TS2322: 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 TS2323: 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 TS2322: 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 TS2323: 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 TS2322: Type 'S' is not assignable to 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; }'. Property ''1.'' is missing in type 'S'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2323: 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 TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': +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; }'. Property ''1.'' is missing in type '{ '1.0': 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; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2323: 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 TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2323: 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 TS2322: Type '{ '1.0': string; }' is not assignable to 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; }'. Property '1.' is missing in 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; }': +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; }'. Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2323: 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 TS2322: Type 'T' is not assignable to type '{ '1.0': string; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2323: 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 TS2322: Type 'T' is not assignable to type 'S': -!!! error TS2322: Property ''1'' is missing in type 'T'. +!!! error TS2323: Type 'T' is not assignable to type 'S'. +!!! error TS2323: Property ''1'' is missing in type 'T'. t = s; ~ -!!! error TS2322: Type 'S' is not assignable to type 'T': -!!! error TS2322: Property ''1.'' is missing in type 'S'. +!!! error TS2323: Type 'S' is not assignable to type 'T'. +!!! error TS2323: Property ''1.'' is missing in type 'S'. s = s2; // ok s = a2; ~ -!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S': -!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'. +!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'. s2 = t2; ~~ -!!! error TS2322: Type 'T2' is not assignable to type 'S2': -!!! error TS2322: Property ''1'' is missing in type 'T2'. +!!! error TS2323: Type 'T2' is not assignable to type 'S2'. +!!! error TS2323: Property ''1'' is missing in type 'T2'. t2 = s2; ~~ -!!! error TS2322: Type 'S2' is not assignable to type 'T2': -!!! error TS2322: Property ''1.0'' is missing in type 'S2'. +!!! error TS2323: Type 'S2' is not assignable to type 'T2'. +!!! error TS2323: Property ''1.0'' is missing in type 'S2'. s2 = t; ~~ -!!! error TS2322: Type 'T' is not assignable to type 'S2': -!!! error TS2322: Property ''1'' is missing in type 'T'. +!!! error TS2323: Type 'T' is not assignable to type 'S2'. +!!! error TS2323: Property ''1'' is missing in type 'T'. s2 = b; ~~ -!!! 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; }'. +!!! 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; }'. s2 = a2; ~~ -!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2': -!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'. +!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'. a = b; ~ -!!! 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; }'. +!!! 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; }'. b = a; ~ -!!! 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; }'. +!!! 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; }'. a = s; ~ -!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': -!!! error TS2322: Property ''1.'' is missing in type 'S'. +!!! error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'. +!!! error TS2323: Property ''1.'' is missing in type 'S'. a = s2; ~ -!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': -!!! error TS2322: Property ''1.'' is missing in type 'S2'. +!!! error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'. +!!! error TS2323: Property ''1.'' is missing in type 'S2'. a = a2; ~ -!!! 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; }'. +!!! 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; }'. a2 = b2; ~~ -!!! error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }': -!!! error TS2322: Property ''1.0'' is missing in type '{ '1': string; }'. +!!! error TS2323: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'. +!!! error TS2323: Property ''1.0'' is missing in type '{ '1': string; }'. b2 = a2; ~~ -!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }': -!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'. +!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'. a2 = b; // ok a2 = t2; // ok a2 = t; ~~ -!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }': -!!! error TS2322: Property ''1.0'' is missing in type 'T'. +!!! error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'. +!!! error TS2323: 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 TS2322: Type '{ '1.0': string; }' is not assignable to type 'S': -!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'. +!!! error TS2323: 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 TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2': -!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'. +!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'. a = b; // error ~ -!!! 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; }'. +!!! 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; }'. b = a; // error ~ -!!! 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; }'. +!!! 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; }'. a = s; // error ~ -!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': -!!! error TS2322: Property ''1.'' is missing in type 'S'. +!!! error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'. +!!! error TS2323: Property ''1.'' is missing in type 'S'. a = s2; // error ~ -!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': -!!! error TS2322: Property ''1.'' is missing in type 'S2'. +!!! error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'. +!!! error TS2323: Property ''1.'' is missing in type 'S2'. a = a2; // error ~ -!!! 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; }'. +!!! 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; }'. a = b2; // error ~ -!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }': -!!! error TS2322: Property ''1.'' is missing in type '{ 1.: string; }'. +!!! error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'. +!!! error TS2323: Property ''1.'' is missing in type '{ 1.: string; }'. a2 = b2; // error ~~ -!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }': -!!! error TS2322: Property ''1.0'' is missing in type '{ 1.: string; }'. +!!! error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'. +!!! error TS2323: Property ''1.0'' is missing in type '{ 1.: string; }'. b2 = a2; // error ~~ -!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }': -!!! error TS2322: Property '1.' is missing in type '{ '1.0': string; }'. +!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'. +!!! error TS2323: Property '1.' is missing in type '{ '1.0': string; }'. a2 = b; // error ~~ -!!! 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; }'. +!!! 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; }'. a2 = t2; // error ~~ -!!! error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }': -!!! error TS2322: Property ''1.0'' is missing in type 'T2'. +!!! error TS2323: Type 'T2' is not assignable to type '{ '1.0': string; }'. +!!! error TS2323: Property ''1.0'' is missing in type 'T2'. a2 = t; // error ~~ -!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }': -!!! error TS2322: Property ''1.0'' is missing in type 'T'. +!!! error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'. +!!! error TS2323: 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 55e62ae2266..e5741c8601e 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number': +tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2323: 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 TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number': - Types of parameters 'x' and 's1' are incompatible: +tests/cases/compiler/assignmentCompatWithOverloads.ts(19,1): error TS2323: 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 TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number': +tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2323: 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 TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2323: 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 TS2322: Type g = f2; // Error ~ -!!! error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number': -!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type '(x: string) => string' is not assignable to type '(s1: string) => number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. g = f3; // Error ~ -!!! 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'. +!!! 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'. g = f4; // Error ~ -!!! 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'. +!!! 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'. class C { constructor(x: string); @@ -52,6 +52,6 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type d = C; // Error ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt index 630c508fc75..3d6a3c48d68 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt @@ -1,32 +1,32 @@ -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': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(15,1): error TS2323: 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 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(19,1): error TS2323: 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 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(33,5): error TS2323: 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(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(41,5): error TS2323: 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(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(46,9): error TS2323: 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 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(47,9): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. + Index signatures are incompatible. + Type 'T' is not assignable to type 'Derived'. Property 'bar' is missing in type 'Base'. -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: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(50,9): error TS2323: 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 TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': - Index signatures are incompatible: - Type 'T' is not assignable to type 'Derived2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(51,9): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. + Index signatures are incompatible. + Type 'T' is not assignable to type 'Derived2'. Property 'baz' is missing in type 'Base'. @@ -47,19 +47,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; // ok b = a; // error ~ -!!! 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'. +!!! 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'. var b2: { [x: string]: Derived2; } a = b2; // ok b2 = a; // error ~~ -!!! 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'. +!!! 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'. module Generics { class A { @@ -75,10 +75,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a1 = b1; // ok b1 = a1; // error ~~ -!!! 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'. +!!! 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'. class B2 extends A { [x: string]: Derived2; // ok @@ -88,37 +88,37 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a1 = b2; // ok b2 = a1; // error ~~ -!!! 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'. +!!! 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'. function foo() { var b3: { [x: string]: Derived; }; var a3: A; a3 = b3; // error ~~ -!!! 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'. +!!! 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'. b3 = a3; // error ~~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Base'. +!!! 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 TS2323: Property 'bar' is missing in type 'Base'. var b4: { [x: string]: Derived2; }; a3 = b4; // error ~~ -!!! 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'. +!!! 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'. b4 = a3; // error ~~ -!!! 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': -!!! error TS2322: Property 'baz' is missing in type 'Base'. +!!! 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 TS2323: Property 'baz' is missing in type 'Base'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt index de88bc13bad..d84196f9dcc 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt @@ -1,32 +1,32 @@ -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': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(15,1): error TS2323: 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 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(19,1): error TS2323: 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 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(33,5): error TS2323: 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(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(41,5): error TS2323: 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(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(46,9): error TS2323: 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 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(47,9): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. + Index signatures are incompatible. + Type 'T' is not assignable to type 'Derived'. Property 'bar' is missing in type 'Base'. -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: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(50,9): error TS2323: 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 TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': - Index signatures are incompatible: - Type 'T' is not assignable to type 'Derived2': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(51,9): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. + Index signatures are incompatible. + Type 'T' is not assignable to type 'Derived2'. Property 'baz' is missing in type 'Base'. @@ -47,19 +47,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; // ok b = a; // error ~ -!!! 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'. +!!! 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'. var b2: { [x: string]: Derived2; } a = b2; // ok b2 = a; // error ~~ -!!! 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'. +!!! 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'. module Generics { interface A { @@ -75,10 +75,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a1 = b1; // ok b1 = a1; // error ~~ -!!! 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'. +!!! 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'. interface B2 extends A { [x: string]: Derived2; // ok @@ -88,37 +88,37 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a1 = b2; // ok b2 = a1; // error ~~ -!!! 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'. +!!! 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'. function foo() { var b3: { [x: string]: Derived; }; var a3: A; a3 = b3; // error ~~ -!!! 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'. +!!! 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'. b3 = a3; // error ~~ -!!! 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': -!!! error TS2322: Property 'bar' is missing in type 'Base'. +!!! 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 TS2323: Property 'bar' is missing in type 'Base'. var b4: { [x: string]: Derived2; }; a3 = b4; // error ~~ -!!! 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'. +!!! 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'. b4 = a3; // error ~~ -!!! 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': -!!! error TS2322: Property 'baz' is missing in type 'Base'. +!!! 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 TS2323: Property 'baz' is missing in type 'Base'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt index 86913461d44..03f9a5de6b1 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt @@ -1,9 +1,9 @@ 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 TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(20,9): error TS2323: 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 TS2322: Type 'A' is not assignable to type '{ [x: string]: string; }': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(21,9): error TS2323: 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 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'. +!!! 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'. b = a; // error ~ -!!! 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'. +!!! 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'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability10.errors.txt b/tests/baselines/reference/assignmentCompatability10.errors.txt index f1fe353c906..6b553d2f5d4 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 TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicAndOptional': +tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__x4 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability11.errors.txt b/tests/baselines/reference/assignmentCompatability11.errors.txt index 1485c3abdba..135daf32d8e 100644 --- a/tests/baselines/reference/assignmentCompatability11.errors.txt +++ b/tests/baselines/reference/assignmentCompatability11.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': - Types of property 'two' are incompatible: +tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability12.errors.txt b/tests/baselines/reference/assignmentCompatability12.errors.txt index 4a0f9cc8f65..f896763d608 100644 --- a/tests/baselines/reference/assignmentCompatability12.errors.txt +++ b/tests/baselines/reference/assignmentCompatability12.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': - Types of property 'one' are incompatible: +tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability13.errors.txt b/tests/baselines/reference/assignmentCompatability13.errors.txt index 909193c6202..33434bd0c20 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 TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': +tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability14.errors.txt b/tests/baselines/reference/assignmentCompatability14.errors.txt index 897f73b8710..a104fd73775 100644 --- a/tests/baselines/reference/assignmentCompatability14.errors.txt +++ b/tests/baselines/reference/assignmentCompatability14.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': - Types of property 'one' are incompatible: +tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability15.errors.txt b/tests/baselines/reference/assignmentCompatability15.errors.txt index f92f3a7ffd7..6952d9780cc 100644 --- a/tests/baselines/reference/assignmentCompatability15.errors.txt +++ b/tests/baselines/reference/assignmentCompatability15.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean; }': - Types of property 'two' are incompatible: +tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability16.errors.txt b/tests/baselines/reference/assignmentCompatability16.errors.txt index b114462c711..7234065e263 100644 --- a/tests/baselines/reference/assignmentCompatability16.errors.txt +++ b/tests/baselines/reference/assignmentCompatability16.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability17.errors.txt b/tests/baselines/reference/assignmentCompatability17.errors.txt index f30e39de1ae..306d3df4a90 100644 --- a/tests/baselines/reference/assignmentCompatability17.errors.txt +++ b/tests/baselines/reference/assignmentCompatability17.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability18.errors.txt b/tests/baselines/reference/assignmentCompatability18.errors.txt index d619b4847ad..e19b8133556 100644 --- a/tests/baselines/reference/assignmentCompatability18.errors.txt +++ b/tests/baselines/reference/assignmentCompatability18.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability19.errors.txt b/tests/baselines/reference/assignmentCompatability19.errors.txt index 1c61c2bc808..ab552ef2a29 100644 --- a/tests/baselines/reference/assignmentCompatability19.errors.txt +++ b/tests/baselines/reference/assignmentCompatability19.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability20.errors.txt b/tests/baselines/reference/assignmentCompatability20.errors.txt index b9d966a09a5..001331c1afd 100644 --- a/tests/baselines/reference/assignmentCompatability20.errors.txt +++ b/tests/baselines/reference/assignmentCompatability20.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability21.errors.txt b/tests/baselines/reference/assignmentCompatability21.errors.txt index 72a690c5d16..1ff8585b2f8 100644 --- a/tests/baselines/reference/assignmentCompatability21.errors.txt +++ b/tests/baselines/reference/assignmentCompatability21.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability22.errors.txt b/tests/baselines/reference/assignmentCompatability22.errors.txt index b033522049d..6ac985e5de0 100644 --- a/tests/baselines/reference/assignmentCompatability22.errors.txt +++ b/tests/baselines/reference/assignmentCompatability22.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability23.errors.txt b/tests/baselines/reference/assignmentCompatability23.errors.txt index f50d2ba943e..315f3bc12bc 100644 --- a/tests/baselines/reference/assignmentCompatability23.errors.txt +++ b/tests/baselines/reference/assignmentCompatability23.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability25.errors.txt b/tests/baselines/reference/assignmentCompatability25.errors.txt index c02b876e4e0..76f462d635d 100644 --- a/tests/baselines/reference/assignmentCompatability25.errors.txt +++ b/tests/baselines/reference/assignmentCompatability25.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': - Types of property 'two' are incompatible: +tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability26.errors.txt b/tests/baselines/reference/assignmentCompatability26.errors.txt index 253c8af2c16..6b6497a5f6d 100644 --- a/tests/baselines/reference/assignmentCompatability26.errors.txt +++ b/tests/baselines/reference/assignmentCompatability26.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': - Types of property 'one' are incompatible: +tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability27.errors.txt b/tests/baselines/reference/assignmentCompatability27.errors.txt index 3c033c8d98d..2751bd38f19 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 TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': +tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability28.errors.txt b/tests/baselines/reference/assignmentCompatability28.errors.txt index ce604747051..756411d654c 100644 --- a/tests/baselines/reference/assignmentCompatability28.errors.txt +++ b/tests/baselines/reference/assignmentCompatability28.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': - Types of property 'one' are incompatible: +tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability29.errors.txt b/tests/baselines/reference/assignmentCompatability29.errors.txt index fe9e390b482..88f936d1466 100644 --- a/tests/baselines/reference/assignmentCompatability29.errors.txt +++ b/tests/baselines/reference/assignmentCompatability29.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability30.errors.txt b/tests/baselines/reference/assignmentCompatability30.errors.txt index 663d8eaa299..cba16799c66 100644 --- a/tests/baselines/reference/assignmentCompatability30.errors.txt +++ b/tests/baselines/reference/assignmentCompatability30.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability31.errors.txt b/tests/baselines/reference/assignmentCompatability31.errors.txt index 00d5dd59188..c7f48f70835 100644 --- a/tests/baselines/reference/assignmentCompatability31.errors.txt +++ b/tests/baselines/reference/assignmentCompatability31.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability32.errors.txt b/tests/baselines/reference/assignmentCompatability32.errors.txt index c4f20881a44..07e8b7de26f 100644 --- a/tests/baselines/reference/assignmentCompatability32.errors.txt +++ b/tests/baselines/reference/assignmentCompatability32.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability35.errors.txt b/tests/baselines/reference/assignmentCompatability35.errors.txt index 4ae2aaf42d8..06f83c1e78f 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 TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: number]: number; }': +tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability36.errors.txt b/tests/baselines/reference/assignmentCompatability36.errors.txt index 013f5ae33b6..eb02058ad8b 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 TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: string]: any; }': +tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability39.errors.txt b/tests/baselines/reference/assignmentCompatability39.errors.txt index 3ab5cee7887..4c7f14ba68f 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 TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic': +tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__x2 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability40.errors.txt b/tests/baselines/reference/assignmentCompatability40.errors.txt index 4be86ebc805..9282af2c121 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 TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate': +tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__x5 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability41.errors.txt b/tests/baselines/reference/assignmentCompatability41.errors.txt index 018beb23358..75c3ddd90bf 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 TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate': +tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__x6 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability42.errors.txt b/tests/baselines/reference/assignmentCompatability42.errors.txt index de6fd79041e..bd20a1d56b2 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 TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate': +tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__x7 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentCompatability43.errors.txt b/tests/baselines/reference/assignmentCompatability43.errors.txt index 3f5fc9789b9..9cc919f34bf 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 TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo': +tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2323: 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 TS2322: Type 'inte } __test2__.__val__obj2 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 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 3c6f6c72b55..29764fec7a7 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 TS2322: Type 'string' is not assignable to type 'Applicable': +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2323: 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 TS2322: Type 'string[]' is not assignable to type 'Applicable': +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2323: 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 TS2322: Type 'number' is not assignable to type 'Applicable': +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2323: 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 TS2322: Type '{}' is not assignable to type 'Applicable': +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2323: 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 TS2322: Type 'string' is not assignable to type 'Applicable': -!!! error TS2322: Property 'apply' is missing in type 'String'. +!!! error TS2323: Type 'string' is not assignable to type 'Applicable'. +!!! error TS2323: Property 'apply' is missing in type 'String'. x = ['']; ~ -!!! error TS2322: Type 'string[]' is not assignable to type 'Applicable': -!!! error TS2322: Property 'apply' is missing in type 'string[]'. +!!! error TS2323: Type 'string[]' is not assignable to type 'Applicable'. +!!! error TS2323: Property 'apply' is missing in type 'string[]'. x = 4; ~ -!!! error TS2322: Type 'number' is not assignable to type 'Applicable': -!!! error TS2322: Property 'apply' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'Applicable'. +!!! error TS2323: Property 'apply' is missing in type 'Number'. x = {}; ~ -!!! error TS2322: Type '{}' is not assignable to type 'Applicable': -!!! error TS2322: Property 'apply' is missing in type '{}'. +!!! error TS2323: Type '{}' is not assignable to type 'Applicable'. +!!! error TS2323: 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 ab9b4985cc2..2abefbf7099 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 TS2322: Type 'string' is not assignable to type 'Callable': +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2323: 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 TS2322: Type 'string[]' is not assignable to type 'Callable': +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2323: 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 TS2322: Type 'number' is not assignable to type 'Callable': +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2323: 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 TS2322: Type '{}' is not assignable to type 'Callable': +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2323: 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 TS2322: Type 'string' is not assignable to type 'Callable': -!!! error TS2322: Property 'call' is missing in type 'String'. +!!! error TS2323: Type 'string' is not assignable to type 'Callable'. +!!! error TS2323: Property 'call' is missing in type 'String'. x = ['']; ~ -!!! error TS2322: Type 'string[]' is not assignable to type 'Callable': -!!! error TS2322: Property 'call' is missing in type 'string[]'. +!!! error TS2323: Type 'string[]' is not assignable to type 'Callable'. +!!! error TS2323: Property 'call' is missing in type 'string[]'. x = 4; ~ -!!! error TS2322: Type 'number' is not assignable to type 'Callable': -!!! error TS2322: Property 'call' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'Callable'. +!!! error TS2323: Property 'call' is missing in type 'Number'. x = {}; ~ -!!! error TS2322: Type '{}' is not assignable to type 'Callable': -!!! error TS2322: Property 'call' is missing in type '{}'. +!!! error TS2323: Type '{}' is not assignable to type 'Callable'. +!!! error TS2323: Property 'call' is missing in type '{}'. // Should work function f() { }; diff --git a/tests/baselines/reference/assignmentToObject.errors.txt b/tests/baselines/reference/assignmentToObject.errors.txt index bfb270b71b6..4be2392fce1 100644 --- a/tests/baselines/reference/assignmentToObject.errors.txt +++ b/tests/baselines/reference/assignmentToObject.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/assignmentToObject.ts(3,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object': - Types of property 'toString' are incompatible: +tests/cases/compiler/assignmentToObject.ts(3,5): error TS2323: 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 TS2322: Type '{ toString: var b: {} = a; // ok var c: Object = a; // should be error ~ -!!! 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt index c6ba4e7dfe3..82ca1be0cfc 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt +++ b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt @@ -1,19 +1,19 @@ -tests/cases/compiler/assignmentToObjectAndFunction.ts(1,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object': - Types of property 'toString' are incompatible: +tests/cases/compiler/assignmentToObjectAndFunction.ts(1,5): error TS2323: 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 TS2322: Type '{}' is not assignable to type 'Function': +tests/cases/compiler/assignmentToObjectAndFunction.ts(8,5): error TS2323: Type '{}' is not assignable to type 'Function'. Property 'apply' is missing in type '{}'. -tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type 'typeof bad' is not assignable to type 'Function': - Types of property 'apply' are incompatible: +tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2323: 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'. ==== tests/cases/compiler/assignmentToObjectAndFunction.ts (3 errors) ==== var errObj: Object = { toString: 0 }; // Error, incompatible toString ~~~~~~ -!!! 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'. +!!! 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'. var goodObj: Object = { toString(x?) { return ""; @@ -22,8 +22,8 @@ tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type var errFun: Function = {}; // Error for no call signature ~~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'Function': -!!! error TS2322: Property 'apply' is missing in type '{}'. +!!! error TS2323: Type '{}' is not assignable to type 'Function'. +!!! error TS2323: Property 'apply' is missing in type '{}'. function foo() { } module foo { @@ -46,6 +46,6 @@ tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type var badFundule: Function = bad; // error ~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt index 070b5497121..67dee955566 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt @@ -6,14 +6,14 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize 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 TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': - Types of property 'x' are incompatible: +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2323: 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 TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': - Types of property 'x' are incompatible: +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2323: 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 TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': - Types of property 'x' are incompatible: +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2323: 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. @@ -79,19 +79,19 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize M2.M3 = { x: '' }; // Error ~~~~~ -!!! 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'. +!!! 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'. (M2).M3 = { x: '' }; // Error ~~~~~~~ -!!! 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'. +!!! 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'. (M2.M3) = { x: '' }; // Error ~~~~~~~ -!!! 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'. +!!! 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'. function fn() { } diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt index 2c165c2395c..8a5899d2377 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 TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }': +tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(15,5): error TS2323: 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 TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }': +tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2323: 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 TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }': -!!! error TS2322: Index signature is missing in type '{}'. +!!! error TS2323: Type '{}' is not assignable to type '{ [x: number]: Foo; }'. +!!! error TS2323: Index signature is missing in type '{}'. [n: number]: Foo } = o; // Should be allowed var v2: { ~~ -!!! error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }': -!!! error TS2322: Index signature is missing in type '() => void'. +!!! error TS2323: Type '() => void' is not assignable to type '{ [x: number]: Bar; }'. +!!! error TS2323: 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/baseTypePrivateMemberClash.errors.txt b/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt index f55bca8e0e2..eca303ff72c 100644 --- a/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt +++ b/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y': +tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y'. Named properties 'm' of types 'X' and 'Y' are not identical. @@ -12,5 +12,5 @@ tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interfac interface Z extends X, Y { } ~ -!!! error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y': +!!! error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y'. !!! error TS2320: Named properties 'm' of types 'X' and 'Y' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/bases.errors.txt b/tests/baselines/reference/bases.errors.txt index a4a04af142d..c9eabafaf80 100644 --- a/tests/baselines/reference/bases.errors.txt +++ b/tests/baselines/reference/bases.errors.txt @@ -2,7 +2,7 @@ tests/cases/compiler/bases.ts(7,15): error TS1005: ';' expected. tests/cases/compiler/bases.ts(13,15): error TS1005: ';' expected. tests/cases/compiler/bases.ts(7,14): error TS2339: Property 'y' does not exist on type 'B'. tests/cases/compiler/bases.ts(7,17): error TS2304: Cannot find name 'any'. -tests/cases/compiler/bases.ts(11,7): error TS2421: Class 'C' incorrectly implements interface 'I': +tests/cases/compiler/bases.ts(11,7): error TS2420: Class 'C' incorrectly implements interface 'I'. Property 'x' is missing in type 'C'. tests/cases/compiler/bases.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call. tests/cases/compiler/bases.ts(13,14): error TS2339: Property 'x' does not exist on type 'C'. @@ -30,8 +30,8 @@ tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist o class C extends B implements I { ~ -!!! error TS2421: Class 'C' incorrectly implements interface 'I': -!!! error TS2421: Property 'x' is missing in type 'C'. +!!! error TS2420: Class 'C' incorrectly implements interface 'I'. +!!! error TS2420: Property 'x' is missing in type 'C'. constructor() { ~~~~~~~~~~~~~~~ this.x: any; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt index d0e31f4a246..d6efdd66868 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts(57,15): error TS2429: Interface 'I2' incorrectly extends interface 'Base2': - Types of property 'a' are incompatible: - Type '(x: number) => string' is not assignable to type '(x: number) => number': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts(57,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. + Types of property 'a' are incompatible. + Type '(x: number) => string' is not assignable to type '(x: number) => number'. Type 'string' is not assignable to type 'number'. @@ -63,10 +63,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign // S's interface I2 extends Base2 { ~~ -!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type '(x: number) => string' is not assignable to type '(x: number) => number': -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type '(x: number) => string' is not assignable to type '(x: number) => number'. +!!! error TS2430: Type 'string' is not assignable to type 'number'. // N's a: (x: number) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt index 51bf9695692..7e9d75b1b41 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(51,19): error TS2429: Interface 'I2' incorrectly extends interface 'A': - Types of property 'a2' are incompatible: - Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(51,19): error TS2430: Interface 'I2' incorrectly extends interface 'A'. + Types of property 'a2' are incompatible. + Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]'. + Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(60,19): error TS2429: Interface 'I4' incorrectly extends interface 'A': - Types of property 'a8' are incompatible: - 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: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(60,19): error TS2430: Interface 'I4' incorrectly extends interface 'A'. + Types of property 'a8' are incompatible. + 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'. @@ -67,11 +67,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign interface I2 extends A { ~~ -!!! error TS2429: Interface 'I2' incorrectly extends interface 'A': -!!! error TS2429: Types of property 'a2' are incompatible: -!!! error TS2429: Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]': -!!! error TS2429: Types of parameters 'x' and 'x' are incompatible: -!!! error TS2429: Type 'T' is not assignable to type 'number'. +!!! error TS2430: Interface 'I2' incorrectly extends interface 'A'. +!!! error TS2430: Types of property 'a2' are incompatible. +!!! error TS2430: Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]'. +!!! error TS2430: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2430: Type 'T' is not assignable to type 'number'. a2: (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic } @@ -82,15 +82,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign interface I4 extends A { ~~ -!!! error TS2429: Interface 'I4' incorrectly extends interface 'A': -!!! error TS2429: Types of property 'a8' are incompatible: -!!! error TS2429: 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 TS2429: Types of parameters 'y' and 'y' are incompatible: -!!! error TS2429: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': -!!! error TS2429: Types of parameters 'arg2' and 'arg2' are incompatible: -!!! error TS2429: Type '{ foo: number; }' is not assignable to type 'Base': -!!! error TS2429: Types of property 'foo' are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'. +!!! error TS2430: Types of property 'a8' are incompatible. +!!! error TS2430: 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 TS2430: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. +!!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible. +!!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'. +!!! error TS2430: Types of property 'foo' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. a8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt index aada6c9f8a1..5fabfd0b7ad 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(8,11): error TS2320: Interface 'A' cannot simultaneously extend types 'I' and 'I': +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(8,11): error TS2320: Interface 'A' cannot simultaneously extend types 'I' and 'I'. Named properties 'foo' of types 'I' and 'I' are not identical. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(13,16): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. @@ -13,7 +13,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesTha interface A extends I, I { } ~ -!!! error TS2320: Interface 'A' cannot simultaneously extend types 'I' and 'I': +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'I' and 'I'. !!! error TS2320: Named properties 'foo' of types 'I' and 'I' are not identical. var x: A; diff --git a/tests/baselines/reference/castingTuple.errors.txt b/tests/baselines/reference/castingTuple.errors.txt index c3079699a80..9bf9c4f24fb 100644 --- a/tests/baselines/reference/castingTuple.errors.txt +++ b/tests/baselines/reference/castingTuple.errors.txt @@ -1,19 +1,19 @@ -tests/cases/conformance/types/tuple/castingTuple.ts(13,23): error TS2353: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other: +tests/cases/conformance/types/tuple/castingTuple.ts(13,23): error TS2352: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other. Property '2' is missing in type '[number, string]'. -tests/cases/conformance/types/tuple/castingTuple.ts(16,21): error TS2353: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other: +tests/cases/conformance/types/tuple/castingTuple.ts(16,21): error TS2352: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other. Property '2' is missing in type '[C, D]'. -tests/cases/conformance/types/tuple/castingTuple.ts(24,10): error TS2353: Neither type '[number, string]' nor type '[number, number]' is assignable to the other: - Types of property '1' are incompatible: +tests/cases/conformance/types/tuple/castingTuple.ts(24,10): error TS2352: Neither type '[number, string]' nor type '[number, number]' is assignable to the other. + Types of property '1' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/tuple/castingTuple.ts(25,10): error TS2353: Neither type '[C, D]' nor type '[A, I]' is assignable to the other: - Types of property '0' are incompatible: - Type 'C' is not assignable to type 'A': +tests/cases/conformance/types/tuple/castingTuple.ts(25,10): error TS2352: Neither type '[C, D]' nor type '[A, I]' is assignable to the other. + Types of property '0' are incompatible. + Type 'C' is not assignable to type 'A'. Property 'a' is missing in type 'C'. tests/cases/conformance/types/tuple/castingTuple.ts(26,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'array1' must be of type '{}[]', but here has type 'number[]'. -tests/cases/conformance/types/tuple/castingTuple.ts(26,14): error TS2353: Neither type '[number, string]' nor type 'number[]' is assignable to the other: - Types of property 'pop' are incompatible: - Type '() => string | number' is not assignable to type '() => number': - Type 'string | number' is not assignable to type 'number': +tests/cases/conformance/types/tuple/castingTuple.ts(26,14): error TS2352: Neither type '[number, string]' nor type 'number[]' is assignable to the other. + 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/tuple/castingTuple.ts(27,1): error TS2304: Cannot find name 't4'. @@ -33,14 +33,14 @@ tests/cases/conformance/types/tuple/castingTuple.ts(27,1): error TS2304: Cannot var emptyObjTuple = <[{}, {}]>numStrTuple; var numStrBoolTuple = <[number, string, boolean]>numStrTuple; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other: -!!! error TS2353: Property '2' is missing in type '[number, string]'. +!!! error TS2352: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other. +!!! error TS2352: Property '2' is missing in type '[number, string]'. var classCDTuple: [C, D] = [new C(), new D()]; var interfaceIITuple = <[I, I]>classCDTuple; var classCDATuple = <[C, D, A]>classCDTuple; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other: -!!! error TS2353: Property '2' is missing in type '[C, D]'. +!!! error TS2352: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other. +!!! error TS2352: Property '2' is missing in type '[C, D]'. var eleFromCDA1 = classCDATuple[2]; // A var eleFromCDA2 = classCDATuple[5]; // {} var t10: [E1, E2] = [E1.one, E2.one]; @@ -50,24 +50,24 @@ tests/cases/conformance/types/tuple/castingTuple.ts(27,1): error TS2304: Cannot // error var t3 = <[number, number]>numStrTuple; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '[number, string]' nor type '[number, number]' is assignable to the other: -!!! error TS2353: Types of property '1' are incompatible: -!!! error TS2353: Type 'string' is not assignable to type 'number'. +!!! error TS2352: Neither type '[number, string]' nor type '[number, number]' is assignable to the other. +!!! error TS2352: Types of property '1' are incompatible. +!!! error TS2352: Type 'string' is not assignable to type 'number'. var t9 = <[A, I]>classCDTuple; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '[C, D]' nor type '[A, I]' is assignable to the other: -!!! error TS2353: Types of property '0' are incompatible: -!!! error TS2353: Type 'C' is not assignable to type 'A': -!!! error TS2353: Property 'a' is missing in type 'C'. +!!! error TS2352: Neither type '[C, D]' nor type '[A, I]' is assignable to the other. +!!! error TS2352: Types of property '0' are incompatible. +!!! error TS2352: Type 'C' is not assignable to type 'A'. +!!! error TS2352: Property 'a' is missing in type 'C'. var array1 = numStrTuple; ~~~~~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'array1' must be of type '{}[]', but here has type 'number[]'. ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '[number, string]' nor type 'number[]' is assignable to the other: -!!! error TS2353: Types of property 'pop' are incompatible: -!!! error TS2353: Type '() => string | number' is not assignable to type '() => number': -!!! error TS2353: Type 'string | number' is not assignable to type 'number': -!!! error TS2353: Type 'string' is not assignable to type 'number'. +!!! error TS2352: Neither type '[number, string]' nor type 'number[]' is assignable to the other. +!!! error TS2352: Types of property 'pop' are incompatible. +!!! error TS2352: Type '() => string | number' is not assignable to type '() => number'. +!!! error TS2352: Type 'string | number' is not assignable to type 'number'. +!!! error TS2352: Type 'string' is not assignable to type 'number'. t4[2] = 10; ~~ !!! error TS2304: Cannot find name 't4'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignment1.errors.txt b/tests/baselines/reference/chainedAssignment1.errors.txt index 29555d10dcb..6c95a2f4362 100644 --- a/tests/baselines/reference/chainedAssignment1.errors.txt +++ b/tests/baselines/reference/chainedAssignment1.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/chainedAssignment1.ts(21,1): error TS2322: Type 'Z' is not assignable to type 'X': +tests/cases/compiler/chainedAssignment1.ts(21,1): error TS2323: Type 'Z' is not assignable to type 'X'. Property 'a' is missing in type 'Z'. -tests/cases/compiler/chainedAssignment1.ts(21,6): error TS2322: Type 'Z' is not assignable to type 'Y': +tests/cases/compiler/chainedAssignment1.ts(21,6): error TS2323: 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'. @@ -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 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 'X'. +!!! 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'. +!!! error TS2323: Type 'Z' is not assignable to type 'Y'. +!!! error TS2323: 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 diff --git a/tests/baselines/reference/chainedAssignment3.errors.txt b/tests/baselines/reference/chainedAssignment3.errors.txt index 758c3e2a332..1c760f9b37c 100644 --- a/tests/baselines/reference/chainedAssignment3.errors.txt +++ b/tests/baselines/reference/chainedAssignment3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/chainedAssignment3.ts(18,1): error TS2322: Type 'A' is not assignable to type 'B': +tests/cases/compiler/chainedAssignment3.ts(18,1): error TS2323: 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'. @@ -23,8 +23,8 @@ tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2323: Type 'A' is not // error cases b = a = new A(); ~ -!!! error TS2322: Type 'A' is not assignable to type 'B': -!!! error TS2322: Property 'value' is missing in type 'A'. +!!! error TS2323: Type 'A' is not assignable to type 'B'. +!!! error TS2323: Property 'value' is missing in type 'A'. a = b = new A(); ~ !!! error TS2323: Type 'A' is not assignable to type 'B'. diff --git a/tests/baselines/reference/chainedAssignmentChecking.errors.txt b/tests/baselines/reference/chainedAssignmentChecking.errors.txt index 3748995e4f0..957c088ab52 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 TS2322: Type 'Z' is not assignable to type 'X': +tests/cases/compiler/chainedAssignmentChecking.ts(21,1): error TS2323: Type 'Z' is not assignable to type 'X'. Property 'a' is missing in type 'Z'. -tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2322: Type 'Z' is not assignable to type 'Y': +tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2323: 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 TS2322: Type 'Z' c1 = c2 = c3; // Should be error ~~ -!!! 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 'X'. +!!! 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'. +!!! error TS2323: Type 'Z' is not assignable to type 'Y'. +!!! error TS2323: Property 'a' is missing in type 'Z'. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt index cff696696b7..ea3927b51d1 100644 --- a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt +++ b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7): error TS2421: Class 'D2' incorrectly implements interface 'I': +tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7): error TS2420: Class 'D2' incorrectly implements interface 'I'. Types have separate declarations of a private property 'x'. @@ -14,8 +14,8 @@ tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7) class D2 implements I { ~~ -!!! error TS2421: Class 'D2' incorrectly implements interface 'I': -!!! error TS2421: Types have separate declarations of a private property 'x'. +!!! error TS2420: Class 'D2' incorrectly implements interface 'I'. +!!! error TS2420: Types have separate declarations of a private property 'x'. public foo(x: any) { return x } private x = 3; other(x: any) { return x } diff --git a/tests/baselines/reference/classImplementsClass2.errors.txt b/tests/baselines/reference/classImplementsClass2.errors.txt index f1fabd8a975..8287eb92ce7 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 TS2421: Class 'C' incorrectly implements interface 'A': +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 TS2322: Type 'C' is not assignable to type 'C2': +tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2323: Type 'C' is not assignable to type 'C2'. Property 'foo' is missing in type 'C'. @@ -8,8 +8,8 @@ tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2322: Type 'C' is n class A { foo(): number { return 1; } } class C implements A {} // error ~ -!!! error TS2421: Class 'C' incorrectly implements interface 'A': -!!! error TS2421: Property 'foo' is missing in type 'C'. +!!! error TS2420: Class 'C' incorrectly implements interface 'A'. +!!! error TS2420: Property 'foo' is missing in type 'C'. class C2 extends A { foo() { @@ -22,5 +22,5 @@ tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2322: Type 'C' is n c = c2; c2 = c; ~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/classImplementsClass4.errors.txt b/tests/baselines/reference/classImplementsClass4.errors.txt index 7539cb1a752..2de30155c8d 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 TS2421: Class 'C' incorrectly implements interface 'A': +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 TS2322: Type 'C' is not assignable to type 'C2': +tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2323: Type 'C' is not assignable to type 'C2'. Property 'x' is missing in type 'C'. @@ -11,8 +11,8 @@ tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2322: Type 'C' is n } class C implements A { ~ -!!! error TS2421: Class 'C' incorrectly implements interface 'A': -!!! error TS2421: Property 'x' is missing in type 'C'. +!!! error TS2420: Class 'C' incorrectly implements interface 'A'. +!!! error TS2420: Property 'x' is missing in type 'C'. foo() { return 1; } @@ -25,5 +25,5 @@ tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2322: Type 'C' is n c = c2; c2 = c; ~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/classImplementsClass5.errors.txt b/tests/baselines/reference/classImplementsClass5.errors.txt index 6328e595e13..6b5533e65f1 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 TS2421: Class 'C' incorrectly implements interface 'A': +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 TS2322: Type 'C2' is not assignable to type 'C': +tests/cases/compiler/classImplementsClass5.ts(16,1): error TS2323: 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 TS2322: Type 'C' is not assignable to type 'C2': +tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2323: Type 'C' is not assignable to type 'C2'. Types have separate declarations of a private property 'x'. @@ -13,8 +13,8 @@ tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is n } class C implements A { ~ -!!! error TS2421: Class 'C' incorrectly implements interface 'A': -!!! error TS2421: Types have separate declarations of a private property 'x'. +!!! error TS2420: Class 'C' incorrectly implements interface 'A'. +!!! error TS2420: Types have separate declarations of a private property 'x'. private x = 1; foo() { return 1; @@ -27,9 +27,9 @@ tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is n var c2: C2; c = c2; ~ -!!! error TS2322: Type 'C2' is not assignable to type 'C': -!!! error TS2322: Types have separate declarations of a private property 'x'. +!!! error TS2323: Type 'C2' is not assignable to type 'C'. +!!! error TS2323: Types have separate declarations of a private property 'x'. c2 = c; ~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt b/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt index 7ba816475fb..88176d95026 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts(11,7): error TS2416: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>': - Types of property 'foo' are incompatible: - Type '{ bar?: string; }' is not assignable to type '{ bar: string; }': +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts(11,7): error TS2415: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>'. + Types of property 'foo' are incompatible. + Type '{ bar?: string; }' is not assignable to type '{ bar: string; }'. Property 'bar' is optional in type '{ bar?: string; }' but required in type '{ bar: string; }'. @@ -17,10 +17,10 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla class Derived2 extends Base<{ bar: string; }> { ~~~~~~~~ -!!! error TS2416: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type '{ bar?: string; }' is not assignable to type '{ bar: string; }': -!!! error TS2416: Property 'bar' is optional in type '{ bar?: string; }' but required in type '{ bar: string; }'. +!!! error TS2415: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type '{ bar?: string; }' is not assignable to type '{ bar: string; }'. +!!! error TS2415: Property 'bar' is optional in type '{ bar?: string; }' but required in type '{ bar: string; }'. foo: { bar?: string; // error } diff --git a/tests/baselines/reference/classUpdateTests.errors.txt b/tests/baselines/reference/classUpdateTests.errors.txt index 4548560df15..6bfd7518855 100644 --- a/tests/baselines/reference/classUpdateTests.errors.txt +++ b/tests/baselines/reference/classUpdateTests.errors.txt @@ -9,9 +9,9 @@ tests/cases/compiler/classUpdateTests.ts(43,18): error TS2335: 'super' can only tests/cases/compiler/classUpdateTests.ts(46,17): error TS2311: A class may only extend another class. tests/cases/compiler/classUpdateTests.ts(47,18): error TS2335: 'super' can only be referenced in a derived class. tests/cases/compiler/classUpdateTests.ts(57,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. -tests/cases/compiler/classUpdateTests.ts(63,7): error TS2416: Class 'L' incorrectly extends base class 'G': +tests/cases/compiler/classUpdateTests.ts(63,7): error TS2415: Class 'L' incorrectly extends base class 'G'. Property 'p1' is private in type 'L' but not in type 'G'. -tests/cases/compiler/classUpdateTests.ts(69,7): error TS2416: Class 'M' incorrectly extends base class 'G': +tests/cases/compiler/classUpdateTests.ts(69,7): error TS2415: Class 'M' incorrectly extends base class 'G'. Property 'p1' is private in type 'M' but not in type 'G'. tests/cases/compiler/classUpdateTests.ts(70,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/compiler/classUpdateTests.ts(105,15): error TS2339: Property 'p1' does not exist on type 'Q'. @@ -96,8 +96,8 @@ tests/cases/compiler/classUpdateTests.ts(111,16): error TS2339: Property 'p1' do class L extends G { ~ -!!! error TS2416: Class 'L' incorrectly extends base class 'G': -!!! error TS2416: Property 'p1' is private in type 'L' but not in type 'G'. +!!! error TS2415: Class 'L' incorrectly extends base class 'G'. +!!! error TS2415: Property 'p1' is private in type 'L' but not in type 'G'. constructor(private p1:number) { super(); // NO ERROR } @@ -105,8 +105,8 @@ tests/cases/compiler/classUpdateTests.ts(111,16): error TS2339: Property 'p1' do class M extends G { ~ -!!! error TS2416: Class 'M' incorrectly extends base class 'G': -!!! error TS2416: Property 'p1' is private in type 'M' but not in type 'G'. +!!! error TS2415: Class 'M' incorrectly extends base class 'G'. +!!! error TS2415: Property 'p1' is private in type 'M' but not in type 'G'. constructor(private p1:number) { // ERROR ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var i = 0; diff --git a/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt b/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt index 5463a3b21ee..37eb63547ed 100644 --- a/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt +++ b/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/classWithMultipleBaseClasses.ts(18,7): error TS2421: Class 'D' incorrectly implements interface 'I': +tests/cases/compiler/classWithMultipleBaseClasses.ts(18,7): error TS2420: Class 'D' incorrectly implements interface 'I'. Property 'foo' is missing in type 'D'. @@ -22,8 +22,8 @@ tests/cases/compiler/classWithMultipleBaseClasses.ts(18,7): error TS2421: Class class D implements I, J { ~ -!!! error TS2421: Class 'D' incorrectly implements interface 'I': -!!! error TS2421: Property 'foo' is missing in type 'D'. +!!! error TS2420: Class 'D' incorrectly implements interface 'I'. +!!! error TS2420: Property 'foo' is missing in type 'D'. baz() { } bat() { } } diff --git a/tests/baselines/reference/clodulesDerivedClasses.errors.txt b/tests/baselines/reference/clodulesDerivedClasses.errors.txt index e4ce78e1875..1753f6051bd 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.errors.txt +++ b/tests/baselines/reference/clodulesDerivedClasses.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2418: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape': - Types of property 'Utils' are incompatible: - Type 'typeof Utils' is not assignable to type 'typeof Utils': +tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'. + Types of property 'Utils' are incompatible. + Type 'typeof Utils' is not assignable to type 'typeof Utils'. Property 'convert' is missing in type 'typeof Utils'. @@ -15,10 +15,10 @@ tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2418: Class static class Path extends Shape { ~~~~ -!!! error TS2418: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape': -!!! error TS2418: Types of property 'Utils' are incompatible: -!!! error TS2418: Type 'typeof Utils' is not assignable to type 'typeof Utils': -!!! error TS2418: Property 'convert' is missing in type 'typeof Utils'. +!!! error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'. +!!! error TS2417: Types of property 'Utils' are incompatible. +!!! error TS2417: Type 'typeof Utils' is not assignable to type 'typeof Utils'. +!!! error TS2417: Property 'convert' is missing in type 'typeof Utils'. name: string; } diff --git a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt index 2055bbc2b34..bedfb8deba3 100644 --- a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt +++ b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt @@ -1,7 +1,7 @@ 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 TS2322: Type 'string' is not assignable to type '{ a: string; }': +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(14,1): error TS2323: 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'. @@ -28,8 +28,8 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmen var x4: {a: string}; x4 += ''; ~~ -!!! error TS2322: Type 'string' is not assignable to type '{ a: string; }': -!!! error TS2322: Property 'a' is missing in type 'String'. +!!! error TS2323: Type 'string' is not assignable to type '{ a: string; }'. +!!! error TS2323: Property 'a' is missing in type 'String'. var x5: void; x5 += ''; diff --git a/tests/baselines/reference/conditionalExpression1.errors.txt b/tests/baselines/reference/conditionalExpression1.errors.txt index 30703c7169e..35066561a38 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 TS2322: Type 'string | number' is not assignable to type 'boolean': +tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2323: 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 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 +!!! 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 diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt index b1dd23fc3e3..27c08308c33 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt @@ -1,17 +1,17 @@ -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': +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(15,5): error TS2323: 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 TS2322: Type 'A | B' is not assignable to type 'B': - Type 'A' is not assignable to type 'B': +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(16,5): error TS2323: 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 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': +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'. + 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 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': +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'. + 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 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': +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'. + 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 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'. +!!! 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'. var result3: B = true ? a : b; ~~~~~~~ -!!! 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'. +!!! 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'. var result4: (t: X) => number = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! 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'. +!!! 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'. var result5: (t: X) => string = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! 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'. +!!! 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'. var result6: (t: X) => boolean = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt b/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt index dfd87465894..58fdcb4c7ae 100644 --- a/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt +++ b/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D': +tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D'. Named properties 'm' of types 'B' and 'D' are not identical. @@ -16,7 +16,7 @@ tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Inte interface E extends B { } // Error here for extending B and D ~ -!!! error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D': +!!! error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D'. !!! error TS2320: Named properties 'm' of types 'B' and 'D' are not identical. interface E extends D { } // No duplicate error here \ No newline at end of file diff --git a/tests/baselines/reference/constraints0.errors.txt b/tests/baselines/reference/constraints0.errors.txt index ac16118149b..217a7408fbd 100644 --- a/tests/baselines/reference/constraints0.errors.txt +++ b/tests/baselines/reference/constraints0.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/constraints0.ts(14,9): error TS2343: Type 'B' does not satisfy the constraint 'A': +tests/cases/compiler/constraints0.ts(14,9): error TS2344: Type 'B' does not satisfy the constraint 'A'. Property 'a' is missing in type 'B'. @@ -18,7 +18,7 @@ tests/cases/compiler/constraints0.ts(14,9): error TS2343: Type 'B' does not sati var v1: C; // should work var v2: C; // should not work ~~~~ -!!! error TS2343: Type 'B' does not satisfy the constraint 'A': -!!! error TS2343: Property 'a' is missing in type 'B'. +!!! error TS2344: Type 'B' does not satisfy the constraint 'A'. +!!! error TS2344: Property 'a' is missing in type 'B'. var y = v1.x.a; // 'a' should be of type 'number' \ No newline at end of file diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt b/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt index 373bd49f92d..51278fc3f44 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts(61,15): error TS2429: Interface 'I2' incorrectly extends interface 'Base2': - Types of property 'a' are incompatible: - Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts(61,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. + Types of property 'a' are incompatible. + Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number'. Type 'string' is not assignable to type 'number'. @@ -67,10 +67,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc // S's interface I2 extends Base2 { ~~ -!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number': -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number'. +!!! error TS2430: Type 'string' is not assignable to type 'number'. // N's a: new (x: number) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt index 4a2425cf3ac..8d6273804f7 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(41,19): error TS2429: Interface 'I2' incorrectly extends interface 'A': - Types of property 'a2' are incompatible: - Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(41,19): error TS2430: Interface 'I2' incorrectly extends interface 'A'. + Types of property 'a2' are incompatible. + Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]'. + Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(50,19): error TS2429: Interface 'I4' incorrectly extends interface 'A': - Types of property 'a8' are incompatible: - 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: +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(50,19): error TS2430: Interface 'I4' incorrectly extends interface 'A'. + Types of property 'a8' are incompatible. + 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'. @@ -57,11 +57,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc interface I2 extends A { ~~ -!!! error TS2429: Interface 'I2' incorrectly extends interface 'A': -!!! error TS2429: Types of property 'a2' are incompatible: -!!! error TS2429: Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]': -!!! error TS2429: Types of parameters 'x' and 'x' are incompatible: -!!! error TS2429: Type 'T' is not assignable to type 'number'. +!!! error TS2430: Interface 'I2' incorrectly extends interface 'A'. +!!! error TS2430: Types of property 'a2' are incompatible. +!!! error TS2430: Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]'. +!!! error TS2430: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2430: Type 'T' is not assignable to type 'number'. a2: new (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic } @@ -72,15 +72,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc interface I4 extends A { ~~ -!!! error TS2429: Interface 'I4' incorrectly extends interface 'A': -!!! error TS2429: Types of property 'a8' are incompatible: -!!! error TS2429: 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 TS2429: Types of parameters 'y' and 'y' are incompatible: -!!! error TS2429: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': -!!! error TS2429: Types of parameters 'arg2' and 'arg2' are incompatible: -!!! error TS2429: Type '{ foo: number; }' is not assignable to type 'Base': -!!! error TS2429: Types of property 'foo' are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'. +!!! error TS2430: Types of property 'a8' are incompatible. +!!! error TS2430: 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 TS2430: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. +!!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible. +!!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'. +!!! error TS2430: Types of property 'foo' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. a8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } diff --git a/tests/baselines/reference/contextualTypeWithTuple.errors.txt b/tests/baselines/reference/contextualTypeWithTuple.errors.txt index bd1aa155661..d093e176455 100644 --- a/tests/baselines/reference/contextualTypeWithTuple.errors.txt +++ b/tests/baselines/reference/contextualTypeWithTuple.errors.txt @@ -1,20 +1,20 @@ -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': +tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(3,5): error TS2323: 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 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; }': +tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(11,1): error TS2323: 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 TS2322: Type '[number, string]' is not assignable to type '[number, string, boolean]': +tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(12,1): error TS2323: 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 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': +tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS2323: 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'. Type 'number' is not assignable to type 'string'. @@ -23,12 +23,12 @@ 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 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'. +!!! 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'. 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 }]]; @@ -40,19 +40,19 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS23 // error objNumTuple = [ {}, 5]; ~~~~~~~~~~~ -!!! 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 '{}'. +!!! 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 '{}'. numStrBoolTuple = numStrTuple; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type '[number, string]' is not assignable to type '[number, string, boolean]': -!!! error TS2322: Property '2' is missing in type '[number, string]'. +!!! error TS2323: Type '[number, string]' is not assignable to type '[number, string, boolean]'. +!!! error TS2323: Property '2' is missing in type '[number, string]'. var strStrTuple: [string, string] = ["foo", "bar", 5]; ~~~~~~~~~~~ -!!! 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping.errors.txt b/tests/baselines/reference/contextualTyping.errors.txt index ed6e50c1dbd..5e415cf13a1 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 TS2322: Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'. +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 (4 errors) ==== @@ -242,5 +242,5 @@ tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not interface B extends A { } var x: B = { }; ~ -!!! error TS2322: Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'. +!!! error TS2323: 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 dca509faa30..c619258a20a 100644 --- a/tests/baselines/reference/contextualTyping11.errors.txt +++ b/tests/baselines/reference/contextualTyping11.errors.txt @@ -1,11 +1,11 @@ -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; }': +tests/cases/compiler/contextualTyping11.ts(1,13): error TS2323: 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'. ==== tests/cases/compiler/contextualTyping11.ts (1 errors) ==== class foo { public bar:{id:number;}[] = [({})]; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/contextualTyping21.errors.txt b/tests/baselines/reference/contextualTyping21.errors.txt index c6ca82d87ac..8b3522066d4 100644 --- a/tests/baselines/reference/contextualTyping21.errors.txt +++ b/tests/baselines/reference/contextualTyping21.errors.txt @@ -1,13 +1,13 @@ -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; }': +tests/cases/compiler/contextualTyping21.ts(1,36): error TS2323: 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'. ==== tests/cases/compiler/contextualTyping21.ts (1 errors) ==== var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, 1]; ~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/contextualTyping24.errors.txt b/tests/baselines/reference/contextualTyping24.errors.txt index 2f7f24f9cac..66161aa329e 100644 --- a/tests/baselines/reference/contextualTyping24.errors.txt +++ b/tests/baselines/reference/contextualTyping24.errors.txt @@ -1,11 +1,11 @@ -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: +tests/cases/compiler/contextualTyping24.ts(1,55): error TS2323: 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; }'. ==== tests/cases/compiler/contextualTyping24.ts (1 errors) ==== var foo:(a:{():number; (i:number):number; })=>number; foo = function(a:string){return 5}; ~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/contextualTyping30.errors.txt b/tests/baselines/reference/contextualTyping30.errors.txt index f7a9eeead35..eda30769ac8 100644 --- a/tests/baselines/reference/contextualTyping30.errors.txt +++ b/tests/baselines/reference/contextualTyping30.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/contextualTyping30.ts(1,37): error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'. - 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'. @@ -7,5 +7,5 @@ tests/cases/compiler/contextualTyping30.ts(1,37): error TS2345: Argument of type function foo(param:number[]){}; foo([1, "a"]); ~~~~~~~~ !!! error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'. -!!! error TS2345: Type 'string | number' is not assignable to type 'number': +!!! error TS2345: Type 'string | number' is not assignable to type 'number'. !!! error TS2345: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping33.errors.txt b/tests/baselines/reference/contextualTyping33.errors.txt index 4aafb6d9645..4ed0787bde3 100644 --- a/tests/baselines/reference/contextualTyping33.errors.txt +++ b/tests/baselines/reference/contextualTyping33.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/contextualTyping33.ts(1,66): error TS2345: Argument of type '((() => number) | (() => string))[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'. - Type '(() => number) | (() => string)' is not assignable to type '{ (): number; (i: number): number; }': + Type '(() => number) | (() => string)' is not assignable to type '{ (): number; (i: number): number; }'. Type '() => string' is not assignable to type '{ (): number; (i: number): number; }'. @@ -7,5 +7,5 @@ tests/cases/compiler/contextualTyping33.ts(1,66): error TS2345: Argument of type function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return "foo"}]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '((() => number) | (() => string))[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'. -!!! error TS2345: Type '(() => number) | (() => string)' is not assignable to type '{ (): number; (i: number): number; }': +!!! error TS2345: Type '(() => number) | (() => string)' is not assignable to type '{ (): number; (i: number): number; }'. !!! error TS2345: Type '() => string' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping39.errors.txt b/tests/baselines/reference/contextualTyping39.errors.txt index bba7954c73a..e43624fbead 100644 --- a/tests/baselines/reference/contextualTyping39.errors.txt +++ b/tests/baselines/reference/contextualTyping39.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/contextualTyping39.ts(1,11): error TS2353: Neither type '() => string' nor type '() => number' is assignable to the other: +tests/cases/compiler/contextualTyping39.ts(1,11): error TS2352: Neither type '() => string' nor type '() => number' is assignable to the other. Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/contextualTyping39.ts (1 errors) ==== var foo = <{ (): number; }> function() { return "err"; }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '() => string' nor type '() => number' is assignable to the other: -!!! error TS2353: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2352: Neither type '() => string' nor type '() => number' is assignable to the other. +!!! error TS2352: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping41.errors.txt b/tests/baselines/reference/contextualTyping41.errors.txt index 03859c4820e..1ed6da1b782 100644 --- a/tests/baselines/reference/contextualTyping41.errors.txt +++ b/tests/baselines/reference/contextualTyping41.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/contextualTyping41.ts(1,11): error TS2353: Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other: +tests/cases/compiler/contextualTyping41.ts(1,11): error TS2352: Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other. Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/contextualTyping41.ts (1 errors) ==== var foo = <{():number; (i:number):number; }> (function(){return "err";}); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other: -!!! error TS2353: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2352: Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other. +!!! error TS2352: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping5.errors.txt b/tests/baselines/reference/contextualTyping5.errors.txt index ad89eb5a71b..f2f6cea14b1 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 TS2322: Type '{}' is not assignable to type '{ id: number; }': +tests/cases/compiler/contextualTyping5.ts(1,13): error TS2323: 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 TS2322: Type '{}' is not assignable to type '{ id: number; }': -!!! error TS2322: Property 'id' is missing in type '{}'. \ No newline at end of file +!!! error TS2323: Type '{}' is not assignable to type '{ id: number; }'. +!!! error TS2323: 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 92b74829e55..8b14d0aa301 100644 --- a/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt +++ b/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt @@ -1,7 +1,7 @@ -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': +tests/cases/compiler/contextualTypingOfArrayLiterals1.ts(5,5): error TS2323: 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'. Property 'toDateString' is missing in type 'Number'. @@ -12,11 +12,11 @@ tests/cases/compiler/contextualTypingOfArrayLiterals1.ts(5,5): error TS2322: Typ var x3: I = [new Date(), 1]; ~~ -!!! 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'. +!!! 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'. 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 3bcfb557048..9cd1475b6e8 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt @@ -1,7 +1,7 @@ -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': +tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS2323: 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'. Property 'foo' is missing in type 'Number'. @@ -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 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt b/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt index e512f2a4b55..7f4d749a3a0 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 TS2322: Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }': +tests/cases/compiler/contextualTypingOfObjectLiterals.ts(4,1): error TS2323: 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 TS2322: Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }': -!!! error TS2322: Index signature is missing in type '{ x: string; }'. +!!! error TS2323: Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }'. +!!! error TS2323: Index signature is missing in type '{ x: string; }'. function f(x: { [s: string]: string }) { } diff --git a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt index bb061b341d0..b668468eac3 100644 --- a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt +++ b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(2,22): error TS2339: Property 'foo' does not exist on type 'string'. -tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. @@ -10,5 +10,5 @@ tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,10): error TS !!! error TS2339: Property 'foo' does not exist on type 'string'. var r9 = f10('', () => (a => a.foo), 1); // error ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt index 15a1c7913bb..a1ed83ada1b 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 TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D': +tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): error TS2323: 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 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt b/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt index 10b2d8ec118..d6944e0e033 100644 --- a/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt +++ b/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/declareClassInterfaceImplementation.ts(5,15): error TS2421: Class 'Buffer' incorrectly implements interface 'IBuffer': +tests/cases/compiler/declareClassInterfaceImplementation.ts(5,15): error TS2420: Class 'Buffer' incorrectly implements interface 'IBuffer'. Index signature is missing in type 'Buffer'. @@ -9,8 +9,8 @@ tests/cases/compiler/declareClassInterfaceImplementation.ts(5,15): error TS2421: declare class Buffer implements IBuffer { ~~~~~~ -!!! error TS2421: Class 'Buffer' incorrectly implements interface 'IBuffer': -!!! error TS2421: Index signature is missing in type 'Buffer'. +!!! error TS2420: Class 'Buffer' incorrectly implements interface 'IBuffer'. +!!! error TS2420: Index signature is missing in type 'Buffer'. } \ No newline at end of file diff --git a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt index 12100f8442b..5000ae05cc3 100644 --- a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt +++ b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(2,6): error TS2339: Property 'length' does not exist on type '{}'. tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(5,6): error TS2339: Property 'length' does not exist on type 'Object'. -tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(8,14): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(8,14): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -18,7 +18,7 @@ tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(8,14): error TS2453: The function concat(x: T, y: T): T { return null; } var result = concat(1, ""); // error ~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var elementCount = result.length; diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt index 994dead5904..f8e237a83ce 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(10,7): error TS2416: Class 'Derived' incorrectly extends base class 'Base': - Types of property 'x' are incompatible: +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(10,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. + Types of property 'x' are incompatible. Type '() => number' is not assignable to type 'number'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(11,5): error TS2426: Class 'Base' defines instance member accessor 'x', but extended class 'Derived' defines it as instance member function. @@ -22,9 +22,9 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFun // error class Derived extends Base { ~~~~~~~ -!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': -!!! error TS2416: Types of property 'x' are incompatible: -!!! error TS2416: Type '() => number' is not assignable to type 'number'. +!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. +!!! error TS2415: Types of property 'x' are incompatible. +!!! error TS2415: Type '() => number' is not assignable to type 'number'. x() { ~ !!! error TS2426: Class 'Base' defines instance member accessor 'x', but extended class 'Derived' defines it as instance member function. diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt index ce9ec20406c..dd5a75362d1 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts(8,7): error TS2416: Class 'DerivedClass' incorrectly extends base class 'BaseClass': +tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts(8,7): error TS2415: Class 'DerivedClass' incorrectly extends base class 'BaseClass'. Types have separate declarations of a private property '_init'. @@ -12,8 +12,8 @@ tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts(8,7): error TS2416 } class DerivedClass extends BaseClass { ~~~~~~~~~~~~ -!!! error TS2416: Class 'DerivedClass' incorrectly extends base class 'BaseClass': -!!! error TS2416: Types have separate declarations of a private property '_init'. +!!! error TS2415: Class 'DerivedClass' incorrectly extends base class 'BaseClass'. +!!! error TS2415: Types have separate declarations of a private property '_init'. constructor() { super(); } diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt b/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt index 9e83faa9b4a..400d7d0d346 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts(5,7): error TS2416: Class 'Derived' incorrectly extends base class 'Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts(5,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. Types have separate declarations of a private property 'x'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts(13,7): error TS2418: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts(13,7): error TS2417: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2'. Types have separate declarations of a private property 'y'. @@ -11,8 +11,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve class Derived extends Base { ~~~~~~~ -!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': -!!! error TS2416: Types have separate declarations of a private property 'x'. +!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. +!!! error TS2415: Types have separate declarations of a private property 'x'. private x: { foo: string; bar: string; }; // error } @@ -22,7 +22,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve class Derived2 extends Base2 { ~~~~~~~~ -!!! error TS2418: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': -!!! error TS2418: Types have separate declarations of a private property 'y'. +!!! error TS2417: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2'. +!!! error TS2417: Types have separate declarations of a private property 'y'. private static y: { foo: string; bar: string; }; // error } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt index 7dddd4d76f8..a9762ce03ec 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(23,7): error TS2416: Class 'Derived1' incorrectly extends base class 'Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(23,7): error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. Property 'a' is protected in type 'Derived1' but public in type 'Base'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(28,7): error TS2416: Class 'Derived2' incorrectly extends base class 'Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(28,7): error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. Property 'b' is protected in type 'Derived2' but public in type 'Base'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(33,7): error TS2416: Class 'Derived3' incorrectly extends base class 'Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(33,7): error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. Property 'c' is protected in type 'Derived3' but public in type 'Base'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(38,7): error TS2416: Class 'Derived4' incorrectly extends base class 'Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(38,7): error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. Property 'c' is protected in type 'Derived4' but public in type 'Base'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(43,7): error TS2416: Class 'Derived5' incorrectly extends base class 'Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(43,7): error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. Property 'd' is protected in type 'Derived5' but public in type 'Base'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(48,7): error TS2418: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(48,7): error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'. Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(53,7): error TS2418: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(53,7): error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(58,7): error TS2418: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(58,7): error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(63,7): error TS2418: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(63,7): error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(68,7): error TS2418: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(68,7): error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. @@ -45,80 +45,80 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve // decrease visibility of all public members to protected class Derived1 extends Base { ~~~~~~~~ -!!! error TS2416: Class 'Derived1' incorrectly extends base class 'Base': -!!! error TS2416: Property 'a' is protected in type 'Derived1' but public in type 'Base'. +!!! error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'a' is protected in type 'Derived1' but public in type 'Base'. protected a: typeof x; constructor(a: typeof x) { super(a); } } class Derived2 extends Base { ~~~~~~~~ -!!! error TS2416: Class 'Derived2' incorrectly extends base class 'Base': -!!! error TS2416: Property 'b' is protected in type 'Derived2' but public in type 'Base'. +!!! error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'b' is protected in type 'Derived2' but public in type 'Base'. protected b(a: typeof x) { } constructor(a: typeof x) { super(a); } } class Derived3 extends Base { ~~~~~~~~ -!!! error TS2416: Class 'Derived3' incorrectly extends base class 'Base': -!!! error TS2416: Property 'c' is protected in type 'Derived3' but public in type 'Base'. +!!! error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'c' is protected in type 'Derived3' but public in type 'Base'. protected get c() { return x; } constructor(a: typeof x) { super(a); } } class Derived4 extends Base { ~~~~~~~~ -!!! error TS2416: Class 'Derived4' incorrectly extends base class 'Base': -!!! error TS2416: Property 'c' is protected in type 'Derived4' but public in type 'Base'. +!!! error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'c' is protected in type 'Derived4' but public in type 'Base'. protected set c(v: typeof x) { } constructor(a: typeof x) { super(a); } } class Derived5 extends Base { ~~~~~~~~ -!!! error TS2416: Class 'Derived5' incorrectly extends base class 'Base': -!!! error TS2416: Property 'd' is protected in type 'Derived5' but public in type 'Base'. +!!! error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'd' is protected in type 'Derived5' but public in type 'Base'. protected d: (a: typeof x) => void ; constructor(a: typeof x) { super(a); } } class Derived6 extends Base { ~~~~~~~~ -!!! error TS2418: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base': -!!! error TS2418: Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. +!!! error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. protected static r: typeof x; constructor(a: typeof x) { super(a); } } class Derived7 extends Base { ~~~~~~~~ -!!! error TS2418: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base': -!!! error TS2418: Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. +!!! error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. protected static s(a: typeof x) { } constructor(a: typeof x) { super(a); } } class Derived8 extends Base { ~~~~~~~~ -!!! error TS2418: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base': -!!! error TS2418: Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. +!!! error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. protected static get t() { return x; } constructor(a: typeof x) { super(a); } } class Derived9 extends Base { ~~~~~~~~ -!!! error TS2418: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base': -!!! error TS2418: Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. +!!! error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. protected static set t(v: typeof x) { } constructor(a: typeof x) { super(a); } } class Derived10 extends Base { ~~~~~~~~~ -!!! error TS2418: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base': -!!! error TS2418: Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. +!!! error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. protected static u: (a: typeof x) => void ; constructor(a: typeof x) { super(a); } } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.errors.txt b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.errors.txt index f22c656f3c7..064e2e8d43c 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers4.ts(12,7): error TS2416: Class 'Derived2' incorrectly extends base class 'Derived1': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers4.ts(12,7): error TS2415: Class 'Derived2' incorrectly extends base class 'Derived1'. Property 'a' is protected in type 'Derived2' but public in type 'Derived1'. @@ -16,7 +16,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve class Derived2 extends Derived1 { ~~~~~~~~ -!!! error TS2416: Class 'Derived2' incorrectly extends base class 'Derived1': -!!! error TS2416: Property 'a' is protected in type 'Derived2' but public in type 'Derived1'. +!!! error TS2415: Class 'Derived2' incorrectly extends base class 'Derived1'. +!!! error TS2415: Property 'a' is protected in type 'Derived2' but public in type 'Derived1'. protected a: typeof x; // Error, parent was public } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity.errors.txt b/tests/baselines/reference/derivedClassTransitivity.errors.txt index 0915f921fe1..cd10113717d 100644 --- a/tests/baselines/reference/derivedClassTransitivity.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity.errors.txt @@ -1,7 +1,7 @@ -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: +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity.ts(18,1): error TS2323: 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. Type 'string' is not assignable to type 'number'. @@ -25,10 +25,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! 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'. +!!! 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'. 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 db89f608d16..7141b2fdc52 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity2.errors.txt @@ -1,7 +1,7 @@ -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: +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity2.ts(18,1): error TS2323: 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. Type 'string' is not assignable to type 'number'. @@ -25,10 +25,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! 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'. +!!! 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'. 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 09b5cbe0dfd..eb3cea00e71 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity3.errors.txt @@ -1,7 +1,7 @@ -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: +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts(18,1): error TS2323: 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. Type 'number' is not assignable to type 'string'. @@ -25,10 +25,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! 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'. +!!! 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'. 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 5950eddf6be..b6f9f9c8028 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity4.errors.txt @@ -1,7 +1,7 @@ -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: +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity4.ts(18,1): error TS2323: 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. Type 'string' is not assignable to type 'number'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity4.ts(19,9): error TS2445: Property 'foo' is protected and only accessible within class 'C' and its subclasses. @@ -26,11 +26,11 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! 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'. +!!! 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'. 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 d7f0665a9e5..42e7f1b38a1 100644 --- a/tests/baselines/reference/derivedClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedClassWithAny.errors.txt @@ -4,8 +4,8 @@ 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 TS2322: Type 'E' is not assignable to type 'C': - Types of property 'x' are incompatible: +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(57,1): error TS2323: 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 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'. +!!! 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'. var r = c.foo(); // e.foo would return string \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt index aebe32f7fbf..60054fa47dc 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingProtectedInstance.ts(13,7): error TS2416: Class 'Derived' incorrectly extends base class 'Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingProtectedInstance.ts(13,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. Property 'x' is private in type 'Derived' but not in type 'Base'. @@ -17,8 +17,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit // error, not a subtype class Derived extends Base { ~~~~~~~ -!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': -!!! error TS2416: Property 'x' is private in type 'Derived' but not in type 'Base'. +!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'x' is private in type 'Derived' but not in type 'Base'. private x: string; private fn(): string { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt index f85e3be4b5a..bbe47bb9544 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(18,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(19,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(12,7): error TS2416: Class 'Derived' incorrectly extends base class 'Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(12,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. Property 'x' is private in type 'Derived' but not in type 'Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(22,14): error TS2339: Property 'x' does not exist on type 'typeof Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(23,18): error TS2339: Property 'x' does not exist on type 'typeof Derived'. @@ -32,8 +32,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit // error, not a subtype class Derived extends Base { ~~~~~~~ -!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': -!!! error TS2416: Property 'x' is private in type 'Derived' but not in type 'Base'. +!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'x' is private in type 'Derived' but not in type 'Base'. private x: string; private fn(): string { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.errors.txt b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.errors.txt index a6aa878e54c..2697585cb20 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingProtectedStatic.ts(13,7): error TS2418: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingProtectedStatic.ts(13,7): error TS2417: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base'. Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'. @@ -17,8 +17,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit // should be error class Derived extends Base { ~~~~~~~ -!!! error TS2418: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base': -!!! error TS2418: Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'. +!!! error TS2417: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'. private static x: string; private static fn(): string { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt index a792c8ebff0..cfdf1381282 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(8,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(19,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(20,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(13,7): error TS2418: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base': +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(13,7): error TS2417: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base'. Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(24,10): error TS2341: Property 'x' is private and only accessible within class 'Derived'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(27,10): error TS2341: Property 'fn' is private and only accessible within class 'Derived'. @@ -29,8 +29,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit // should be error class Derived extends Base { ~~~~~~~ -!!! error TS2418: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base': -!!! error TS2418: Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'. +!!! error TS2417: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'. private static x: string; private static fn(): string { return ''; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt index ef0c9851ad7..91111563a71 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt @@ -4,8 +4,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC 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 TS2322: Type 'E' is not assignable to type 'C': - Types of property 'x' are incompatible: +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(41,1): error TS2323: Type 'E' is not assignable to type 'C'. + Types of property 'x' are incompatible. Type 'string' is not assignable to type 'number'. @@ -64,7 +64,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC c = d; c = e; ~ -!!! 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'. +!!! 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'. var r = c.foo(); // e.foo would return string \ No newline at end of file diff --git a/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt b/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt index e1c43f1bb36..ae8fbe2ff5d 100644 --- a/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt +++ b/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/derivedInterfaceCallSignature.ts(11,11): error TS2429: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath': - Types of property 'x' are incompatible: +tests/cases/compiler/derivedInterfaceCallSignature.ts(11,11): error TS2430: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath'. + Types of property 'x' are incompatible. Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'. @@ -16,9 +16,9 @@ tests/cases/compiler/derivedInterfaceCallSignature.ts(11,11): error TS2429: Inte interface D3SvgArea extends D3SvgPath { ~~~~~~~~~ -!!! error TS2429: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath': -!!! error TS2429: Types of property 'x' are incompatible: -!!! error TS2429: Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'. +!!! error TS2430: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath'. +!!! error TS2430: Types of property 'x' are incompatible. +!!! error TS2430: Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'. x(x: (data: any, index?: number) => number): D3SvgArea; y(y: (data: any, index?: number) => number): D3SvgArea; y0(): (data: any, index?: number) => number; diff --git a/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt b/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt index 643979a8ef8..71fe36660c4 100644 --- a/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt +++ b/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/derivedTypeIncompatibleSignatures.ts(21,11): error TS2429: Interface 'F' incorrectly extends interface 'E': - Index signatures are incompatible: +tests/cases/compiler/derivedTypeIncompatibleSignatures.ts(21,11): error TS2430: Interface 'F' incorrectly extends interface 'E'. + Index signatures are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/derivedTypeIncompatibleSignatures.ts(29,11): error TS2429: Interface 'H' incorrectly extends interface 'G': - Index signatures are incompatible: +tests/cases/compiler/derivedTypeIncompatibleSignatures.ts(29,11): error TS2430: Interface 'H' incorrectly extends interface 'G'. + Index signatures are incompatible. Type 'number' is not assignable to type 'string'. @@ -29,9 +29,9 @@ tests/cases/compiler/derivedTypeIncompatibleSignatures.ts(29,11): error TS2429: interface F extends E { ~ -!!! error TS2429: Interface 'F' incorrectly extends interface 'E': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'F' incorrectly extends interface 'E'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. [a: string]: number; // Number is not a subtype of string. Should error. } @@ -41,8 +41,8 @@ tests/cases/compiler/derivedTypeIncompatibleSignatures.ts(29,11): error TS2429: interface H extends G { ~ -!!! error TS2429: Interface 'H' incorrectly extends interface 'G': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'H' incorrectly extends interface 'G'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. [a: number]: number; // Should error for the same reason } \ No newline at end of file diff --git a/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt b/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt index be90535f14c..241a90f0419 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 TS2322: Type 'number' is not assignable to type '{ (): any; x: number; }': +tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(1,5): error TS2323: 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 TS2322: Type 'number' is not assignable to type '{ (): any; x: number; }': -!!! error TS2322: Property 'x' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type '{ (): any; x: number; }'. +!!! error TS2323: 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 018cd119b05..8ea3b5a368c 100644 --- a/tests/baselines/reference/enumAssignability.errors.txt +++ b/tests/baselines/reference/enumAssignability.errors.txt @@ -2,23 +2,23 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi 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 TS2322: Type 'E' is not assignable to type 'Date': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(31,9): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'Function': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(37,9): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'C': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(39,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'I': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(40,5): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'number[]': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(41,9): error TS2323: 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 TS2322: Type 'E' is not assignable to type '{ foo: string; }': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(42,9): error TS2323: 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 TS2322: Type 'E' is not assignable to type 'String': +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(45,9): error TS2323: 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'. @@ -69,8 +69,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi !!! error TS2323: Type 'E' is not assignable to type 'boolean'. var ee: Date = e; ~~ -!!! error TS2322: Type 'E' is not assignable to type 'Date': -!!! error TS2322: Property 'toDateString' is missing in type 'Number'. +!!! error TS2323: Type 'E' is not assignable to type 'Date'. +!!! error TS2323: Property 'toDateString' is missing in type 'Number'. var f: any = e; // ok var g: void = e; ~ @@ -82,35 +82,35 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi !!! error TS2323: Type 'E' is not assignable to type '() => {}'. var k: Function = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'Function': -!!! error TS2322: Property 'apply' is missing in type 'Number'. +!!! error TS2323: Type 'E' is not assignable to type 'Function'. +!!! error TS2323: 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'. ac = e; ~~ -!!! error TS2322: Type 'E' is not assignable to type 'C': -!!! error TS2322: Property 'foo' is missing in type 'Number'. +!!! error TS2323: Type 'E' is not assignable to type 'C'. +!!! error TS2323: Property 'foo' is missing in type 'Number'. ai = e; ~~ -!!! error TS2322: Type 'E' is not assignable to type 'I': -!!! error TS2322: Property 'foo' is missing in type 'Number'. +!!! error TS2323: Type 'E' is not assignable to type 'I'. +!!! error TS2323: Property 'foo' is missing in type 'Number'. var m: number[] = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'number[]': -!!! error TS2322: Property 'length' is missing in type 'Number'. +!!! error TS2323: Type 'E' is not assignable to type 'number[]'. +!!! error TS2323: Property 'length' is missing in type 'Number'. var n: { foo: string } = e; ~ -!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }': -!!! error TS2322: Property 'foo' is missing in type 'Number'. +!!! error TS2323: Type 'E' is not assignable to type '{ foo: string; }'. +!!! error TS2323: 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'. var p: Number = e; var q: String = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'String': -!!! error TS2322: Property 'charAt' is missing in type 'Number'. +!!! error TS2323: Type 'E' is not assignable to type 'String'. +!!! error TS2323: Property 'charAt' is missing in type 'Number'. function foo(x: T, y: U, z: V) { ~~~~~~~~~~~ diff --git a/tests/baselines/reference/enumAssignmentCompat.errors.txt b/tests/baselines/reference/enumAssignmentCompat.errors.txt index 4048ac104c6..f2a093f2046 100644 --- a/tests/baselines/reference/enumAssignmentCompat.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat.errors.txt @@ -1,8 +1,8 @@ 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 TS2322: Type 'W' is not assignable to type 'typeof W': +tests/cases/compiler/enumAssignmentCompat.ts(28,5): error TS2323: 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 TS2322: Type 'W' is not assignable to type 'WStatic': +tests/cases/compiler/enumAssignmentCompat.ts(32,5): error TS2323: 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'. @@ -39,8 +39,8 @@ tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2323: Type 'number' var a: number = W.a; var b: typeof W = W.a; // error ~ -!!! error TS2322: Type 'W' is not assignable to type 'typeof W': -!!! error TS2322: Property 'D' is missing in type 'Number'. +!!! error TS2323: Type 'W' is not assignable to type 'typeof W'. +!!! error TS2323: Property 'D' is missing in type 'Number'. var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ @@ -48,8 +48,8 @@ tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2323: Type 'number' var e: typeof W.a = 4; var f: WStatic = W.a; // error ~ -!!! error TS2322: Type 'W' is not assignable to type 'WStatic': -!!! error TS2322: Property 'a' is missing in type 'Number'. +!!! error TS2323: Type 'W' is not assignable to type 'WStatic'. +!!! error TS2323: Property 'a' is missing in type 'Number'. var g: WStatic = 5; // error ~ !!! error TS2323: Type 'number' is not assignable to type 'WStatic'. diff --git a/tests/baselines/reference/enumAssignmentCompat2.errors.txt b/tests/baselines/reference/enumAssignmentCompat2.errors.txt index 52890bcecc7..9b2263455ec 100644 --- a/tests/baselines/reference/enumAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat2.errors.txt @@ -1,8 +1,8 @@ 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 TS2322: Type 'W' is not assignable to type 'typeof W': +tests/cases/compiler/enumAssignmentCompat2.ts(27,5): error TS2323: 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 TS2322: Type 'W' is not assignable to type 'WStatic': +tests/cases/compiler/enumAssignmentCompat2.ts(31,5): error TS2323: 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'. @@ -38,8 +38,8 @@ tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2323: Type 'number' var a: number = W.a; var b: typeof W = W.a; // error ~ -!!! error TS2322: Type 'W' is not assignable to type 'typeof W': -!!! error TS2322: Property 'a' is missing in type 'Number'. +!!! error TS2323: Type 'W' is not assignable to type 'typeof W'. +!!! error TS2323: Property 'a' is missing in type 'Number'. var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ @@ -47,8 +47,8 @@ tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2323: Type 'number' var e: typeof W.a = 4; var f: WStatic = W.a; // error ~ -!!! error TS2322: Type 'W' is not assignable to type 'WStatic': -!!! error TS2322: Property 'a' is missing in type 'Number'. +!!! error TS2323: Type 'W' is not assignable to type 'WStatic'. +!!! error TS2323: Property 'a' is missing in type 'Number'. var g: WStatic = 5; // error ~ !!! error TS2323: Type 'number' is not assignable to type 'WStatic'. diff --git a/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt b/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt index c832230f343..757b311f3cd 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 TS2322: Type '() => void' is not assignable to type '() => boolean': +tests/cases/compiler/errorOnContextuallyTypedReturnType.ts(1,5): error TS2323: 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 TS2322: Type '() => void' is not assignable to type '() => boolean': -!!! error TS2322: Type 'void' is not assignable to type 'boolean'. +!!! error TS2323: Type '() => void' is not assignable to type '() => boolean'. +!!! error TS2323: 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/everyTypeWithAnnotationAndInvalidInitializer.errors.txt b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt index 5dbce43970f..4222edc2dbd 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt @@ -1,36 +1,36 @@ 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 TS2322: Type 'number' is not assignable to type 'Date': +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(36,5): error TS2323: 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 TS2322: Type 'D<{}>' is not assignable to type 'I': +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(40,5): error TS2323: 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 TS2322: Type 'D<{}>' is not assignable to type 'C': +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(41,5): error TS2323: 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 TS2322: Type 'C' is not assignable to type 'D': +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(42,5): error TS2323: 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 TS2322: Type '{ id: string; }' is not assignable to type 'I': - Types of property 'id' are incompatible: +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(43,5): error TS2323: 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 TS2322: Type 'C' is not assignable to type '{ id: string; }': - Types of property 'id' are incompatible: +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(44,5): error TS2323: 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 TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(46,5): error TS2323: 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 TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(47,5): error TS2323: 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 TS2322: Type '(x: string) => string' is not assignable to type '(x: string) => number': +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(48,5): error TS2323: 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 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': +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(50,5): error TS2323: 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 TS2322: Type 'A' is not assignable to type 'A': +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(51,5): error TS2323: Type 'A' is not assignable to type 'A'. Property 'name' is missing in 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': +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(52,5): error TS2323: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'. Type 'boolean' is not assignable to type 'string'. @@ -76,8 +76,8 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd !!! error TS2323: Type 'number' is not assignable to type 'string'. var aDate: Date = 9.9; ~~~~~ -!!! error TS2322: Type 'number' is not assignable to type 'Date': -!!! error TS2322: Property 'toDateString' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'Date'. +!!! error TS2323: Property 'toDateString' is missing in type 'Number'. var aVoid: void = 9.9; ~~~~~ @@ -85,56 +85,56 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd var anInterface: I = new D(); ~~~~~~~~~~~ -!!! error TS2322: Type 'D<{}>' is not assignable to type 'I': -!!! error TS2322: Property 'id' is missing in type 'D<{}>'. +!!! error TS2323: Type 'D<{}>' is not assignable to type 'I'. +!!! error TS2323: Property 'id' is missing in type 'D<{}>'. var aClass: C = new D(); ~~~~~~ -!!! error TS2322: Type 'D<{}>' is not assignable to type 'C': -!!! error TS2322: Property 'id' is missing in type 'D<{}>'. +!!! error TS2323: Type 'D<{}>' is not assignable to type 'C'. +!!! error TS2323: Property 'id' is missing in type 'D<{}>'. var aGenericClass: D = new C(); ~~~~~~~~~~~~~ -!!! error TS2322: Type 'C' is not assignable to type 'D': -!!! error TS2322: Property 'source' is missing in type 'C'. +!!! error TS2323: Type 'C' is not assignable to type 'D'. +!!! error TS2323: Property 'source' is missing in type 'C'. var anObjectLiteral: I = { id: 'a string' }; ~~~~~~~~~~~~~~~ -!!! 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'. +!!! 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'. var anOtherObjectLiteral: { id: string } = new C(); ~~~~~~~~~~~~~~~~~~~~ -!!! 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'. +!!! 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'. var aFunction: typeof F = F2; ~~~~~~~~~ -!!! 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'. +!!! 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'. var anOtherFunction: (x: string) => number = F2; ~~~~~~~~~~~~~~~ -!!! 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'. +!!! 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'. var aLambda: typeof F = (x) => 'a string'; ~~~~~~~ -!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: string) => number': -!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type '(x: string) => string' is not assignable to type '(x: string) => number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. var aModule: typeof M = N; ~~~~~~~ -!!! 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'. +!!! 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'. var aClassInModule: M.A = new N.A(); ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'A' is not assignable to type 'A': -!!! error TS2322: Property 'name' is missing in type 'A'. +!!! error TS2323: Type 'A' is not assignable to type 'A'. +!!! error TS2323: Property 'name' is missing in type 'A'. var aFunctionInModule: typeof M.F2 = F2; ~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string': -!!! error TS2322: Type 'boolean' is not assignable to type 'string'. +!!! error TS2323: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'. +!!! error TS2323: 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 83fededbcbc..049e91b9b3d 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(7,7): error TS2421: Class 'D' incorrectly implements interface 'C': - Types of property 'bar' are incompatible: - Type '() => string' is not assignable to type '() => number': +tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(7,7): error TS2420: Class 'D' incorrectly implements interface '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'. @@ -15,10 +15,10 @@ tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(16,5): error TS2323: } class D extends C implements C { ~ -!!! error TS2421: Class 'D' incorrectly implements interface 'C': -!!! error TS2421: Types of property 'bar' are incompatible: -!!! error TS2421: Type '() => string' is not assignable to type '() => number': -!!! error TS2421: Type 'string' is not assignable to type 'number'. +!!! error TS2420: Class 'D' incorrectly implements interface 'C'. +!!! error TS2420: Types of property 'bar' are incompatible. +!!! error TS2420: Type '() => string' is not assignable to type '() => number'. +!!! error TS2420: Type 'string' is not assignable to type 'number'. baz() { } } diff --git a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.errors.txt b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.errors.txt index 70fcb979228..3666c89a0ed 100644 --- a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.errors.txt +++ b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/fixTypeParameterInSignatureWithRestParameters.ts(2,1): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/fixTypeParameterInSignatureWithRestParameters.ts(2,1): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -6,5 +6,5 @@ tests/cases/compiler/fixTypeParameterInSignatureWithRestParameters.ts(2,1): erro function bar(item1: T, item2: T) { } bar(1, ""); // Should be ok ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads40.errors.txt b/tests/baselines/reference/functionOverloads40.errors.txt index cf23d39c108..f965a4eb9e1 100644 --- a/tests/baselines/reference/functionOverloads40.errors.txt +++ b/tests/baselines/reference/functionOverloads40.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/functionOverloads40.ts(4,13): error TS2345: Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. - Type '{ a: string; }' is not assignable to type '{ a: boolean; }': - Types of property 'a' are incompatible: + Type '{ a: string; }' is not assignable to type '{ a: boolean; }'. + Types of property 'a' are incompatible. Type 'string' is not assignable to type 'boolean'. @@ -11,7 +11,7 @@ tests/cases/compiler/functionOverloads40.ts(4,13): error TS2345: Argument of typ var x = foo([{a:'bar'}]); ~~~~~~~~~~~ !!! error TS2345: Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. -!!! error TS2345: Type '{ a: string; }' is not assignable to type '{ a: boolean; }': -!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type '{ a: string; }' is not assignable to type '{ a: boolean; }'. +!!! error TS2345: Types of property 'a' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads41.errors.txt b/tests/baselines/reference/functionOverloads41.errors.txt index 47b1e031133..77f8149c822 100644 --- a/tests/baselines/reference/functionOverloads41.errors.txt +++ b/tests/baselines/reference/functionOverloads41.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/functionOverloads41.ts(4,13): error TS2345: Argument of type '{}[]' is not assignable to parameter of type '{ a: boolean; }[]'. - Type '{}' is not assignable to type '{ a: boolean; }': + Type '{}' is not assignable to type '{ a: boolean; }'. Property 'a' is missing in type '{}'. @@ -10,6 +10,6 @@ tests/cases/compiler/functionOverloads41.ts(4,13): error TS2345: Argument of typ var x = foo([{}]); ~~~~ !!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type '{ a: boolean; }[]'. -!!! error TS2345: Type '{}' is not assignable to type '{ a: boolean; }': +!!! error TS2345: Type '{}' is not assignable to type '{ a: boolean; }'. !!! error TS2345: Property 'a' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt b/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt index f731a2e7bba..dc46ff3ff1f 100644 --- a/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt +++ b/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt @@ -1,5 +1,5 @@ -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: +tests/cases/compiler/functionSignatureAssignmentCompat1.ts(10,5): error TS2323: 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 TS2322: var c: ParserFunc = parsers.raw; // ok! var d: ParserFunc = parsers.readline; // not ok ~ -!!! 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'. +!!! 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'. 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 321a03f5470..22e1f48ae0f 100644 --- a/tests/baselines/reference/fuzzy.errors.txt +++ b/tests/baselines/reference/fuzzy.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/fuzzy.ts(13,18): error TS2421: Class 'C' incorrectly implements interface 'I': +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 TS2322: Type '{ anything: number; oneI: C; }' is not assignable to type 'R': - Types of property 'oneI' are incompatible: +tests/cases/compiler/fuzzy.ts(21,20): error TS2323: 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 TS2353: Neither type '{ oneI: C; }' nor type 'R' is assignable to the other: +tests/cases/compiler/fuzzy.ts(25,20): error TS2352: Neither type '{ oneI: C; }' nor type 'R' is assignable to the other. Property 'anything' is missing in type '{ oneI: C; }'. @@ -22,8 +22,8 @@ tests/cases/compiler/fuzzy.ts(25,20): error TS2353: Neither type '{ oneI: C; }' export class C implements I { ~ -!!! error TS2421: Class 'C' incorrectly implements interface 'I': -!!! error TS2421: Property 'alsoWorks' is missing in type 'C'. +!!! error TS2420: Class 'C' incorrectly implements interface 'I'. +!!! error TS2420: Property 'alsoWorks' is missing in type 'C'. constructor(public x:number) { } works():R { @@ -33,16 +33,16 @@ tests/cases/compiler/fuzzy.ts(25,20): error TS2353: Neither type '{ oneI: C; }' doesntWork():R { return { anything:1, oneI:this }; ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 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'. +!!! 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'. } worksToo():R { return ({ oneI: this }); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '{ oneI: C; }' nor type 'R' is assignable to the other: -!!! error TS2353: Property 'anything' is missing in type '{ oneI: C; }'. +!!! error TS2352: Neither type '{ oneI: C; }' nor type 'R' is assignable to the other. +!!! error TS2352: Property 'anything' is missing in type '{ oneI: C; }'. } } } diff --git a/tests/baselines/reference/genericArrayAssignment1.errors.txt b/tests/baselines/reference/genericArrayAssignment1.errors.txt index c0ffc6e1901..e555bbcf3f7 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 TS2322: Type 'number[]' is not assignable to type 'string[]': +tests/cases/compiler/genericArrayAssignment1.ts(4,1): error TS2323: 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 TS2322: Type 'number s = n; ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/genericArrayExtenstions.errors.txt b/tests/baselines/reference/genericArrayExtenstions.errors.txt index d5ba57ddb55..e3004eb2838 100644 --- a/tests/baselines/reference/genericArrayExtenstions.errors.txt +++ b/tests/baselines/reference/genericArrayExtenstions.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2421: Class 'ObservableArray' incorrectly implements interface 'T[]': +tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2420: Class 'ObservableArray' incorrectly implements interface 'T[]'. Property 'length' is missing in type 'ObservableArray'. @@ -8,8 +8,8 @@ tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2421: Class 'Obse ~~~~~~~~~~~~~~~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~~~~~ -!!! error TS2421: Class 'ObservableArray' incorrectly implements interface 'T[]': -!!! error TS2421: Property 'length' is missing in type 'ObservableArray'. +!!! error TS2420: Class 'ObservableArray' incorrectly implements interface 'T[]'. +!!! error TS2420: Property 'length' is missing in type 'ObservableArray'. concat(...items: U[]): T[]; concat(...items: T[]): T[]; } diff --git a/tests/baselines/reference/genericArrayMethods1.errors.txt b/tests/baselines/reference/genericArrayMethods1.errors.txt index 9b037155e33..7341cde82d3 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 TS2322: Type 'number[]' is not assignable to type 'string[]': +tests/cases/compiler/genericArrayMethods1.ts(1,5): error TS2323: 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 TS2322: Type 'number[]' is not assignable to type 'string[]': -!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! 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 diff --git a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt index 8fea5ddfa72..0ca20061fef 100644 --- a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt +++ b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt @@ -1,30 +1,30 @@ -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: +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(12,5): error TS2323: 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 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: +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(13,5): error TS2323: 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(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': - 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: +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(16,5): error TS2323: 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(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': - 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: +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(17,5): error TS2323: Type 'K' 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'. @@ -42,41 +42,41 @@ tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(17,5): error TS23 var z = { x: new A() }; var a1: I = { x: new A() }; ~~ -!!! 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'. +!!! 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'. var a2: I = function (): { x: A } { ~~ -!!! 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'. +!!! 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'. var z = { x: new A() }; return z; } (); var a3: I = z; ~~ -!!! 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'. +!!! 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'. var a4: I = >z; ~~ -!!! 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': -!!! 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'. +!!! 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 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'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt index cdd15b7fb21..093c4bed545 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(26,10): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(26,10): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(30,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(30,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(33,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(33,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(34,16): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(34,16): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(35,15): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(35,15): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -38,27 +38,27 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun var r8 = foo3(1, function (a) { return '' }, 1); // error ~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var r9 = foo3(1, (a) => '', ''); // string function other(t: T, u: U) { var r10 = foo2(1, (x: T) => ''); // error ~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r10 = foo2(1, (x) => ''); // string var r11 = foo3(1, (x: T) => '', ''); // error ~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r11b = foo3(1, (x: T) => '', 1); // error ~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r12 = foo3(1, function (a) { return '' }, 1); // error ~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt index 7ce5683f335..3a397a66eba 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments2.ts(29,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments2.ts(29,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments2.ts(40,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments2.ts(40,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -35,7 +35,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun var r4 = foo2(1, i2); // error ~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var r4b = foo2(1, a); // any var r5 = foo2(1, i); // any @@ -49,6 +49,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun var r7b = foo3(null, a, ''); // any var r8 = foo3(1, i2, 1); // error ~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var r9 = foo3('', i2, ''); // string \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt index d5084fbee40..75ae76b1dbc 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt @@ -1,8 +1,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts(10,14): error TS2345: Argument of type '{ cb: (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: {}) => string; }'. - Types of property 'cb' are incompatible: + Types of property 'cb' are incompatible. Type '(x: T, y: T) => string' is not assignable to type '(t: {}) => string'. tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts(11,14): error TS2345: Argument of type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: (t: string) => string; }'. - Types of property 'cb' are incompatible: + Types of property 'cb' are incompatible. Type '(x: string, y: number) => string' is not assignable to type '(t: string) => string'. @@ -19,12 +19,12 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun var r2 = foo({ cb: (x: T, y: T) => '' }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ cb: (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: {}) => string; }'. -!!! error TS2345: Types of property 'cb' are incompatible: +!!! error TS2345: Types of property 'cb' are incompatible. !!! error TS2345: Type '(x: T, y: T) => string' is not assignable to type '(t: {}) => string'. var r3 = foo({ cb: (x: string, y: number) => '' }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: (t: string) => string; }'. -!!! error TS2345: Types of property 'cb' are incompatible: +!!! error TS2345: Types of property 'cb' are incompatible. !!! error TS2345: Type '(x: string, y: number) => string' is not assignable to type '(t: string) => string'. function foo2(arg: { cb: (t: T, t2: T) => U }) { diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments.errors.txt b/tests/baselines/reference/genericCallWithGenericSignatureArguments.errors.txt index 12d605166c1..2d5ad21959e 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments.errors.txt +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments.ts(18,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments.ts(18,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; y?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; z?: number; }'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments.ts(19,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments.ts(19,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y?: number; }'. @@ -24,11 +24,11 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen var r4 = foo((x: typeof a) => a, (x: typeof b) => b); // typeof a => typeof a ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; y?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; z?: number; }'. var r5 = foo((x: typeof b) => b, (x: typeof a) => a); // typeof b => typeof b ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y?: number; }'. function other(x: T) { diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt index cea92ef6077..a8ee6ac6ca9 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(10,29): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(10,29): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(15,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'. tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(16,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. @@ -23,7 +23,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen var r1: (x: {}) => {} = foo((x: number) => 1, (x: string) => ''); ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. function other2(x: T) { diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt index 28f142b804e..574cc5ca50d 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments3.ts(32,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments3.ts(32,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '(y: string) => string' is not a valid type argument because it is not a supertype of candidate '(a: string) => boolean'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments3.ts(33,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments3.ts(33,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '(n: Object) => number' is not a valid type argument because it is not a supertype of candidate 'number'. @@ -38,9 +38,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen var x: (a: string) => boolean; var r11 = foo2(x, (a1: (y: string) => string) => (n: Object) => 1, (a2: (z: string) => string) => 2); // error ~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '(y: string) => string' is not a valid type argument because it is not a supertype of candidate '(a: string) => boolean'. var r12 = foo2(x, (a1: (y: string) => boolean) => (n: Object) => 1, (a2: (z: string) => boolean) => 2); // error ~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '(n: Object) => number' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.errors.txt b/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.errors.txt index eb8bcca96fc..2efcd043d78 100644 --- a/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.errors.txt +++ b/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithNonSymmetricSubtypes.ts(12,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithNonSymmetricSubtypes.ts(12,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; y?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; z?: number; }'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithNonSymmetricSubtypes.ts(13,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithNonSymmetricSubtypes.ts(13,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y?: number; }'. @@ -18,11 +18,11 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithNon var r = foo(a, b); // { x: number; y?: number; }; ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; y?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; z?: number; }'. var r2 = foo(b, a); // { x: number; z?: number; }; ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y?: number; }'. var x: { x: number; }; diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArgs.errors.txt b/tests/baselines/reference/genericCallWithObjectLiteralArgs.errors.txt index a5702c23915..eb45586442d 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArgs.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectLiteralArgs.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectLiteralArgs.ts(5,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectLiteralArgs.ts(5,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -9,7 +9,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var r = foo({ bar: 1, baz: '' }); // error ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var r2 = foo({ bar: 1, baz: 1 }); // T = number var r3 = foo({ bar: foo, baz: foo }); // T = typeof foo diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt index 39e757fc6b4..f389a0a6cae 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(3,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(3,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(4,22): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; y: number; }'. - Types of property 'y' are incompatible: + Types of property 'y' are incompatible. Type 'string' is not assignable to type 'number'. tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(5,22): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: string; y: string; }'. - Types of property 'x' are incompatible: + Types of property 'x' are incompatible. Type 'number' is not assignable to type 'string'. tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(6,22): error TS2345: Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: number; y: number; }'. - Types of property 'x' are incompatible: + Types of property 'x' are incompatible. Type 'string' is not assignable to type 'number'. tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(7,22): error TS2345: Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: string; y: string; }'. - Types of property 'y' are incompatible: + Types of property 'y' are incompatible. Type 'number' is not assignable to type 'string'. @@ -19,25 +19,25 @@ tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(7,22): error TS23 // these are all errors var x = foo({ x: 3, y: "" }, 4); ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var x2 = foo({ x: 3, y: "" }, 4); ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; y: number; }'. -!!! error TS2345: Types of property 'y' are incompatible: +!!! error TS2345: Types of property 'y' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. var x3 = foo({ x: 3, y: "" }, 4); ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: string; y: string; }'. -!!! error TS2345: Types of property 'x' are incompatible: +!!! error TS2345: Types of property 'x' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'string'. var x4 = foo({ x: "", y: 4 }, ""); ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: number; y: number; }'. -!!! error TS2345: Types of property 'x' are incompatible: +!!! error TS2345: Types of property 'x' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. var x5 = foo({ x: "", y: 4 }, ""); ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: string; y: string; }'. -!!! error TS2345: Types of property 'y' are incompatible: +!!! error TS2345: Types of property 'y' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt index 478f1404b1c..97b09a7d43f 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts(20,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts(20,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'C' is not a valid type argument because it is not a supertype of candidate 'D'. @@ -24,6 +24,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var d1 = new X(); var r = foo(c1, d1); // error ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'C' is not a valid type argument because it is not a supertype of candidate 'D'. var r2 = foo(c1, c1); // ok \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt index b1f00ed2abd..02b38ddeb74 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts(18,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts(18,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'Derived' is not a valid type argument because it is not a supertype of candidate 'Derived2'. tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts(20,29): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. @@ -23,7 +23,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var r1 = f({ x: new Derived(), y: new Derived2() }); // error because neither is supertype of the other ~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'Derived' is not a valid type argument because it is not a supertype of candidate 'Derived2'. function f2(a: U) { diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.errors.txt b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.errors.txt index 03ab33e11d6..2a0807bf6b9 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.errors.txt +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments.ts(36,14): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments.ts(36,14): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'boolean' is not a valid type argument because it is not a supertype of candidate 'number'. @@ -40,7 +40,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOve var r8 = foo6(a); // error ~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'boolean' is not a valid type argument because it is not a supertype of candidate 'number'. var r9 = foo6(b); // new any => string; new(x:any, y?:any) => string diff --git a/tests/baselines/reference/genericCallWithTupleType.errors.txt b/tests/baselines/reference/genericCallWithTupleType.errors.txt index abfe5087131..930d3128452 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 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': +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(12,1): error TS2323: 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 TS2322: Type '{ a: string; }' is not assignable to type 'string | number': +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(14,1): error TS2323: 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 TS2322: Type '[number, string]' is not assignable to type '[string, number]': - Types of property '0' are incompatible: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(22,1): error TS2323: 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 TS2322: Type '[{}, {}]' is not assignable to type '[string, number]': - Types of property '0' are incompatible: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(23,1): error TS2323: 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 TS2322: Type '[{}]' is not assignable to type '[{}, {}]': +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(24,1): error TS2323: 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 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'. +!!! 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'. var e3 = i1.tuple1[2]; // {} i1.tuple1[3] = { a: "string" }; ~~~~~~~~~~~~ -!!! error TS2322: Type '{ a: string; }' is not assignable to type 'string | number': -!!! error TS2322: Type '{ a: string; }' is not assignable to type 'number'. +!!! error TS2323: Type '{ a: string; }' is not assignable to type 'string | number'. +!!! error TS2323: 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 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'. +!!! 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'. i1.tuple1 = [{}, {}]; ~~~~~~~~~ -!!! 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'. +!!! 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'. i2.tuple1 = [{}]; ~~~~~~~~~ -!!! error TS2322: Type '[{}]' is not assignable to type '[{}, {}]': -!!! error TS2322: Property '1' is missing in type '[{}]'. +!!! error TS2323: Type '[{}]' is not assignable to type '[{}, {}]'. +!!! error TS2323: Property '1' is missing in type '[{}]'. \ No newline at end of file diff --git a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt index 40d0b19fd7c..149a20e92a5 100644 --- a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt +++ b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(57,19): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(57,19): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(60,19): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(60,19): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(61,20): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(61,20): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(62,19): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(62,19): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -67,21 +67,21 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFu function other(t: T, u: U) { var r10 = c.foo2(1, (x: T) => ''); // error ~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r10 = c.foo2(1, (x) => ''); // string var r11 = c3.foo3(1, (x: T) => '', ''); // error ~~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r11b = c3.foo3(1, (x: T) => '', 1); // error ~~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r12 = c3.foo3(1, function (a) { return '' }, 1); // error ~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. } } \ No newline at end of file diff --git a/tests/baselines/reference/genericCloneReturnTypes.errors.txt b/tests/baselines/reference/genericCloneReturnTypes.errors.txt index 37de816704c..626f53bddea 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 TS2322: Type 'Bar' is not assignable to type 'Bar': +tests/cases/compiler/genericCloneReturnTypes.ts(25,1): error TS2323: 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 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 +!!! 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 diff --git a/tests/baselines/reference/genericCloneReturnTypes2.errors.txt b/tests/baselines/reference/genericCloneReturnTypes2.errors.txt index 0d8131871fe..c531ea31ccc 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 TS2322: Type 'MyList' is not assignable to type 'MyList': +tests/cases/compiler/genericCloneReturnTypes2.ts(15,5): error TS2323: 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 TS2322: Type 'MyLi var c: MyList = a.clone(); // bug was there was an error on this line var d: MyList = a.clone(); // error ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/genericConstraint2.errors.txt b/tests/baselines/reference/genericConstraint2.errors.txt index 482173ff075..3ab29b585d8 100644 --- a/tests/baselines/reference/genericConstraint2.errors.txt +++ b/tests/baselines/reference/genericConstraint2.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/genericConstraint2.ts(5,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/compiler/genericConstraint2.ts(11,7): error TS2421: Class 'ComparableString' incorrectly implements interface 'Comparable': +tests/cases/compiler/genericConstraint2.ts(11,7): error TS2420: Class 'ComparableString' incorrectly implements interface 'Comparable'. Property 'comparer' is missing in type 'ComparableString'. tests/cases/compiler/genericConstraint2.ts(21,17): error TS2344: Type 'ComparableString' does not satisfy the constraint 'Comparable'. @@ -19,8 +19,8 @@ tests/cases/compiler/genericConstraint2.ts(21,17): error TS2344: Type 'Comparabl class ComparableString implements Comparable{ ~~~~~~~~~~~~~~~~ -!!! error TS2421: Class 'ComparableString' incorrectly implements interface 'Comparable': -!!! error TS2421: Property 'comparer' is missing in type 'ComparableString'. +!!! error TS2420: Class 'ComparableString' incorrectly implements interface 'Comparable'. +!!! error TS2420: Property 'comparer' is missing in type 'ComparableString'. constructor(public currentValue: string) { } localeCompare(other) { diff --git a/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt b/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt index 4602e5eb494..ade053d9344 100644 --- a/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt +++ b/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/genericConstraintSatisfaction1.ts(6,5): error TS2345: Argument of type '{ s: number; }' is not assignable to parameter of type '{ s: string; }'. - Types of property 's' are incompatible: + Types of property 's' are incompatible. Type 'number' is not assignable to type 'string'. @@ -12,6 +12,6 @@ tests/cases/compiler/genericConstraintSatisfaction1.ts(6,5): error TS2345: Argum x.f({s: 1}) ~~~~~~ !!! error TS2345: Argument of type '{ s: number; }' is not assignable to parameter of type '{ s: string; }'. -!!! error TS2345: Types of property 's' are incompatible: +!!! error TS2345: Types of property 's' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt index e08cc405426..51aac95daad 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts(11,1): error TS2322: Type 'B' is not assignable to type 'A': - Types of property 'x' are incompatible: +tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts(11,1): error TS2323: 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 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt index bcb406447a4..798557ef72d 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt @@ -1,6 +1,6 @@ -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; }': +tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts(11,1): error TS2323: 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 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/genericRestArgs.errors.txt b/tests/baselines/reference/genericRestArgs.errors.txt index 2cbaba80221..8a977452958 100644 --- a/tests/baselines/reference/genericRestArgs.errors.txt +++ b/tests/baselines/reference/genericRestArgs.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/genericRestArgs.ts(2,12): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/genericRestArgs.ts(2,12): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. tests/cases/compiler/genericRestArgs.ts(5,34): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -tests/cases/compiler/genericRestArgs.ts(10,12): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/genericRestArgs.ts(10,12): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. tests/cases/compiler/genericRestArgs.ts(12,30): error TS2345: Argument of type 'number' is not assignable to parameter of type 'any[]'. @@ -10,7 +10,7 @@ tests/cases/compiler/genericRestArgs.ts(12,30): error TS2345: Argument of type ' function makeArrayG(...items: T[]): T[] { return items; } var a1Ga = makeArrayG(1, ""); // no error ~~~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var a1Gb = makeArrayG(1, ""); var a1Gc = makeArrayG(1, ""); @@ -23,7 +23,7 @@ tests/cases/compiler/genericRestArgs.ts(12,30): error TS2345: Argument of type ' } var a2Ga = makeArrayGOpt(1, ""); ~~~~~~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var a2Gb = makeArrayG(1, ""); var a2Gc = makeArrayG(1, ""); // error diff --git a/tests/baselines/reference/genericSpecializations3.errors.txt b/tests/baselines/reference/genericSpecializations3.errors.txt index 0011be255f1..e8e8804c0cc 100644 --- a/tests/baselines/reference/genericSpecializations3.errors.txt +++ b/tests/baselines/reference/genericSpecializations3.errors.txt @@ -1,17 +1,17 @@ -tests/cases/compiler/genericSpecializations3.ts(8,7): error TS2421: Class 'IntFooBad' incorrectly implements interface 'IFoo': - 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: +tests/cases/compiler/genericSpecializations3.ts(8,7): error TS2420: Class 'IntFooBad' incorrectly implements interface 'IFoo'. + 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(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: +tests/cases/compiler/genericSpecializations3.ts(28,1): error TS2323: 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 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: +tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2323: 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. Type 'number' is not assignable to type 'string'. @@ -25,11 +25,11 @@ tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2322: Type 'IntFo class IntFooBad implements IFoo { // error ~~~~~~~~~ -!!! error TS2421: Class 'IntFooBad' incorrectly implements interface 'IFoo': -!!! error TS2421: Types of property 'foo' are incompatible: -!!! error TS2421: Type '(x: string) => string' is not assignable to type '(x: number) => number': -!!! error TS2421: Types of parameters 'x' and 'x' are incompatible: -!!! error TS2421: Type 'string' is not assignable to type 'number'. +!!! error TS2420: Class 'IntFooBad' incorrectly implements interface 'IFoo'. +!!! error TS2420: Types of property 'foo' are incompatible. +!!! error TS2420: Type '(x: string) => string' is not assignable to type '(x: number) => number'. +!!! error TS2420: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2420: Type 'string' is not assignable to type 'number'. foo(x: string): string { return null; } } @@ -51,18 +51,18 @@ tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2322: Type 'IntFo intFoo = stringFoo2; // error ~~~~~~ -!!! 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'. +!!! 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'. stringFoo2 = intFoo; // error ~~~~~~~~~~ -!!! 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'. +!!! 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'. class StringFoo3 implements IFoo { // error diff --git a/tests/baselines/reference/genericTypeAssertions1.errors.txt b/tests/baselines/reference/genericTypeAssertions1.errors.txt index 9e0492a8474..26a0d7d11aa 100644 --- a/tests/baselines/reference/genericTypeAssertions1.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions1.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/genericTypeAssertions1.ts(3,5): error TS2322: Type 'A' is not assignable to type 'A': +tests/cases/compiler/genericTypeAssertions1.ts(3,5): error TS2323: Type 'A' is not assignable to type 'A'. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/genericTypeAssertions1.ts(4,5): error TS2322: Type 'A>' is not assignable to type 'A': +tests/cases/compiler/genericTypeAssertions1.ts(4,5): error TS2323: Type 'A>' is not assignable to type 'A'. Type 'A' is not assignable to type 'number'. -tests/cases/compiler/genericTypeAssertions1.ts(4,21): error TS2353: Neither type 'A' nor type 'A>' is assignable to the other: - Type 'number' is not assignable to type 'A': +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'. Property 'foo' is missing in type 'Number'. @@ -12,13 +12,13 @@ tests/cases/compiler/genericTypeAssertions1.ts(4,21): error TS2353: Neither type var foo = new A(); var r: A = >new A(); // error ~ -!!! error TS2322: Type 'A' is not assignable to type 'A': -!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'A' is not assignable to type 'A'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var r2: A = >>foo; // error ~~ -!!! error TS2322: Type 'A>' is not assignable to type 'A': -!!! error TS2322: Type 'A' is not assignable to type 'number'. +!!! error TS2323: Type 'A>' is not assignable to type 'A'. +!!! error TS2323: Type 'A' is not assignable to type 'number'. ~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type 'A' nor type 'A>' is assignable to the other: -!!! error TS2353: Type 'number' is not assignable to type 'A': -!!! error TS2353: Property 'foo' is missing in type 'Number'. \ No newline at end of file +!!! error TS2352: Neither type 'A' nor type 'A>' is assignable to the other. +!!! error TS2352: Type 'number' is not assignable to type 'A'. +!!! error TS2352: Property 'foo' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions2.errors.txt b/tests/baselines/reference/genericTypeAssertions2.errors.txt index 887e66a532f..e2f4fab7b7b 100644 --- a/tests/baselines/reference/genericTypeAssertions2.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions2.errors.txt @@ -1,11 +1,11 @@ -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: +tests/cases/compiler/genericTypeAssertions2.ts(10,5): error TS2323: 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 TS2322: Type 'A' is not assignable to type 'B': +tests/cases/compiler/genericTypeAssertions2.ts(11,5): error TS2323: Type 'A' is not assignable to type 'B'. Property 'bar' is missing in type 'A'. -tests/cases/compiler/genericTypeAssertions2.ts(13,21): error TS2353: Neither type 'undefined[]' nor type 'A' is assignable to the other: +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,17 +21,17 @@ tests/cases/compiler/genericTypeAssertions2.ts(13,21): error TS2353: Neither typ var r: A = >new B(); var r2: A = >new B(); // error ~~ -!!! 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'. +!!! 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'. var r3: B = >new B(); // error ~~ -!!! error TS2322: Type 'A' is not assignable to type 'B': -!!! error TS2322: Property 'bar' is missing in type 'A'. +!!! error TS2323: Type 'A' is not assignable to type 'B'. +!!! error TS2323: Property 'bar' is missing in type 'A'. var r4: A = >new A(); var r5: A = >[]; // error ~~~~~~~~~~~~~ -!!! error TS2353: Neither type 'undefined[]' nor type 'A' is assignable to the other: -!!! error TS2353: Property 'foo' is missing in type 'undefined[]'. \ No newline at end of file +!!! error TS2352: Neither type 'undefined[]' nor type 'A' is assignable to the other. +!!! error TS2352: Property 'foo' is missing in type 'undefined[]'. \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt index a1efb4a4e87..13ab681e4e5 100644 --- a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt +++ b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(4,7): error TS2421: Class 'X' incorrectly implements interface 'I': - Types of property 'f' are incompatible: - Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void': - Types of parameters 'a' and 'a' are incompatible: - Type 'T' is not assignable to type '{ a: number; }': - Types of property 'a' are incompatible: +tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(4,7): error TS2420: Class 'X' incorrectly implements interface 'I'. + Types of property 'f' are incompatible. + Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void'. + Types of parameters 'a' and 'a' are incompatible. + 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 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: - Type '{ a: string; }' is not assignable to type '{ a: number; }': - Types of property 'a' are incompatible: +tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(8,5): error TS2323: 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. + Type '{ a: string; }' is not assignable to type '{ a: number; }'. + Types of property 'a' are incompatible. Type 'string' is not assignable to type 'number'. @@ -20,23 +20,23 @@ tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(8,5): error TS2322 } class X implements I { ~ -!!! error TS2421: Class 'X' incorrectly implements interface 'I': -!!! error TS2421: Types of property 'f' are incompatible: -!!! error TS2421: Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void': -!!! error TS2421: Types of parameters 'a' and 'a' are incompatible: -!!! error TS2421: Type 'T' is not assignable to type '{ a: number; }': -!!! error TS2421: Types of property 'a' are incompatible: -!!! error TS2421: Type 'string' is not assignable to type 'number'. +!!! error TS2420: Class 'X' incorrectly implements interface 'I'. +!!! error TS2420: Types of property 'f' are incompatible. +!!! error TS2420: Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void'. +!!! error TS2420: Types of parameters 'a' and 'a' are incompatible. +!!! error TS2420: Type 'T' is not assignable to type '{ a: number; }'. +!!! error TS2420: Types of property 'a' are incompatible. +!!! error TS2420: Type 'string' is not assignable to type 'number'. f(a: T): void { } } var x = new X<{ a: string }>(); var i: I = x; // Should not be allowed -- type of 'f' is incompatible with 'I' ~ -!!! 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/generics1.errors.txt b/tests/baselines/reference/generics1.errors.txt index 4d378d0b7d6..81d250a2ef4 100644 --- a/tests/baselines/reference/generics1.errors.txt +++ b/tests/baselines/reference/generics1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/generics1.ts(10,9): error TS2343: Type 'A' does not satisfy the constraint 'B': +tests/cases/compiler/generics1.ts(10,9): error TS2344: Type 'A' does not satisfy the constraint 'B'. Property 'b' is missing in type 'A'. tests/cases/compiler/generics1.ts(13,9): error TS2314: Generic type 'G' requires 2 type argument(s). tests/cases/compiler/generics1.ts(14,9): error TS2314: Generic type 'G' requires 2 type argument(s). @@ -16,8 +16,8 @@ tests/cases/compiler/generics1.ts(14,9): error TS2314: Generic type 'G' re var v2: G<{ a: string }, C>; // Ok, equivalent to G var v3: G; // Error, A not valid argument for U ~~~~~~~ -!!! error TS2343: Type 'A' does not satisfy the constraint 'B': -!!! error TS2343: Property 'b' is missing in type 'A'. +!!! error TS2344: Type 'A' does not satisfy the constraint 'B'. +!!! error TS2344: Property 'b' is missing in type 'A'. var v4: G, C>; // Ok var v5: G; // Error, any does not satisfy constraint B var v6: G; // Error, wrong number of arguments diff --git a/tests/baselines/reference/generics2.errors.txt b/tests/baselines/reference/generics2.errors.txt index dfe58f07f23..a0380eee753 100644 --- a/tests/baselines/reference/generics2.errors.txt +++ b/tests/baselines/reference/generics2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/generics2.ts(17,9): error TS2343: Type 'A' does not satisfy the constraint 'B': +tests/cases/compiler/generics2.ts(17,9): error TS2344: Type 'A' does not satisfy the constraint 'B'. Property 'b' is missing in type 'A'. tests/cases/compiler/generics2.ts(20,9): error TS2314: Generic type 'G' requires 2 type argument(s). tests/cases/compiler/generics2.ts(21,9): error TS2314: Generic type 'G' requires 2 type argument(s). @@ -23,8 +23,8 @@ tests/cases/compiler/generics2.ts(21,9): error TS2314: Generic type 'G' re var v2: G<{ a: string }, C>; // Ok, equivalent to G var v3: G; // Error, A not valid argument for U ~~~~~~~ -!!! error TS2343: Type 'A' does not satisfy the constraint 'B': -!!! error TS2343: Property 'b' is missing in type 'A'. +!!! error TS2344: Type 'A' does not satisfy the constraint 'B'. +!!! error TS2344: Property 'b' is missing in type 'A'. var v4: G, C>; // Ok var v5: G; // Error, any does not satisfy constraint B var v6: G; // Error, wrong number of arguments diff --git a/tests/baselines/reference/generics4.errors.txt b/tests/baselines/reference/generics4.errors.txt index dcf210a53cf..5824ce7958a 100644 --- a/tests/baselines/reference/generics4.errors.txt +++ b/tests/baselines/reference/generics4.errors.txt @@ -1,7 +1,7 @@ -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': +tests/cases/compiler/generics4.ts(7,1): error TS2323: 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'. Type 'boolean' is not assignable to type 'string'. @@ -14,8 +14,8 @@ tests/cases/compiler/generics4.ts(7,1): error TS2322: Type 'C' is not assigna a = b; // Not ok - return types of "f" are different ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/generics5.errors.txt b/tests/baselines/reference/generics5.errors.txt index fa279b92a5d..17aeea63df2 100644 --- a/tests/baselines/reference/generics5.errors.txt +++ b/tests/baselines/reference/generics5.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/generics5.ts(10,9): error TS2343: Type 'A' does not satisfy the constraint 'B': +tests/cases/compiler/generics5.ts(10,9): error TS2344: Type 'A' does not satisfy the constraint 'B'. Property 'b' is missing in type 'A'. @@ -14,7 +14,7 @@ tests/cases/compiler/generics5.ts(10,9): error TS2343: Type 'A' does not satisfy var v3: G; // Error, A not valid argument for U ~~~~~~~ -!!! error TS2343: Type 'A' does not satisfy the constraint 'B': -!!! error TS2343: Property 'b' is missing in type 'A'. +!!! error TS2344: Type 'A' does not satisfy the constraint 'B'. +!!! error TS2344: Property 'b' is missing in type 'A'. \ No newline at end of file diff --git a/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt index b4843deb9c2..1c9d42c9abc 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 TS2322: Type 'A' is not assignable to type 'A': +tests/cases/compiler/getAndSetNotIdenticalType2.ts(9,9): error TS2323: 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 TS2322: Type 'A' is not assignable to type 'A': -!!! error TS2322: Type 'string' is not assignable to type 'T'. +!!! error TS2323: Type 'A' is not assignable to type 'A'. +!!! error TS2323: 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 637c140a1f3..7590f50815d 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 TS2322: Type 'A' is not assignable to type 'A': +tests/cases/compiler/getAndSetNotIdenticalType3.ts(9,9): error TS2323: 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 TS2322: Type 'A' is not assignable to type 'A': -!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'A' is not assignable to type 'A'. +!!! error TS2323: 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/heterogeneousArrayAndOverloads.errors.txt b/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt index 15f8f21b8f3..e5c2be7a598 100644 --- a/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt +++ b/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/heterogeneousArrayAndOverloads.ts(9,19): error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'string[]'. - 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'. @@ -15,7 +15,7 @@ tests/cases/compiler/heterogeneousArrayAndOverloads.ts(9,19): error TS2345: Argu this.test([1, 2, "hi", 5]); // Error ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'string[]'. -!!! error TS2345: Type 'string | number' is not assignable to type 'string': +!!! error TS2345: Type 'string | number' is not assignable to type 'string'. !!! error TS2345: Type 'number' is not assignable to type 'string'. } } \ No newline at end of file diff --git a/tests/baselines/reference/i3.errors.txt b/tests/baselines/reference/i3.errors.txt index 1a03e690a2f..39a62340d53 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 TS2322: Type 'I3' is not assignable to type '{ one: number; }': +tests/cases/compiler/i3.ts(6,1): error TS2323: 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 TS2322: Type 'I3' is not assignable to ty i = x; x = i; ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/implementClausePrecedingExtends.errors.txt b/tests/baselines/reference/implementClausePrecedingExtends.errors.txt index 43baa8c8be7..0ded03b0808 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.errors.txt +++ b/tests/baselines/reference/implementClausePrecedingExtends.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/implementClausePrecedingExtends.ts(2,22): error TS1005: '{' expected. tests/cases/compiler/implementClausePrecedingExtends.ts(2,32): error TS1005: ';' expected. -tests/cases/compiler/implementClausePrecedingExtends.ts(2,7): error TS2421: Class 'D' incorrectly implements interface 'C': +tests/cases/compiler/implementClausePrecedingExtends.ts(2,7): error TS2420: Class 'D' incorrectly implements interface 'C'. Property 'foo' is missing in type 'D'. @@ -12,5 +12,5 @@ tests/cases/compiler/implementClausePrecedingExtends.ts(2,7): error TS2421: Clas ~ !!! error TS1005: ';' expected. ~ -!!! error TS2421: Class 'D' incorrectly implements interface 'C': -!!! error TS2421: Property 'foo' is missing in type 'D'. \ No newline at end of file +!!! error TS2420: Class 'D' incorrectly implements interface 'C'. +!!! error TS2420: Property 'foo' is missing in type 'D'. \ No newline at end of file diff --git a/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt b/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt index 4c2803b76ac..7a128b87764 100644 --- a/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt +++ b/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/implementGenericWithMismatchedTypes.ts(7,7): error TS2421: Class 'C' incorrectly implements interface 'IFoo': - Types of property 'foo' are incompatible: - Type '(x: string) => number' is not assignable to type '(x: T) => T': - Types of parameters 'x' and 'x' are incompatible: +tests/cases/compiler/implementGenericWithMismatchedTypes.ts(7,7): error TS2420: Class 'C' incorrectly implements interface 'IFoo'. + Types of property 'foo' are incompatible. + Type '(x: string) => number' is not assignable to type '(x: T) => T'. + Types of parameters 'x' and 'x' are incompatible. Type 'string' is not assignable to type 'T'. -tests/cases/compiler/implementGenericWithMismatchedTypes.ts(16,7): error TS2421: Class 'C2' incorrectly implements interface 'IFoo2': - Types of property 'foo' are incompatible: - Type '(x: Tstring) => number' is not assignable to type '(x: T) => T': +tests/cases/compiler/implementGenericWithMismatchedTypes.ts(16,7): error TS2420: Class 'C2' incorrectly implements interface 'IFoo2'. + Types of property 'foo' are incompatible. + Type '(x: Tstring) => number' is not assignable to type '(x: T) => T'. Type 'number' is not assignable to type 'T'. @@ -18,11 +18,11 @@ tests/cases/compiler/implementGenericWithMismatchedTypes.ts(16,7): error TS2421: } class C implements IFoo { // error ~ -!!! error TS2421: Class 'C' incorrectly implements interface 'IFoo': -!!! error TS2421: Types of property 'foo' are incompatible: -!!! error TS2421: Type '(x: string) => number' is not assignable to type '(x: T) => T': -!!! error TS2421: Types of parameters 'x' and 'x' are incompatible: -!!! error TS2421: Type 'string' is not assignable to type 'T'. +!!! error TS2420: Class 'C' incorrectly implements interface 'IFoo'. +!!! error TS2420: Types of property 'foo' are incompatible. +!!! error TS2420: Type '(x: string) => number' is not assignable to type '(x: T) => T'. +!!! error TS2420: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2420: Type 'string' is not assignable to type 'T'. foo(x: string): number { return null; } @@ -33,10 +33,10 @@ tests/cases/compiler/implementGenericWithMismatchedTypes.ts(16,7): error TS2421: } class C2 implements IFoo2 { // error ~~ -!!! error TS2421: Class 'C2' incorrectly implements interface 'IFoo2': -!!! error TS2421: Types of property 'foo' are incompatible: -!!! error TS2421: Type '(x: Tstring) => number' is not assignable to type '(x: T) => T': -!!! error TS2421: Type 'number' is not assignable to type 'T'. +!!! error TS2420: Class 'C2' incorrectly implements interface 'IFoo2'. +!!! error TS2420: Types of property 'foo' are incompatible. +!!! error TS2420: Type '(x: Tstring) => number' is not assignable to type '(x: T) => T'. +!!! error TS2420: Type 'number' is not assignable to type 'T'. foo(x: Tstring): number { return null; } diff --git a/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt b/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt index c445403c3fa..75d9fdcce34 100644 --- a/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt +++ b/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/implementPublicPropertyAsPrivate.ts(4,7): error TS2421: Class 'C' incorrectly implements interface 'I': +tests/cases/compiler/implementPublicPropertyAsPrivate.ts(4,7): error TS2420: Class 'C' incorrectly implements interface 'I'. Property 'x' is private in type 'C' but not in type 'I'. @@ -8,7 +8,7 @@ tests/cases/compiler/implementPublicPropertyAsPrivate.ts(4,7): error TS2421: Cla } class C implements I { ~ -!!! error TS2421: Class 'C' incorrectly implements interface 'I': -!!! error TS2421: Property 'x' is private in type 'C' but not in type 'I'. +!!! error TS2420: Class 'C' incorrectly implements interface 'I'. +!!! error TS2420: Property 'x' is private in type 'C' but not in type 'I'. private x = 0; // should raise error at class decl } \ No newline at end of file diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt index ab12cb9708b..a38c477f111 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(9,7): error TS2421: Class 'Bar' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(9,7): error TS2420: Class 'Bar' incorrectly implements interface 'I'. Property 'y' is missing in type 'Bar'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(12,7): error TS2421: Class 'Bar2' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(12,7): error TS2420: Class 'Bar2' incorrectly implements interface 'I'. Property 'x' is missing in type 'Bar2'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(16,7): error TS2421: Class 'Bar3' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(16,7): error TS2420: Class 'Bar3' incorrectly implements interface 'I'. Property 'x' is private in type 'I' but not in type 'Bar3'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(21,7): error TS2421: Class 'Bar4' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(21,7): error TS2420: Class 'Bar4' incorrectly implements interface 'I'. Types have separate declarations of a private property 'x'. @@ -19,29 +19,29 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar implements I { // error ~~~ -!!! error TS2421: Class 'Bar' incorrectly implements interface 'I': -!!! error TS2421: Property 'y' is missing in type 'Bar'. +!!! error TS2420: Class 'Bar' incorrectly implements interface 'I'. +!!! error TS2420: Property 'y' is missing in type 'Bar'. } class Bar2 implements I { // error ~~~~ -!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': -!!! error TS2421: Property 'x' is missing in type 'Bar2'. +!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'. +!!! error TS2420: Property 'x' is missing in type 'Bar2'. y: number; } class Bar3 implements I { // error ~~~~ -!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': -!!! error TS2421: Property 'x' is private in type 'I' but not in type 'Bar3'. +!!! error TS2420: Class 'Bar3' incorrectly implements interface 'I'. +!!! error TS2420: Property 'x' is private in type 'I' but not in type 'Bar3'. x: string; y: number; } class Bar4 implements I { // error ~~~~ -!!! error TS2421: Class 'Bar4' incorrectly implements interface 'I': -!!! error TS2421: Types have separate declarations of a private property 'x'. +!!! error TS2420: Class 'Bar4' incorrectly implements interface 'I'. +!!! error TS2420: Types have separate declarations of a private property 'x'. private x: string; y: number; } \ No newline at end of file diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt index 53fc5c54bee..c6c0be3896c 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt @@ -1,30 +1,30 @@ -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(13,7): error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(13,7): error TS2415: Class 'Bar2' incorrectly extends base class 'Foo'. Property 'x' is private in type 'Foo' but not in type 'Bar2'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(13,7): error TS2421: Class 'Bar2' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(13,7): error TS2420: Class 'Bar2' incorrectly implements interface 'I'. Property 'x' is private in type 'I' but not in type 'Bar2'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(18,7): error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(18,7): error TS2415: Class 'Bar3' incorrectly extends base class 'Foo'. Types have separate declarations of a private property 'x'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(18,7): error TS2421: Class 'Bar3' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(18,7): error TS2420: Class 'Bar3' incorrectly implements interface 'I'. Types have separate declarations of a private property 'x'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(42,11): error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(42,11): error TS2415: Class 'Bar2' incorrectly extends base class 'Foo'. Property 'x' is private in type 'Foo' but not in type 'Bar2'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(42,11): error TS2421: Class 'Bar2' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(42,11): error TS2420: Class 'Bar2' incorrectly implements interface 'I'. Property 'z' is missing in type 'Bar2'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(47,11): error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(47,11): error TS2415: Class 'Bar3' incorrectly extends base class 'Foo'. Types have separate declarations of a private property 'x'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(47,11): error TS2421: Class 'Bar3' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(47,11): error TS2420: Class 'Bar3' incorrectly implements interface 'I'. Property 'z' is missing in type 'Bar3'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(67,11): error TS2421: Class 'Bar' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(67,11): error TS2420: Class 'Bar' incorrectly implements interface 'I'. Property 'y' is missing in type 'Bar'. tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(73,14): error TS2341: Property 'x' is private and only accessible within class 'Foo'. tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(74,16): error TS2339: Property 'y' does not exist on type 'Bar'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(76,11): error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(76,11): error TS2415: Class 'Bar2' incorrectly extends base class 'Foo'. Property 'x' is private in type 'Foo' but not in type 'Bar2'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(76,11): error TS2421: Class 'Bar2' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(76,11): error TS2420: Class 'Bar2' incorrectly implements interface 'I'. Property 'y' is missing in type 'Bar2'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(81,11): error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(81,11): error TS2415: Class 'Bar3' incorrectly extends base class 'Foo'. Types have separate declarations of a private property 'x'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(81,11): error TS2421: Class 'Bar3' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(81,11): error TS2420: Class 'Bar3' incorrectly implements interface 'I'. Property 'y' is missing in type 'Bar3'. @@ -43,22 +43,22 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar2 extends Foo implements I { // error ~~~~ -!!! error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': -!!! error TS2416: Property 'x' is private in type 'Foo' but not in type 'Bar2'. +!!! error TS2415: Class 'Bar2' incorrectly extends base class 'Foo'. +!!! error TS2415: Property 'x' is private in type 'Foo' but not in type 'Bar2'. ~~~~ -!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': -!!! error TS2421: Property 'x' is private in type 'I' but not in type 'Bar2'. +!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'. +!!! error TS2420: Property 'x' is private in type 'I' but not in type 'Bar2'. x: string; y: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': -!!! error TS2416: Types have separate declarations of a private property 'x'. +!!! error TS2415: Class 'Bar3' incorrectly extends base class 'Foo'. +!!! error TS2415: Types have separate declarations of a private property 'x'. ~~~~ -!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': -!!! error TS2421: Types have separate declarations of a private property 'x'. +!!! error TS2420: Class 'Bar3' incorrectly implements interface 'I'. +!!! error TS2420: Types have separate declarations of a private property 'x'. private x: string; y: number; } @@ -84,22 +84,22 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar2 extends Foo implements I { // error ~~~~ -!!! error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': -!!! error TS2416: Property 'x' is private in type 'Foo' but not in type 'Bar2'. +!!! error TS2415: Class 'Bar2' incorrectly extends base class 'Foo'. +!!! error TS2415: Property 'x' is private in type 'Foo' but not in type 'Bar2'. ~~~~ -!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': -!!! error TS2421: Property 'z' is missing in type 'Bar2'. +!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'. +!!! error TS2420: Property 'z' is missing in type 'Bar2'. x: string; y: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': -!!! error TS2416: Types have separate declarations of a private property 'x'. +!!! error TS2415: Class 'Bar3' incorrectly extends base class 'Foo'. +!!! error TS2415: Types have separate declarations of a private property 'x'. ~~~~ -!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': -!!! error TS2421: Property 'z' is missing in type 'Bar3'. +!!! error TS2420: Class 'Bar3' incorrectly implements interface 'I'. +!!! error TS2420: Property 'z' is missing in type 'Bar3'. private x: string; y: number; } @@ -121,8 +121,8 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar extends Foo implements I { // error ~~~ -!!! error TS2421: Class 'Bar' incorrectly implements interface 'I': -!!! error TS2421: Property 'y' is missing in type 'Bar'. +!!! error TS2420: Class 'Bar' incorrectly implements interface 'I'. +!!! error TS2420: Property 'y' is missing in type 'Bar'. z: number; } @@ -137,22 +137,22 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar2 extends Foo implements I { // error ~~~~ -!!! error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': -!!! error TS2416: Property 'x' is private in type 'Foo' but not in type 'Bar2'. +!!! error TS2415: Class 'Bar2' incorrectly extends base class 'Foo'. +!!! error TS2415: Property 'x' is private in type 'Foo' but not in type 'Bar2'. ~~~~ -!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': -!!! error TS2421: Property 'y' is missing in type 'Bar2'. +!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'. +!!! error TS2420: Property 'y' is missing in type 'Bar2'. x: string; z: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': -!!! error TS2416: Types have separate declarations of a private property 'x'. +!!! error TS2415: Class 'Bar3' incorrectly extends base class 'Foo'. +!!! error TS2415: Types have separate declarations of a private property 'x'. ~~~~ -!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': -!!! error TS2421: Property 'y' is missing in type 'Bar3'. +!!! error TS2420: Class 'Bar3' incorrectly implements interface 'I'. +!!! error TS2420: Property 'y' is missing in type 'Bar3'. private x: string; z: number; } diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt index fc7cbbed97a..3835408ab05 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(9,7): error TS2421: Class 'Bar' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(9,7): error TS2420: Class 'Bar' incorrectly implements interface 'I'. Property 'y' is missing in type 'Bar'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(12,7): error TS2421: Class 'Bar2' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(12,7): error TS2420: Class 'Bar2' incorrectly implements interface 'I'. Property 'x' is missing in type 'Bar2'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(16,7): error TS2421: Class 'Bar3' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(16,7): error TS2420: Class 'Bar3' incorrectly implements interface 'I'. Property 'x' is protected but type 'Bar3' is not a class derived from 'Foo'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(21,7): error TS2421: Class 'Bar4' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(21,7): error TS2420: Class 'Bar4' incorrectly implements interface 'I'. Property 'x' is protected but type 'Bar4' is not a class derived from 'Foo'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(26,7): error TS2421: Class 'Bar5' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(26,7): error TS2420: Class 'Bar5' incorrectly implements interface 'I'. Property 'y' is missing in type 'Bar5'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(29,7): error TS2421: Class 'Bar6' incorrectly implements interface 'I': +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts(29,7): error TS2420: Class 'Bar6' incorrectly implements interface 'I'. Property 'y' is protected in type 'Bar6' but public in type 'I'. @@ -23,43 +23,43 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar implements I { // error ~~~ -!!! error TS2421: Class 'Bar' incorrectly implements interface 'I': -!!! error TS2421: Property 'y' is missing in type 'Bar'. +!!! error TS2420: Class 'Bar' incorrectly implements interface 'I'. +!!! error TS2420: Property 'y' is missing in type 'Bar'. } class Bar2 implements I { // error ~~~~ -!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': -!!! error TS2421: Property 'x' is missing in type 'Bar2'. +!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'. +!!! error TS2420: Property 'x' is missing in type 'Bar2'. y: number; } class Bar3 implements I { // error ~~~~ -!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': -!!! error TS2421: Property 'x' is protected but type 'Bar3' is not a class derived from 'Foo'. +!!! error TS2420: Class 'Bar3' incorrectly implements interface 'I'. +!!! error TS2420: Property 'x' is protected but type 'Bar3' is not a class derived from 'Foo'. x: string; y: number; } class Bar4 implements I { // error ~~~~ -!!! error TS2421: Class 'Bar4' incorrectly implements interface 'I': -!!! error TS2421: Property 'x' is protected but type 'Bar4' is not a class derived from 'Foo'. +!!! error TS2420: Class 'Bar4' incorrectly implements interface 'I'. +!!! error TS2420: Property 'x' is protected but type 'Bar4' is not a class derived from 'Foo'. protected x: string; y: number; } class Bar5 extends Foo implements I { // error ~~~~ -!!! error TS2421: Class 'Bar5' incorrectly implements interface 'I': -!!! error TS2421: Property 'y' is missing in type 'Bar5'. +!!! error TS2420: Class 'Bar5' incorrectly implements interface 'I'. +!!! error TS2420: Property 'y' is missing in type 'Bar5'. } class Bar6 extends Foo implements I { // error ~~~~ -!!! error TS2421: Class 'Bar6' incorrectly implements interface 'I': -!!! error TS2421: Property 'y' is protected in type 'Bar6' but public in type 'I'. +!!! error TS2420: Class 'Bar6' incorrectly implements interface 'I'. +!!! error TS2420: Property 'y' is protected in type 'Bar6' but public in type 'I'. protected y: number; } diff --git a/tests/baselines/reference/incompatibleGenericTypes.errors.txt b/tests/baselines/reference/incompatibleGenericTypes.errors.txt index 13aa9ea2e25..04c00f4fa20 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 TS2322: Type 'I1' is not assignable to type 'I1': +tests/cases/compiler/incompatibleGenericTypes.ts(10,5): error TS2323: 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 TS2322: Type 'I1 = v1; ~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/incompatibleTypes.errors.txt b/tests/baselines/reference/incompatibleTypes.errors.txt index 6f7fd89d79e..9b66a6e8c64 100644 --- a/tests/baselines/reference/incompatibleTypes.errors.txt +++ b/tests/baselines/reference/incompatibleTypes.errors.txt @@ -1,23 +1,23 @@ -tests/cases/compiler/incompatibleTypes.ts(5,7): error TS2421: Class 'C1' incorrectly implements interface 'IFoo1': - Types of property 'p1' are incompatible: - Type '() => string' is not assignable to type '() => number': +tests/cases/compiler/incompatibleTypes.ts(5,7): error TS2420: Class 'C1' incorrectly implements interface 'IFoo1'. + Types of property 'p1' are incompatible. + Type '() => string' is not assignable to type '() => number'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/incompatibleTypes.ts(15,7): error TS2421: Class 'C2' incorrectly implements interface 'IFoo2': - Types of property 'p1' are incompatible: - Type '(n: number) => number' is not assignable to type '(s: string) => number': - Types of parameters 'n' and 's' are incompatible: +tests/cases/compiler/incompatibleTypes.ts(15,7): error TS2420: Class 'C2' incorrectly implements interface 'IFoo2'. + Types of property 'p1' are incompatible. + Type '(n: number) => number' is not assignable to type '(s: string) => number'. + Types of parameters 'n' and 's' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/incompatibleTypes.ts(25,7): error TS2421: Class 'C3' incorrectly implements interface 'IFoo3': - Types of property 'p1' are incompatible: +tests/cases/compiler/incompatibleTypes.ts(25,7): error TS2420: Class 'C3' incorrectly implements interface 'IFoo3'. + Types of property 'p1' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/incompatibleTypes.ts(33,7): error TS2421: Class 'C4' incorrectly implements interface 'IFoo4': - Types of property 'p1' are incompatible: - Type '{ c: { b: string; }; d: string; }' is not assignable to type '{ a: { a: string; }; b: string; }': +tests/cases/compiler/incompatibleTypes.ts(33,7): error TS2420: Class 'C4' incorrectly implements interface 'IFoo4'. + Types of property 'p1' are incompatible. + Type '{ c: { b: string; }; d: string; }' is not assignable to type '{ a: { a: string; }; b: string; }'. Property 'a' is missing in type '{ c: { b: string; }; d: string; }'. 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 TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }': +tests/cases/compiler/incompatibleTypes.ts(66,5): error TS2323: 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'. @@ -30,10 +30,10 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2323: Type '(a: any) => class C1 implements IFoo1 { // incompatible on the return type ~~ -!!! error TS2421: Class 'C1' incorrectly implements interface 'IFoo1': -!!! error TS2421: Types of property 'p1' are incompatible: -!!! error TS2421: Type '() => string' is not assignable to type '() => number': -!!! error TS2421: Type 'string' is not assignable to type 'number'. +!!! error TS2420: Class 'C1' incorrectly implements interface 'IFoo1'. +!!! error TS2420: Types of property 'p1' are incompatible. +!!! error TS2420: Type '() => string' is not assignable to type '() => number'. +!!! error TS2420: Type 'string' is not assignable to type 'number'. public p1() { return "s"; } @@ -45,11 +45,11 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2323: Type '(a: any) => class C2 implements IFoo2 { // incompatible on the param type ~~ -!!! error TS2421: Class 'C2' incorrectly implements interface 'IFoo2': -!!! error TS2421: Types of property 'p1' are incompatible: -!!! error TS2421: Type '(n: number) => number' is not assignable to type '(s: string) => number': -!!! error TS2421: Types of parameters 'n' and 's' are incompatible: -!!! error TS2421: Type 'number' is not assignable to type 'string'. +!!! error TS2420: Class 'C2' incorrectly implements interface 'IFoo2'. +!!! error TS2420: Types of property 'p1' are incompatible. +!!! error TS2420: Type '(n: number) => number' is not assignable to type '(s: string) => number'. +!!! error TS2420: Types of parameters 'n' and 's' are incompatible. +!!! error TS2420: Type 'number' is not assignable to type 'string'. public p1(n:number) { return 0; } @@ -61,9 +61,9 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2323: Type '(a: any) => class C3 implements IFoo3 { // incompatible on the property type ~~ -!!! error TS2421: Class 'C3' incorrectly implements interface 'IFoo3': -!!! error TS2421: Types of property 'p1' are incompatible: -!!! error TS2421: Type 'number' is not assignable to type 'string'. +!!! error TS2420: Class 'C3' incorrectly implements interface 'IFoo3'. +!!! error TS2420: Types of property 'p1' are incompatible. +!!! error TS2420: Type 'number' is not assignable to type 'string'. public p1: number; } @@ -73,10 +73,10 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2323: Type '(a: any) => class C4 implements IFoo4 { // incompatible on the property type ~~ -!!! error TS2421: Class 'C4' incorrectly implements interface 'IFoo4': -!!! error TS2421: Types of property 'p1' are incompatible: -!!! error TS2421: Type '{ c: { b: string; }; d: string; }' is not assignable to type '{ a: { a: string; }; b: string; }': -!!! error TS2421: Property 'a' is missing in type '{ c: { b: string; }; d: string; }'. +!!! error TS2420: Class 'C4' incorrectly implements interface 'IFoo4'. +!!! error TS2420: Types of property 'p1' are incompatible. +!!! error TS2420: Type '{ c: { b: string; }; d: string; }' is not assignable to type '{ a: { a: string; }; b: string; }'. +!!! error TS2420: Property 'a' is missing in type '{ c: { b: string; }; d: string; }'. public p1: { c: { b: string; }; d: string; }; } @@ -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 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; }'. +!!! 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; }'. var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }]; diff --git a/tests/baselines/reference/indexer2.errors.txt b/tests/baselines/reference/indexer2.errors.txt index 9587bb6bb75..28020a570ed 100644 --- a/tests/baselines/reference/indexer2.errors.txt +++ b/tests/baselines/reference/indexer2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/indexer2.ts(6,25): error TS2353: Neither type '{ [x: number]: undefined; }' nor type 'IDirectChildrenMap' is assignable to the other: - Types of property 'hasOwnProperty' are incompatible: - Type '(v: string) => boolean' is not assignable to type '(objectId: number) => boolean': - Types of parameters 'v' and 'objectId' are incompatible: +tests/cases/compiler/indexer2.ts(6,25): error TS2352: Neither type '{ [x: number]: undefined; }' nor type 'IDirectChildrenMap' is assignable to the other. + Types of property 'hasOwnProperty' are incompatible. + Type '(v: string) => boolean' is not assignable to type '(objectId: number) => boolean'. + Types of parameters 'v' and 'objectId' are incompatible. Type 'string' is not assignable to type 'number'. @@ -13,8 +13,8 @@ tests/cases/compiler/indexer2.ts(6,25): error TS2353: Neither type '{ [x: number } var directChildrenMap = {}; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '{ [x: number]: undefined; }' nor type 'IDirectChildrenMap' is assignable to the other: -!!! error TS2353: Types of property 'hasOwnProperty' are incompatible: -!!! error TS2353: Type '(v: string) => boolean' is not assignable to type '(objectId: number) => boolean': -!!! error TS2353: Types of parameters 'v' and 'objectId' are incompatible: -!!! error TS2353: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2352: Neither type '{ [x: number]: undefined; }' nor type 'IDirectChildrenMap' is assignable to the other. +!!! error TS2352: Types of property 'hasOwnProperty' are incompatible. +!!! error TS2352: Type '(v: string) => boolean' is not assignable to type '(objectId: number) => boolean'. +!!! error TS2352: Types of parameters 'v' and 'objectId' are incompatible. +!!! error TS2352: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/indexer2A.errors.txt b/tests/baselines/reference/indexer2A.errors.txt index 548ed5e565b..f2314c5b49b 100644 --- a/tests/baselines/reference/indexer2A.errors.txt +++ b/tests/baselines/reference/indexer2A.errors.txt @@ -1,8 +1,8 @@ tests/cases/compiler/indexer2A.ts(4,5): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/compiler/indexer2A.ts(7,25): error TS2353: Neither type '{ [x: number]: undefined; }' nor type 'IDirectChildrenMap' is assignable to the other: - Types of property 'hasOwnProperty' are incompatible: - Type '(v: string) => boolean' is not assignable to type '(objectId: number) => boolean': - Types of parameters 'v' and 'objectId' are incompatible: +tests/cases/compiler/indexer2A.ts(7,25): error TS2352: Neither type '{ [x: number]: undefined; }' nor type 'IDirectChildrenMap' is assignable to the other. + Types of property 'hasOwnProperty' are incompatible. + Type '(v: string) => boolean' is not assignable to type '(objectId: number) => boolean'. + Types of parameters 'v' and 'objectId' are incompatible. Type 'string' is not assignable to type 'number'. @@ -17,8 +17,8 @@ tests/cases/compiler/indexer2A.ts(7,25): error TS2353: Neither type '{ [x: numbe } var directChildrenMap = {}; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '{ [x: number]: undefined; }' nor type 'IDirectChildrenMap' is assignable to the other: -!!! error TS2353: Types of property 'hasOwnProperty' are incompatible: -!!! error TS2353: Type '(v: string) => boolean' is not assignable to type '(objectId: number) => boolean': -!!! error TS2353: Types of parameters 'v' and 'objectId' are incompatible: -!!! error TS2353: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2352: Neither type '{ [x: number]: undefined; }' nor type 'IDirectChildrenMap' is assignable to the other. +!!! error TS2352: Types of property 'hasOwnProperty' are incompatible. +!!! error TS2352: Type '(v: string) => boolean' is not assignable to type '(objectId: number) => boolean'. +!!! error TS2352: Types of parameters 'v' and 'objectId' are incompatible. +!!! error TS2352: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/indexerAssignability.errors.txt b/tests/baselines/reference/indexerAssignability.errors.txt index 062ddbc3c43..8f7f1c11d6c 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 TS2322: Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }': +tests/cases/compiler/indexerAssignability.ts(5,1): error TS2323: 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 TS2322: Type '{}' is not assignable to type '{ [x: string]: string; }': +tests/cases/compiler/indexerAssignability.ts(6,1): error TS2323: Type '{}' is not assignable to type '{ [x: string]: string; }'. Index signature is missing in type '{}'. -tests/cases/compiler/indexerAssignability.ts(8,1): error TS2322: Type '{}' is not assignable to type '{ [x: number]: string; }': +tests/cases/compiler/indexerAssignability.ts(8,1): error TS2323: 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 TS2322: Type '{}' is no a = b; ~ -!!! 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; }'. +!!! 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; }'. a = c; ~ -!!! error TS2322: Type '{}' is not assignable to type '{ [x: string]: string; }': -!!! error TS2322: Index signature is missing in type '{}'. +!!! error TS2323: Type '{}' is not assignable to type '{ [x: string]: string; }'. +!!! error TS2323: Index signature is missing in type '{}'. b = a; b = c; ~ -!!! error TS2322: Type '{}' is not assignable to type '{ [x: number]: string; }': -!!! error TS2322: Index signature is missing in type '{}'. +!!! error TS2323: Type '{}' is not assignable to type '{ [x: number]: string; }'. +!!! error TS2323: Index signature is missing in type '{}'. c = a; c = b; \ No newline at end of file diff --git a/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt b/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt index 908681ddf7a..adbc31af210 100644 --- a/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt +++ b/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt @@ -1,8 +1,8 @@ -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: +tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts(16,1): error TS2323: 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 TS2322: Type 'OwnerList' is not assignable to type 'List': - Types of property 'data' are incompatible: +tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts(21,5): error TS2323: 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 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'. +!!! 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'. function other(x: T) { var list: List; var ownerList: OwnerList; list = ownerList; ~~~~ -!!! 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'. +!!! 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'. } \ No newline at end of file diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt index 71a9f74e77a..555349cc251 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +tests/cases/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'. Named properties 'x' of types 'C' and 'C2' are not identical. @@ -13,7 +13,7 @@ tests/cases/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.ts(9,1 interface A extends C, C2 { // error ~ -!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'. !!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt index 8de311e230a..3f9c4a3bae0 100644 --- a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt +++ b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/inheritSameNamePropertiesWithDifferentOptionality.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +tests/cases/compiler/inheritSameNamePropertiesWithDifferentOptionality.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'. Named properties 'x' of types 'C' and 'C2' are not identical. @@ -13,7 +13,7 @@ tests/cases/compiler/inheritSameNamePropertiesWithDifferentOptionality.ts(9,11): interface A extends C, C2 { // error ~ -!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'. !!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt index a6671492277..9864b4a4792 100644 --- a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt +++ b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/inheritSameNamePropertiesWithDifferentVisibility.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +tests/cases/compiler/inheritSameNamePropertiesWithDifferentVisibility.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'. Named properties 'x' of types 'C' and 'C2' are not identical. @@ -13,7 +13,7 @@ tests/cases/compiler/inheritSameNamePropertiesWithDifferentVisibility.ts(9,11): interface A extends C, C2 { // error ~ -!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'. !!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritance.errors.txt b/tests/baselines/reference/inheritance.errors.txt index 4811357b6d5..c667e8b001e 100644 --- a/tests/baselines/reference/inheritance.errors.txt +++ b/tests/baselines/reference/inheritance.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/inheritance.ts(30,7): error TS2416: Class 'Baad' incorrectly extends base class 'Good': - Types of property 'g' are incompatible: +tests/cases/compiler/inheritance.ts(30,7): error TS2415: Class 'Baad' incorrectly extends base class 'Good'. + Types of property 'g' are incompatible. Type '(n: number) => number' is not assignable to type '() => number'. tests/cases/compiler/inheritance.ts(31,12): error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. @@ -36,9 +36,9 @@ tests/cases/compiler/inheritance.ts(31,12): error TS2425: Class 'Good' defines i class Baad extends Good { ~~~~ -!!! error TS2416: Class 'Baad' incorrectly extends base class 'Good': -!!! error TS2416: Types of property 'g' are incompatible: -!!! error TS2416: Type '(n: number) => number' is not assignable to type '() => number'. +!!! error TS2415: Class 'Baad' incorrectly extends base class 'Good'. +!!! error TS2415: Types of property 'g' are incompatible. +!!! error TS2415: Type '(n: number) => number' is not assignable to type '() => number'. public f(): number { return 0; } ~ !!! error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. diff --git a/tests/baselines/reference/inheritance1.errors.txt b/tests/baselines/reference/inheritance1.errors.txt index 0d2f6a72bfd..65cba48d34e 100644 --- a/tests/baselines/reference/inheritance1.errors.txt +++ b/tests/baselines/reference/inheritance1.errors.txt @@ -1,24 +1,24 @@ -tests/cases/compiler/inheritance1.ts(14,7): error TS2421: Class 'ImageBase' incorrectly implements interface 'SelectableControl': +tests/cases/compiler/inheritance1.ts(14,7): error TS2420: Class 'ImageBase' incorrectly implements interface 'SelectableControl'. Property 'select' is missing in type 'ImageBase'. -tests/cases/compiler/inheritance1.ts(18,7): error TS2421: Class 'Locations' incorrectly implements interface 'SelectableControl': +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 TS2322: Type 'Control' is not assignable to type 'Button': +tests/cases/compiler/inheritance1.ts(31,1): error TS2323: Type 'Control' is not assignable to type 'Button'. Property 'select' is missing in type 'Control'. -tests/cases/compiler/inheritance1.ts(37,1): error TS2322: Type 'Control' is not assignable to type 'TextBox': +tests/cases/compiler/inheritance1.ts(37,1): error TS2323: 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 TS2322: Type 'Image1' is not assignable to type 'SelectableControl': +tests/cases/compiler/inheritance1.ts(46,1): error TS2323: 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 TS2322: Type 'Locations' is not assignable to type 'Control': +tests/cases/compiler/inheritance1.ts(53,1): error TS2323: Type 'Locations' is not assignable to type 'Control'. Property 'state' is missing in type 'Locations'. -tests/cases/compiler/inheritance1.ts(55,1): error TS2322: Type 'Control' is not assignable to type 'Locations': +tests/cases/compiler/inheritance1.ts(55,1): error TS2323: Type 'Control' is not assignable to type 'Locations'. Property 'select' is missing in type 'Control'. -tests/cases/compiler/inheritance1.ts(58,1): error TS2322: Type 'Locations1' is not assignable to type 'SelectableControl': +tests/cases/compiler/inheritance1.ts(58,1): error TS2323: Type 'Locations1' is not assignable to type 'SelectableControl'. Property 'state' is missing in type 'Locations1'. -tests/cases/compiler/inheritance1.ts(59,1): error TS2322: Type 'Locations1' is not assignable to type 'Control': +tests/cases/compiler/inheritance1.ts(59,1): error TS2323: Type 'Locations1' is not assignable to type 'Control'. Property 'state' is missing in type 'Locations1'. -tests/cases/compiler/inheritance1.ts(61,1): error TS2322: Type 'Control' is not assignable to type 'Locations1': +tests/cases/compiler/inheritance1.ts(61,1): error TS2323: Type 'Control' is not assignable to type 'Locations1'. Property 'select' is missing in type 'Control'. @@ -38,15 +38,15 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2322: Type 'Control' is not } class ImageBase extends Control implements SelectableControl{ ~~~~~~~~~ -!!! error TS2421: Class 'ImageBase' incorrectly implements interface 'SelectableControl': -!!! error TS2421: Property 'select' is missing in type 'ImageBase'. +!!! error TS2420: Class 'ImageBase' incorrectly implements interface 'SelectableControl'. +!!! error TS2420: Property 'select' is missing in type 'ImageBase'. } class Image1 extends Control { } class Locations implements SelectableControl { ~~~~~~~~~ -!!! error TS2421: Class 'Locations' incorrectly implements interface 'SelectableControl': -!!! error TS2421: Property 'state' is missing in type 'Locations'. +!!! error TS2420: Class 'Locations' incorrectly implements interface 'SelectableControl'. +!!! error TS2420: Property 'state' is missing in type 'Locations'. select() { } } class Locations1 { @@ -61,8 +61,8 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2322: Type 'Control' is not b = sc; b = c; ~ -!!! error TS2322: Type 'Control' is not assignable to type 'Button': -!!! error TS2322: Property 'select' is missing in type 'Control'. +!!! error TS2323: Type 'Control' is not assignable to type 'Button'. +!!! error TS2323: Property 'select' is missing in type 'Control'. var t: TextBox; sc = t; @@ -70,8 +70,8 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2322: Type 'Control' is not t = sc; t = c; ~ -!!! error TS2322: Type 'Control' is not assignable to type 'TextBox': -!!! error TS2322: Property 'select' is missing in type 'Control'. +!!! error TS2323: Type 'Control' is not assignable to type 'TextBox'. +!!! error TS2323: Property 'select' is missing in type 'Control'. var i: ImageBase; sc = i; @@ -84,8 +84,8 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2322: Type 'Control' is not var i1: Image1; sc = i1; ~~ -!!! error TS2322: Type 'Image1' is not assignable to type 'SelectableControl': -!!! error TS2322: Property 'select' is missing in type 'Image1'. +!!! error TS2323: Type 'Image1' is not assignable to type 'SelectableControl'. +!!! error TS2323: Property 'select' is missing in type 'Image1'. c = i1; i1 = sc; i1 = c; @@ -96,25 +96,25 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2322: Type 'Control' is not !!! error TS2323: Type 'Locations' is not assignable to type 'SelectableControl'. c = l; ~ -!!! error TS2322: Type 'Locations' is not assignable to type 'Control': -!!! error TS2322: Property 'state' is missing in type 'Locations'. +!!! error TS2323: Type 'Locations' is not assignable to type 'Control'. +!!! error TS2323: Property 'state' is missing in type 'Locations'. l = sc; l = c; ~ -!!! error TS2322: Type 'Control' is not assignable to type 'Locations': -!!! error TS2322: Property 'select' is missing in type 'Control'. +!!! error TS2323: Type 'Control' is not assignable to type 'Locations'. +!!! error TS2323: Property 'select' is missing in type 'Control'. var l1: Locations1; sc = l1; ~~ -!!! error TS2322: Type 'Locations1' is not assignable to type 'SelectableControl': -!!! error TS2322: Property 'state' is missing in type 'Locations1'. +!!! error TS2323: Type 'Locations1' is not assignable to type 'SelectableControl'. +!!! error TS2323: Property 'state' is missing in type 'Locations1'. c = l1; ~ -!!! error TS2322: Type 'Locations1' is not assignable to type 'Control': -!!! error TS2322: Property 'state' is missing in type 'Locations1'. +!!! error TS2323: Type 'Locations1' is not assignable to type 'Control'. +!!! error TS2323: Property 'state' is missing in type 'Locations1'. l1 = sc; l1 = c; ~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt index 8bcef0e5a14..84a04107008 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts(7,7): error TS2416: Class 'C' incorrectly extends base class 'B': +tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts(7,7): error TS2415: Class 'C' incorrectly extends base class 'B'. Types have separate declarations of a private property 'myMethod'. @@ -11,8 +11,8 @@ tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts(7,7): error class C extends B { ~ -!!! error TS2416: Class 'C' incorrectly extends base class 'B': -!!! error TS2416: Types have separate declarations of a private property 'myMethod'. +!!! error TS2415: Class 'C' incorrectly extends base class 'B'. +!!! error TS2415: Types have separate declarations of a private property 'myMethod'. private myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt index 7676029fb8b..7486fbc6e8f 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.ts(7,7): error TS2416: Class 'C' incorrectly extends base class 'B': +tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.ts(7,7): error TS2415: Class 'C' incorrectly extends base class 'B'. Property 'myMethod' is private in type 'B' but not in type 'C'. @@ -11,8 +11,8 @@ tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMembe class C extends B { ~ -!!! error TS2416: Class 'C' incorrectly extends base class 'B': -!!! error TS2416: Property 'myMethod' is private in type 'B' but not in type 'C'. +!!! error TS2415: Class 'C' incorrectly extends base class 'B'. +!!! error TS2415: Property 'myMethod' is private in type 'B' but not in type 'C'. public myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt index c5d41868fab..1ef0d8c0cdb 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.ts(7,7): error TS2416: Class 'C' incorrectly extends base class 'B': +tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.ts(7,7): error TS2415: Class 'C' incorrectly extends base class 'B'. Property 'myMethod' is private in type 'C' but not in type 'B'. @@ -11,8 +11,8 @@ tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMembe class C extends B { ~ -!!! error TS2416: Class 'C' incorrectly extends base class 'B': -!!! error TS2416: Property 'myMethod' is private in type 'C' but not in type 'B'. +!!! error TS2415: Class 'C' incorrectly extends base class 'B'. +!!! error TS2415: Property 'myMethod' is private in type 'C' but not in type 'B'. private myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt index 243bcecb57d..54f5fcc2a34 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(7,7): error TS2416: Class 'b' incorrectly extends base class 'a': - Types of property 'x' are incompatible: +tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(7,7): error TS2415: Class 'b' incorrectly extends base class 'a'. + Types of property 'x' are incompatible. Type 'string' is not assignable to type '() => string'. tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(8,9): error TS2423: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor. @@ -15,9 +15,9 @@ tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(8,9): error TS class b extends a { ~ -!!! error TS2416: Class 'b' incorrectly extends base class 'a': -!!! error TS2416: Types of property 'x' are incompatible: -!!! error TS2416: Type 'string' is not assignable to type '() => string'. +!!! error TS2415: Class 'b' incorrectly extends base class 'a'. +!!! error TS2415: Types of property 'x' are incompatible. +!!! error TS2415: Type 'string' is not assignable to type '() => string'. get x() { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt index 3208de26bd4..283e7ce3f18 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(10,7): error TS2416: Class 'b' incorrectly extends base class 'a': - Types of property 'x' are incompatible: +tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(10,7): error TS2415: Class 'b' incorrectly extends base class 'a'. + Types of property 'x' are incompatible. Type '() => string' is not assignable to type 'string'. tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(11,5): error TS2426: Class 'a' defines instance member accessor 'x', but extended class 'b' defines it as instance member function. @@ -22,9 +22,9 @@ tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(11,5): error TS2 class b extends a { ~ -!!! error TS2416: Class 'b' incorrectly extends base class 'a': -!!! error TS2416: Types of property 'x' are incompatible: -!!! error TS2416: Type '() => string' is not assignable to type 'string'. +!!! error TS2415: Class 'b' incorrectly extends base class 'a'. +!!! error TS2415: Types of property 'x' are incompatible. +!!! error TS2415: Type '() => string' is not assignable to type 'string'. x() { ~ !!! error TS2426: Class 'a' defines instance member accessor 'x', but extended class 'b' defines it as instance member function. diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt index eb8b181c1fd..026c2b51ac9 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(11,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(7,7): error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': - Types of property 'x' are incompatible: +tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(7,7): error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. + Types of property 'x' are incompatible. Type 'string' is not assignable to type '() => string'. @@ -14,9 +14,9 @@ tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(7,7): error TS class b extends a { ~ -!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! error TS2418: Types of property 'x' are incompatible: -!!! error TS2418: Type 'string' is not assignable to type '() => string'. +!!! error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. +!!! error TS2417: Types of property 'x' are incompatible. +!!! error TS2417: Type 'string' is not assignable to type '() => string'. static get x() { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt index 46e079217b8..cfe05da8ea4 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(10,7): error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': - Types of property 'x' are incompatible: +tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(10,7): error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. + Types of property 'x' are incompatible. Type '() => string' is not assignable to type 'string'. @@ -21,9 +21,9 @@ tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(10,7): error TS2 class b extends a { ~ -!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! error TS2418: Types of property 'x' are incompatible: -!!! error TS2418: Type '() => string' is not assignable to type 'string'. +!!! error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. +!!! error TS2417: Types of property 'x' are incompatible. +!!! error TS2417: Type '() => string' is not assignable to type 'string'. static x() { return "20"; } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt index 3ecc7a44522..61edfe7fc64 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/inheritanceStaticFuncOverridingProperty.ts(5,7): error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': - Types of property 'x' are incompatible: +tests/cases/compiler/inheritanceStaticFuncOverridingProperty.ts(5,7): error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. + Types of property 'x' are incompatible. Type '() => string' is not assignable to type 'string'. @@ -10,9 +10,9 @@ tests/cases/compiler/inheritanceStaticFuncOverridingProperty.ts(5,7): error TS24 class b extends a { ~ -!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! error TS2418: Types of property 'x' are incompatible: -!!! error TS2418: Type '() => string' is not assignable to type 'string'. +!!! error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. +!!! error TS2417: Types of property 'x' are incompatible. +!!! error TS2417: Type '() => string' is not assignable to type 'string'. static x() { return "20"; } diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt b/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt index 01c276be81c..49dfd2de513 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/inheritanceStaticMembersIncompatible.ts(5,7): error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': - Types of property 'x' are incompatible: +tests/cases/compiler/inheritanceStaticMembersIncompatible.ts(5,7): error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. + Types of property 'x' are incompatible. Type 'number' is not assignable to type 'string'. @@ -10,8 +10,8 @@ tests/cases/compiler/inheritanceStaticMembersIncompatible.ts(5,7): error TS2418: class b extends a { ~ -!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! error TS2418: Types of property 'x' are incompatible: -!!! error TS2418: Type 'number' is not assignable to type 'string'. +!!! error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. +!!! error TS2417: Types of property 'x' are incompatible. +!!! error TS2417: Type 'number' is not assignable to type 'string'. static x: number; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt index f2137aab6f0..22748fda783 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/inheritanceStaticPropertyOverridingMethod.ts(7,7): error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': - Types of property 'x' are incompatible: +tests/cases/compiler/inheritanceStaticPropertyOverridingMethod.ts(7,7): error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. + Types of property 'x' are incompatible. Type 'string' is not assignable to type '() => string'. @@ -12,8 +12,8 @@ tests/cases/compiler/inheritanceStaticPropertyOverridingMethod.ts(7,7): error TS class b extends a { ~ -!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! error TS2418: Types of property 'x' are incompatible: -!!! error TS2418: Type 'string' is not assignable to type '() => string'. +!!! error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. +!!! error TS2417: Types of property 'x' are incompatible. +!!! error TS2417: Type 'string' is not assignable to type '() => string'. static x: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt b/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt index 31816482cb5..0b7e00d95ce 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/inheritedModuleMembersForClodule.ts(7,7): error TS2418: Class static side 'typeof D' incorrectly extends base class static side 'typeof C': - Types of property 'foo' are incompatible: - Type '() => number' is not assignable to type '() => string': +tests/cases/compiler/inheritedModuleMembersForClodule.ts(7,7): error TS2417: Class static side 'typeof D' incorrectly extends base class static side 'typeof C'. + Types of property 'foo' are incompatible. + Type '() => number' is not assignable to type '() => string'. Type 'number' is not assignable to type 'string'. @@ -13,10 +13,10 @@ tests/cases/compiler/inheritedModuleMembersForClodule.ts(7,7): error TS2418: Cla class D extends C { ~ -!!! error TS2418: Class static side 'typeof D' incorrectly extends base class static side 'typeof C': -!!! error TS2418: Types of property 'foo' are incompatible: -!!! error TS2418: Type '() => number' is not assignable to type '() => string': -!!! error TS2418: Type 'number' is not assignable to type 'string'. +!!! error TS2417: Class static side 'typeof D' incorrectly extends base class static side 'typeof C'. +!!! error TS2417: Types of property 'foo' are incompatible. +!!! error TS2417: Type '() => number' is not assignable to type '() => string'. +!!! error TS2417: Type 'number' is not assignable to type 'string'. } module D { diff --git a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt index a7861a136ca..b99efb5e157 100644 --- a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt +++ b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts(13,11): error TS2429: Interface 'E' incorrectly extends interface 'D': - Index signatures are incompatible: +tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts(13,11): error TS2430: Interface 'E' incorrectly extends interface 'D'. + Index signatures are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts(28,11): error TS2429: Interface 'E2' incorrectly extends interface 'D2': - Index signatures are incompatible: +tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts(28,11): error TS2430: Interface 'E2' incorrectly extends interface 'D2'. + Index signatures are incompatible. Type 'number' is not assignable to type 'string'. @@ -21,9 +21,9 @@ tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts(28,11): er } interface E extends A, D { } // error ~ -!!! error TS2429: Interface 'E' incorrectly extends interface 'D': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'E' incorrectly extends interface 'D'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. // Same tests for number indexer @@ -40,6 +40,6 @@ tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts(28,11): er } interface E2 extends A2, D2 { } // error ~~ -!!! error TS2429: Interface 'E2' incorrectly extends interface 'D2': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2430: Interface 'E2' incorrectly extends interface 'D2'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: 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 06d2d76a6e1..4a52cbeecfc 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 TS2322: Type '() => void' is not assignable to type '(x: number) => number': +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/instanceMemberAssignsToClassPrototype.ts(7,9): error TS2323: 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 TS2322: Type '() => void' is not assignable to type '(x: number) => number': -!!! error TS2322: Type 'void' is not assignable to type 'number'. +!!! error TS2323: Type '() => void' is not assignable to type '(x: number) => number'. +!!! error TS2323: 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/instanceSubtypeCheck2.errors.txt b/tests/baselines/reference/instanceSubtypeCheck2.errors.txt index dab3c0279bc..ba93c2ef127 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.errors.txt +++ b/tests/baselines/reference/instanceSubtypeCheck2.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/instanceSubtypeCheck2.ts(5,7): error TS2416: Class 'C2' incorrectly extends base class 'C1': - Types of property 'x' are incompatible: - Type 'string' is not assignable to type 'C2': +tests/cases/compiler/instanceSubtypeCheck2.ts(5,7): error TS2415: Class 'C2' incorrectly extends base class 'C1'. + Types of property 'x' are incompatible. + Type 'string' is not assignable to type 'C2'. Property 'x' is missing in type 'String'. @@ -11,9 +11,9 @@ tests/cases/compiler/instanceSubtypeCheck2.ts(5,7): error TS2416: Class 'C2' class C2 extends C1 { ~~ -!!! error TS2416: Class 'C2' incorrectly extends base class 'C1': -!!! error TS2416: Types of property 'x' are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'C2': -!!! error TS2416: Property 'x' is missing in type 'String'. +!!! error TS2415: Class 'C2' incorrectly extends base class 'C1'. +!!! error TS2415: Types of property 'x' are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'C2'. +!!! error TS2415: Property 'x' is missing in type 'String'. x: string } \ No newline at end of file diff --git a/tests/baselines/reference/intTypeCheck.errors.txt b/tests/baselines/reference/intTypeCheck.errors.txt index 6fdf7ea2aa8..01235160e2f 100644 --- a/tests/baselines/reference/intTypeCheck.errors.txt +++ b/tests/baselines/reference/intTypeCheck.errors.txt @@ -13,14 +13,14 @@ 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 TS2322: Type 'Object' is not assignable to type 'i1': +tests/cases/compiler/intTypeCheck.ts(97,5): error TS2323: 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 TS2322: Type 'Base' is not assignable to type 'i1': +tests/cases/compiler/intTypeCheck.ts(99,5): error TS2323: Type 'Base' is not assignable to type 'i1'. Property 'p' is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(101,5): error TS2322: Type '() => void' is not assignable to type 'i1': +tests/cases/compiler/intTypeCheck.ts(101,5): error TS2323: Type '() => void' is not assignable to type 'i1'. Property 'p' is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(104,5): error TS2322: Type 'boolean' is not assignable to type 'i1': +tests/cases/compiler/intTypeCheck.ts(104,5): error TS2323: 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. @@ -38,27 +38,27 @@ tests/cases/compiler/intTypeCheck.ts(129,5): error TS2323: Type '() => void' is tests/cases/compiler/intTypeCheck.ts(132,5): error TS2323: 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 TS2322: Type 'Object' is not assignable to type 'i4': +tests/cases/compiler/intTypeCheck.ts(139,5): error TS2323: 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 TS2322: Type 'Base' is not assignable to type 'i4': +tests/cases/compiler/intTypeCheck.ts(141,5): error TS2323: Type 'Base' is not assignable to type 'i4'. Index signature is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(143,5): error TS2322: Type '() => void' is not assignable to type 'i4': +tests/cases/compiler/intTypeCheck.ts(143,5): error TS2323: Type '() => void' is not assignable to type 'i4'. Index signature is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(146,5): error TS2322: Type 'boolean' is not assignable to type 'i4': +tests/cases/compiler/intTypeCheck.ts(146,5): error TS2323: 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 TS2322: Type '{}' is not assignable to type 'i5': +tests/cases/compiler/intTypeCheck.ts(152,5): error TS2323: Type '{}' is not assignable to type 'i5'. Property 'p' is missing in type '{}'. -tests/cases/compiler/intTypeCheck.ts(153,5): error TS2322: Type 'Object' is not assignable to type 'i5': +tests/cases/compiler/intTypeCheck.ts(153,5): error TS2323: 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 TS2322: Type 'Base' is not assignable to type 'i5': +tests/cases/compiler/intTypeCheck.ts(155,5): error TS2323: Type 'Base' is not assignable to type 'i5'. Property 'p' is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(157,5): error TS2322: Type '() => void' is not assignable to type 'i5': +tests/cases/compiler/intTypeCheck.ts(157,5): error TS2323: Type '() => void' is not assignable to type 'i5'. Property 'p' is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(160,5): error TS2322: Type 'boolean' is not assignable to type 'i5': +tests/cases/compiler/intTypeCheck.ts(160,5): error TS2323: 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. @@ -66,7 +66,7 @@ tests/cases/compiler/intTypeCheck.ts(166,5): error TS2323: Type '{}' is not assi tests/cases/compiler/intTypeCheck.ts(167,5): error TS2323: 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 TS2322: Type '() => void' is not assignable to type 'i6': +tests/cases/compiler/intTypeCheck.ts(171,5): error TS2323: 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,22): error TS2304: Cannot find name 'i6'. @@ -78,14 +78,14 @@ tests/cases/compiler/intTypeCheck.ts(185,5): error TS2323: Type '() => void' is tests/cases/compiler/intTypeCheck.ts(188,5): error TS2323: 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 TS2322: Type 'Object' is not assignable to type 'i8': +tests/cases/compiler/intTypeCheck.ts(195,5): error TS2323: 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 TS2322: Type 'Base' is not assignable to type 'i8': +tests/cases/compiler/intTypeCheck.ts(197,5): error TS2323: Type 'Base' is not assignable to type 'i8'. Index signature is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(199,5): error TS2322: Type '() => void' is not assignable to type 'i8': +tests/cases/compiler/intTypeCheck.ts(199,5): error TS2323: Type '() => void' is not assignable to type 'i8'. Index signature is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(202,5): error TS2322: Type 'boolean' is not assignable to type 'i8': +tests/cases/compiler/intTypeCheck.ts(202,5): error TS2323: 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 TS2322: Type 'Object' is not assignable to type 'i1': -!!! error TS2322: Property 'p' is missing in type 'Object'. +!!! error TS2323: Type 'Object' is not assignable to type 'i1'. +!!! error TS2323: 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 TS2322: Type 'Base' is not assignable to type 'i1': -!!! error TS2322: Property 'p' is missing in type 'Base'. +!!! error TS2323: Type 'Base' is not assignable to type 'i1'. +!!! error TS2323: Property 'p' is missing in type 'Base'. var obj5: i1 = null; var obj6: i1 = function () { }; ~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i1': -!!! error TS2322: Property 'p' is missing in type '() => void'. +!!! error TS2323: Type '() => void' is not assignable to type 'i1'. +!!! error TS2323: 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 TS2322: Type 'boolean' is not assignable to type 'i1': -!!! error TS2322: Property 'p' is missing in type 'Boolean'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i1'. +!!! error TS2323: Property 'p' is missing in type 'Boolean'. ~~ !!! error TS2304: Cannot find name 'i1'. var obj10: i1 = 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 TS2322: Type 'Object' is not assignable to type 'i4': -!!! error TS2322: Index signature is missing in type 'Object'. +!!! error TS2323: Type 'Object' is not assignable to type 'i4'. +!!! error TS2323: 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 TS2322: Type 'Base' is not assignable to type 'i4': -!!! error TS2322: Index signature is missing in type 'Base'. +!!! error TS2323: Type 'Base' is not assignable to type 'i4'. +!!! error TS2323: Index signature is missing in type 'Base'. var obj38: i4 = null; var obj39: i4 = function () { }; ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i4': -!!! error TS2322: Index signature is missing in type '() => void'. +!!! error TS2323: Type '() => void' is not assignable to type 'i4'. +!!! error TS2323: 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 TS2322: Type 'boolean' is not assignable to type 'i4': -!!! error TS2322: Index signature is missing in type 'Boolean'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i4'. +!!! error TS2323: 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 TS2322: Type '{}' is not assignable to type 'i5': -!!! error TS2322: Property 'p' is missing in type '{}'. +!!! error TS2323: Type '{}' is not assignable to type 'i5'. +!!! error TS2323: Property 'p' is missing in type '{}'. var obj46: i5 = new Object(); ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i5': -!!! error TS2322: Property 'p' is missing in type 'Object'. +!!! error TS2323: Type 'Object' is not assignable to type 'i5'. +!!! error TS2323: 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 TS2322: Type 'Base' is not assignable to type 'i5': -!!! error TS2322: Property 'p' is missing in type 'Base'. +!!! error TS2323: Type 'Base' is not assignable to type 'i5'. +!!! error TS2323: Property 'p' is missing in type 'Base'. var obj49: i5 = null; var obj50: i5 = function () { }; ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i5': -!!! error TS2322: Property 'p' is missing in type '() => void'. +!!! error TS2323: Type '() => void' is not assignable to type 'i5'. +!!! error TS2323: 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 TS2322: Type 'boolean' is not assignable to type 'i5': -!!! error TS2322: Property 'p' is missing in type 'Boolean'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i5'. +!!! error TS2323: Property 'p' is missing in type 'Boolean'. ~~ !!! error TS2304: Cannot find name 'i5'. var obj54: i5 = new {}; @@ -381,8 +381,8 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit var obj60: i6 = null; var obj61: i6 = function () { }; ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i6': -!!! error TS2322: Type 'void' is not assignable to type 'number'. +!!! error TS2323: Type '() => void' is not assignable to type 'i6'. +!!! error TS2323: Type 'void' is not assignable to type 'number'. //var obj62: i6 = function foo() { }; var obj63: i6 = anyVar; var obj64: i6 = new anyVar; @@ -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 TS2322: Type 'Object' is not assignable to type 'i8': -!!! error TS2322: Index signature is missing in type 'Object'. +!!! error TS2323: Type 'Object' is not assignable to type 'i8'. +!!! error TS2323: 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 TS2322: Type 'Base' is not assignable to type 'i8': -!!! error TS2322: Index signature is missing in type 'Base'. +!!! error TS2323: Type 'Base' is not assignable to type 'i8'. +!!! error TS2323: Index signature is missing in type 'Base'. var obj82: i8 = null; var obj83: i8 = function () { }; ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i8': -!!! error TS2322: Index signature is missing in type '() => void'. +!!! error TS2323: Type '() => void' is not assignable to type 'i8'. +!!! error TS2323: 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 TS2322: Type 'boolean' is not assignable to type 'i8': -!!! error TS2322: Index signature is missing in type 'Boolean'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i8'. +!!! error TS2323: 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 bd5a7a46f91..04ae7ea89e4 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.errors.txt +++ b/tests/baselines/reference/interfaceAssignmentCompat.errors.txt @@ -1,8 +1,8 @@ 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 TS2322: Type 'IEye' is not assignable to type 'IFrenchEye': +tests/cases/compiler/interfaceAssignmentCompat.ts(42,13): error TS2323: Type 'IEye' is not assignable to type 'IFrenchEye'. Property 'coleur' is missing in type 'IEye'. -tests/cases/compiler/interfaceAssignmentCompat.ts(44,9): error TS2322: 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[]'. Type 'IEye' is not assignable to type 'IFrenchEye'. @@ -54,13 +54,13 @@ tests/cases/compiler/interfaceAssignmentCompat.ts(44,9): error TS2322: Type 'IEy for (var j=z.length=1;j>=0;j--) { eeks[j]=z[j]; // nope: element assignment ~~~~~~~ -!!! error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye': -!!! error TS2322: Property 'coleur' is missing in type 'IEye'. +!!! error TS2323: Type 'IEye' is not assignable to type 'IFrenchEye'. +!!! error TS2323: Property 'coleur' is missing in type 'IEye'. } eeks=z; // nope: array assignment ~~~~ -!!! error TS2322: Type 'IEye[]' is not assignable to type 'IFrenchEye[]': -!!! error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye'. +!!! error TS2323: Type 'IEye[]' is not assignable to type 'IFrenchEye[]'. +!!! error TS2323: Type 'IEye' is not assignable to type 'IFrenchEye'. return result; } } diff --git a/tests/baselines/reference/interfaceDeclaration1.errors.txt b/tests/baselines/reference/interfaceDeclaration1.errors.txt index 3d7fcb86784..1e8cc0c1e68 100644 --- a/tests/baselines/reference/interfaceDeclaration1.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration1.errors.txt @@ -3,10 +3,10 @@ tests/cases/compiler/interfaceDeclaration1.ts(3,5): error TS2300: Duplicate iden tests/cases/compiler/interfaceDeclaration1.ts(7,5): error TS2300: Duplicate identifier 'item'. tests/cases/compiler/interfaceDeclaration1.ts(8,5): error TS2300: Duplicate identifier 'item'. tests/cases/compiler/interfaceDeclaration1.ts(22,11): error TS2310: Type 'I5' recursively references itself as a base type. -tests/cases/compiler/interfaceDeclaration1.ts(35,7): error TS2421: Class 'C1' incorrectly implements interface 'I3': +tests/cases/compiler/interfaceDeclaration1.ts(35,7): error TS2420: Class 'C1' incorrectly implements interface 'I3'. Property 'prototype' is missing in type 'C1'. tests/cases/compiler/interfaceDeclaration1.ts(41,11): error TS2310: Type 'i8' recursively references itself as a base type. -tests/cases/compiler/interfaceDeclaration1.ts(52,11): error TS2320: Interface 'i12' cannot simultaneously extend types 'i10' and 'i11': +tests/cases/compiler/interfaceDeclaration1.ts(52,11): error TS2320: Interface 'i12' cannot simultaneously extend types 'i10' and 'i11'. Named properties 'foo' of types 'i10' and 'i11' are not identical. @@ -57,8 +57,8 @@ tests/cases/compiler/interfaceDeclaration1.ts(52,11): error TS2320: Interface 'i class C1 implements I3 { ~~ -!!! error TS2421: Class 'C1' incorrectly implements interface 'I3': -!!! error TS2421: Property 'prototype' is missing in type 'C1'. +!!! error TS2420: Class 'C1' incorrectly implements interface 'I3'. +!!! error TS2420: Property 'prototype' is missing in type 'C1'. constructor() { var prototype: number = 3; } @@ -79,6 +79,6 @@ tests/cases/compiler/interfaceDeclaration1.ts(52,11): error TS2320: Interface 'i interface i12 extends i10, i11 { } ~~~ -!!! error TS2320: Interface 'i12' cannot simultaneously extend types 'i10' and 'i11': +!!! error TS2320: Interface 'i12' cannot simultaneously extend types 'i10' and 'i11'. !!! error TS2320: Named properties 'foo' of types 'i10' and 'i11' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceDeclaration3.errors.txt b/tests/baselines/reference/interfaceDeclaration3.errors.txt index d58a77b2e12..a9bd1d42647 100644 --- a/tests/baselines/reference/interfaceDeclaration3.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration3.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/interfaceDeclaration3.ts(6,11): error TS2421: Class 'C1' incorrectly implements interface 'I1': - Types of property 'item' are incompatible: +tests/cases/compiler/interfaceDeclaration3.ts(6,11): error TS2420: Class 'C1' incorrectly implements interface 'I1'. + Types of property 'item' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/interfaceDeclaration3.ts(31,11): error TS2421: Class 'C1' incorrectly implements interface 'I1': - Types of property 'item' are incompatible: +tests/cases/compiler/interfaceDeclaration3.ts(31,11): error TS2420: Class 'C1' incorrectly implements interface 'I1'. + Types of property 'item' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/interfaceDeclaration3.ts(54,11): error TS2429: Interface 'I2' incorrectly extends interface 'I1': - Types of property 'item' are incompatible: +tests/cases/compiler/interfaceDeclaration3.ts(54,11): error TS2430: Interface 'I2' incorrectly extends interface 'I1'. + Types of property 'item' are incompatible. Type 'string' is not assignable to type 'number'. @@ -17,9 +17,9 @@ tests/cases/compiler/interfaceDeclaration3.ts(54,11): error TS2429: Interface 'I interface I2 { item:number; } class C1 implements I1 { ~~ -!!! error TS2421: Class 'C1' incorrectly implements interface 'I1': -!!! error TS2421: Types of property 'item' are incompatible: -!!! error TS2421: Type 'number' is not assignable to type 'string'. +!!! error TS2420: Class 'C1' incorrectly implements interface 'I1'. +!!! error TS2420: Types of property 'item' are incompatible. +!!! error TS2420: Type 'number' is not assignable to type 'string'. public item:number; } class C2 implements I1 { @@ -46,9 +46,9 @@ tests/cases/compiler/interfaceDeclaration3.ts(54,11): error TS2429: Interface 'I } class C1 implements I1 { ~~ -!!! error TS2421: Class 'C1' incorrectly implements interface 'I1': -!!! error TS2421: Types of property 'item' are incompatible: -!!! error TS2421: Type 'number' is not assignable to type 'string'. +!!! error TS2420: Class 'C1' incorrectly implements interface 'I1'. +!!! error TS2420: Types of property 'item' are incompatible. +!!! error TS2420: Type 'number' is not assignable to type 'string'. public item:number; } class C2 implements I1 { @@ -73,7 +73,7 @@ tests/cases/compiler/interfaceDeclaration3.ts(54,11): error TS2429: Interface 'I interface I2 extends I1 { item:string; } ~~ -!!! error TS2429: Interface 'I2' incorrectly extends interface 'I1': -!!! error TS2429: Types of property 'item' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'I2' incorrectly extends interface 'I1'. +!!! error TS2430: Types of property 'item' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceDeclaration4.errors.txt b/tests/baselines/reference/interfaceDeclaration4.errors.txt index 7092cda3dc2..520c0c2cadf 100644 --- a/tests/baselines/reference/interfaceDeclaration4.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration4.errors.txt @@ -1,11 +1,11 @@ tests/cases/compiler/interfaceDeclaration4.ts(39,14): error TS1005: '{' expected. tests/cases/compiler/interfaceDeclaration4.ts(39,18): error TS1005: ';' expected. -tests/cases/compiler/interfaceDeclaration4.ts(18,11): error TS2429: Interface 'I3' incorrectly extends interface 'I1': - Types of property 'item' are incompatible: +tests/cases/compiler/interfaceDeclaration4.ts(18,11): error TS2430: Interface 'I3' incorrectly extends interface 'I1'. + Types of property 'item' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/interfaceDeclaration4.ts(27,7): error TS2421: Class 'C2' incorrectly implements interface 'I4': +tests/cases/compiler/interfaceDeclaration4.ts(27,7): error TS2420: Class 'C2' incorrectly implements interface 'I4'. Property 'item' is missing in type 'C2'. -tests/cases/compiler/interfaceDeclaration4.ts(36,7): error TS2421: Class 'C3' incorrectly implements interface 'I1': +tests/cases/compiler/interfaceDeclaration4.ts(36,7): error TS2420: Class 'C3' incorrectly implements interface 'I1'. Property 'item' is missing in type 'C3'. tests/cases/compiler/interfaceDeclaration4.ts(39,15): error TS2304: Cannot find name 'I1'. @@ -30,9 +30,9 @@ tests/cases/compiler/interfaceDeclaration4.ts(39,15): error TS2304: Cannot find // Negative Case interface I3 extends Foo.I1 { ~~ -!!! error TS2429: Interface 'I3' incorrectly extends interface 'I1': -!!! error TS2429: Types of property 'item' are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'I3' incorrectly extends interface 'I1'. +!!! error TS2430: Types of property 'item' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. item:number; } @@ -43,8 +43,8 @@ tests/cases/compiler/interfaceDeclaration4.ts(39,15): error TS2304: Cannot find // Err - not implemented item class C2 implements I4 { ~~ -!!! error TS2421: Class 'C2' incorrectly implements interface 'I4': -!!! error TS2421: Property 'item' is missing in type 'C2'. +!!! error TS2420: Class 'C2' incorrectly implements interface 'I4'. +!!! error TS2420: Property 'item' is missing in type 'C2'. public token: string; } @@ -55,8 +55,8 @@ tests/cases/compiler/interfaceDeclaration4.ts(39,15): error TS2304: Cannot find class C3 implements Foo.I1 { } ~~ -!!! error TS2421: Class 'C3' incorrectly implements interface 'I1': -!!! error TS2421: Property 'item' is missing in type 'C3'. +!!! error TS2420: Class 'C3' incorrectly implements interface 'I1'. +!!! error TS2420: Property 'item' is missing in type 'C3'. // Negative case interface Foo.I1 { } diff --git a/tests/baselines/reference/interfaceDeclaration6.errors.txt b/tests/baselines/reference/interfaceDeclaration6.errors.txt index 9cf0606d8bf..ab5ac03a31d 100644 --- a/tests/baselines/reference/interfaceDeclaration6.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration6.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/interfaceDeclaration6.ts(3,11): error TS2429: Interface 'i3' incorrectly extends interface 'i1': - Types of property 'foo' are incompatible: +tests/cases/compiler/interfaceDeclaration6.ts(3,11): error TS2430: Interface 'i3' incorrectly extends interface 'i1'. + Types of property 'foo' are incompatible. Type 'string' is not assignable to type 'number'. @@ -8,9 +8,9 @@ tests/cases/compiler/interfaceDeclaration6.ts(3,11): error TS2429: Interface 'i3 interface i2 extends i1 { foo: number; }; interface i3 extends i1 { foo: string; }; ~~ -!!! error TS2429: Interface 'i3' incorrectly extends interface 'i1': -!!! error TS2429: Types of property 'foo' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'i3' incorrectly extends interface 'i1'. +!!! error TS2430: Types of property 'foo' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'number'. interface i4 { bar():any; bar():any; diff --git a/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt index 93d8b7cfa57..d80df216c79 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(5,11): error TS2429: Interface 'I' incorrectly extends interface 'Foo': +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(5,11): error TS2430: Interface 'I' incorrectly extends interface 'Foo'. Property 'x' is private in type 'Foo' but not in type 'I'. tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(15,10): error TS2341: Property 'x' is private and only accessible within class 'Foo'. @@ -10,8 +10,8 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending interface I extends Foo { // error ~ -!!! error TS2429: Interface 'I' incorrectly extends interface 'Foo': -!!! error TS2429: Property 'x' is private in type 'Foo' but not in type 'I'. +!!! error TS2430: Interface 'I' incorrectly extends interface 'Foo'. +!!! error TS2430: Property 'x' is private in type 'Foo' but not in type 'I'. x: string; } diff --git a/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt index f17a1ef3485..c9be8471e8c 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(9,11): error TS2320: Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar': +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(9,11): error TS2320: Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar'. Named properties 'x' of types 'Foo' and 'Bar' are not identical. -tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(12,11): error TS2429: Interface 'I4' incorrectly extends interface 'Bar': +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(12,11): error TS2430: Interface 'I4' incorrectly extends interface 'Bar'. Property 'x' is private in type 'Bar' but not in type 'I4'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(12,11): error TS2429: Interface 'I4' incorrectly extends interface 'Foo': +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(12,11): error TS2430: Interface 'I4' incorrectly extends interface 'Foo'. Property 'x' is private in type 'Foo' but not in type 'I4'. tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(26,10): error TS2341: Property 'x' is private and only accessible within class 'Foo'. tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(27,10): error TS2341: Property 'y' is private and only accessible within class 'Baz'. @@ -19,17 +19,17 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending interface I3 extends Foo, Bar { // error ~~ -!!! error TS2320: Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar': +!!! error TS2320: Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar'. !!! error TS2320: Named properties 'x' of types 'Foo' and 'Bar' are not identical. } interface I4 extends Foo, Bar { // error ~~ -!!! error TS2429: Interface 'I4' incorrectly extends interface 'Bar': -!!! error TS2429: Property 'x' is private in type 'Bar' but not in type 'I4'. +!!! error TS2430: Interface 'I4' incorrectly extends interface 'Bar'. +!!! error TS2430: Property 'x' is private in type 'Bar' but not in type 'I4'. ~~ -!!! error TS2429: Interface 'I4' incorrectly extends interface 'Foo': -!!! error TS2429: Property 'x' is private in type 'Foo' but not in type 'I4'. +!!! error TS2430: Interface 'I4' incorrectly extends interface 'Foo'. +!!! error TS2430: Property 'x' is private in type 'Foo' but not in type 'I4'. x: string; } diff --git a/tests/baselines/reference/interfaceExtendingClassWithProtecteds.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithProtecteds.errors.txt index 1cbc921e1ac..05651c92976 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithProtecteds.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithProtecteds.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds.ts(5,11): error TS2429: Interface 'I' incorrectly extends interface 'Foo': +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds.ts(5,11): error TS2430: Interface 'I' incorrectly extends interface 'Foo'. Property 'x' is protected but type 'I' is not a class derived from 'Foo'. tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds.ts(15,10): error TS2445: Property 'x' is protected and only accessible within class 'Foo' and its subclasses. @@ -10,8 +10,8 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending interface I extends Foo { // error ~ -!!! error TS2429: Interface 'I' incorrectly extends interface 'Foo': -!!! error TS2429: Property 'x' is protected but type 'I' is not a class derived from 'Foo'. +!!! error TS2430: Interface 'I' incorrectly extends interface 'Foo'. +!!! error TS2430: Property 'x' is protected but type 'I' is not a class derived from 'Foo'. x: string; } diff --git a/tests/baselines/reference/interfaceExtendingClassWithProtecteds2.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithProtecteds2.errors.txt index 4e5b6364010..a63dfd6efca 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithProtecteds2.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithProtecteds2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts(9,11): error TS2320: Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar': +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts(9,11): error TS2320: Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar'. Named properties 'x' of types 'Foo' and 'Bar' are not identical. -tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts(12,11): error TS2429: Interface 'I4' incorrectly extends interface 'Bar': +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts(12,11): error TS2430: Interface 'I4' incorrectly extends interface 'Bar'. Property 'x' is protected but type 'I4' is not a class derived from 'Bar'. -tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts(12,11): error TS2429: Interface 'I4' incorrectly extends interface 'Foo': +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts(12,11): error TS2430: Interface 'I4' incorrectly extends interface 'Foo'. Property 'x' is protected but type 'I4' is not a class derived from 'Foo'. tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts(26,10): error TS2445: Property 'x' is protected and only accessible within class 'Foo' and its subclasses. tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts(27,10): error TS2445: Property 'y' is protected and only accessible within class 'Baz' and its subclasses. @@ -19,17 +19,17 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending interface I3 extends Foo, Bar { // error ~~ -!!! error TS2320: Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar': +!!! error TS2320: Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar'. !!! error TS2320: Named properties 'x' of types 'Foo' and 'Bar' are not identical. } interface I4 extends Foo, Bar { // error ~~ -!!! error TS2429: Interface 'I4' incorrectly extends interface 'Bar': -!!! error TS2429: Property 'x' is protected but type 'I4' is not a class derived from 'Bar'. +!!! error TS2430: Interface 'I4' incorrectly extends interface 'Bar'. +!!! error TS2430: Property 'x' is protected but type 'I4' is not a class derived from 'Bar'. ~~ -!!! error TS2429: Interface 'I4' incorrectly extends interface 'Foo': -!!! error TS2429: Property 'x' is protected but type 'I4' is not a class derived from 'Foo'. +!!! error TS2430: Interface 'I4' incorrectly extends interface 'Foo'. +!!! error TS2430: Property 'x' is protected but type 'I4' is not a class derived from 'Foo'. x: string; } diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt index 919bdaea17d..daa91c8822b 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 TS2322: Type 'C' is not assignable to type 'I': +tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(21,1): error TS2323: Type 'C' is not assignable to type 'I'. Property 'other' is missing in type 'C'. -tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(24,1): error TS2322: Type 'I' is not assignable to type 'D': +tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(24,1): error TS2323: Type 'I' is not assignable to type 'D'. Property 'bar' is missing in type 'I'. -tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(27,1): error TS2322: Type 'C' is not assignable to type 'D': +tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(27,1): error TS2323: 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 TS2322: T c = i; i = c; // error ~ -!!! error TS2322: Type 'C' is not assignable to type 'I': -!!! error TS2322: Property 'other' is missing in type 'C'. +!!! error TS2323: Type 'C' is not assignable to type 'I'. +!!! error TS2323: Property 'other' is missing in type 'C'. i = d; d = i; // error ~ -!!! error TS2322: Type 'I' is not assignable to type 'D': -!!! error TS2322: Property 'bar' is missing in type 'I'. +!!! error TS2323: Type 'I' is not assignable to type 'D'. +!!! error TS2323: Property 'bar' is missing in type 'I'. c = d; d = c; // error ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt index a965d7003bb..035fe89cd35 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(10,7): error TS2416: Class 'D' incorrectly extends base class 'C': +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(10,7): error TS2415: Class 'D' incorrectly extends base class 'C'. Types have separate declarations of a private property 'x'. -tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(10,7): error TS2421: Class 'D' incorrectly implements interface 'I': +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(10,7): error TS2420: Class 'D' incorrectly implements interface 'I'. Types have separate declarations of a private property 'x'. -tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(18,7): error TS2416: Class 'D2' incorrectly extends base class 'C': +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(18,7): error TS2415: Class 'D2' incorrectly extends base class 'C'. Types have separate declarations of a private property 'x'. -tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(18,7): error TS2421: Class 'D2' incorrectly implements interface 'I': +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(18,7): error TS2420: Class 'D2' incorrectly implements interface 'I'. Types have separate declarations of a private property 'x'. @@ -20,11 +20,11 @@ tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(18,7): error TS2421: C class D extends C implements I { // error ~ -!!! error TS2416: Class 'D' incorrectly extends base class 'C': -!!! error TS2416: Types have separate declarations of a private property 'x'. +!!! error TS2415: Class 'D' incorrectly extends base class 'C'. +!!! error TS2415: Types have separate declarations of a private property 'x'. ~ -!!! error TS2421: Class 'D' incorrectly implements interface 'I': -!!! error TS2421: Types have separate declarations of a private property 'x'. +!!! error TS2420: Class 'D' incorrectly implements interface 'I'. +!!! error TS2420: Types have separate declarations of a private property 'x'. public foo(x: any) { return x; } private x = 2; private y = 3; @@ -34,11 +34,11 @@ tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(18,7): error TS2421: C class D2 extends C implements I { // error ~~ -!!! error TS2416: Class 'D2' incorrectly extends base class 'C': -!!! error TS2416: Types have separate declarations of a private property 'x'. +!!! error TS2415: Class 'D2' incorrectly extends base class 'C'. +!!! error TS2415: Types have separate declarations of a private property 'x'. ~~ -!!! error TS2421: Class 'D2' incorrectly implements interface 'I': -!!! error TS2421: Types have separate declarations of a private property 'x'. +!!! error TS2420: Class 'D2' incorrectly implements interface 'I'. +!!! error TS2420: Types have separate declarations of a private property 'x'. public foo(x: any) { return x; } private x = ""; other(x: any) { return x; } diff --git a/tests/baselines/reference/interfaceImplementation1.errors.txt b/tests/baselines/reference/interfaceImplementation1.errors.txt index 59a81e66957..5a6b870b55a 100644 --- a/tests/baselines/reference/interfaceImplementation1.errors.txt +++ b/tests/baselines/reference/interfaceImplementation1.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/interfaceImplementation1.ts(12,7): error TS2421: Class 'C1' incorrectly implements interface 'I1': +tests/cases/compiler/interfaceImplementation1.ts(12,7): error TS2420: Class 'C1' incorrectly implements interface 'I1'. Property 'iObj' is private in type 'C1' but not in type 'I1'. -tests/cases/compiler/interfaceImplementation1.ts(12,7): error TS2421: Class 'C1' incorrectly implements interface 'I2': +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'. @@ -19,11 +19,11 @@ tests/cases/compiler/interfaceImplementation1.ts(34,5): error TS2323: Type '() = class C1 implements I1,I2 { ~~ -!!! error TS2421: Class 'C1' incorrectly implements interface 'I1': -!!! error TS2421: Property 'iObj' is private in type 'C1' but not in type 'I1'. +!!! error TS2420: Class 'C1' incorrectly implements interface 'I1'. +!!! error TS2420: Property 'iObj' is private in type 'C1' but not in type 'I1'. ~~ -!!! error TS2421: Class 'C1' incorrectly implements interface 'I2': -!!! error TS2421: Property 'iFn' is private in type 'C1' but not in type 'I2'. +!!! error TS2420: Class 'C1' incorrectly implements interface 'I2'. +!!! error TS2420: Property 'iFn' is private in type 'C1' but not in type 'I2'. private iFn(); private iFn(n?:number, s?:string) { } private iAny:any; diff --git a/tests/baselines/reference/interfaceImplementation2.errors.txt b/tests/baselines/reference/interfaceImplementation2.errors.txt index d723549d8be..eedc3a4f746 100644 --- a/tests/baselines/reference/interfaceImplementation2.errors.txt +++ b/tests/baselines/reference/interfaceImplementation2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/interfaceImplementation2.ts(8,7): error TS2421: Class 'C3' incorrectly implements interface 'I1': +tests/cases/compiler/interfaceImplementation2.ts(8,7): error TS2420: Class 'C3' incorrectly implements interface 'I1'. Property 'iFn' is missing in type 'C3'. @@ -12,8 +12,8 @@ tests/cases/compiler/interfaceImplementation2.ts(8,7): error TS2421: Class 'C3' class C3 implements I1 { ~~ -!!! error TS2421: Class 'C3' incorrectly implements interface 'I1': -!!! error TS2421: Property 'iFn' is missing in type 'C3'. +!!! error TS2420: Class 'C3' incorrectly implements interface 'I1'. +!!! error TS2420: Property 'iFn' is missing in type 'C3'. public iObj:{ }; public iNum:number; public iAny:any; diff --git a/tests/baselines/reference/interfaceImplementation3.errors.txt b/tests/baselines/reference/interfaceImplementation3.errors.txt index 1e5073ac2ee..06baf5d5915 100644 --- a/tests/baselines/reference/interfaceImplementation3.errors.txt +++ b/tests/baselines/reference/interfaceImplementation3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/interfaceImplementation3.ts(8,7): error TS2421: Class 'C4' incorrectly implements interface 'I1': +tests/cases/compiler/interfaceImplementation3.ts(8,7): error TS2420: Class 'C4' incorrectly implements interface 'I1'. Property 'iAny' is missing in type 'C4'. @@ -12,8 +12,8 @@ tests/cases/compiler/interfaceImplementation3.ts(8,7): error TS2421: Class 'C4' class C4 implements I1 { ~~ -!!! error TS2421: Class 'C4' incorrectly implements interface 'I1': -!!! error TS2421: Property 'iAny' is missing in type 'C4'. +!!! error TS2420: Class 'C4' incorrectly implements interface 'I1'. +!!! error TS2420: Property 'iAny' is missing in type 'C4'. public iObj:{ }; public iNum:number; public iFn() { } diff --git a/tests/baselines/reference/interfaceImplementation4.errors.txt b/tests/baselines/reference/interfaceImplementation4.errors.txt index 8a08026b0bb..f50aa4ade97 100644 --- a/tests/baselines/reference/interfaceImplementation4.errors.txt +++ b/tests/baselines/reference/interfaceImplementation4.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/interfaceImplementation4.ts(8,7): error TS2421: Class 'C5' incorrectly implements interface 'I1': +tests/cases/compiler/interfaceImplementation4.ts(8,7): error TS2420: Class 'C5' incorrectly implements interface 'I1'. Property 'iObj' is missing in type 'C5'. @@ -12,8 +12,8 @@ tests/cases/compiler/interfaceImplementation4.ts(8,7): error TS2421: Class 'C5' class C5 implements I1 { ~~ -!!! error TS2421: Class 'C5' incorrectly implements interface 'I1': -!!! error TS2421: Property 'iObj' is missing in type 'C5'. +!!! error TS2420: Class 'C5' incorrectly implements interface 'I1'. +!!! error TS2420: Property 'iObj' is missing in type 'C5'. public iNum:number; public iAny:any; public iFn() { } diff --git a/tests/baselines/reference/interfaceImplementation6.errors.txt b/tests/baselines/reference/interfaceImplementation6.errors.txt index 0965a1c6019..c4c0dcba8ae 100644 --- a/tests/baselines/reference/interfaceImplementation6.errors.txt +++ b/tests/baselines/reference/interfaceImplementation6.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/interfaceImplementation6.ts(9,7): error TS2421: Class 'C2' incorrectly implements interface 'I1': +tests/cases/compiler/interfaceImplementation6.ts(9,7): error TS2420: Class 'C2' incorrectly implements interface 'I1'. Property 'item' is private in type 'C2' but not in type 'I1'. -tests/cases/compiler/interfaceImplementation6.ts(13,7): error TS2421: Class 'C3' incorrectly implements interface 'I1': +tests/cases/compiler/interfaceImplementation6.ts(13,7): error TS2420: Class 'C3' incorrectly implements interface 'I1'. Property 'item' is missing in type 'C3'. @@ -15,15 +15,15 @@ tests/cases/compiler/interfaceImplementation6.ts(13,7): error TS2421: Class 'C3' class C2 implements I1 { ~~ -!!! error TS2421: Class 'C2' incorrectly implements interface 'I1': -!!! error TS2421: Property 'item' is private in type 'C2' but not in type 'I1'. +!!! error TS2420: Class 'C2' incorrectly implements interface 'I1'. +!!! error TS2420: Property 'item' is private in type 'C2' but not in type 'I1'. private item:number; } class C3 implements I1 { ~~ -!!! error TS2421: Class 'C3' incorrectly implements interface 'I1': -!!! error TS2421: Property 'item' is missing in type 'C3'. +!!! error TS2420: Class 'C3' incorrectly implements interface 'I1'. +!!! error TS2420: Property 'item' is missing in type 'C3'. constructor() { var item: number; } diff --git a/tests/baselines/reference/interfaceImplementation7.errors.txt b/tests/baselines/reference/interfaceImplementation7.errors.txt index 9e04892215d..ff1118e5c69 100644 --- a/tests/baselines/reference/interfaceImplementation7.errors.txt +++ b/tests/baselines/reference/interfaceImplementation7.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/interfaceImplementation7.ts(4,11): error TS2320: Interface 'i3' cannot simultaneously extend types 'i1' and 'i2': +tests/cases/compiler/interfaceImplementation7.ts(4,11): error TS2320: Interface 'i3' cannot simultaneously extend types 'i1' and 'i2'. Named properties 'name' of types 'i1' and 'i2' are not identical. -tests/cases/compiler/interfaceImplementation7.ts(7,7): error TS2421: Class 'C1' incorrectly implements interface 'i4': - Types of property 'name' are incompatible: - Type '() => string' is not assignable to type '() => { s: string; n: number; }': - Type 'string' is not assignable to type '{ s: string; n: number; }': +tests/cases/compiler/interfaceImplementation7.ts(7,7): error TS2420: Class 'C1' incorrectly implements interface 'i4'. + Types of property 'name' are incompatible. + Type '() => string' is not assignable to type '() => { s: string; n: number; }'. + Type 'string' is not assignable to type '{ s: string; n: number; }'. Property 's' is missing in type 'String'. @@ -13,17 +13,17 @@ tests/cases/compiler/interfaceImplementation7.ts(7,7): error TS2421: Class 'C1' interface i3 extends i1, i2 { } ~~ -!!! error TS2320: Interface 'i3' cannot simultaneously extend types 'i1' and 'i2': +!!! error TS2320: Interface 'i3' cannot simultaneously extend types 'i1' and 'i2'. !!! error TS2320: Named properties 'name' of types 'i1' and 'i2' are not identical. interface i4 extends i1, i2 { name(): { s: string; n: number; }; } class C1 implements i4 { ~~ -!!! error TS2421: Class 'C1' incorrectly implements interface 'i4': -!!! error TS2421: Types of property 'name' are incompatible: -!!! error TS2421: Type '() => string' is not assignable to type '() => { s: string; n: number; }': -!!! error TS2421: Type 'string' is not assignable to type '{ s: string; n: number; }': -!!! error TS2421: Property 's' is missing in type 'String'. +!!! error TS2420: Class 'C1' incorrectly implements interface 'i4'. +!!! error TS2420: Types of property 'name' are incompatible. +!!! error TS2420: Type '() => string' is not assignable to type '() => { s: string; n: number; }'. +!!! error TS2420: Type 'string' is not assignable to type '{ s: string; n: number; }'. +!!! error TS2420: Property 's' is missing in type 'String'. public name(): string { return ""; } } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceImplementation8.errors.txt b/tests/baselines/reference/interfaceImplementation8.errors.txt index 4d0d06042a1..6b4b8f4a4fa 100644 --- a/tests/baselines/reference/interfaceImplementation8.errors.txt +++ b/tests/baselines/reference/interfaceImplementation8.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/interfaceImplementation8.ts(12,7): error TS2421: Class 'C2' incorrectly implements interface 'i1': +tests/cases/compiler/interfaceImplementation8.ts(12,7): error TS2420: Class 'C2' incorrectly implements interface 'i1'. Property 'name' is private in type 'C2' but not in type 'i1'. -tests/cases/compiler/interfaceImplementation8.ts(21,7): error TS2421: Class 'C5' incorrectly implements interface 'i1': +tests/cases/compiler/interfaceImplementation8.ts(21,7): error TS2420: Class 'C5' incorrectly implements interface 'i1'. Property 'name' is private in type 'C5' but not in type 'i1'. -tests/cases/compiler/interfaceImplementation8.ts(22,7): error TS2421: Class 'C6' incorrectly implements interface 'i1': +tests/cases/compiler/interfaceImplementation8.ts(22,7): error TS2420: Class 'C6' incorrectly implements interface 'i1'. Property 'name' is private in type 'C6' but not in type 'i1'. @@ -20,8 +20,8 @@ tests/cases/compiler/interfaceImplementation8.ts(22,7): error TS2421: Class 'C6' class C2 implements i1 { ~~ -!!! error TS2421: Class 'C2' incorrectly implements interface 'i1': -!!! error TS2421: Property 'name' is private in type 'C2' but not in type 'i1'. +!!! error TS2420: Class 'C2' incorrectly implements interface 'i1'. +!!! error TS2420: Property 'name' is private in type 'C2' but not in type 'i1'. private name:string; } @@ -32,12 +32,12 @@ tests/cases/compiler/interfaceImplementation8.ts(22,7): error TS2421: Class 'C6' class C4 extends C1 implements i1{ } class C5 extends C2 implements i1{ } ~~ -!!! error TS2421: Class 'C5' incorrectly implements interface 'i1': -!!! error TS2421: Property 'name' is private in type 'C5' but not in type 'i1'. +!!! error TS2420: Class 'C5' incorrectly implements interface 'i1'. +!!! error TS2420: Property 'name' is private in type 'C5' but not in type 'i1'. class C6 extends C3 implements i1{ } ~~ -!!! error TS2421: Class 'C6' incorrectly implements interface 'i1': -!!! error TS2421: Property 'name' is private in type 'C6' but not in type 'i1'. +!!! error TS2420: Class 'C6' incorrectly implements interface 'i1'. +!!! error TS2420: Property 'name' is private in type 'C6' but not in type 'i1'. /* 2 diff --git a/tests/baselines/reference/interfaceInheritance.errors.txt b/tests/baselines/reference/interfaceInheritance.errors.txt index e192d0fa2e9..b598ba4a985 100644 --- a/tests/baselines/reference/interfaceInheritance.errors.txt +++ b/tests/baselines/reference/interfaceInheritance.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/interfaceInheritance.ts(22,7): error TS2421: Class 'C1' incorrectly implements interface 'I2': +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 TS2322: Type 'I3' is not assignable to type 'I2': +tests/cases/compiler/interfaceInheritance.ts(30,1): error TS2323: Type 'I3' is not assignable to type 'I2'. Property 'i1P1' is missing in type 'I3'. -tests/cases/compiler/interfaceInheritance.ts(37,1): error TS2322: Type 'I5' is not assignable to type 'I4': - Types of property 'one' are incompatible: +tests/cases/compiler/interfaceInheritance.ts(37,1): error TS2323: 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 TS2322: Type 'I4' is not assignable to type 'I5': - Types of property 'one' are incompatible: +tests/cases/compiler/interfaceInheritance.ts(38,1): error TS2323: Type 'I4' is not assignable to type 'I5'. + Types of property 'one' are incompatible. Type 'number' is not assignable to type 'string'. @@ -34,8 +34,8 @@ tests/cases/compiler/interfaceInheritance.ts(38,1): error TS2322: Type 'I4' is n class C1 implements I2 { // should be an error - it doesn't implement the members of I1 ~~ -!!! error TS2421: Class 'C1' incorrectly implements interface 'I2': -!!! error TS2421: Property 'i1P1' is missing in type 'C1'. +!!! error TS2420: Class 'C1' incorrectly implements interface 'I2'. +!!! error TS2420: Property 'i1P1' is missing in type 'C1'. public i2P1: string; } @@ -45,8 +45,8 @@ tests/cases/compiler/interfaceInheritance.ts(38,1): error TS2322: Type 'I4' is n i1 = i2; i2 = i3; // should be an error - i3 does not implement the members of i1 ~~ -!!! error TS2322: Type 'I3' is not assignable to type 'I2': -!!! error TS2322: Property 'i1P1' is missing in type 'I3'. +!!! error TS2323: Type 'I3' is not assignable to type 'I2'. +!!! error TS2323: Property 'i1P1' is missing in type 'I3'. var c1: C1; @@ -55,13 +55,13 @@ tests/cases/compiler/interfaceInheritance.ts(38,1): error TS2322: Type 'I4' is n i4 = i5; // should be an error ~~ -!!! 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'. +!!! 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'. i5 = i4; // should be an error ~~ -!!! 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceMemberValidation.errors.txt b/tests/baselines/reference/interfaceMemberValidation.errors.txt index ed8b119bbdd..3b2b1d1874c 100644 --- a/tests/baselines/reference/interfaceMemberValidation.errors.txt +++ b/tests/baselines/reference/interfaceMemberValidation.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/interfaceMemberValidation.ts(2,11): error TS2429: Interface 'i2' incorrectly extends interface 'i1': - Types of property 'name' are incompatible: +tests/cases/compiler/interfaceMemberValidation.ts(2,11): error TS2430: Interface 'i2' incorrectly extends interface 'i1'. + Types of property 'name' are incompatible. Type 'number' is not assignable to type 'string'. tests/cases/compiler/interfaceMemberValidation.ts(5,2): error TS2411: Property 'bar' of type '{ (): any; (): any; }' is not assignable to string index type 'number'. tests/cases/compiler/interfaceMemberValidation.ts(10,2): error TS2374: Duplicate string index signature. @@ -9,9 +9,9 @@ tests/cases/compiler/interfaceMemberValidation.ts(10,2): error TS2374: Duplicate interface i1 { name: string; } interface i2 extends i1 { name: number; yo: string; } ~~ -!!! error TS2429: Interface 'i2' incorrectly extends interface 'i1': -!!! error TS2429: Types of property 'name' are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'i2' incorrectly extends interface 'i1'. +!!! error TS2430: Types of property 'name' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. interface foo { bar():any; diff --git a/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt b/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt index 82d4a755d2a..a7df9c15e59 100644 --- a/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt +++ b/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/interfacePropertiesWithSameName2.ts(10,11): error TS2320: Interface 'MoverShaker' cannot simultaneously extend types 'Mover' and 'Shaker': +tests/cases/compiler/interfacePropertiesWithSameName2.ts(10,11): error TS2320: Interface 'MoverShaker' cannot simultaneously extend types 'Mover' and 'Shaker'. Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. -tests/cases/compiler/interfacePropertiesWithSameName2.ts(26,11): error TS2320: Interface 'MoverShaker2' cannot simultaneously extend types 'Mover' and 'Shaker': +tests/cases/compiler/interfacePropertiesWithSameName2.ts(26,11): error TS2320: Interface 'MoverShaker2' cannot simultaneously extend types 'Mover' and 'Shaker'. Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. @@ -16,7 +16,7 @@ tests/cases/compiler/interfacePropertiesWithSameName2.ts(26,11): error TS2320: I interface MoverShaker extends Mover, Shaker { ~~~~~~~~~~~ -!!! error TS2320: Interface 'MoverShaker' cannot simultaneously extend types 'Mover' and 'Shaker': +!!! error TS2320: Interface 'MoverShaker' cannot simultaneously extend types 'Mover' and 'Shaker'. !!! error TS2320: Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. } @@ -35,7 +35,7 @@ tests/cases/compiler/interfacePropertiesWithSameName2.ts(26,11): error TS2320: I interface MoverShaker2 extends MoversAndShakers.Mover, MoversAndShakers.Shaker { } // error ~~~~~~~~~~~~ -!!! error TS2320: Interface 'MoverShaker2' cannot simultaneously extend types 'Mover' and 'Shaker': +!!! error TS2320: Interface 'MoverShaker2' cannot simultaneously extend types 'Mover' and 'Shaker'. !!! error TS2320: Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. interface MoverShaker3 extends MoversAndShakers.Mover, MoversAndShakers.Shaker { diff --git a/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt b/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt index 136a2460b5e..b7dfdffc79e 100644 --- a/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt +++ b/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/interfacePropertiesWithSameName3.ts(3,11): error TS2320: Interface 'F' cannot simultaneously extend types 'E' and 'D': +tests/cases/compiler/interfacePropertiesWithSameName3.ts(3,11): error TS2320: Interface 'F' cannot simultaneously extend types 'E' and 'D'. Named properties 'a' of types 'E' and 'D' are not identical. -tests/cases/compiler/interfacePropertiesWithSameName3.ts(7,11): error TS2320: Interface 'F2' cannot simultaneously extend types 'E2' and 'D2': +tests/cases/compiler/interfacePropertiesWithSameName3.ts(7,11): error TS2320: Interface 'F2' cannot simultaneously extend types 'E2' and 'D2'. Named properties 'a' of types 'E2' and 'D2' are not identical. @@ -9,13 +9,13 @@ tests/cases/compiler/interfacePropertiesWithSameName3.ts(7,11): error TS2320: In interface E { a: string; } interface F extends E, D { } // error ~ -!!! error TS2320: Interface 'F' cannot simultaneously extend types 'E' and 'D': +!!! error TS2320: Interface 'F' cannot simultaneously extend types 'E' and 'D'. !!! error TS2320: Named properties 'a' of types 'E' and 'D' are not identical. class D2 { a: number; } class E2 { a: string; } interface F2 extends E2, D2 { } // error ~~ -!!! error TS2320: Interface 'F2' cannot simultaneously extend types 'E2' and 'D2': +!!! error TS2320: Interface 'F2' cannot simultaneously extend types 'E2' and 'D2'. !!! error TS2320: Named properties 'a' of types 'E2' and 'D2' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt b/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt index dafff4336ba..f66e13c0d9d 100644 --- a/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt +++ b/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseProperty2.ts(5,11): error TS2429: Interface 'Derived' incorrectly extends interface 'Base': - Types of property 'x' are incompatible: - Type '{ a: string; }' is not assignable to type '{ a: number; }': - Types of property 'a' are incompatible: +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseProperty2.ts(5,11): error TS2430: Interface 'Derived' incorrectly extends interface 'Base'. + Types of property 'x' are incompatible. + Type '{ a: string; }' is not assignable to type '{ a: number; }'. + Types of property 'a' are incompatible. Type 'string' is not assignable to type 'number'. @@ -12,11 +12,11 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseP interface Derived extends Base { // error ~~~~~~~ -!!! error TS2429: Interface 'Derived' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'x' are incompatible: -!!! error TS2429: Type '{ a: string; }' is not assignable to type '{ a: number; }': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'Derived' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'x' are incompatible. +!!! error TS2430: Type '{ a: string; }' is not assignable to type '{ a: number; }'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'number'. x: { a: string; }; diff --git a/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt b/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt index 85351b191ec..1562e16df4d 100644 --- a/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt +++ b/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt @@ -1,27 +1,27 @@ -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(21,11): error TS2429: Interface 'Derived2' incorrectly extends interface 'Base2': - Types of property 'x' are incompatible: - Type '{ a: string; b: number; }' is not assignable to type '{ b: string; }': - Types of property 'b' are incompatible: +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(21,11): error TS2430: Interface 'Derived2' incorrectly extends interface 'Base2'. + Types of property 'x' are incompatible. + Type '{ a: string; b: number; }' is not assignable to type '{ b: string; }'. + Types of property 'b' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(52,15): error TS2320: Interface 'Derived3' cannot simultaneously extend types 'Base1' and 'Base2': +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(52,15): error TS2320: Interface 'Derived3' cannot simultaneously extend types 'Base1' and 'Base2'. Named properties 'x' of types 'Base1' and 'Base2' are not identical. -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(54,15): error TS2429: Interface 'Derived4' incorrectly extends interface 'Base1': - Types of property 'x' are incompatible: - Type '{ a: T; b: T; }' is not assignable to type '{ a: number; }': - Types of property 'a' are incompatible: +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(54,15): error TS2430: Interface 'Derived4' incorrectly extends interface 'Base1'. + Types of property 'x' are incompatible. + Type '{ a: T; b: T; }' is not assignable to type '{ a: number; }'. + Types of property 'a' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(54,15): error TS2429: Interface 'Derived4' incorrectly extends interface 'Base2': - Types of property 'x' are incompatible: - Type '{ a: T; b: T; }' is not assignable to type '{ b: number; }': - Types of property 'b' are incompatible: +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(54,15): error TS2430: Interface 'Derived4' incorrectly extends interface 'Base2'. + Types of property 'x' are incompatible. + Type '{ a: T; b: T; }' is not assignable to type '{ b: number; }'. + Types of property 'b' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(60,15): error TS2429: Interface 'Derived5' incorrectly extends interface 'Base1': - Types of property 'x' are incompatible: - Type 'T' is not assignable to type '{ a: T; }': +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(60,15): error TS2430: Interface 'Derived5' incorrectly extends interface 'Base1'. + Types of property 'x' are incompatible. + Type 'T' is not assignable to type '{ a: T; }'. Property 'a' is missing in type '{}'. -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(60,15): error TS2429: Interface 'Derived5' incorrectly extends interface 'Base2': - Types of property 'x' are incompatible: - Type 'T' is not assignable to type '{ b: T; }': +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(60,15): error TS2430: Interface 'Derived5' incorrectly extends interface 'Base2'. + Types of property 'x' are incompatible. + Type 'T' is not assignable to type '{ b: T; }'. Property 'b' is missing in type '{}'. @@ -48,11 +48,11 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBa interface Derived2 extends Base1, Base2 { // error ~~~~~~~~ -!!! error TS2429: Interface 'Derived2' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'x' are incompatible: -!!! error TS2429: Type '{ a: string; b: number; }' is not assignable to type '{ b: string; }': -!!! error TS2429: Types of property 'b' are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'Derived2' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'x' are incompatible. +!!! error TS2430: Type '{ a: string; b: number; }' is not assignable to type '{ b: string; }'. +!!! error TS2430: Types of property 'b' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. x: { a: string; b: number; } @@ -85,22 +85,22 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBa interface Derived3 extends Base1, Base2 { } // error ~~~~~~~~ -!!! error TS2320: Interface 'Derived3' cannot simultaneously extend types 'Base1' and 'Base2': +!!! error TS2320: Interface 'Derived3' cannot simultaneously extend types 'Base1' and 'Base2'. !!! error TS2320: Named properties 'x' of types 'Base1' and 'Base2' are not identical. interface Derived4 extends Base1, Base2 { // error ~~~~~~~~ -!!! error TS2429: Interface 'Derived4' incorrectly extends interface 'Base1': -!!! error TS2429: Types of property 'x' are incompatible: -!!! error TS2429: Type '{ a: T; b: T; }' is not assignable to type '{ a: number; }': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type 'T' is not assignable to type 'number'. +!!! error TS2430: Interface 'Derived4' incorrectly extends interface 'Base1'. +!!! error TS2430: Types of property 'x' are incompatible. +!!! error TS2430: Type '{ a: T; b: T; }' is not assignable to type '{ a: number; }'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type 'T' is not assignable to type 'number'. ~~~~~~~~ -!!! error TS2429: Interface 'Derived4' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'x' are incompatible: -!!! error TS2429: Type '{ a: T; b: T; }' is not assignable to type '{ b: number; }': -!!! error TS2429: Types of property 'b' are incompatible: -!!! error TS2429: Type 'T' is not assignable to type 'number'. +!!! error TS2430: Interface 'Derived4' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'x' are incompatible. +!!! error TS2430: Type '{ a: T; b: T; }' is not assignable to type '{ b: number; }'. +!!! error TS2430: Types of property 'b' are incompatible. +!!! error TS2430: Type 'T' is not assignable to type 'number'. x: { a: T; b: T; } @@ -108,15 +108,15 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBa interface Derived5 extends Base1, Base2 { // error ~~~~~~~~ -!!! error TS2429: Interface 'Derived5' incorrectly extends interface 'Base1': -!!! error TS2429: Types of property 'x' are incompatible: -!!! error TS2429: Type 'T' is not assignable to type '{ a: T; }': -!!! error TS2429: Property 'a' is missing in type '{}'. +!!! error TS2430: Interface 'Derived5' incorrectly extends interface 'Base1'. +!!! error TS2430: Types of property 'x' are incompatible. +!!! error TS2430: Type 'T' is not assignable to type '{ a: T; }'. +!!! error TS2430: Property 'a' is missing in type '{}'. ~~~~~~~~ -!!! error TS2429: Interface 'Derived5' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'x' are incompatible: -!!! error TS2429: Type 'T' is not assignable to type '{ b: T; }': -!!! error TS2429: Property 'b' is missing in type '{}'. +!!! error TS2430: Interface 'Derived5' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'x' are incompatible. +!!! error TS2430: Type 'T' is not assignable to type '{ b: T; }'. +!!! error TS2430: Property 'b' is missing in type '{}'. x: T; } } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt b/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt index 9d60afede0a..b3459233923 100644 --- a/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt +++ b/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts(17,11): error TS2429: Interface 'Derived2' incorrectly extends interface 'Base': - Types of property 'x' are incompatible: - Type '{ a: number; b: string; }' is not assignable to type '{ a?: string; b: string; }': - Types of property 'a' are incompatible: +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts(17,11): error TS2430: Interface 'Derived2' incorrectly extends interface 'Base'. + Types of property 'x' are incompatible. + Type '{ a: number; b: string; }' is not assignable to type '{ a?: string; b: string; }'. + Types of property 'a' are incompatible. Type 'number' is not assignable to type 'string'. @@ -24,11 +24,11 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBa interface Derived2 extends Base, Base2 { // error ~~~~~~~~ -!!! error TS2429: Interface 'Derived2' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'x' are incompatible: -!!! error TS2429: Type '{ a: number; b: string; }' is not assignable to type '{ a?: string; b: string; }': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'Derived2' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'x' are incompatible. +!!! error TS2430: Type '{ a: number; b: string; }' is not assignable to type '{ a?: string; b: string; }'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. x: { a: number; b: string } } diff --git a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt index 60c917d0fbc..79cbd0e6b4e 100644 --- a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt +++ b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts(5,11): error TS2429: Interface 'Foo' incorrectly extends interface 'Base': +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts(5,11): error TS2430: Interface 'Foo' incorrectly extends interface 'Base'. Property 'x' is private in type 'Base' but not in type 'Foo'. -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts(13,11): error TS2429: Interface 'Foo2' incorrectly extends interface 'Base2': +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts(13,11): error TS2430: Interface 'Foo2' incorrectly extends interface 'Base2'. Property 'x' is private in type 'Base2' but not in type 'Foo2'. @@ -11,8 +11,8 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyTh interface Foo extends Base { // error ~~~ -!!! error TS2429: Interface 'Foo' incorrectly extends interface 'Base': -!!! error TS2429: Property 'x' is private in type 'Base' but not in type 'Foo'. +!!! error TS2430: Interface 'Foo' incorrectly extends interface 'Base'. +!!! error TS2430: Property 'x' is private in type 'Base' but not in type 'Foo'. x: number; } @@ -22,7 +22,7 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyTh interface Foo2 extends Base2 { // error ~~~~ -!!! error TS2429: Interface 'Foo2' incorrectly extends interface 'Base2': -!!! error TS2429: Property 'x' is private in type 'Base2' but not in type 'Foo2'. +!!! error TS2430: Interface 'Foo2' incorrectly extends interface 'Base2'. +!!! error TS2430: Property 'x' is private in type 'Base2' but not in type 'Foo2'. x: number; } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt index 4ee4bf8709f..3a31d7dfcbd 100644 --- a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt +++ b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts(5,11): error TS2429: Interface 'Foo' incorrectly extends interface 'Base': +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts(5,11): error TS2430: Interface 'Foo' incorrectly extends interface 'Base'. Property 'x' is private in type 'Base' but not in type 'Foo'. -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts(13,11): error TS2429: Interface 'Foo2' incorrectly extends interface 'Base2': +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts(13,11): error TS2430: Interface 'Foo2' incorrectly extends interface 'Base2'. Property 'x' is private in type 'Base2' but not in type 'Foo2'. @@ -11,8 +11,8 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyTh interface Foo extends Base { // error ~~~ -!!! error TS2429: Interface 'Foo' incorrectly extends interface 'Base': -!!! error TS2429: Property 'x' is private in type 'Base' but not in type 'Foo'. +!!! error TS2430: Interface 'Foo' incorrectly extends interface 'Base'. +!!! error TS2430: Property 'x' is private in type 'Base' but not in type 'Foo'. x(): any; } @@ -22,7 +22,7 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyTh interface Foo2 extends Base2 { // error ~~~~ -!!! error TS2429: Interface 'Foo2' incorrectly extends interface 'Base2': -!!! error TS2429: Property 'x' is private in type 'Base2' but not in type 'Foo2'. +!!! error TS2430: Interface 'Foo2' incorrectly extends interface 'Base2'. +!!! error TS2430: Property 'x' is private in type 'Base2' but not in type 'Foo2'. x(): any; } \ No newline at end of file diff --git a/tests/baselines/reference/invalidBooleanAssignments.errors.txt b/tests/baselines/reference/invalidBooleanAssignments.errors.txt index d7642fa4ace..2a725e0f71d 100644 --- a/tests/baselines/reference/invalidBooleanAssignments.errors.txt +++ b/tests/baselines/reference/invalidBooleanAssignments.errors.txt @@ -2,9 +2,9 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(3, 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 TS2322: Type 'boolean' is not assignable to type 'C': +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(12,5): error TS2323: 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 TS2322: Type 'boolean' is not assignable to type 'I': +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(15,5): error TS2323: 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(21,1): error TS2364: Invalid left-hand side of assignment expression. @@ -34,14 +34,14 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26 class C { foo: string } var f: C = x; ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'C': -!!! error TS2322: Property 'foo' is missing in type 'Boolean'. +!!! error TS2323: Type 'boolean' is not assignable to type 'C'. +!!! error TS2323: Property 'foo' is missing in type 'Boolean'. interface I { bar: string } var g: I = x; ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'I': -!!! error TS2322: Property 'bar' is missing in type 'Boolean'. +!!! error TS2323: Type 'boolean' is not assignable to type 'I'. +!!! error TS2323: Property 'bar' is missing in type 'Boolean'. var h: { (): string } = x; ~ diff --git a/tests/baselines/reference/invalidNumberAssignments.errors.txt b/tests/baselines/reference/invalidNumberAssignments.errors.txt index 641e02683e6..b2f8123c911 100644 --- a/tests/baselines/reference/invalidNumberAssignments.errors.txt +++ b/tests/baselines/reference/invalidNumberAssignments.errors.txt @@ -1,13 +1,13 @@ 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 TS2322: Type 'number' is not assignable to type 'C': +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(9,5): error TS2323: 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 TS2322: Type 'number' is not assignable to type 'I': +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(12,5): error TS2323: 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 TS2322: Type 'number' is not assignable to type '{ baz: string; }': +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(14,5): error TS2323: 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 TS2322: Type 'number' is not assignable to type '{ 0: number; }': +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(15,5): error TS2323: 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'. @@ -31,23 +31,23 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1 class C { foo: string; } var e: C = x; ~ -!!! error TS2322: Type 'number' is not assignable to type 'C': -!!! error TS2322: Property 'foo' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'C'. +!!! error TS2323: Property 'foo' is missing in type 'Number'. interface I { bar: string; } var f: I = x; ~ -!!! error TS2322: Type 'number' is not assignable to type 'I': -!!! error TS2322: Property 'bar' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'I'. +!!! error TS2323: Property 'bar' is missing in type 'Number'. var g: { baz: string } = 1; ~ -!!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }': -!!! error TS2322: Property 'baz' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type '{ baz: string; }'. +!!! error TS2323: Property 'baz' is missing in type 'Number'. var g2: { 0: number } = 1; ~~ -!!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }': -!!! error TS2322: Property '0' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type '{ 0: number; }'. +!!! error TS2323: Property '0' is missing in type 'Number'. module M { export var x = 1; } M = x; diff --git a/tests/baselines/reference/invalidReturnStatements.errors.txt b/tests/baselines/reference/invalidReturnStatements.errors.txt index ed15e4543aa..c32f266c0e7 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 TS2322: Type '{ id: number; }' is not assignable to type 'D': +tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(16,29): error TS2323: 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 TS2322: Type 'C' is not assignable to type 'D': +tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(18,29): error TS2323: 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 TS2322: Type '{ id: number; }' is not assignable to type 'D': -!!! error TS2322: Property 'name' is missing in type '{ id: number; }'. +!!! error TS2323: Type '{ id: number; }' is not assignable to type 'D'. +!!! error TS2323: Property 'name' is missing in type '{ id: number; }'. function fn11(): D { return new C(); } ~~~~~~~ -!!! error TS2322: Type 'C' is not assignable to type 'D': -!!! error TS2322: Property 'name' is missing in type 'C'. +!!! error TS2323: Type 'C' is not assignable to type 'D'. +!!! error TS2323: 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 eca680b23cd..7e73f9b634b 100644 --- a/tests/baselines/reference/invalidStringAssignments.errors.txt +++ b/tests/baselines/reference/invalidStringAssignments.errors.txt @@ -1,13 +1,13 @@ 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 TS2322: Type 'string' is not assignable to type 'C': +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(9,5): error TS2323: 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 TS2322: Type 'string' is not assignable to type 'I': +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(12,5): error TS2323: 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 TS2322: Type 'number' is not assignable to type '{ baz: string; }': +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(14,5): error TS2323: 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 TS2322: Type 'number' is not assignable to type '{ 0: number; }': +tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(15,5): error TS2323: 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'. @@ -32,23 +32,23 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5 class C { foo: string; } var e: C = x; ~ -!!! error TS2322: Type 'string' is not assignable to type 'C': -!!! error TS2322: Property 'foo' is missing in type 'String'. +!!! error TS2323: Type 'string' is not assignable to type 'C'. +!!! error TS2323: Property 'foo' is missing in type 'String'. interface I { bar: string; } var f: I = x; ~ -!!! error TS2322: Type 'string' is not assignable to type 'I': -!!! error TS2322: Property 'bar' is missing in type 'String'. +!!! error TS2323: Type 'string' is not assignable to type 'I'. +!!! error TS2323: Property 'bar' is missing in type 'String'. var g: { baz: string } = 1; ~ -!!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }': -!!! error TS2322: Property 'baz' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type '{ baz: string; }'. +!!! error TS2323: Property 'baz' is missing in type 'Number'. var g2: { 0: number } = 1; ~~ -!!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }': -!!! error TS2322: Property '0' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type '{ 0: number; }'. +!!! error TS2323: Property '0' is missing in type 'Number'. module M { export var x = 1; } M = x; diff --git a/tests/baselines/reference/invalidVoidAssignments.errors.txt b/tests/baselines/reference/invalidVoidAssignments.errors.txt index 4ec170717b9..5dc20a63f3a 100644 --- a/tests/baselines/reference/invalidVoidAssignments.errors.txt +++ b/tests/baselines/reference/invalidVoidAssignments.errors.txt @@ -3,9 +3,9 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(4,5): er 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 TS2322: Type 'number' is not assignable to type '{ baz: string; }': +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(14,5): error TS2323: 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 TS2322: Type 'number' is not assignable to type '{ 0: number; }': +tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(15,5): error TS2323: 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'. @@ -41,12 +41,12 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e var g: { baz: string } = 1; ~ -!!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }': -!!! error TS2322: Property 'baz' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type '{ baz: string; }'. +!!! error TS2323: Property 'baz' is missing in type 'Number'. var g2: { 0: number } = 1; ~~ -!!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }': -!!! error TS2322: Property '0' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type '{ 0: number; }'. +!!! error TS2323: Property '0' is missing in type 'Number'. module M { export var x = 1; } M = x; diff --git a/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt b/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt index 39e5cfaa834..0e5e9e540be 100644 --- a/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt +++ b/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/lastPropertyInLiteralWins.ts(8,5): error TS2300: Duplicate identifier 'thunk'. tests/cases/compiler/lastPropertyInLiteralWins.ts(9,5): error TS2300: Duplicate identifier 'thunk'. tests/cases/compiler/lastPropertyInLiteralWins.ts(12,6): error TS2345: Argument of type '{ thunk: (num: number) => void; }' is not assignable to parameter of type 'Thing'. - Types of property 'thunk' are incompatible: - Type '(num: number) => void' is not assignable to type '(str: string) => void': - Types of parameters 'num' and 'str' are incompatible: + Types of property 'thunk' are incompatible. + Type '(num: number) => void' is not assignable to type '(str: string) => void'. + Types of parameters 'num' and 'str' are incompatible. Type 'number' is not assignable to type 'string'. tests/cases/compiler/lastPropertyInLiteralWins.ts(13,5): error TS2300: Duplicate identifier 'thunk'. tests/cases/compiler/lastPropertyInLiteralWins.ts(14,5): error TS2300: Duplicate identifier 'thunk'. @@ -38,8 +38,8 @@ tests/cases/compiler/lastPropertyInLiteralWins.ts(14,5): error TS2300: Duplicate }); ~ !!! error TS2345: Argument of type '{ thunk: (num: number) => void; }' is not assignable to parameter of type 'Thing'. -!!! error TS2345: Types of property 'thunk' are incompatible: -!!! error TS2345: Type '(num: number) => void' is not assignable to type '(str: string) => void': -!!! error TS2345: Types of parameters 'num' and 'str' are incompatible: +!!! error TS2345: Types of property 'thunk' are incompatible. +!!! error TS2345: Type '(num: number) => void' is not assignable to type '(str: string) => void'. +!!! error TS2345: Types of parameters 'num' and 'str' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt index f1ee1f383bf..92d4cb17e72 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts(13,7): error TS2421: Class 'D' incorrectly implements interface 'A': +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts(13,7): error TS2420: Class 'D' incorrectly implements interface 'A'. Types have separate declarations of a private property 'x'. -tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts(19,7): error TS2421: Class 'E' incorrectly implements interface 'A': +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts(19,7): error TS2420: Class 'E' incorrectly implements interface 'A'. Property 'x' is private in type 'A' but not in type 'E'. tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts(26,9): error TS2341: Property 'x' is private and only accessible within class 'C'. @@ -20,8 +20,8 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri class D implements A { // error ~ -!!! error TS2421: Class 'D' incorrectly implements interface 'A': -!!! error TS2421: Types have separate declarations of a private property 'x'. +!!! error TS2420: Class 'D' incorrectly implements interface 'A'. +!!! error TS2420: Types have separate declarations of a private property 'x'. private x: number; y: string; z: string; @@ -29,8 +29,8 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri class E implements A { // error ~ -!!! error TS2421: Class 'E' incorrectly implements interface 'A': -!!! error TS2421: Property 'x' is private in type 'A' but not in type 'E'. +!!! error TS2420: Class 'E' incorrectly implements interface 'A'. +!!! error TS2420: Property 'x' is private in type 'A' but not in type 'E'. x: number; y: string; z: string; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt index 0ca3b4c3aa2..8fc1f0fe819 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(17,7): error TS2421: Class 'D' incorrectly implements interface 'A': +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(17,7): error TS2420: Class 'D' incorrectly implements interface 'A'. Types have separate declarations of a private property 'w'. -tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(23,7): error TS2416: Class 'E' incorrectly extends base class 'C2': +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(23,7): error TS2415: Class 'E' incorrectly extends base class 'C2'. Property 'w' is private in type 'C2' but not in type 'E'. -tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(23,7): error TS2421: Class 'E' incorrectly implements interface 'A': +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(23,7): error TS2420: Class 'E' incorrectly implements interface 'A'. Property 'x' is missing in type 'E'. tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(30,9): error TS2341: Property 'x' is private and only accessible within class 'C'. tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(31,10): error TS2341: Property 'w' is private and only accessible within class 'C2'. @@ -27,8 +27,8 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri class D extends C implements A { // error ~ -!!! error TS2421: Class 'D' incorrectly implements interface 'A': -!!! error TS2421: Types have separate declarations of a private property 'w'. +!!! error TS2420: Class 'D' incorrectly implements interface 'A'. +!!! error TS2420: Types have separate declarations of a private property 'w'. private w: number; y: string; z: string; @@ -36,11 +36,11 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri class E extends C2 implements A { // error ~ -!!! error TS2416: Class 'E' incorrectly extends base class 'C2': -!!! error TS2416: Property 'w' is private in type 'C2' but not in type 'E'. +!!! error TS2415: Class 'E' incorrectly extends base class 'C2'. +!!! error TS2415: Property 'w' is private in type 'C2' but not in type 'E'. ~ -!!! error TS2421: Class 'E' incorrectly implements interface 'A': -!!! error TS2421: Property 'x' is missing in type 'E'. +!!! error TS2420: Class 'E' incorrectly implements interface 'A'. +!!! error TS2420: Property 'x' is missing in type 'E'. w: number; y: string; z: string; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt index 0fadcfde588..4c49e6beb0c 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'. Named properties 'x' of types 'C' and 'C2' are not identical. -tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts(31,15): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts(31,15): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'. Named properties 'x' of types 'C' and 'C2' are not identical. @@ -15,7 +15,7 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri interface A extends C { // error ~ -!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'. !!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } @@ -40,7 +40,7 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri interface A extends C { // error, privates conflict ~ -!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'. !!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } diff --git a/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt b/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt index 3687a0b79e8..1e11dc792f1 100644 --- a/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases4.ts(19,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C': +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases4.ts(19,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C'. Named properties 'a' of types 'C' and 'C' are not identical. @@ -23,7 +23,7 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultip interface A extends C, C3 { // error ~ -!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C': +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C'. !!! error TS2320: Named properties 'a' of types 'C' and 'C' are not identical. y: T; } diff --git a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt index cc93b716d2e..2fb7bd1bfbb 100644 --- a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt +++ b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/mismatchedExplicitTypeParameterAndArgumentType.ts(10,30): error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'. - 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/mismatchedExplicitTypeParameterAndArgumentType.ts(11,11): error TS2346: Supplied parameters do not match any signature of call target. @@ -17,7 +17,7 @@ tests/cases/compiler/mismatchedExplicitTypeParameterAndArgumentType.ts(11,11): e var r7 = map([1, ""], (x) => x.toString()); // error ~~~~~~~ !!! error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'. -!!! error TS2345: Type 'string | number' is not assignable to type 'number': +!!! error TS2345: Type 'string | number' is not assignable to type 'number'. !!! error TS2345: Type 'string' is not assignable to type 'number'. var r7b = map([1, ""], (x) => x.toString()); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/multiLineErrors.errors.txt b/tests/baselines/reference/multiLineErrors.errors.txt index 1f28f758c38..f0f5070269b 100644 --- a/tests/baselines/reference/multiLineErrors.errors.txt +++ b/tests/baselines/reference/multiLineErrors.errors.txt @@ -1,8 +1,8 @@ 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 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: +tests/cases/compiler/multiLineErrors.ts(21,1): error TS2323: 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. Type 'string' is not assignable to type 'number'. @@ -34,9 +34,9 @@ tests/cases/compiler/multiLineErrors.ts(21,1): error TS2322: Type 'A2' is not as var t2: A2; t1 = t2; ~~ -!!! 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt b/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt index d815861d7fb..633f544a67b 100644 --- a/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt +++ b/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/multipleBaseInterfaesWithIncompatibleProperties.ts(6,11): error TS2320: Interface 'C' cannot simultaneously extend types 'A' and 'A': +tests/cases/compiler/multipleBaseInterfaesWithIncompatibleProperties.ts(6,11): error TS2320: Interface 'C' cannot simultaneously extend types 'A' and 'A'. Named properties 'x' of types 'A' and 'A' are not identical. @@ -10,6 +10,6 @@ tests/cases/compiler/multipleBaseInterfaesWithIncompatibleProperties.ts(6,11): e interface C extends A, A { } ~ -!!! error TS2320: Interface 'C' cannot simultaneously extend types 'A' and 'A': +!!! error TS2320: Interface 'C' cannot simultaneously extend types 'A' and 'A'. !!! error TS2320: Named properties 'x' of types 'A' and 'A' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/multipleInheritance.errors.txt b/tests/baselines/reference/multipleInheritance.errors.txt index b482e0a125e..b15a6978ef5 100644 --- a/tests/baselines/reference/multipleInheritance.errors.txt +++ b/tests/baselines/reference/multipleInheritance.errors.txt @@ -2,8 +2,8 @@ tests/cases/compiler/multipleInheritance.ts(9,19): error TS1005: '{' expected. tests/cases/compiler/multipleInheritance.ts(9,24): error TS1005: ';' expected. tests/cases/compiler/multipleInheritance.ts(18,19): error TS1005: '{' expected. tests/cases/compiler/multipleInheritance.ts(18,24): error TS1005: ';' expected. -tests/cases/compiler/multipleInheritance.ts(34,7): error TS2416: Class 'Baad' incorrectly extends base class 'Good': - Types of property 'g' are incompatible: +tests/cases/compiler/multipleInheritance.ts(34,7): error TS2415: Class 'Baad' incorrectly extends base class 'Good'. + Types of property 'g' are incompatible. Type '(n: number) => number' is not assignable to type '() => number'. tests/cases/compiler/multipleInheritance.ts(35,12): error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. @@ -52,9 +52,9 @@ tests/cases/compiler/multipleInheritance.ts(35,12): error TS2425: Class 'Good' d class Baad extends Good { ~~~~ -!!! error TS2416: Class 'Baad' incorrectly extends base class 'Good': -!!! error TS2416: Types of property 'g' are incompatible: -!!! error TS2416: Type '(n: number) => number' is not assignable to type '() => number'. +!!! error TS2415: Class 'Baad' incorrectly extends base class 'Good'. +!!! error TS2415: Types of property 'g' are incompatible. +!!! error TS2415: Type '(n: number) => number' is not assignable to type '() => number'. public f(): number { return 0; } ~ !!! error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. diff --git a/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt b/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt index ac52b2365ee..66a7773ab49 100644 --- a/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt +++ b/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/noImplicitAnyInCastExpression.ts(16,2): error TS2353: Neither type '{ c: null; }' nor type 'IFoo' is assignable to the other: +tests/cases/compiler/noImplicitAnyInCastExpression.ts(16,2): error TS2352: Neither type '{ c: null; }' nor type 'IFoo' is assignable to the other. Property 'a' is missing in type '{ c: null; }'. @@ -20,5 +20,5 @@ tests/cases/compiler/noImplicitAnyInCastExpression.ts(16,2): error TS2353: Neith // Neither types is assignable to each other ({ c: null }); ~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type '{ c: null; }' nor type 'IFoo' is assignable to the other: -!!! error TS2353: Property 'a' is missing in type '{ c: null; }'. \ No newline at end of file +!!! error TS2352: Neither type '{ c: null; }' nor type 'IFoo' is assignable to the other. +!!! error TS2352: Property 'a' is missing in type '{ c: null; }'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt index 9965709713d..6e3a7cf50c8 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt @@ -7,9 +7,9 @@ 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 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': +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; }'. + Index signatures are incompatible. + Type 'string | number' is not assignable to type 'string'. Type 'number' is not assignable to type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(88,9): error TS2304: Cannot find name 'Myn'. @@ -108,10 +108,10 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo // error var b: { [x: number]: 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'. +!!! 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'. a: '', b: 1, c: () => { }, diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt index 327a09d8813..adda2ec61d5 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt @@ -1,9 +1,9 @@ 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 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': +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; }'. + 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 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'. +!!! 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'. 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 cd800042c4b..15ab0d557b0 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 TS2322: Type 'number' is not assignable to type 'Foo': +tests/cases/compiler/numericIndexerConstraint1.ts(3,5): error TS2323: 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 TS2322: Type 'numb var x: { [index: string]: number; }; var result: Foo = x["one"]; // error ~~~~~~ -!!! error TS2322: Type 'number' is not assignable to type 'Foo': -!!! error TS2322: Property 'foo' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'Foo'. +!!! error TS2323: 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 b31688ca349..cb65a5bffcc 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 TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }': +tests/cases/compiler/numericIndexerConstraint2.ts(4,1): error TS2323: 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 TS2322: Type '{ on var a: { one: number; }; x = a; ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/numericIndexerConstraint5.errors.txt b/tests/baselines/reference/numericIndexerConstraint5.errors.txt index 4cccdf0d30b..5bccc56ce0d 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 TS2322: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }': +tests/cases/compiler/numericIndexerConstraint5.ts(2,5): error TS2323: 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 TS2322: Type '{ 0: var x = { name: "x", 0: new Date() }; var z: { [name: number]: string } = x; ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt index 25f51e89882..9fa3e39919a 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 TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }': +tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2323: 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 TS2322: Type // Shouldn't compile var x: { a: number; } = { b: 5 }; ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt b/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt index 761cd24c1a0..0d064af3935 100644 --- a/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt +++ b/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/objectLitTargetTypeCallSite.ts(5,9): error TS2345: Argument of type '{ a: boolean; b: string; }' is not assignable to parameter of type '{ a: number; b: string; }'. - Types of property 'a' are incompatible: + Types of property 'a' are incompatible. Type 'boolean' is not assignable to type 'number'. @@ -11,5 +11,5 @@ tests/cases/compiler/objectLitTargetTypeCallSite.ts(5,9): error TS2345: Argument process({a:true,b:"y"}); ~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ a: boolean; b: string; }' is not assignable to parameter of type '{ a: number; b: string; }'. -!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Types of property 'a' are incompatible. !!! error TS2345: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt index 18aa2c63160..7cd580a219b 100644 --- a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt +++ b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt @@ -1,6 +1,6 @@ -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': +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; }'. + Index signatures are incompatible. + Type 'A' is not assignable to type 'B'. Property 'y' is missing in type 'A'. @@ -19,8 +19,8 @@ tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{ var o1: { [s: string]: A;[n: number]: B; } = { x: b, 0: a }; // both indexers are A ~~ -!!! 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': -!!! error TS2322: Property 'y' is missing in type '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 TS2323: Property 'y' is missing in type 'A'. 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 00f724ee0a7..b3b1c6ec6f0 100644 --- a/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt +++ b/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/objectLiteralWithNumericPropertyName.ts(4,5): error TS2322: Type '{ 0: number; }' is not assignable to type 'A': - Types of property '0' are incompatible: +tests/cases/compiler/objectLiteralWithNumericPropertyName.ts(4,5): error TS2323: 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 TS2322: } var x: A = { ~ -!!! 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'. +!!! 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'. 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 42395ccf0b5..3568899773e 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt @@ -1,14 +1,14 @@ -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': +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(7,1): error TS2323: 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 TS2322: Type 'C' is not assignable to type 'Object': - Types of property 'toString' are incompatible: - 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'. + 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 TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object': - Types of property 'toString' are incompatible: - 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'. + 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 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'. +!!! 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'. i = o; // ok class C { @@ -33,10 +33,10 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC var c: C; o = c; // error ~ -!!! 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'. +!!! 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'. c = o; // ok var a = { @@ -44,8 +44,8 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC } o = a; // error ~ -!!! 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'. +!!! 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'. 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 4a64f34aa5e..3eed6774826 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt @@ -1,22 +1,22 @@ -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': +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(7,1): error TS2323: 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 TS2322: Type 'Object' is not assignable to type 'I': - Types of property 'toString' are incompatible: - Type '() => string' is not assignable to type '() => number': +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(8,1): error TS2323: 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 TS2322: Type 'C' is not assignable to type 'Object': - Types of property 'toString' are incompatible: - Type '() => number' is not assignable to type '() => string': +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(14,1): error TS2323: 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 TS2322: Type 'Object' is not assignable to type 'C': - Types of property 'toString' are incompatible: - Type '() => string' is not assignable to type '() => number': +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(15,1): error TS2323: 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 TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object': - Types of property 'toString' are incompatible: - Type '() => void' is not assignable to type '() => string': +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(20,1): error TS2323: 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 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'. +!!! 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'. i = o; // error ~ -!!! 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'. +!!! 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'. class C { toString(): number { return 1; } @@ -46,24 +46,24 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC var c: C; o = c; // error ~ -!!! 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'. +!!! 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'. c = o; // error ~ -!!! 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'. +!!! 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'. var a = { toString: () => { } } o = a; // error ~ -!!! 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'. +!!! 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'. a = o; // ok \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt index 6a6fe5965fc..11698f0a51c 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 TS2322: Type 'List' is not assignable to type 'List': +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty.ts(13,1): error TS2323: 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 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 +!!! 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 diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt index bcabfeaa183..53a32b6aad5 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 TS2322: Type 'List' is not assignable to type 'List': +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty2.ts(13,1): error TS2323: 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 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 +!!! 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 diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt index 9dc658d1850..20951b6571e 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt @@ -1,8 +1,8 @@ -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: +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(20,1): error TS2323: 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 TS2322: Type 'MyList' is not assignable to type 'List': - Types of property 'data' are incompatible: +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(22,1): error TS2323: 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'. @@ -35,15 +35,15 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec list1 = myList1; // error, not nominally equal list1 = myList2; // error, type mismatch ~~~~~ -!!! 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'. +!!! 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'. list2 = myList1; // error, not nominally equal ~~~~~ -!!! 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'. +!!! 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'. list2 = myList2; // error, type mismatch var rList1 = new List>(); diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.errors.txt b/tests/baselines/reference/objectTypesIdentityWithPrivates3.errors.txt index c950b935130..9cbaa730022 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts(25,1): error TS2353: Neither type 'C3' nor type 'C4' is assignable to the other: +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts(25,1): error TS2352: Neither type 'C3' nor type 'C4' is assignable to the other. Property 'y' is missing in type 'C3'. @@ -29,5 +29,5 @@ tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectType var c3: C3; c3; // Should fail (private x originates in the same declaration, but different types) ~~~~~~ -!!! error TS2353: Neither type 'C3' nor type 'C4' is assignable to the other: -!!! error TS2353: Property 'y' is missing in type 'C3'. \ No newline at end of file +!!! error TS2352: Neither type 'C3' nor type 'C4' is assignable to the other. +!!! error TS2352: Property 'y' is missing in type 'C3'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt b/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt index a930e9f7657..c1c687f345a 100644 --- a/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt +++ b/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt @@ -1,7 +1,7 @@ -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: +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'. + 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. Type 'number' is not assignable to type 'string'. @@ -14,9 +14,9 @@ tests/cases/compiler/optionalFunctionArgAssignability.ts(7,1): error TS2322: 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 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt b/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt index f6e9cd01761..a3c76815e30 100644 --- a/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt +++ b/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt @@ -1,5 +1,5 @@ -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: +tests/cases/compiler/optionalParamAssignmentCompat.ts(10,5): error TS2323: 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 TS2322: Type var c: I1 = i2.p1; // should be ok var d: I1 = i2.m1; // should error ~ -!!! 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamTypeComparison.errors.txt b/tests/baselines/reference/optionalParamTypeComparison.errors.txt index 29ecc73509f..c3fe7cc5d5d 100644 --- a/tests/baselines/reference/optionalParamTypeComparison.errors.txt +++ b/tests/baselines/reference/optionalParamTypeComparison.errors.txt @@ -1,8 +1,8 @@ -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: +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'. + Types of parameters 'b' and 'n' are incompatible. Type 'boolean' is not assignable to type 'number'. -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: +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'. + 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 TS2322: Type '(s f = g; ~ -!!! 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'. +!!! 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'. g = f; ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/optionalPropertiesInClasses.errors.txt b/tests/baselines/reference/optionalPropertiesInClasses.errors.txt index d1193270c0c..7e27dea4df9 100644 --- a/tests/baselines/reference/optionalPropertiesInClasses.errors.txt +++ b/tests/baselines/reference/optionalPropertiesInClasses.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/optionalPropertiesInClasses.ts(10,7): error TS2421: Class 'C2' incorrectly implements interface 'ifoo': +tests/cases/compiler/optionalPropertiesInClasses.ts(10,7): error TS2420: Class 'C2' incorrectly implements interface 'ifoo'. Property 'y' is missing in type 'C2'. @@ -14,8 +14,8 @@ tests/cases/compiler/optionalPropertiesInClasses.ts(10,7): error TS2421: Class ' class C2 implements ifoo { // ERROR - still need 'y' ~~ -!!! error TS2421: Class 'C2' incorrectly implements interface 'ifoo': -!!! error TS2421: Property 'y' is missing in type 'C2'. +!!! error TS2420: Class 'C2' incorrectly implements interface 'ifoo'. +!!! error TS2420: Property 'y' is missing in type 'C2'. public x:number; } diff --git a/tests/baselines/reference/optionalPropertiesTest.errors.txt b/tests/baselines/reference/optionalPropertiesTest.errors.txt index 74b8dd7a73a..1059d05abea 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 TS2322: Type '{ name: string; }' is not assignable to type 'IFoo': +tests/cases/compiler/optionalPropertiesTest.ts(14,1): error TS2323: 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 TS2322: Type '{}' is not assignable to type 'i1': +tests/cases/compiler/optionalPropertiesTest.ts(25,5): error TS2323: Type '{}' is not assignable to type 'i1'. Property 'M' is missing in type '{}'. -tests/cases/compiler/optionalPropertiesTest.ts(26,5): error TS2322: Type '{}' is not assignable to type 'i3': +tests/cases/compiler/optionalPropertiesTest.ts(26,5): error TS2323: Type '{}' is not assignable to type 'i3'. Property 'M' is missing in type '{}'. -tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2322: Type 'i2' is not assignable to type 'i1': +tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2323: 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 TS2322: Type 'i2' is foo = { id: 1234, name: "test" }; // Ok foo = { name: "test" }; // Error, id missing ~~~ -!!! error TS2322: Type '{ name: string; }' is not assignable to type 'IFoo': -!!! error TS2322: Property 'id' is missing in type '{ name: string; }'. +!!! error TS2323: Type '{ name: string; }' is not assignable to type 'IFoo'. +!!! error TS2323: 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 TS2322: Type 'i2' is var test1: i1 = {}; ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i1': -!!! error TS2322: Property 'M' is missing in type '{}'. +!!! error TS2323: Type '{}' is not assignable to type 'i1'. +!!! error TS2323: Property 'M' is missing in type '{}'. var test2: i3 = {}; ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i3': -!!! error TS2322: Property 'M' is missing in type '{}'. +!!! error TS2323: Type '{}' is not assignable to type 'i3'. +!!! error TS2323: 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 TS2322: Type 'i2' is var test10_2: i2; test10_1 = test10_2; ~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt b/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt index cb2635c4a3b..241bbb5729d 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 TS2322: Type 'I1' is not assignable to type 'I1': +tests/cases/compiler/overEagerReturnTypeSpecialization.ts(8,5): error TS2323: 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 TS2322: Ty declare var v1: I1; var r1: I1 = v1.func(num => num.toString()) // Correctly returns an I1 ~~ -!!! error TS2322: Type 'I1' is not assignable to type 'I1': -!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'I1' is not assignable to type 'I1'. +!!! error TS2323: 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/overloadOnConstInheritance2.errors.txt b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt index f50dcd04a1d..159af64a13a 100644 --- a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/overloadOnConstInheritance2.ts(5,11): error TS2429: Interface 'Deriver' incorrectly extends interface 'Base': - Types of property 'addEventListener' are incompatible: +tests/cases/compiler/overloadOnConstInheritance2.ts(5,11): error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. + Types of property 'addEventListener' are incompatible. Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'. tests/cases/compiler/overloadOnConstInheritance2.ts(6,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. @@ -11,9 +11,9 @@ tests/cases/compiler/overloadOnConstInheritance2.ts(6,5): error TS2382: Speciali } interface Deriver extends Base { ~~~~~~~ -!!! error TS2429: Interface 'Deriver' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'addEventListener' are incompatible: -!!! error TS2429: Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'. +!!! error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'addEventListener' are incompatible. +!!! error TS2430: Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'. addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. diff --git a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt b/tests/baselines/reference/overloadOnConstInheritance3.errors.txt index 4ddb7d3669a..e0fff7b1ec7 100644 --- a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance3.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/overloadOnConstInheritance3.ts(4,11): error TS2429: Interface 'Deriver' incorrectly extends interface 'Base': - Types of property 'addEventListener' are incompatible: +tests/cases/compiler/overloadOnConstInheritance3.ts(4,11): error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. + Types of property 'addEventListener' are incompatible. Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'. tests/cases/compiler/overloadOnConstInheritance3.ts(6,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/compiler/overloadOnConstInheritance3.ts(7,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. @@ -11,9 +11,9 @@ tests/cases/compiler/overloadOnConstInheritance3.ts(7,5): error TS2382: Speciali } interface Deriver extends Base { ~~~~~~~ -!!! error TS2429: Interface 'Deriver' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'addEventListener' are incompatible: -!!! error TS2429: Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'. +!!! error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'addEventListener' are incompatible. +!!! error TS2430: Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'. // shouldn't need to redeclare the string overload addEventListener(x: 'bar'): string; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/overloadResolutionTest1.errors.txt b/tests/baselines/reference/overloadResolutionTest1.errors.txt index 6e9be0cc516..9f51c0fa10b 100644 --- a/tests/baselines/reference/overloadResolutionTest1.errors.txt +++ b/tests/baselines/reference/overloadResolutionTest1.errors.txt @@ -1,12 +1,12 @@ tests/cases/compiler/overloadResolutionTest1.ts(8,16): error TS2345: Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. - Type '{ a: string; }' is not assignable to type '{ a: boolean; }': - Types of property 'a' are incompatible: + Type '{ a: string; }' is not assignable to type '{ a: boolean; }'. + Types of property 'a' are incompatible. Type 'string' is not assignable to type 'boolean'. tests/cases/compiler/overloadResolutionTest1.ts(19,15): error TS2345: Argument of type '{ a: string; }' is not assignable to parameter of type '{ a: boolean; }'. - Types of property 'a' are incompatible: + Types of property 'a' are incompatible. Type 'string' is not assignable to type 'boolean'. tests/cases/compiler/overloadResolutionTest1.ts(25,14): error TS2345: Argument of type '{ a: boolean; }' is not assignable to parameter of type '{ a: string; }'. - Types of property 'a' are incompatible: + Types of property 'a' are incompatible. Type 'boolean' is not assignable to type 'string'. @@ -21,8 +21,8 @@ tests/cases/compiler/overloadResolutionTest1.ts(25,14): error TS2345: Argument o var x111 = foo([{a:"s"}]); // error - does not match any signature ~~~~~~~~~ !!! error TS2345: Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. -!!! error TS2345: Type '{ a: string; }' is not assignable to type '{ a: boolean; }': -!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type '{ a: string; }' is not assignable to type '{ a: boolean; }'. +!!! error TS2345: Types of property 'a' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'boolean'. var x1111 = foo([{a:null}]); // works - ambiguous call is resolved to be the first in the overload set so this returns a string @@ -37,7 +37,7 @@ tests/cases/compiler/overloadResolutionTest1.ts(25,14): error TS2345: Argument o var x4 = foo2({a:"s"}); // error ~~~~~~~ !!! error TS2345: Argument of type '{ a: string; }' is not assignable to parameter of type '{ a: boolean; }'. -!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Types of property 'a' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'boolean'. @@ -47,5 +47,5 @@ tests/cases/compiler/overloadResolutionTest1.ts(25,14): error TS2345: Argument o var x = foo4({a:true}); // error ~~~~~~~~ !!! error TS2345: Argument of type '{ a: boolean; }' is not assignable to parameter of type '{ a: string; }'. -!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Types of property 'a' are incompatible. !!! error TS2345: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadingOnConstants1.errors.txt b/tests/baselines/reference/overloadingOnConstants1.errors.txt index bc277dc0795..e52a2a10e5b 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 TS2322: Type 'Base' is not assignable to type 'Derived1': +tests/cases/compiler/overloadingOnConstants1.ts(22,5): error TS2323: Type 'Base' is not assignable to type 'Derived1'. Property 'bar' is missing in type 'Base'. -tests/cases/compiler/overloadingOnConstants1.ts(23,5): error TS2322: Type 'Derived1' is not assignable to type 'Derived3': +tests/cases/compiler/overloadingOnConstants1.ts(23,5): error TS2323: Type 'Derived1' is not assignable to type 'Derived3'. Property 'biz' is missing in type 'Derived1'. -tests/cases/compiler/overloadingOnConstants1.ts(24,5): error TS2322: Type 'Derived2' is not assignable to type 'Derived1': +tests/cases/compiler/overloadingOnConstants1.ts(24,5): error TS2323: Type 'Derived2' is not assignable to type 'Derived1'. Property 'bar' is missing in type 'Derived2'. -tests/cases/compiler/overloadingOnConstants1.ts(25,5): error TS2322: Type 'Derived3' is not assignable to type 'Derived1': +tests/cases/compiler/overloadingOnConstants1.ts(25,5): error TS2323: 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 TS2322: Type 'Deriv // these are errors var htmlElement2: Derived1 = d2.createElement("yo") ~~~~~~~~~~~~ -!!! error TS2322: Type 'Base' is not assignable to type 'Derived1': -!!! error TS2322: Property 'bar' is missing in type 'Base'. +!!! error TS2323: Type 'Base' is not assignable to type 'Derived1'. +!!! error TS2323: Property 'bar' is missing in type 'Base'. var htmlCanvasElement2: Derived3 = d2.createElement("canvas"); ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Derived1' is not assignable to type 'Derived3': -!!! error TS2322: Property 'biz' is missing in type 'Derived1'. +!!! error TS2323: Type 'Derived1' is not assignable to type 'Derived3'. +!!! error TS2323: Property 'biz' is missing in type 'Derived1'. var htmlDivElement2: Derived1 = d2.createElement("div"); ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived1': -!!! error TS2322: Property 'bar' is missing in type 'Derived2'. +!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived1'. +!!! error TS2323: Property 'bar' is missing in type 'Derived2'. var htmlSpanElement2: Derived1 = d2.createElement("span"); ~~~~~~~~~~~~~~~~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt b/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt index 6d51014f005..c63856a9ee1 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt +++ b/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/overridingPrivateStaticMembers.ts(5,7): error TS2418: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': +tests/cases/compiler/overridingPrivateStaticMembers.ts(5,7): error TS2417: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2'. Types have separate declarations of a private property 'y'. @@ -9,7 +9,7 @@ tests/cases/compiler/overridingPrivateStaticMembers.ts(5,7): error TS2418: Class class Derived2 extends Base2 { ~~~~~~~~ -!!! error TS2418: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': -!!! error TS2418: Types have separate declarations of a private property 'y'. +!!! error TS2417: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2'. +!!! error TS2417: Types have separate declarations of a private property 'y'. private static y: { foo: string; bar: string; }; } \ No newline at end of file diff --git a/tests/baselines/reference/parseTypes.errors.txt b/tests/baselines/reference/parseTypes.errors.txt index 96d004c5b01..ccaf7be59bf 100644 --- a/tests/baselines/reference/parseTypes.errors.txt +++ b/tests/baselines/reference/parseTypes.errors.txt @@ -1,6 +1,6 @@ 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 TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }': +tests/cases/compiler/parseTypes.ts(11,1): error TS2323: 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'. @@ -22,8 +22,8 @@ tests/cases/compiler/parseTypes.ts(12,1): error TS2323: Type '(s: string) => voi !!! error TS2323: Type '(s: string) => void' is not assignable to type '() => number'. w=g; ~ -!!! 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'. +!!! 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'. z=g; ~ !!! error TS2323: Type '(s: string) => void' is not assignable to type 'new () => number'. diff --git a/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt b/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt index 6779ebb9c07..940083ca93a 100644 --- a/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt +++ b/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(16,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(16,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'boolean' is not a valid type argument because it is not a supertype of candidate 'string'. tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(25,1): error TS2304: Cannot find name 'runTestCase'. @@ -21,7 +21,7 @@ tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(25,1): error T var _float = -(4/3); var a = new Array(false,undefined,null,"0",obj,-1.3333333333333, "str",-0,true,+0, one, 1,0, false, _float, -(4/3)); ~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'boolean' is not a valid type argument because it is not a supertype of candidate 'string'. if (a.indexOf(-(4/3)) === 14 && // a[14]=_float===-(4/3) a.indexOf(0) === 7 && // a[7] = +0, 0===+0 diff --git a/tests/baselines/reference/parserObjectCreation1.errors.txt b/tests/baselines/reference/parserObjectCreation1.errors.txt index 211a3620b19..876f49c5bed 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 TS2322: Type 'number[][]' is not assignable to type 'number[]': +tests/cases/conformance/parser/ecmascript5/Generics/parserObjectCreation1.ts(1,5): error TS2323: 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 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 +!!! 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 diff --git a/tests/baselines/reference/privateInterfaceProperties.errors.txt b/tests/baselines/reference/privateInterfaceProperties.errors.txt index faff968379f..2c363ad40cc 100644 --- a/tests/baselines/reference/privateInterfaceProperties.errors.txt +++ b/tests/baselines/reference/privateInterfaceProperties.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/privateInterfaceProperties.ts(4,7): error TS2421: Class 'c1' incorrectly implements interface 'i1': +tests/cases/compiler/privateInterfaceProperties.ts(4,7): error TS2420: Class 'c1' incorrectly implements interface 'i1'. Property 'name' is private in type 'c1' but not in type 'i1'. @@ -8,8 +8,8 @@ tests/cases/compiler/privateInterfaceProperties.ts(4,7): error TS2421: Class 'c1 // should be an error class c1 implements i1 { private name:string; } ~~ -!!! error TS2421: Class 'c1' incorrectly implements interface 'i1': -!!! error TS2421: Property 'name' is private in type 'c1' but not in type 'i1'. +!!! error TS2420: Class 'c1' incorrectly implements interface 'i1'. +!!! error TS2420: Property 'name' is private in type 'c1' but not in type 'i1'. // should be ok class c2 implements i1 { public name:string; } diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index 855614eb76e..9104d924e66 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -20,19 +20,19 @@ tests/cases/compiler/promisePermutations.ts(120,19): error TS2345: Argument of t tests/cases/compiler/promisePermutations.ts(121,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations.ts(122,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations.ts(126,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations.ts(129,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: - Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +tests/cases/compiler/promisePermutations.ts(129,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. + Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Type 'string' is not assignable to type 'number'. tests/cases/compiler/promisePermutations.ts(132,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations.ts(133,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations.ts(134,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations.ts(137,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: - Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +tests/cases/compiler/promisePermutations.ts(137,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. + Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations.ts(144,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: - Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +tests/cases/compiler/promisePermutations.ts(144,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. + Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations.ts(152,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations.ts(152,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. tests/cases/compiler/promisePermutations.ts(156,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations.ts(158,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. @@ -215,8 +215,8 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // ok ~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Type 'string' is not assignable to type 'number'. var r9e = r9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s9: Promise; @@ -233,8 +233,8 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Type 'string' is not assignable to type 'number'. var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok @@ -244,8 +244,8 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // ok ~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Type 'string' is not assignable to type 'number'. var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s10 = testFunction10P(x => x); @@ -256,7 +256,7 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index 5338df82121..3c316115a27 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -20,19 +20,19 @@ tests/cases/compiler/promisePermutations2.ts(119,19): error TS2345: Argument of tests/cases/compiler/promisePermutations2.ts(120,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations2.ts(121,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations2.ts(125,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations2.ts(128,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: - Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +tests/cases/compiler/promisePermutations2.ts(128,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. + Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Type 'string' is not assignable to type 'number'. tests/cases/compiler/promisePermutations2.ts(131,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations2.ts(132,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations2.ts(133,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations2.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: - Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +tests/cases/compiler/promisePermutations2.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. + Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations2.ts(143,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: - Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +tests/cases/compiler/promisePermutations2.ts(143,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. + Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations2.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations2.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. tests/cases/compiler/promisePermutations2.ts(155,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations2.ts(157,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. @@ -214,8 +214,8 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Type 'string' is not assignable to type 'number'. var r9e = r9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s9: Promise; @@ -232,8 +232,8 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Type 'string' is not assignable to type 'number'. var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok @@ -243,8 +243,8 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Type 'string' is not assignable to type 'number'. var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s10 = testFunction10P(x => x); @@ -255,7 +255,7 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index 58e37629cf5..f8edf83c694 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -21,19 +21,19 @@ tests/cases/compiler/promisePermutations3.ts(119,19): error TS2345: Argument of tests/cases/compiler/promisePermutations3.ts(120,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations3.ts(121,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations3.ts(125,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(128,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: - Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +tests/cases/compiler/promisePermutations3.ts(128,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. + Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Type 'string' is not assignable to type 'number'. tests/cases/compiler/promisePermutations3.ts(131,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations3.ts(132,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations3.ts(133,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: - Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +tests/cases/compiler/promisePermutations3.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. + Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations3.ts(143,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: - Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +tests/cases/compiler/promisePermutations3.ts(143,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. + Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations3.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations3.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. tests/cases/compiler/promisePermutations3.ts(155,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations3.ts(157,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. @@ -218,8 +218,8 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Type 'string' is not assignable to type 'number'. var r9e = r9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s9: Promise; @@ -236,8 +236,8 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Type 'string' is not assignable to type 'number'. var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok @@ -247,8 +247,8 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Type 'string' is not assignable to type 'number'. var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s10 = testFunction10P(x => x); @@ -259,7 +259,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok diff --git a/tests/baselines/reference/propertyParameterWithQuestionMark.errors.txt b/tests/baselines/reference/propertyParameterWithQuestionMark.errors.txt index e68922ccf36..681d2c5ea9a 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 TS2322: Type '{}' is not assignable to type 'C': +tests/cases/compiler/propertyParameterWithQuestionMark.ts(6,5): error TS2323: Type '{}' is not assignable to type 'C'. Property 'x' is missing in type '{}'. -tests/cases/compiler/propertyParameterWithQuestionMark.ts(8,1): error TS2322: Type '{ x?: any; }' is not assignable to type 'C': +tests/cases/compiler/propertyParameterWithQuestionMark.ts(8,1): error TS2323: 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 TS2322: Ty // x should not be an optional property var v: C = {}; // Should fail ~ -!!! error TS2322: Type '{}' is not assignable to type 'C': -!!! error TS2322: Property 'x' is missing in type '{}'. +!!! error TS2323: Type '{}' is not assignable to type 'C'. +!!! error TS2323: Property 'x' is missing in type '{}'. var v2: { x? } v = v2; // Should fail ~ -!!! 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'. +!!! 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'. 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 ce9529a7f67..cab3a682400 100644 --- a/tests/baselines/reference/protectedMembers.errors.txt +++ b/tests/baselines/reference/protectedMembers.errors.txt @@ -9,11 +9,11 @@ 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 TS2322: Type 'B1' is not assignable to type 'A1': +tests/cases/compiler/protectedMembers.ts(98,1): error TS2323: 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 TS2322: Type 'A1' is not assignable to type 'B1': +tests/cases/compiler/protectedMembers.ts(99,1): error TS2323: 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 TS2416: Class 'B3' incorrectly extends base class 'A3': +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 TS2416: Class 'B3' incorr var b1: B1; a1 = b1; // Error, B1 doesn't derive 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'. +!!! 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'. b1 = a1; // Error, x is protected in A1 but public in 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'. +!!! error TS2323: Type 'A1' is not assignable to type 'B1'. +!!! error TS2323: Property 'x' is protected in type 'A1' but public in type 'B1'. class A2 { protected x; @@ -159,8 +159,8 @@ tests/cases/compiler/protectedMembers.ts(112,7): error TS2416: Class 'B3' incorr // Error x is protected in B3 but public in A3 class B3 extends A3 { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A3': -!!! error TS2416: Property 'x' is protected in type 'B3' but public in type 'A3'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. +!!! error TS2415: Property 'x' is protected in type 'B3' but public in type 'A3'. protected x; } diff --git a/tests/baselines/reference/publicMemberImplementedAsPrivateInDerivedClass.errors.txt b/tests/baselines/reference/publicMemberImplementedAsPrivateInDerivedClass.errors.txt index b5404823218..3083338f573 100644 --- a/tests/baselines/reference/publicMemberImplementedAsPrivateInDerivedClass.errors.txt +++ b/tests/baselines/reference/publicMemberImplementedAsPrivateInDerivedClass.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/publicMemberImplementedAsPrivateInDerivedClass.ts(4,7): error TS2421: Class 'Foo' incorrectly implements interface 'Qux': +tests/cases/compiler/publicMemberImplementedAsPrivateInDerivedClass.ts(4,7): error TS2420: Class 'Foo' incorrectly implements interface 'Qux'. Property 'Bar' is private in type 'Foo' but not in type 'Qux'. @@ -8,8 +8,8 @@ tests/cases/compiler/publicMemberImplementedAsPrivateInDerivedClass.ts(4,7): err } class Foo implements Qux { ~~~ -!!! error TS2421: Class 'Foo' incorrectly implements interface 'Qux': -!!! error TS2421: Property 'Bar' is private in type 'Foo' but not in type 'Qux'. +!!! error TS2420: Class 'Foo' incorrectly implements interface 'Qux'. +!!! error TS2420: Property 'Bar' is private in type 'Foo' but not in type 'Qux'. private Bar: number; } \ No newline at end of file diff --git a/tests/baselines/reference/qualify.errors.txt b/tests/baselines/reference/qualify.errors.txt index 2ae8ea57b25..761dbab6b1b 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 TS2322: Type 'number' is not assignable to type 'I': +tests/cases/compiler/qualify.ts(21,13): error TS2323: Type 'number' is not assignable to type 'I'. Property 'p' is missing in type 'Number'. -tests/cases/compiler/qualify.ts(30,13): error TS2322: Type 'number' is not assignable to type 'I2': +tests/cases/compiler/qualify.ts(30,13): error TS2323: Type 'number' is not assignable to type 'I2'. Property 'q' is missing in type 'Number'. -tests/cases/compiler/qualify.ts(45,13): error TS2322: Type 'I4' is not assignable to type 'I3': +tests/cases/compiler/qualify.ts(45,13): error TS2323: Type 'I4' is not assignable to type 'I3'. Property 'zeep' is missing in type 'I4'. -tests/cases/compiler/qualify.ts(46,13): error TS2322: Type 'I4' is not assignable to type 'I3[]': +tests/cases/compiler/qualify.ts(46,13): error TS2323: 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 TS2322: Type 'I4' is not assignable to type '{ k: I3; }': +tests/cases/compiler/qualify.ts(49,13): error TS2323: Type 'I4' is not assignable to type '{ k: I3; }'. Property 'k' is missing in type 'I4'. -tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable to type 'I': +tests/cases/compiler/qualify.ts(58,5): error TS2323: 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 TS2322: Type 'I' is not assignable export module U { var z:I=3; ~ -!!! error TS2322: Type 'number' is not assignable to type 'I': -!!! error TS2322: Property 'p' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'I'. +!!! error TS2323: Property 'p' is missing in type 'Number'. export interface I2 { q; } @@ -49,8 +49,8 @@ tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable export module U2 { var z:T.U.I2=3; ~ -!!! error TS2322: Type 'number' is not assignable to type 'I2': -!!! error TS2322: Property 'q' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'I2'. +!!! error TS2323: Property 'q' is missing in type 'Number'. } } @@ -67,12 +67,12 @@ tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable var v1:I4; var v2:K1.I3=v1; ~~ -!!! error TS2322: Type 'I4' is not assignable to type 'I3': -!!! error TS2322: Property 'zeep' is missing in type 'I4'. +!!! error TS2323: Type 'I4' is not assignable to type 'I3'. +!!! error TS2323: Property 'zeep' is missing in type 'I4'. var v3:K1.I3[]=v1; ~~ -!!! error TS2322: Type 'I4' is not assignable to type 'I3[]': -!!! error TS2322: Property 'length' is missing in type 'I4'. +!!! error TS2323: Type 'I4' is not assignable to type 'I3[]'. +!!! error TS2323: Property 'length' is missing in type 'I4'. var v4:()=>K1.I3=v1; ~~ !!! error TS2323: Type 'I4' is not assignable to type '() => I3'. @@ -81,8 +81,8 @@ tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable !!! error TS2323: Type 'I4' is not assignable to type '(k: I3) => void'. var v6:{k:K1.I3;}=v1; ~~ -!!! error TS2322: Type 'I4' is not assignable to type '{ k: I3; }': -!!! error TS2322: Property 'k' is missing in type 'I4'. +!!! error TS2323: Type 'I4' is not assignable to type '{ k: I3; }'. +!!! error TS2323: Property 'k' is missing in type 'I4'. } } @@ -93,7 +93,7 @@ tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable var y:I; var x:T.I=y; ~ -!!! error TS2322: Type 'I' is not assignable to type 'I': -!!! error TS2322: Property 'p' is missing in type 'I'. +!!! error TS2323: Type 'I' is not assignable to type 'I'. +!!! error TS2323: 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 cb26efe3472..c287a713e2b 100644 --- a/tests/baselines/reference/recursiveFunctionTypes.errors.txt +++ b/tests/baselines/reference/recursiveFunctionTypes.errors.txt @@ -1,6 +1,6 @@ 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 TS2322: 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'. 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. @@ -24,8 +24,8 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,4): error TS2345: Argument of !!! error TS2323: Type '() => typeof fn' is not assignable to type 'number'. var y: () => number = fn; // ok ~ -!!! error TS2322: Type '() => typeof fn' is not assignable to type '() => number': -!!! error TS2322: Type '() => typeof fn' is not assignable to type 'number'. +!!! error TS2323: Type '() => typeof fn' is not assignable to type '() => number'. +!!! error TS2323: Type '() => typeof fn' is not assignable to type 'number'. var f: () => typeof g; var g: () => typeof f; diff --git a/tests/baselines/reference/recursiveInheritance3.errors.txt b/tests/baselines/reference/recursiveInheritance3.errors.txt index 494aa26a201..6ec3935ece4 100644 --- a/tests/baselines/reference/recursiveInheritance3.errors.txt +++ b/tests/baselines/reference/recursiveInheritance3.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/recursiveInheritance3.ts(1,7): error TS2421: Class 'C' incorrectly implements interface 'I': +tests/cases/compiler/recursiveInheritance3.ts(1,7): error TS2420: Class 'C' incorrectly implements interface 'I'. Property 'other' is missing in type 'C'. ==== tests/cases/compiler/recursiveInheritance3.ts (1 errors) ==== class C implements I { ~ -!!! error TS2421: Class 'C' incorrectly implements interface 'I': -!!! error TS2421: Property 'other' is missing in type 'C'. +!!! error TS2420: Class 'C' incorrectly implements interface 'I'. +!!! error TS2420: Property 'other' is missing in type 'C'. public foo(x: any) { return x; } private x = 1; } diff --git a/tests/baselines/reference/redefineArray.errors.txt b/tests/baselines/reference/redefineArray.errors.txt index 063c5b67480..86c8c8aee33 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 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[]; }': +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[]; }'. 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 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 +!!! 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 diff --git a/tests/baselines/reference/restArgAssignmentCompat.errors.txt b/tests/baselines/reference/restArgAssignmentCompat.errors.txt index 3a02ecf63ab..a7397ffc157 100644 --- a/tests/baselines/reference/restArgAssignmentCompat.errors.txt +++ b/tests/baselines/reference/restArgAssignmentCompat.errors.txt @@ -1,6 +1,6 @@ -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[]': +tests/cases/compiler/restArgAssignmentCompat.ts(7,1): error TS2323: 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 TS2322: Type '(...x: var n = g; n = f; ~ -!!! 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'. +!!! 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'. n([4], 'foo'); \ No newline at end of file diff --git a/tests/baselines/reference/scopeTests.errors.txt b/tests/baselines/reference/scopeTests.errors.txt index 59749eaf396..ce24301efc2 100644 --- a/tests/baselines/reference/scopeTests.errors.txt +++ b/tests/baselines/reference/scopeTests.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/scopeTests.ts(2,7): error TS2416: Class 'D' incorrectly extends base class 'C': +tests/cases/compiler/scopeTests.ts(2,7): error TS2415: Class 'D' incorrectly extends base class 'C'. Property 'v' is private in type 'C' but not in type 'D'. @@ -6,8 +6,8 @@ tests/cases/compiler/scopeTests.ts(2,7): error TS2416: Class 'D' incorrectly ext class C { private v; public p; static s; } class D extends C { ~ -!!! error TS2416: Class 'D' incorrectly extends base class 'C': -!!! error TS2416: Property 'v' is private in type 'C' but not in type 'D'. +!!! error TS2415: Class 'D' incorrectly extends base class 'C'. +!!! error TS2415: Property 'v' is private in type 'C' but not in type 'D'. public v: number; public p: number constructor() { diff --git a/tests/baselines/reference/shadowPrivateMembers.errors.txt b/tests/baselines/reference/shadowPrivateMembers.errors.txt index 94dd577c1c4..2196224b7c4 100644 --- a/tests/baselines/reference/shadowPrivateMembers.errors.txt +++ b/tests/baselines/reference/shadowPrivateMembers.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/shadowPrivateMembers.ts(2,7): error TS2416: Class 'derived' incorrectly extends base class 'base': +tests/cases/compiler/shadowPrivateMembers.ts(2,7): error TS2415: Class 'derived' incorrectly extends base class 'base'. Types have separate declarations of a private property 'n'. @@ -6,6 +6,6 @@ tests/cases/compiler/shadowPrivateMembers.ts(2,7): error TS2416: Class 'derived' class base { private n() {} } class derived extends base { private n() {} } ~~~~~~~ -!!! error TS2416: Class 'derived' incorrectly extends base class 'base': -!!! error TS2416: Types have separate declarations of a private property 'n'. +!!! error TS2415: Class 'derived' incorrectly extends base class 'base'. +!!! error TS2415: Types have separate declarations of a private property 'n'. \ No newline at end of file diff --git a/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.errors.txt b/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.errors.txt index dc3446cb368..4bb3baf2f84 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 TS2322: Type '() => void' is not assignable to type '(x: number) => number': +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticMemberAssignsToConstructorFunctionMembers.ts(7,9): error TS2323: 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 TS2322: Type '() => void' is not assignable to type '(x: number) => number': -!!! error TS2322: Type 'void' is not assignable to type 'number'. +!!! error TS2323: Type '() => void' is not assignable to type '(x: number) => number'. +!!! error TS2323: 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 bb2ba1747a4..6e855cdfeb2 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 TS2322: Type 'C' is not assignable to type 'A': +tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(12,1): error TS2323: Type 'C' is not assignable to type 'A'. Property 'name' is missing in type 'C'. -tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(13,1): error TS2322: Type 'typeof B' is not assignable to type 'A': +tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(13,1): error TS2323: 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 TS2322: Type 'C' is not assignable to type 'B': +tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(16,5): error TS2323: Type 'C' is not assignable to type 'B'. Property 'name' is missing in type 'C'. -tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(17,1): error TS2322: Type 'typeof B' is not assignable to type 'B': +tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts(17,1): error TS2323: 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 TS2322: Type 'C' is not assignable to type 'A': -!!! error TS2322: Property 'name' is missing in type 'C'. +!!! error TS2323: Type 'C' is not assignable to type 'A'. +!!! error TS2323: Property 'name' is missing in type 'C'. a = B; // error name is missing ~ -!!! error TS2322: Type 'typeof B' is not assignable to type 'A': -!!! error TS2322: Property 'name' is missing in type 'typeof B'. +!!! error TS2323: Type 'typeof B' is not assignable to type 'A'. +!!! error TS2323: Property 'name' is missing in type 'typeof B'. a = C; var b: B = new C(); // error name is missing ~ -!!! error TS2322: Type 'C' is not assignable to type 'B': -!!! error TS2322: Property 'name' is missing in type 'C'. +!!! error TS2323: Type 'C' is not assignable to type 'B'. +!!! error TS2323: Property 'name' is missing in type 'C'. b = B; // error name is missing ~ -!!! error TS2322: Type 'typeof B' is not assignable to type 'B': -!!! error TS2322: Property 'name' is missing in type 'typeof B'. +!!! error TS2323: Type 'typeof B' is not assignable to type 'B'. +!!! error TS2323: 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 63e8430b7f4..b4ca39eaa2f 100644 --- a/tests/baselines/reference/stringIndexerAssignments1.errors.txt +++ b/tests/baselines/reference/stringIndexerAssignments1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/stringIndexerAssignments1.ts(4,1): error TS2322: Type '{ one: string; }' is not assignable to type '{ [x: string]: string; one: string; }': +tests/cases/compiler/stringIndexerAssignments1.ts(4,1): error TS2323: 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 TS2322: Type '{ one: number; two: string; }' is not assignable to type '{ [x: string]: string; one: string; }': - Types of property 'one' are incompatible: +tests/cases/compiler/stringIndexerAssignments1.ts(5,1): error TS2323: 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 TS2322: Type '{ on var b: { one: number; two: string; }; x = a; ~ -!!! 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; }'. +!!! 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; }'. x = b; // error ~ -!!! 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'. +!!! 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'. \ No newline at end of file diff --git a/tests/baselines/reference/stringIndexerAssignments2.errors.txt b/tests/baselines/reference/stringIndexerAssignments2.errors.txt index 73e108f824f..73472081d9a 100644 --- a/tests/baselines/reference/stringIndexerAssignments2.errors.txt +++ b/tests/baselines/reference/stringIndexerAssignments2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/stringIndexerAssignments2.ts(19,1): error TS2322: Type 'C2' is not assignable to type 'C1': +tests/cases/compiler/stringIndexerAssignments2.ts(19,1): error TS2323: Type 'C2' is not assignable to type 'C1'. Index signature is missing in type 'C2'. -tests/cases/compiler/stringIndexerAssignments2.ts(20,1): error TS2322: Type 'C3' is not assignable to type 'C1': - Types of property 'one' are incompatible: +tests/cases/compiler/stringIndexerAssignments2.ts(20,1): error TS2323: 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 TS2322: Type 'C3' x = a; ~ -!!! error TS2322: Type 'C2' is not assignable to type 'C1': -!!! error TS2322: Index signature is missing in type 'C2'. +!!! error TS2323: Type 'C2' is not assignable to type 'C1'. +!!! error TS2323: Index signature is missing in type 'C2'. x = b; ~ -!!! 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 +!!! 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 diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt index 8039cdf01f0..cc9d56cff57 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt @@ -24,9 +24,9 @@ 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 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': +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; }'. + 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 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'. +!!! 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'. a: '', b: 1, c: () => { }, diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt index 4ac335c2465..4e3a0152b56 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt @@ -4,9 +4,9 @@ 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 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': +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; }'. + 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 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'. +!!! 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'. a: A, b: B } \ No newline at end of file diff --git a/tests/baselines/reference/subtypesOfTypeParameter.errors.txt b/tests/baselines/reference/subtypesOfTypeParameter.errors.txt index bdb3c9a056f..042d8227b78 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.errors.txt +++ b/tests/baselines/reference/subtypesOfTypeParameter.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts(7,7): error TS2416: Class 'D1' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts(7,7): error TS2415: Class 'D1' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts(95,21): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. @@ -13,9 +13,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D1 extends C3 { ~~ -!!! error TS2416: Class 'D1' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'U' is not assignable to type 'T'. +!!! error TS2415: Class 'D1' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'U' is not assignable to type 'T'. foo: U; // error } diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.errors.txt b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.errors.txt index 1cf24d3c809..eeedf58ab73 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.errors.txt +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.errors.txt @@ -1,111 +1,111 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(7,10): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(12,7): error TS2416: Class 'D2' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(12,7): error TS2415: Class 'D2' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(12,10): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(14,5): error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'U'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(17,7): error TS2416: Class 'D3' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(17,7): error TS2415: Class 'D3' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(17,10): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(19,5): error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(22,10): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(31,10): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(31,23): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(36,7): error TS2416: Class 'D6' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(36,7): error TS2415: Class 'D6' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(36,10): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(36,23): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(38,5): error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'U'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(41,7): error TS2416: Class 'D7' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(41,7): error TS2415: Class 'D7' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'V'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(41,10): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(41,23): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(43,5): error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'V'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(48,7): error TS2416: Class 'D8' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(48,7): error TS2415: Class 'D8' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(48,10): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(48,23): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(50,5): error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(53,10): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(53,23): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(58,7): error TS2416: Class 'D10' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(58,7): error TS2415: Class 'D10' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'V'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(58,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(58,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(60,5): error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'V'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(65,7): error TS2416: Class 'D11' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(65,7): error TS2415: Class 'D11' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'V' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(65,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(65,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(67,5): error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(70,7): error TS2416: Class 'D12' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(70,7): error TS2415: Class 'D12' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'V' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(70,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(70,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(72,5): error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'U'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(75,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(75,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(83,7): error TS2416: Class 'D14' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(83,7): error TS2415: Class 'D14' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'Date'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(83,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(83,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(85,5): error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'Date'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(88,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(88,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(93,7): error TS2416: Class 'D16' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(93,7): error TS2415: Class 'D16' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(93,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(93,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(95,5): error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'U'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(98,7): error TS2416: Class 'D17' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(98,7): error TS2415: Class 'D17' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'V'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(98,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(98,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(100,5): error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'V'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(105,7): error TS2416: Class 'D18' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(105,7): error TS2415: Class 'D18' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'Date'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(105,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(105,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(107,5): error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'Date'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(110,7): error TS2416: Class 'D19' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(110,7): error TS2415: Class 'D19' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(110,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(110,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(112,5): error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(115,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(115,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(120,7): error TS2416: Class 'D21' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(120,7): error TS2415: Class 'D21' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'V'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(120,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(120,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(122,5): error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'V'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(127,7): error TS2416: Class 'D22' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(127,7): error TS2415: Class 'D22' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'Date'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(127,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(127,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(129,5): error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'Date'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(132,7): error TS2416: Class 'D23' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(132,7): error TS2415: Class 'D23' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'V' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(132,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(132,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(134,5): error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(137,7): error TS2416: Class 'D24' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(137,7): error TS2415: Class 'D24' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'V' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(137,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(137,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. @@ -114,20 +114,20 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(142,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(149,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(149,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(154,7): error TS2416: Class 'D27' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(154,7): error TS2415: Class 'D27' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'Date' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(154,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(154,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(156,5): error TS2411: Property 'foo' of type 'Date' is not assignable to string index type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(159,7): error TS2416: Class 'D28' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(159,7): error TS2415: Class 'D28' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'Date' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(159,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(159,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(161,5): error TS2411: Property 'foo' of type 'Date' is not assignable to string index type 'U'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(164,7): error TS2416: Class 'D29' incorrectly extends base class 'C3': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(164,7): error TS2415: Class 'D29' incorrectly extends base class 'C3'. + Types of property 'foo' are incompatible. Type 'Date' is not assignable to type 'V'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(164,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts(164,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. @@ -150,9 +150,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D2 extends C3 { ~~ -!!! error TS2416: Class 'D2' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'T' is not assignable to type 'U'. +!!! error TS2415: Class 'D2' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'T' is not assignable to type 'U'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. [x: string]: U; @@ -163,9 +163,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D3 extends C3 { ~~ -!!! error TS2416: Class 'D3' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'U' is not assignable to type 'T'. +!!! error TS2415: Class 'D3' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'U' is not assignable to type 'T'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. [x: string]: T; @@ -196,9 +196,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D6 extends C3 { ~~ -!!! error TS2416: Class 'D6' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'T' is not assignable to type 'U'. +!!! error TS2415: Class 'D6' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'T' is not assignable to type 'U'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -211,9 +211,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D7 extends C3 { ~~ -!!! error TS2416: Class 'D7' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'T' is not assignable to type 'V'. +!!! error TS2415: Class 'D7' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'T' is not assignable to type 'V'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -228,9 +228,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf // only a subtype of V and itself class D8 extends C3 { ~~ -!!! error TS2416: Class 'D8' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'U' is not assignable to type 'T'. +!!! error TS2415: Class 'D8' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'U' is not assignable to type 'T'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -252,9 +252,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D10 extends C3 { ~~~ -!!! error TS2416: Class 'D10' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'U' is not assignable to type 'V'. +!!! error TS2415: Class 'D10' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'U' is not assignable to type 'V'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -269,9 +269,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf // only a subtype of itself class D11 extends C3 { ~~~ -!!! error TS2416: Class 'D11' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'V' is not assignable to type 'T'. +!!! error TS2415: Class 'D11' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'V' is not assignable to type 'T'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -284,9 +284,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D12 extends C3 { ~~~ -!!! error TS2416: Class 'D12' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'V' is not assignable to type 'U'. +!!! error TS2415: Class 'D12' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'V' is not assignable to type 'U'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -311,9 +311,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf // should all work class D14 extends C3 { ~~~ -!!! error TS2416: Class 'D14' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'T' is not assignable to type 'Date'. +!!! error TS2415: Class 'D14' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'T' is not assignable to type 'Date'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -335,9 +335,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D16 extends C3 { ~~~ -!!! error TS2416: Class 'D16' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'T' is not assignable to type 'U'. +!!! error TS2415: Class 'D16' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'T' is not assignable to type 'U'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -350,9 +350,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D17 extends C3 { ~~~ -!!! error TS2416: Class 'D17' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'T' is not assignable to type 'V'. +!!! error TS2415: Class 'D17' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'T' is not assignable to type 'V'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -367,9 +367,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf // only a subtype of V, Date and itself class D18 extends C3 { ~~~ -!!! error TS2416: Class 'D18' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'T' is not assignable to type 'Date'. +!!! error TS2415: Class 'D18' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'T' is not assignable to type 'Date'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -382,9 +382,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D19 extends C3 { ~~~ -!!! error TS2416: Class 'D19' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'U' is not assignable to type 'T'. +!!! error TS2415: Class 'D19' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'U' is not assignable to type 'T'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -406,9 +406,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D21 extends C3 { ~~~ -!!! error TS2416: Class 'D21' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'U' is not assignable to type 'V'. +!!! error TS2415: Class 'D21' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'U' is not assignable to type 'V'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -423,9 +423,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf // only a subtype of itself and Date class D22 extends C3 { ~~~ -!!! error TS2416: Class 'D22' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'T' is not assignable to type 'Date'. +!!! error TS2415: Class 'D22' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'T' is not assignable to type 'Date'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -438,9 +438,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D23 extends C3 { ~~~ -!!! error TS2416: Class 'D23' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'V' is not assignable to type 'T'. +!!! error TS2415: Class 'D23' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'V' is not assignable to type 'T'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -453,9 +453,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D24 extends C3 { ~~~ -!!! error TS2416: Class 'D24' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'V' is not assignable to type 'U'. +!!! error TS2415: Class 'D24' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'V' is not assignable to type 'U'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -488,9 +488,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D27 extends C3 { ~~~ -!!! error TS2416: Class 'D27' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'Date' is not assignable to type 'T'. +!!! error TS2415: Class 'D27' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'Date' is not assignable to type 'T'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -503,9 +503,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D28 extends C3 { ~~~ -!!! error TS2416: Class 'D28' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'Date' is not assignable to type 'U'. +!!! error TS2415: Class 'D28' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'Date' is not assignable to type 'U'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ @@ -518,9 +518,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D29 extends C3 { ~~~ -!!! error TS2416: Class 'D29' incorrectly extends base class 'C3': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'Date' is not assignable to type 'V'. +!!! error TS2415: Class 'D29' incorrectly extends base class 'C3'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'Date' is not assignable to type 'V'. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.errors.txt b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.errors.txt index 872cb8ef965..a9b025ccc77 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.errors.txt +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(45,7): error TS2416: Class 'D3' incorrectly extends base class 'B1': - Types of property 'foo' are incompatible: - Type 'V' is not assignable to type 'Foo': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(45,7): error TS2415: Class 'D3' incorrectly extends base class 'B1'. + Types of property 'foo' are incompatible. + Type 'V' is not assignable to type 'Foo'. Property 'foo' is missing in type '{}'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(47,5): error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'Foo'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(55,7): error TS2416: Class 'D5' incorrectly extends base class 'B1': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(55,7): error TS2415: Class 'D5' incorrectly extends base class 'B1'. + Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(57,5): error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(60,7): error TS2416: Class 'D6' incorrectly extends base class 'B1': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(60,7): error TS2415: Class 'D6' incorrectly extends base class 'B1'. + Types of property 'foo' are incompatible. Type 'V' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(62,5): error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(65,7): error TS2416: Class 'D7' incorrectly extends base class 'B1': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(65,7): error TS2415: Class 'D7' incorrectly extends base class 'B1'. + Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(67,5): error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'U'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(75,7): error TS2416: Class 'D9' incorrectly extends base class 'B1': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(75,7): error TS2415: Class 'D9' incorrectly extends base class 'B1'. + Types of property 'foo' are incompatible. Type 'V' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts(77,5): error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'U'. @@ -68,10 +68,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D3 extends B1 { ~~ -!!! error TS2416: Class 'D3' incorrectly extends base class 'B1': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'V' is not assignable to type 'Foo': -!!! error TS2416: Property 'foo' is missing in type '{}'. +!!! error TS2415: Class 'D3' incorrectly extends base class 'B1'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'V' is not assignable to type 'Foo'. +!!! error TS2415: Property 'foo' is missing in type '{}'. [x: string]: Foo; foo: V; // error ~~~~~~~ @@ -85,9 +85,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D5 extends B1 { ~~ -!!! error TS2416: Class 'D5' incorrectly extends base class 'B1': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'U' is not assignable to type 'T'. +!!! error TS2415: Class 'D5' incorrectly extends base class 'B1'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'U' is not assignable to type 'T'. [x: string]: T; foo: U; // error ~~~~~~~ @@ -96,9 +96,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D6 extends B1 { ~~ -!!! error TS2416: Class 'D6' incorrectly extends base class 'B1': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'V' is not assignable to type 'T'. +!!! error TS2415: Class 'D6' incorrectly extends base class 'B1'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'V' is not assignable to type 'T'. [x: string]: T; foo: V; // error ~~~~~~~ @@ -107,9 +107,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D7 extends B1 { ~~ -!!! error TS2416: Class 'D7' incorrectly extends base class 'B1': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'T' is not assignable to type 'U'. +!!! error TS2415: Class 'D7' incorrectly extends base class 'B1'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'T' is not assignable to type 'U'. [x: string]: U; foo: T; // error ~~~~~~~ @@ -123,9 +123,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D9 extends B1 { ~~ -!!! error TS2416: Class 'D9' incorrectly extends base class 'B1': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'V' is not assignable to type 'U'. +!!! error TS2415: Class 'D9' incorrectly extends base class 'B1'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'V' is not assignable to type 'U'. [x: string]: U; foo: V; // error ~~~~~~~ diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.errors.txt b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.errors.txt index f4b1d7ef041..867b622cf1a 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.errors.txt +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.errors.txt @@ -4,22 +4,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(61,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(61,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(61,50): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(66,11): error TS2416: Class 'D2' incorrectly extends base class 'Base': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(66,11): error TS2415: Class 'D2' incorrectly extends base class 'Base'. + Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(66,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(66,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(66,50): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(68,9): error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(71,11): error TS2416: Class 'D3' incorrectly extends base class 'Base': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(71,11): error TS2415: Class 'D3' incorrectly extends base class 'Base'. + Types of property 'foo' are incompatible. Type 'V' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(71,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(71,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(71,50): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(73,9): error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(76,11): error TS2416: Class 'D4' incorrectly extends base class 'Base': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(76,11): error TS2415: Class 'D4' incorrectly extends base class 'Base'. + Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(76,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(76,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. @@ -28,22 +28,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(81,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(81,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(81,50): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(86,11): error TS2416: Class 'D6' incorrectly extends base class 'Base': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(86,11): error TS2415: Class 'D6' incorrectly extends base class 'Base'. + Types of property 'foo' are incompatible. Type 'V' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(86,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(86,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(86,50): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(88,9): error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'U'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(91,11): error TS2416: Class 'D7' incorrectly extends base class 'Base': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(91,11): error TS2415: Class 'D7' incorrectly extends base class 'Base'. + Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'V'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(91,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(91,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(91,50): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(93,9): error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'V'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(96,11): error TS2416: Class 'D8' incorrectly extends base class 'Base': - Types of property 'foo' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(96,11): error TS2415: Class 'D8' incorrectly extends base class 'Base'. + Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'V'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(96,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts(96,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. @@ -167,9 +167,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D2, U extends Foo, V extends Foo> extends Base { ~~ -!!! error TS2416: Class 'D2' incorrectly extends base class 'Base': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'U' is not assignable to type 'T'. +!!! error TS2415: Class 'D2' incorrectly extends base class 'Base'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'U' is not assignable to type 'T'. ~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~ @@ -184,9 +184,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D3, U extends Foo, V extends Foo> extends Base { ~~ -!!! error TS2416: Class 'D3' incorrectly extends base class 'Base': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'V' is not assignable to type 'T'. +!!! error TS2415: Class 'D3' incorrectly extends base class 'Base'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'V' is not assignable to type 'T'. ~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~ @@ -201,9 +201,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D4, U extends Foo, V extends Foo> extends Base { ~~ -!!! error TS2416: Class 'D4' incorrectly extends base class 'Base': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'T' is not assignable to type 'U'. +!!! error TS2415: Class 'D4' incorrectly extends base class 'Base'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'T' is not assignable to type 'U'. ~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~ @@ -229,9 +229,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D6, U extends Foo, V extends Foo> extends Base { ~~ -!!! error TS2416: Class 'D6' incorrectly extends base class 'Base': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'V' is not assignable to type 'U'. +!!! error TS2415: Class 'D6' incorrectly extends base class 'Base'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'V' is not assignable to type 'U'. ~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~ @@ -246,9 +246,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D7, U extends Foo, V extends Foo> extends Base { ~~ -!!! error TS2416: Class 'D7' incorrectly extends base class 'Base': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'T' is not assignable to type 'V'. +!!! error TS2415: Class 'D7' incorrectly extends base class 'Base'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'T' is not assignable to type 'V'. ~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~ @@ -263,9 +263,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf class D8, U extends Foo, V extends Foo> extends Base { ~~ -!!! error TS2416: Class 'D8' incorrectly extends base class 'Base': -!!! error TS2416: Types of property 'foo' are incompatible: -!!! error TS2416: Type 'U' is not assignable to type 'V'. +!!! error TS2415: Class 'D8' incorrectly extends base class 'Base'. +!!! error TS2415: Types of property 'foo' are incompatible. +!!! error TS2415: Type 'U' is not assignable to type 'V'. ~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/subtypingWithCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/subtypingWithCallSignaturesWithOptionalParameters.errors.txt index 918d219cec5..b5d23da2241 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/subtypingWithCallSignaturesWithOptionalParameters.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts(19,11): error TS2429: Interface 'I3' incorrectly extends interface 'Base': - Types of property 'a' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts(19,11): error TS2430: Interface 'I3' incorrectly extends interface 'Base'. + Types of property 'a' are incompatible. Type '(x: number) => number' is not assignable to type '() => number'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts(49,11): error TS2429: Interface 'I10' incorrectly extends interface 'Base': - Types of property 'a3' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts(49,11): error TS2430: Interface 'I10' incorrectly extends interface 'Base'. + Types of property 'a3' are incompatible. Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. @@ -27,9 +27,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base { ~~ -!!! error TS2429: Interface 'I3' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type '(x: number) => number' is not assignable to type '() => number'. +!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type '(x: number) => number' is not assignable to type '() => number'. a: (x: number) => number; // error, too many required params } @@ -61,9 +61,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base { ~~~ -!!! error TS2429: Interface 'I10' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. +!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. a3: (x: number, y: number) => number; // error, too many required params } diff --git a/tests/baselines/reference/subtypingWithCallSignaturesWithRestParameters.errors.txt b/tests/baselines/reference/subtypingWithCallSignaturesWithRestParameters.errors.txt index 4392862d189..f4a141ff390 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesWithRestParameters.errors.txt +++ b/tests/baselines/reference/subtypingWithCallSignaturesWithRestParameters.errors.txt @@ -1,57 +1,57 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(18,11): error TS2429: Interface 'I1C' incorrectly extends interface 'Base': - Types of property 'a' are incompatible: - Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number': - Types of parameters 'args' and 'args' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(18,11): error TS2430: Interface 'I1C' incorrectly extends interface 'Base'. + Types of property 'a' are incompatible. + 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/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(34,11): error TS2429: Interface 'I3B' incorrectly extends interface 'Base': - Types of property 'a' are incompatible: - Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number': - Types of parameters 'x' and 'args' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(34,11): error TS2430: Interface 'I3B' incorrectly extends interface 'Base'. + Types of property 'a' are incompatible. + 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/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(60,11): error TS2429: Interface 'I6C' incorrectly extends interface 'Base': - Types of property 'a2' are incompatible: - Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number': - Types of parameters 'args' and 'z' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(60,11): error TS2430: Interface 'I6C' incorrectly extends interface 'Base'. + Types of property 'a2' are incompatible. + 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/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(90,11): error TS2429: Interface 'I10B' incorrectly extends interface 'Base': - Types of property 'a3' are incompatible: - 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: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(90,11): error TS2430: Interface 'I10B' incorrectly extends interface 'Base'. + Types of property 'a3' are incompatible. + 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/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(94,11): error TS2429: Interface 'I10C' incorrectly extends interface 'Base': - Types of property 'a3' are incompatible: - 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: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(94,11): error TS2430: Interface 'I10C' incorrectly extends interface 'Base'. + Types of property 'a3' are incompatible. + 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/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(98,11): error TS2429: Interface 'I10D' incorrectly extends interface 'Base': - Types of property 'a3' are incompatible: - 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: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(98,11): error TS2430: Interface 'I10D' incorrectly extends interface 'Base'. + Types of property 'a3' are incompatible. + 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/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(102,11): error TS2429: Interface 'I10E' incorrectly extends interface 'Base': - Types of property 'a3' are incompatible: - Type '(x: number, ...z: string[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': - Types of parameters 'z' and 'z' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(102,11): error TS2430: Interface 'I10E' incorrectly extends interface 'Base'. + Types of property 'a3' are incompatible. + Type '(x: number, ...z: string[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. + Types of parameters 'z' and 'z' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(110,11): error TS2429: Interface 'I12' incorrectly extends interface 'Base': - Types of property 'a4' are incompatible: - 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: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(110,11): error TS2430: Interface 'I12' incorrectly extends interface 'Base'. + Types of property 'a4' are incompatible. + 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/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(118,11): error TS2429: Interface 'I14' incorrectly extends interface 'Base': - Types of property 'a4' are incompatible: - 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: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(118,11): error TS2430: Interface 'I14' incorrectly extends interface 'Base'. + Types of property 'a4' are incompatible. + 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/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(126,11): error TS2429: Interface 'I16' incorrectly extends interface 'Base': - Types of property 'a4' are incompatible: - 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: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(126,11): error TS2430: Interface 'I16' incorrectly extends interface 'Base'. + Types of property 'a4' are incompatible. + 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'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(130,11): error TS2429: Interface 'I17' incorrectly extends interface 'Base': - Types of property 'a4' are incompatible: - Type '(...args: number[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': - Types of parameters 'args' and 'y' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts(130,11): error TS2430: Interface 'I17' incorrectly extends interface 'Base'. + Types of property 'a4' are incompatible. + Type '(...args: number[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. + Types of parameters 'args' and 'y' are incompatible. Type 'number' is not assignable to type 'string'. @@ -75,11 +75,11 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I1C extends Base { ~~~ -!!! error TS2429: Interface 'I1C' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number': -!!! error TS2429: Types of parameters 'args' and 'args' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'I1C' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'. +!!! error TS2430: Types of parameters 'args' and 'args' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'number'. a: (...args: string[]) => number; // error, type mismatch } @@ -97,11 +97,11 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3B extends Base { ~~~ -!!! error TS2429: Interface 'I3B' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number': -!!! error TS2429: Types of parameters 'x' and 'args' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'I3B' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'. +!!! error TS2430: Types of parameters 'x' and 'args' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'number'. a: (x?: string) => number; // error, incompatible type } @@ -129,11 +129,11 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I6C extends Base { ~~~ -!!! error TS2429: Interface 'I6C' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a2' are incompatible: -!!! error TS2429: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number': -!!! error TS2429: Types of parameters 'args' and 'z' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'I6C' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a2' are incompatible. +!!! error TS2430: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'. +!!! error TS2430: Types of parameters 'args' and 'z' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'number'. a2: (x: number, ...args: string[]) => number; // error } @@ -165,41 +165,41 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10B extends Base { ~~~~ -!!! error TS2429: Interface 'I10B' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': -!!! error TS2429: Types of parameters 'y' and 'y' are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'I10B' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. +!!! error TS2430: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. a3: (x: number, y?: number, z?: number) => number; // error } interface I10C extends Base { ~~~~ -!!! error TS2429: Interface 'I10C' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': -!!! error TS2429: Types of parameters 'z' and 'y' are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'I10C' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. +!!! error TS2430: Types of parameters 'z' and 'y' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. a3: (x: number, ...z: number[]) => number; // error } interface I10D extends Base { ~~~~ -!!! error TS2429: Interface 'I10D' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': -!!! error TS2429: Types of parameters 'x' and 'x' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'I10D' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. +!!! error TS2430: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'number'. a3: (x: string, y?: string, z?: string) => number; // error, incompatible types } interface I10E extends Base { ~~~~ -!!! error TS2429: Interface 'I10E' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type '(x: number, ...z: string[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': -!!! error TS2429: Types of parameters 'z' and 'z' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'I10E' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type '(x: number, ...z: string[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. +!!! error TS2430: Types of parameters 'z' and 'z' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'number'. a3: (x: number, ...z: string[]) => number; // error } @@ -209,11 +209,11 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I12 extends Base { ~~~ -!!! error TS2429: Interface 'I12' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a4' are incompatible: -!!! error TS2429: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': -!!! error TS2429: Types of parameters 'y' and 'y' are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'I12' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a4' are incompatible. +!!! error TS2430: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. +!!! error TS2430: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. a4: (x?: number, y?: number) => number; // error, type mismatch } @@ -223,11 +223,11 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I14 extends Base { ~~~ -!!! error TS2429: Interface 'I14' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a4' are incompatible: -!!! error TS2429: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': -!!! error TS2429: Types of parameters 'y' and 'y' are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'I14' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a4' are incompatible. +!!! error TS2430: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. +!!! error TS2430: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. a4: (x: number, y?: number) => number; // error, second param has type mismatch } @@ -237,21 +237,21 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I16 extends Base { ~~~ -!!! error TS2429: Interface 'I16' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a4' are incompatible: -!!! error TS2429: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': -!!! error TS2429: Types of parameters 'args' and 'z' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'I16' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a4' are incompatible. +!!! error TS2430: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. +!!! error TS2430: Types of parameters 'args' and 'z' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'number'. a4: (x: number, ...args: string[]) => number; // error, rest param has type mismatch } interface I17 extends Base { ~~~ -!!! error TS2429: Interface 'I17' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a4' are incompatible: -!!! error TS2429: Type '(...args: number[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': -!!! error TS2429: Types of parameters 'args' and 'y' are incompatible: -!!! error TS2429: Type 'number' is not assignable to type 'string'. +!!! error TS2430: Interface 'I17' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a4' are incompatible. +!!! error TS2430: Type '(...args: number[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. +!!! error TS2430: Types of parameters 'args' and 'y' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. a4: (...args: number[]) => number; // error } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt index b42e93b0f3b..d3c399477d6 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt +++ b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts(70,15): error TS2429: Interface 'I2' incorrectly extends interface 'Base2': - Types of property 'a' are incompatible: - Type '(x: string) => string' is not assignable to type '{ (x: 'a'): number; (x: string): number; }': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts(70,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. + Types of property 'a' are incompatible. + Type '(x: string) => string' is not assignable to type '{ (x: 'a'): number; (x: string): number; }'. Type 'string' is not assignable to type 'number'. @@ -76,10 +76,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW // S's interface I2 extends Base2 { ~~ -!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type '(x: string) => string' is not assignable to type '{ (x: 'a'): number; (x: string): number; }': -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type '(x: string) => string' is not assignable to type '{ (x: 'a'): number; (x: string): number; }'. +!!! error TS2430: Type 'string' is not assignable to type 'number'. // N's a: (x: string) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/subtypingWithConstructSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/subtypingWithConstructSignaturesWithOptionalParameters.errors.txt index 916813a4306..e041b1cdce0 100644 --- a/tests/baselines/reference/subtypingWithConstructSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/subtypingWithConstructSignaturesWithOptionalParameters.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithOptionalParameters.ts(19,11): error TS2429: Interface 'I3' incorrectly extends interface 'Base': - Types of property 'a' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithOptionalParameters.ts(19,11): error TS2430: Interface 'I3' incorrectly extends interface 'Base'. + Types of property 'a' are incompatible. Type 'new (x: number) => number' is not assignable to type 'new () => number'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithOptionalParameters.ts(49,11): error TS2429: Interface 'I10' incorrectly extends interface 'Base': - Types of property 'a3' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithOptionalParameters.ts(49,11): error TS2430: Interface 'I10' incorrectly extends interface 'Base'. + Types of property 'a3' are incompatible. Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. @@ -27,9 +27,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base { ~~ -!!! error TS2429: Interface 'I3' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type 'new (x: number) => number' is not assignable to type 'new () => number'. +!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type 'new (x: number) => number' is not assignable to type 'new () => number'. a: new (x: number) => number; // error, too many required params } @@ -61,9 +61,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base { ~~~ -!!! error TS2429: Interface 'I10' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. +!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. a3: new (x: number, y: number) => number; // error, too many required params } diff --git a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt index c0ae6d2b9f2..03cc6de0ca4 100644 --- a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt +++ b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts(70,15): error TS2429: Interface 'I2' incorrectly extends interface 'Base2': - Types of property 'a' are incompatible: - Type 'new (x: string) => string' is not assignable to type '{ new (x: 'a'): number; new (x: string): number; }': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts(70,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. + Types of property 'a' are incompatible. + Type 'new (x: string) => string' is not assignable to type '{ new (x: 'a'): number; new (x: string): number; }'. Type 'string' is not assignable to type 'number'. @@ -76,10 +76,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW // S's interface I2 extends Base2 { ~~ -!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type 'new (x: string) => string' is not assignable to type '{ new (x: 'a'): number; new (x: string): number; }': -!!! error TS2429: Type 'string' is not assignable to type 'number'. +!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type 'new (x: string) => string' is not assignable to type '{ new (x: 'a'): number; new (x: string): number; }'. +!!! error TS2430: Type 'string' is not assignable to type 'number'. // N's a: new (x: string) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/subtypingWithGenericCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/subtypingWithGenericCallSignaturesWithOptionalParameters.errors.txt index 31582f29bdc..e8f50236cba 100644 --- a/tests/baselines/reference/subtypingWithGenericCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/subtypingWithGenericCallSignaturesWithOptionalParameters.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(20,15): error TS2429: Interface 'I3' incorrectly extends interface 'Base': - Types of property 'a' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(20,15): error TS2430: Interface 'I3' incorrectly extends interface 'Base'. + Types of property 'a' are incompatible. Type '(x: T) => T' is not assignable to type '() => T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(50,15): error TS2429: Interface 'I10' incorrectly extends interface 'Base': - Types of property 'a3' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(50,15): error TS2430: Interface 'I10' incorrectly extends interface 'Base'. + Types of property 'a3' are incompatible. Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(108,15): error TS2429: Interface 'I3' incorrectly extends interface 'Base2': - Types of property 'a' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(108,15): error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. + Types of property 'a' are incompatible. Type '(x: T) => T' is not assignable to type '() => T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(138,15): error TS2429: Interface 'I10' incorrectly extends interface 'Base2': - Types of property 'a3' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(138,15): error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. + Types of property 'a3' are incompatible. Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(196,15): error TS2429: Interface 'I3' incorrectly extends interface 'Base2': - Types of property 'a' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(196,15): error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. + Types of property 'a' are incompatible. Type '(x: T) => T' is not assignable to type '() => T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(226,15): error TS2429: Interface 'I10' incorrectly extends interface 'Base2': - Types of property 'a3' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts(226,15): error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. + Types of property 'a3' are incompatible. Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. @@ -40,9 +40,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base { ~~ -!!! error TS2429: Interface 'I3' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type '(x: T) => T' is not assignable to type '() => T'. +!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type '(x: T) => T' is not assignable to type '() => T'. a: (x: T) => T; // error, too many required params } @@ -74,9 +74,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base { ~~~ -!!! error TS2429: Interface 'I10' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. a3: (x: T, y: T) => T; // error, too many required params } @@ -136,9 +136,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base2 { ~~ -!!! error TS2429: Interface 'I3' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type '(x: T) => T' is not assignable to type '() => T'. +!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type '(x: T) => T' is not assignable to type '() => T'. a: (x: T) => T; } @@ -170,9 +170,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base2 { ~~~ -!!! error TS2429: Interface 'I10' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. a3: (x: T, y: T) => T; } @@ -232,9 +232,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base2 { ~~ -!!! error TS2429: Interface 'I3' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type '(x: T) => T' is not assignable to type '() => T'. +!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type '(x: T) => T' is not assignable to type '() => T'. a: (x: T) => T; // error, not identical and contextual signature instatiation can't make inference from T to T } @@ -266,9 +266,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base2 { ~~~ -!!! error TS2429: Interface 'I10' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. a3: (x: T, y: T) => T; // error, too many required params } diff --git a/tests/baselines/reference/subtypingWithGenericConstructSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/subtypingWithGenericConstructSignaturesWithOptionalParameters.errors.txt index 2759801416a..27066058238 100644 --- a/tests/baselines/reference/subtypingWithGenericConstructSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/subtypingWithGenericConstructSignaturesWithOptionalParameters.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(20,15): error TS2429: Interface 'I3' incorrectly extends interface 'Base': - Types of property 'a' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(20,15): error TS2430: Interface 'I3' incorrectly extends interface 'Base'. + Types of property 'a' are incompatible. Type 'new (x: T) => T' is not assignable to type 'new () => T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(50,15): error TS2429: Interface 'I10' incorrectly extends interface 'Base': - Types of property 'a3' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(50,15): error TS2430: Interface 'I10' incorrectly extends interface 'Base'. + Types of property 'a3' are incompatible. Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(108,15): error TS2429: Interface 'I3' incorrectly extends interface 'Base2': - Types of property 'a' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(108,15): error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. + Types of property 'a' are incompatible. Type 'new (x: T) => T' is not assignable to type 'new () => T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(138,15): error TS2429: Interface 'I10' incorrectly extends interface 'Base2': - Types of property 'a3' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(138,15): error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. + Types of property 'a3' are incompatible. Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(196,15): error TS2429: Interface 'I3' incorrectly extends interface 'Base2': - Types of property 'a' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(196,15): error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. + Types of property 'a' are incompatible. Type 'new (x: T) => T' is not assignable to type 'new () => T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(226,15): error TS2429: Interface 'I10' incorrectly extends interface 'Base2': - Types of property 'a3' are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts(226,15): error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. + Types of property 'a3' are incompatible. Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. @@ -40,9 +40,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base { ~~ -!!! error TS2429: Interface 'I3' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type 'new (x: T) => T' is not assignable to type 'new () => T'. +!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new () => T'. a: new (x: T) => T; // error, too many required params } @@ -74,9 +74,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base { ~~~ -!!! error TS2429: Interface 'I10' incorrectly extends interface 'Base': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. +!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. a3: new (x: T, y: T) => T; // error, too many required params } @@ -136,9 +136,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base2 { ~~ -!!! error TS2429: Interface 'I3' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type 'new (x: T) => T' is not assignable to type 'new () => T'. +!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new () => T'. a: new (x: T) => T; } @@ -170,9 +170,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base2 { ~~~ -!!! error TS2429: Interface 'I10' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. +!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. a3: new (x: T, y: T) => T; } @@ -232,9 +232,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base2 { ~~ -!!! error TS2429: Interface 'I3' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a' are incompatible: -!!! error TS2429: Type 'new (x: T) => T' is not assignable to type 'new () => T'. +!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a' are incompatible. +!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new () => T'. a: new (x: T) => T; // error, not identical and contextual signature instatiation can't make inference from T to T } @@ -266,9 +266,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base2 { ~~~ -!!! error TS2429: Interface 'I10' incorrectly extends interface 'Base2': -!!! error TS2429: Types of property 'a3' are incompatible: -!!! error TS2429: Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. +!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. +!!! error TS2430: Types of property 'a3' are incompatible. +!!! error TS2430: Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. a3: new (x: T, y: T) => T; // error, too many required params } diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.errors.txt b/tests/baselines/reference/subtypingWithNumericIndexer.errors.txt index f56a8c31fa4..e5ff0d47ca3 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.errors.txt +++ b/tests/baselines/reference/subtypingWithNumericIndexer.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts(32,11): error TS2416: Class 'B3' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts(32,11): error TS2415: Class 'B3' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts(36,11): error TS2416: Class 'B4' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts(36,11): error TS2415: Class 'B4' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'Derived2' is not assignable to type 'T'. @@ -40,17 +40,17 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Derived' is not assignable to type 'T'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Derived' is not assignable to type 'T'. [x: number]: Derived; // error, BUG? } class B4 extends A { ~~ -!!! error TS2416: Class 'B4' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Derived2' is not assignable to type 'T'. +!!! error TS2415: Class 'B4' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Derived2' is not assignable to type 'T'. [x: number]: Derived2; // error, BUG? } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithNumericIndexer2.errors.txt b/tests/baselines/reference/subtypingWithNumericIndexer2.errors.txt index d8a33c93c81..1c428ae99af 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer2.errors.txt +++ b/tests/baselines/reference/subtypingWithNumericIndexer2.errors.txt @@ -1,17 +1,17 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(11,11): error TS2429: Interface 'B' incorrectly extends interface 'A': - Index signatures are incompatible: - Type 'Base' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(11,11): error TS2430: Interface 'B' incorrectly extends interface '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/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(24,25): error TS2343: Type 'Base' does not satisfy the constraint 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(24,25): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. Property 'bar' is missing in type 'Base'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(32,15): error TS2429: Interface 'B3' incorrectly extends interface 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(32,15): error TS2430: Interface 'B3' incorrectly extends interface 'A'. + Index signatures are incompatible. Type 'Base' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(36,15): error TS2429: Interface 'B4' incorrectly extends interface 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(36,15): error TS2430: Interface 'B4' incorrectly extends interface 'A'. + Index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(40,15): error TS2429: Interface 'B5' incorrectly extends interface 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(40,15): error TS2430: Interface 'B5' incorrectly extends interface 'A'. + Index signatures are incompatible. Type 'Derived2' is not assignable to type 'T'. @@ -28,10 +28,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2429: Interface 'B' incorrectly extends interface 'A': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'Base' is not assignable to type 'Derived': -!!! error TS2429: Property 'bar' is missing in type 'Base'. +!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Property 'bar' is missing in type 'Base'. [x: number]: Base; // error } @@ -46,8 +46,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~~~~~~~ -!!! error TS2343: Type 'Base' does not satisfy the constraint 'Derived': -!!! error TS2343: Property 'bar' is missing in type 'Base'. +!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. +!!! error TS2344: Property 'bar' is missing in type 'Base'. [x: number]: Derived; // error } @@ -57,25 +57,25 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A { ~~ -!!! error TS2429: Interface 'B3' incorrectly extends interface 'A': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'Base' is not assignable to type 'T'. +!!! error TS2430: Interface 'B3' incorrectly extends interface 'A'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: Type 'Base' is not assignable to type 'T'. [x: number]: Base; // error } interface B4 extends A { ~~ -!!! error TS2429: Interface 'B4' incorrectly extends interface 'A': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'Derived' is not assignable to type 'T'. +!!! error TS2430: Interface 'B4' incorrectly extends interface 'A'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: Type 'Derived' is not assignable to type 'T'. [x: number]: Derived; // error } interface B5 extends A { ~~ -!!! error TS2429: Interface 'B5' incorrectly extends interface 'A': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'Derived2' is not assignable to type 'T'. +!!! error TS2430: Interface 'B5' incorrectly extends interface 'A'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: Type 'Derived2' is not assignable to type 'T'. [x: number]: Derived2; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.errors.txt b/tests/baselines/reference/subtypingWithNumericIndexer3.errors.txt index 2b20970cc7f..e386fc69a3f 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.errors.txt +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.errors.txt @@ -1,17 +1,17 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(11,7): error TS2416: Class 'B' incorrectly extends base class 'A': - Index signatures are incompatible: - Type 'Base' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(11,7): error TS2415: Class 'B' incorrectly extends base class '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/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(24,21): error TS2343: Type 'Base' does not satisfy the constraint 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(24,21): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. Property 'bar' is missing in type 'Base'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(32,11): error TS2416: Class 'B3' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(32,11): error TS2415: Class 'B3' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'Base' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(36,11): error TS2416: Class 'B4' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(36,11): error TS2415: Class 'B4' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(40,11): error TS2416: Class 'B5' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(40,11): error TS2415: Class 'B5' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'Derived2' is not assignable to type 'T'. @@ -28,10 +28,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2416: Class 'B' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Base' is not assignable to type 'Derived': -!!! error TS2416: Property 'bar' is missing in type 'Base'. +!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2415: Property 'bar' is missing in type 'Base'. [x: number]: Base; // error } @@ -46,8 +46,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~~~~~~~ -!!! error TS2343: Type 'Base' does not satisfy the constraint 'Derived': -!!! error TS2343: Property 'bar' is missing in type 'Base'. +!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. +!!! error TS2344: Property 'bar' is missing in type 'Base'. [x: number]: Derived; // error } @@ -57,25 +57,25 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Base' is not assignable to type 'T'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Base' is not assignable to type 'T'. [x: number]: Base; // error } class B4 extends A { ~~ -!!! error TS2416: Class 'B4' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Derived' is not assignable to type 'T'. +!!! error TS2415: Class 'B4' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Derived' is not assignable to type 'T'. [x: number]: Derived; // error } class B5 extends A { ~~ -!!! error TS2416: Class 'B5' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Derived2' is not assignable to type 'T'. +!!! error TS2415: Class 'B5' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Derived2' is not assignable to type 'T'. [x: number]: Derived2; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt b/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt index cbc5236edec..f3c9cc25a10 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(11,7): error TS2416: Class 'B' incorrectly extends base class 'A': - Index signatures are incompatible: - Type 'string' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(11,7): error TS2415: Class 'B' incorrectly extends base class 'A'. + Index signatures are incompatible. + Type 'string' is not assignable to type 'Derived'. Property 'bar' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(20,11): error TS2416: Class 'B' incorrectly extends base class 'A': - Index signatures are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(20,11): error TS2415: Class 'B' incorrectly extends base class 'A'. + Index signatures are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(20,21): error TS2343: Type 'Base' does not satisfy the constraint 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(20,21): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. Property 'bar' is missing in type 'Base'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(24,11): error TS2416: Class 'B3' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(24,11): error TS2415: Class 'B3' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'string' is not assignable to type 'T'. @@ -26,10 +26,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2416: Class 'B' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'Derived': -!!! error TS2416: Property 'bar' is missing in type 'String'. +!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'Derived'. +!!! error TS2415: Property 'bar' is missing in type 'String'. [x: number]: string; // error } @@ -40,21 +40,21 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2416: Class 'B' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'Base': -!!! error TS2416: Property 'foo' is missing in type 'String'. +!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'Base'. +!!! error TS2415: Property 'foo' is missing in type 'String'. ~~~~~~~ -!!! error TS2343: Type 'Base' does not satisfy the constraint 'Derived': -!!! error TS2343: Property 'bar' is missing in type 'Base'. +!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. +!!! error TS2344: Property 'bar' is missing in type 'Base'. [x: number]: string; // error } class B3 extends A { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'T'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'T'. [x: number]: string; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithNumericIndexer5.errors.txt b/tests/baselines/reference/subtypingWithNumericIndexer5.errors.txt index 818a9591309..be4afeafcde 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer5.errors.txt +++ b/tests/baselines/reference/subtypingWithNumericIndexer5.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts(11,7): error TS2421: Class 'B' incorrectly implements interface 'A': - Index signatures are incompatible: - Type 'Base' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts(11,7): error TS2420: Class 'B' incorrectly implements interface '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/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts(32,11): error TS2421: Class 'B3' incorrectly implements interface 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts(32,11): error TS2420: Class 'B3' incorrectly implements interface 'A'. + Index signatures are incompatible. Type 'Base' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts(36,11): error TS2421: Class 'B4' incorrectly implements interface 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts(36,11): error TS2420: Class 'B4' incorrectly implements interface 'A'. + Index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts(40,11): error TS2421: Class 'B5' incorrectly implements interface 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts(40,11): error TS2420: Class 'B5' incorrectly implements interface 'A'. + Index signatures are incompatible. Type 'Derived2' is not assignable to type 'T'. @@ -26,10 +26,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B implements A { ~ -!!! error TS2421: Class 'B' incorrectly implements interface 'A': -!!! error TS2421: Index signatures are incompatible: -!!! error TS2421: Type 'Base' is not assignable to type 'Derived': -!!! error TS2421: Property 'bar' is missing in type 'Base'. +!!! error TS2420: Class 'B' incorrectly implements interface 'A'. +!!! error TS2420: Index signatures are incompatible. +!!! error TS2420: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2420: Property 'bar' is missing in type 'Base'. [x: string]: Base; // error } @@ -52,25 +52,25 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 implements A { ~~ -!!! error TS2421: Class 'B3' incorrectly implements interface 'A': -!!! error TS2421: Index signatures are incompatible: -!!! error TS2421: Type 'Base' is not assignable to type 'T'. +!!! error TS2420: Class 'B3' incorrectly implements interface 'A'. +!!! error TS2420: Index signatures are incompatible. +!!! error TS2420: Type 'Base' is not assignable to type 'T'. [x: string]: Base; // error } class B4 implements A { ~~ -!!! error TS2421: Class 'B4' incorrectly implements interface 'A': -!!! error TS2421: Index signatures are incompatible: -!!! error TS2421: Type 'Derived' is not assignable to type 'T'. +!!! error TS2420: Class 'B4' incorrectly implements interface 'A'. +!!! error TS2420: Index signatures are incompatible. +!!! error TS2420: Type 'Derived' is not assignable to type 'T'. [x: string]: Derived; // error } class B5 implements A { ~~ -!!! error TS2421: Class 'B5' incorrectly implements interface 'A': -!!! error TS2421: Index signatures are incompatible: -!!! error TS2421: Type 'Derived2' is not assignable to type 'T'. +!!! error TS2420: Class 'B5' incorrectly implements interface 'A'. +!!! error TS2420: Index signatures are incompatible. +!!! error TS2420: Type 'Derived2' is not assignable to type 'T'. [x: string]: Derived2; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithObjectMembers.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers.errors.txt index fa1d3c43fa4..e54ece580ca 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers.errors.txt @@ -1,26 +1,26 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(12,7): error TS2416: Class 'B' incorrectly extends base class 'A': - Types of property 'bar' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(12,7): error TS2415: Class 'B' incorrectly extends base class 'A'. + Types of property 'bar' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(22,7): error TS2416: Class 'B2' incorrectly extends base class 'A2': - Types of property '2.0' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(22,7): error TS2415: Class 'B2' incorrectly extends base class 'A2'. + Types of property '2.0' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(32,7): error TS2416: Class 'B3' incorrectly extends base class 'A3': - Types of property ''2.0'' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(32,7): error TS2415: Class 'B3' incorrectly extends base class 'A3'. + Types of property ''2.0'' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(43,11): error TS2416: Class 'B' incorrectly extends base class 'A': - Types of property 'bar' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(43,11): error TS2415: Class 'B' incorrectly extends base class 'A'. + Types of property 'bar' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(53,11): error TS2416: Class 'B2' incorrectly extends base class 'A2': - Types of property '2.0' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(53,11): error TS2415: Class 'B2' incorrectly extends base class 'A2'. + Types of property '2.0' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(63,11): error TS2416: Class 'B3' incorrectly extends base class 'A3': - Types of property ''2.0'' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(63,11): error TS2415: Class 'B3' incorrectly extends base class 'A3'. + Types of property ''2.0'' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. @@ -38,10 +38,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2416: Class 'B' incorrectly extends base class 'A': -!!! error TS2416: Types of property 'bar' are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'Base': -!!! error TS2416: Property 'foo' is missing in type 'String'. +!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Types of property 'bar' are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'Base'. +!!! error TS2415: Property 'foo' is missing in type 'String'. foo: Derived; // ok bar: string; // error } @@ -53,10 +53,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B2 extends A2 { ~~ -!!! error TS2416: Class 'B2' incorrectly extends base class 'A2': -!!! error TS2416: Types of property '2.0' are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'Base': -!!! error TS2416: Property 'foo' is missing in type 'String'. +!!! error TS2415: Class 'B2' incorrectly extends base class 'A2'. +!!! error TS2415: Types of property '2.0' are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'Base'. +!!! error TS2415: Property 'foo' is missing in type 'String'. 1: Derived; // ok 2: string; // error } @@ -68,10 +68,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A3 { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A3': -!!! error TS2416: Types of property ''2.0'' are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'Base': -!!! error TS2416: Property 'foo' is missing in type 'String'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. +!!! error TS2415: Types of property ''2.0'' are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'Base'. +!!! error TS2415: Property 'foo' is missing in type 'String'. '1': Derived; // ok '2.0': string; // error } @@ -84,10 +84,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2416: Class 'B' incorrectly extends base class 'A': -!!! error TS2416: Types of property 'bar' are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'Base': -!!! error TS2416: Property 'foo' is missing in type 'String'. +!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Types of property 'bar' are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'Base'. +!!! error TS2415: Property 'foo' is missing in type 'String'. foo: Derived2; // ok bar: string; // error } @@ -99,10 +99,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B2 extends A2 { ~~ -!!! error TS2416: Class 'B2' incorrectly extends base class 'A2': -!!! error TS2416: Types of property '2.0' are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'Base': -!!! error TS2416: Property 'foo' is missing in type 'String'. +!!! error TS2415: Class 'B2' incorrectly extends base class 'A2'. +!!! error TS2415: Types of property '2.0' are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'Base'. +!!! error TS2415: Property 'foo' is missing in type 'String'. 1: Derived2; // ok 2: string; // error } @@ -114,10 +114,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A3 { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A3': -!!! error TS2416: Types of property ''2.0'' are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'Base': -!!! error TS2416: Property 'foo' is missing in type 'String'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. +!!! error TS2415: Types of property ''2.0'' are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'Base'. +!!! error TS2415: Property 'foo' is missing in type 'String'. '1': Derived2; // ok '2.0': string; // error } diff --git a/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt index 73421a09015..0ba28f2fcd0 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt @@ -1,26 +1,26 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(17,15): error TS2429: Interface 'B' incorrectly extends interface 'A': - Types of property 'bar' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(17,15): error TS2430: Interface 'B' incorrectly extends interface 'A'. + Types of property 'bar' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(27,15): error TS2429: Interface 'B2' incorrectly extends interface 'A2': - Types of property '2.0' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(27,15): error TS2430: Interface 'B2' incorrectly extends interface 'A2'. + Types of property '2.0' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(37,15): error TS2429: Interface 'B3' incorrectly extends interface 'A3': - Types of property ''2.0'' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(37,15): error TS2430: Interface 'B3' incorrectly extends interface 'A3'. + Types of property ''2.0'' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(50,15): error TS2429: Interface 'B' incorrectly extends interface 'A': - Types of property 'bar' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(50,15): error TS2430: Interface 'B' incorrectly extends interface 'A'. + Types of property 'bar' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(60,15): error TS2429: Interface 'B2' incorrectly extends interface 'A2': - Types of property '2.0' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(60,15): error TS2430: Interface 'B2' incorrectly extends interface 'A2'. + Types of property '2.0' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(70,15): error TS2429: Interface 'B3' incorrectly extends interface 'A3': - Types of property ''2.0'' are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(70,15): error TS2430: Interface 'B3' incorrectly extends interface 'A3'. + Types of property ''2.0'' are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. @@ -43,10 +43,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2429: Interface 'B' incorrectly extends interface 'A': -!!! error TS2429: Types of property 'bar' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'Base': -!!! error TS2429: Property 'foo' is missing in type 'String'. +!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Types of property 'bar' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Property 'foo' is missing in type 'String'. foo: Derived; // ok bar: string; // error } @@ -58,10 +58,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B2 extends A2 { ~~ -!!! error TS2429: Interface 'B2' incorrectly extends interface 'A2': -!!! error TS2429: Types of property '2.0' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'Base': -!!! error TS2429: Property 'foo' is missing in type 'String'. +!!! error TS2430: Interface 'B2' incorrectly extends interface 'A2'. +!!! error TS2430: Types of property '2.0' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Property 'foo' is missing in type 'String'. 1: Derived; // ok 2: string; // error } @@ -73,10 +73,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A3 { ~~ -!!! error TS2429: Interface 'B3' incorrectly extends interface 'A3': -!!! error TS2429: Types of property ''2.0'' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'Base': -!!! error TS2429: Property 'foo' is missing in type 'String'. +!!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. +!!! error TS2430: Types of property ''2.0'' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Property 'foo' is missing in type 'String'. '1': Derived; // ok '2.0': string; // error } @@ -91,10 +91,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2429: Interface 'B' incorrectly extends interface 'A': -!!! error TS2429: Types of property 'bar' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'Base': -!!! error TS2429: Property 'foo' is missing in type 'String'. +!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Types of property 'bar' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Property 'foo' is missing in type 'String'. foo?: Derived; // ok bar?: string; // error } @@ -106,10 +106,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B2 extends A2 { ~~ -!!! error TS2429: Interface 'B2' incorrectly extends interface 'A2': -!!! error TS2429: Types of property '2.0' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'Base': -!!! error TS2429: Property 'foo' is missing in type 'String'. +!!! error TS2430: Interface 'B2' incorrectly extends interface 'A2'. +!!! error TS2430: Types of property '2.0' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Property 'foo' is missing in type 'String'. 1?: Derived; // ok 2?: string; // error } @@ -121,10 +121,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A3 { ~~ -!!! error TS2429: Interface 'B3' incorrectly extends interface 'A3': -!!! error TS2429: Types of property ''2.0'' are incompatible: -!!! error TS2429: Type 'string' is not assignable to type 'Base': -!!! error TS2429: Property 'foo' is missing in type 'String'. +!!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. +!!! error TS2430: Types of property ''2.0'' are incompatible. +!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Property 'foo' is missing in type 'String'. '1'?: Derived; // ok '2.0'?: string; // error } diff --git a/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt index 47d34e19b31..8db24b325c0 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt @@ -1,26 +1,26 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(17,15): error TS2429: Interface 'B' incorrectly extends interface 'A': - Types of property 'bar' are incompatible: - Type 'Base' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(17,15): error TS2430: Interface 'B' incorrectly extends interface 'A'. + Types of property 'bar' are incompatible. + Type 'Base' is not assignable to type 'Derived'. Property 'bar' is missing in type 'Base'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(27,15): error TS2429: Interface 'B2' incorrectly extends interface 'A2': - Types of property '2.0' are incompatible: - Type 'Base' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(27,15): error TS2430: Interface 'B2' incorrectly extends interface 'A2'. + Types of property '2.0' are incompatible. + Type 'Base' is not assignable to type 'Derived'. Property 'bar' is missing in type 'Base'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(37,15): error TS2429: Interface 'B3' incorrectly extends interface 'A3': - Types of property ''2.0'' are incompatible: - Type 'Base' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(37,15): error TS2430: Interface 'B3' incorrectly extends interface 'A3'. + Types of property ''2.0'' are incompatible. + Type 'Base' is not assignable to type 'Derived'. Property 'bar' is missing in type 'Base'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(49,15): error TS2429: Interface 'B' incorrectly extends interface 'A': - Types of property 'bar' are incompatible: - Type 'Base' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(49,15): error TS2430: Interface 'B' incorrectly extends interface 'A'. + Types of property 'bar' are incompatible. + Type 'Base' is not assignable to type 'Derived'. Property 'bar' is missing in type 'Base'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(59,15): error TS2429: Interface 'B2' incorrectly extends interface 'A2': - Types of property '2.0' are incompatible: - Type 'Base' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(59,15): error TS2430: Interface 'B2' incorrectly extends interface 'A2'. + Types of property '2.0' are incompatible. + Type 'Base' is not assignable to type 'Derived'. Property 'bar' is missing in type 'Base'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(69,15): error TS2429: Interface 'B3' incorrectly extends interface 'A3': - Types of property ''2.0'' are incompatible: - Type 'Base' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts(69,15): error TS2430: Interface 'B3' incorrectly extends interface 'A3'. + Types of property ''2.0'' are incompatible. + Type 'Base' is not assignable to type 'Derived'. Property 'bar' is missing in type 'Base'. @@ -43,10 +43,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2429: Interface 'B' incorrectly extends interface 'A': -!!! error TS2429: Types of property 'bar' are incompatible: -!!! error TS2429: Type 'Base' is not assignable to type 'Derived': -!!! error TS2429: Property 'bar' is missing in type 'Base'. +!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Types of property 'bar' are incompatible. +!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Property 'bar' is missing in type 'Base'. foo: Derived; // ok bar: Base; // error } @@ -58,10 +58,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B2 extends A2 { ~~ -!!! error TS2429: Interface 'B2' incorrectly extends interface 'A2': -!!! error TS2429: Types of property '2.0' are incompatible: -!!! error TS2429: Type 'Base' is not assignable to type 'Derived': -!!! error TS2429: Property 'bar' is missing in type 'Base'. +!!! error TS2430: Interface 'B2' incorrectly extends interface 'A2'. +!!! error TS2430: Types of property '2.0' are incompatible. +!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Property 'bar' is missing in type 'Base'. 1: Derived; // ok 2: Base; // error } @@ -73,10 +73,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A3 { ~~ -!!! error TS2429: Interface 'B3' incorrectly extends interface 'A3': -!!! error TS2429: Types of property ''2.0'' are incompatible: -!!! error TS2429: Type 'Base' is not assignable to type 'Derived': -!!! error TS2429: Property 'bar' is missing in type 'Base'. +!!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. +!!! error TS2430: Types of property ''2.0'' are incompatible. +!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Property 'bar' is missing in type 'Base'. '1': Derived; // ok '2.0': Base; // error } @@ -90,10 +90,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2429: Interface 'B' incorrectly extends interface 'A': -!!! error TS2429: Types of property 'bar' are incompatible: -!!! error TS2429: Type 'Base' is not assignable to type 'Derived': -!!! error TS2429: Property 'bar' is missing in type 'Base'. +!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Types of property 'bar' are incompatible. +!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Property 'bar' is missing in type 'Base'. foo?: Derived; // ok bar?: Base; // error } @@ -105,10 +105,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B2 extends A2 { ~~ -!!! error TS2429: Interface 'B2' incorrectly extends interface 'A2': -!!! error TS2429: Types of property '2.0' are incompatible: -!!! error TS2429: Type 'Base' is not assignable to type 'Derived': -!!! error TS2429: Property 'bar' is missing in type 'Base'. +!!! error TS2430: Interface 'B2' incorrectly extends interface 'A2'. +!!! error TS2430: Types of property '2.0' are incompatible. +!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Property 'bar' is missing in type 'Base'. 1?: Derived; // ok 2?: Base; // error } @@ -120,10 +120,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A3 { ~~ -!!! error TS2429: Interface 'B3' incorrectly extends interface 'A3': -!!! error TS2429: Types of property ''2.0'' are incompatible: -!!! error TS2429: Type 'Base' is not assignable to type 'Derived': -!!! error TS2429: Property 'bar' is missing in type 'Base'. +!!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. +!!! error TS2430: Types of property ''2.0'' are incompatible. +!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Property 'bar' is missing in type 'Base'. '1'?: Derived; // ok '2.0'?: Base; // error } diff --git a/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt index 3f646666ad1..7fd025721ec 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(16,11): error TS2421: Class 'B' incorrectly implements interface 'A': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(16,11): error TS2420: Class 'B' incorrectly implements interface 'A'. Property 'foo' is missing in type 'B'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(24,11): error TS2421: Class 'B2' incorrectly implements interface 'A2': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(24,11): error TS2420: Class 'B2' incorrectly implements interface 'A2'. Property '1' is missing in type 'B2'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(32,11): error TS2421: Class 'B3' incorrectly implements interface 'A3': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(32,11): error TS2420: Class 'B3' incorrectly implements interface 'A3'. Property ''1'' is missing in type 'B3'. @@ -24,8 +24,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B implements A { ~ -!!! error TS2421: Class 'B' incorrectly implements interface 'A': -!!! error TS2421: Property 'foo' is missing in type 'B'. +!!! error TS2420: Class 'B' incorrectly implements interface 'A'. +!!! error TS2420: Property 'foo' is missing in type 'B'. fooo: Derived; // error } @@ -35,8 +35,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B2 implements A2 { ~~ -!!! error TS2421: Class 'B2' incorrectly implements interface 'A2': -!!! error TS2421: Property '1' is missing in type 'B2'. +!!! error TS2420: Class 'B2' incorrectly implements interface 'A2'. +!!! error TS2420: Property '1' is missing in type 'B2'. 2: Derived; // error } @@ -46,8 +46,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 implements A3 { ~~ -!!! error TS2421: Class 'B3' incorrectly implements interface 'A3': -!!! error TS2421: Property ''1'' is missing in type 'B3'. +!!! error TS2420: Class 'B3' incorrectly implements interface 'A3'. +!!! error TS2420: Property ''1'' is missing in type 'B3'. '1.0': Derived; // error } } diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt index 09dfa1696df..50646f64eae 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts(15,7): error TS2416: Class 'B' incorrectly extends base class 'A': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts(15,7): error TS2415: Class 'B' incorrectly extends base class 'A'. Property 'foo' is private in type 'B' but not in type 'A'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts(23,7): error TS2416: Class 'B2' incorrectly extends base class 'A2': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts(23,7): error TS2415: Class 'B2' incorrectly extends base class 'A2'. Property '1' is private in type 'B2' but not in type 'A2'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts(31,7): error TS2416: Class 'B3' incorrectly extends base class 'A3': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts(31,7): error TS2415: Class 'B3' incorrectly extends base class 'A3'. Property ''1'' is private in type 'B3' but not in type 'A3'. @@ -23,8 +23,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2416: Class 'B' incorrectly extends base class 'A': -!!! error TS2416: Property 'foo' is private in type 'B' but not in type 'A'. +!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Property 'foo' is private in type 'B' but not in type 'A'. private foo: Derived; // error } @@ -34,8 +34,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B2 extends A2 { ~~ -!!! error TS2416: Class 'B2' incorrectly extends base class 'A2': -!!! error TS2416: Property '1' is private in type 'B2' but not in type 'A2'. +!!! error TS2415: Class 'B2' incorrectly extends base class 'A2'. +!!! error TS2415: Property '1' is private in type 'B2' but not in type 'A2'. private 1: Derived; // error } @@ -45,7 +45,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A3 { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A3': -!!! error TS2416: Property ''1'' is private in type 'B3' but not in type 'A3'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. +!!! error TS2415: Property ''1'' is private in type 'B3' but not in type 'A3'. private '1': Derived; // error } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt index 9af7e894b27..083e96eaf5f 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(16,11): error TS2416: Class 'B' incorrectly extends base class 'A': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(16,11): error TS2415: Class 'B' incorrectly extends base class 'A'. Property 'foo' is private in type 'A' but not in type 'B'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(24,11): error TS2416: Class 'B2' incorrectly extends base class 'A2': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(24,11): error TS2415: Class 'B2' incorrectly extends base class 'A2'. Property '1' is private in type 'A2' but not in type 'B2'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(32,11): error TS2416: Class 'B3' incorrectly extends base class 'A3': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(32,11): error TS2415: Class 'B3' incorrectly extends base class 'A3'. Property ''1'' is private in type 'A3' but not in type 'B3'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(42,11): error TS2416: Class 'B' incorrectly extends base class 'A': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(42,11): error TS2415: Class 'B' incorrectly extends base class 'A'. Property 'foo' is private in type 'A' but not in type 'B'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(50,11): error TS2416: Class 'B2' incorrectly extends base class 'A2': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(50,11): error TS2415: Class 'B2' incorrectly extends base class 'A2'. Property '1' is private in type 'A2' but not in type 'B2'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(58,11): error TS2416: Class 'B3' incorrectly extends base class 'A3': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(58,11): error TS2415: Class 'B3' incorrectly extends base class 'A3'. Property ''1'' is private in type 'A3' but not in type 'B3'. @@ -30,8 +30,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2416: Class 'B' incorrectly extends base class 'A': -!!! error TS2416: Property 'foo' is private in type 'A' but not in type 'B'. +!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Property 'foo' is private in type 'A' but not in type 'B'. public foo: Derived; // error } @@ -41,8 +41,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B2 extends A2 { ~~ -!!! error TS2416: Class 'B2' incorrectly extends base class 'A2': -!!! error TS2416: Property '1' is private in type 'A2' but not in type 'B2'. +!!! error TS2415: Class 'B2' incorrectly extends base class 'A2'. +!!! error TS2415: Property '1' is private in type 'A2' but not in type 'B2'. public 1: Derived; // error } @@ -52,8 +52,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A3 { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A3': -!!! error TS2416: Property ''1'' is private in type 'A3' but not in type 'B3'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. +!!! error TS2415: Property ''1'' is private in type 'A3' but not in type 'B3'. public '1': Derived; // error } } @@ -65,8 +65,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2416: Class 'B' incorrectly extends base class 'A': -!!! error TS2416: Property 'foo' is private in type 'A' but not in type 'B'. +!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Property 'foo' is private in type 'A' but not in type 'B'. foo: Derived; // error } @@ -76,8 +76,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B2 extends A2 { ~~ -!!! error TS2416: Class 'B2' incorrectly extends base class 'A2': -!!! error TS2416: Property '1' is private in type 'A2' but not in type 'B2'. +!!! error TS2415: Class 'B2' incorrectly extends base class 'A2'. +!!! error TS2415: Property '1' is private in type 'A2' but not in type 'B2'. 1: Derived; // error } @@ -87,8 +87,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A3 { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A3': -!!! error TS2416: Property ''1'' is private in type 'A3' but not in type 'B3'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. +!!! error TS2415: Property ''1'' is private in type 'A3' but not in type 'B3'. '1': Derived; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt b/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt index ac17303572d..89d5ef7915c 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts(10,11): error TS2429: Interface 'S' incorrectly extends interface 'T': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts(10,11): error TS2430: Interface 'S' incorrectly extends interface 'T'. Property 'Foo' is optional in type 'S' but required in type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts(18,11): error TS2429: Interface 'S2' incorrectly extends interface 'T2': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts(18,11): error TS2430: Interface 'S2' incorrectly extends interface 'T2'. Property '1' is optional in type 'S2' but required in type 'T2'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts(26,11): error TS2429: Interface 'S3' incorrectly extends interface 'T3': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts(26,11): error TS2430: Interface 'S3' incorrectly extends interface 'T3'. Property ''1'' is optional in type 'S3' but required in type 'T3'. @@ -18,8 +18,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface S extends T { ~ -!!! error TS2429: Interface 'S' incorrectly extends interface 'T': -!!! error TS2429: Property 'Foo' is optional in type 'S' but required in type 'T'. +!!! error TS2430: Interface 'S' incorrectly extends interface 'T'. +!!! error TS2430: Property 'Foo' is optional in type 'S' but required in type 'T'. Foo?: Derived // error } @@ -29,8 +29,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface S2 extends T2 { ~~ -!!! error TS2429: Interface 'S2' incorrectly extends interface 'T2': -!!! error TS2429: Property '1' is optional in type 'S2' but required in type 'T2'. +!!! error TS2430: Interface 'S2' incorrectly extends interface 'T2'. +!!! error TS2430: Property '1' is optional in type 'S2' but required in type 'T2'. 1?: Derived; // error } @@ -40,8 +40,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface S3 extends T3 { ~~ -!!! error TS2429: Interface 'S3' incorrectly extends interface 'T3': -!!! error TS2429: Property ''1'' is optional in type 'S3' but required in type 'T3'. +!!! error TS2430: Interface 'S3' incorrectly extends interface 'T3'. +!!! error TS2430: Property ''1'' is optional in type 'S3' but required in type 'T3'. '1'?: Derived; // error } diff --git a/tests/baselines/reference/subtypingWithStringIndexer.errors.txt b/tests/baselines/reference/subtypingWithStringIndexer.errors.txt index db7e6bd7d47..4ad0f665425 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.errors.txt +++ b/tests/baselines/reference/subtypingWithStringIndexer.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts(32,11): error TS2416: Class 'B3' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts(32,11): error TS2415: Class 'B3' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts(36,11): error TS2416: Class 'B4' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts(36,11): error TS2415: Class 'B4' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'Derived2' is not assignable to type 'T'. @@ -40,17 +40,17 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Derived' is not assignable to type 'T'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Derived' is not assignable to type 'T'. [x: string]: Derived; // error } class B4 extends A { ~~ -!!! error TS2416: Class 'B4' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Derived2' is not assignable to type 'T'. +!!! error TS2415: Class 'B4' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Derived2' is not assignable to type 'T'. [x: string]: Derived2; // error } } diff --git a/tests/baselines/reference/subtypingWithStringIndexer2.errors.txt b/tests/baselines/reference/subtypingWithStringIndexer2.errors.txt index 7116f4d14af..add4abd8975 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer2.errors.txt +++ b/tests/baselines/reference/subtypingWithStringIndexer2.errors.txt @@ -1,17 +1,17 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(11,11): error TS2429: Interface 'B' incorrectly extends interface 'A': - Index signatures are incompatible: - Type 'Base' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(11,11): error TS2430: Interface 'B' incorrectly extends interface '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/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(24,25): error TS2343: Type 'Base' does not satisfy the constraint 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(24,25): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. Property 'bar' is missing in type 'Base'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(32,15): error TS2429: Interface 'B3' incorrectly extends interface 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(32,15): error TS2430: Interface 'B3' incorrectly extends interface 'A'. + Index signatures are incompatible. Type 'Base' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(36,15): error TS2429: Interface 'B4' incorrectly extends interface 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(36,15): error TS2430: Interface 'B4' incorrectly extends interface 'A'. + Index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(40,15): error TS2429: Interface 'B5' incorrectly extends interface 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(40,15): error TS2430: Interface 'B5' incorrectly extends interface 'A'. + Index signatures are incompatible. Type 'Derived2' is not assignable to type 'T'. @@ -28,10 +28,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2429: Interface 'B' incorrectly extends interface 'A': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'Base' is not assignable to type 'Derived': -!!! error TS2429: Property 'bar' is missing in type 'Base'. +!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Property 'bar' is missing in type 'Base'. [x: string]: Base; // error } @@ -46,8 +46,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~~~~~~~ -!!! error TS2343: Type 'Base' does not satisfy the constraint 'Derived': -!!! error TS2343: Property 'bar' is missing in type 'Base'. +!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. +!!! error TS2344: Property 'bar' is missing in type 'Base'. [x: string]: Derived; // error } @@ -57,25 +57,25 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A { ~~ -!!! error TS2429: Interface 'B3' incorrectly extends interface 'A': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'Base' is not assignable to type 'T'. +!!! error TS2430: Interface 'B3' incorrectly extends interface 'A'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: Type 'Base' is not assignable to type 'T'. [x: string]: Base; // error } interface B4 extends A { ~~ -!!! error TS2429: Interface 'B4' incorrectly extends interface 'A': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'Derived' is not assignable to type 'T'. +!!! error TS2430: Interface 'B4' incorrectly extends interface 'A'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: Type 'Derived' is not assignable to type 'T'. [x: string]: Derived; // error } interface B5 extends A { ~~ -!!! error TS2429: Interface 'B5' incorrectly extends interface 'A': -!!! error TS2429: Index signatures are incompatible: -!!! error TS2429: Type 'Derived2' is not assignable to type 'T'. +!!! error TS2430: Interface 'B5' incorrectly extends interface 'A'. +!!! error TS2430: Index signatures are incompatible. +!!! error TS2430: Type 'Derived2' is not assignable to type 'T'. [x: string]: Derived2; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.errors.txt b/tests/baselines/reference/subtypingWithStringIndexer3.errors.txt index 333e5a39c84..10c519cf304 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.errors.txt +++ b/tests/baselines/reference/subtypingWithStringIndexer3.errors.txt @@ -1,17 +1,17 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(11,7): error TS2416: Class 'B' incorrectly extends base class 'A': - Index signatures are incompatible: - Type 'Base' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(11,7): error TS2415: Class 'B' incorrectly extends base class '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/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(24,21): error TS2343: Type 'Base' does not satisfy the constraint 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(24,21): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. Property 'bar' is missing in type 'Base'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(32,11): error TS2416: Class 'B3' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(32,11): error TS2415: Class 'B3' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'Base' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(36,11): error TS2416: Class 'B4' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(36,11): error TS2415: Class 'B4' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(40,11): error TS2416: Class 'B5' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(40,11): error TS2415: Class 'B5' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'Derived2' is not assignable to type 'T'. @@ -28,10 +28,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2416: Class 'B' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Base' is not assignable to type 'Derived': -!!! error TS2416: Property 'bar' is missing in type 'Base'. +!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2415: Property 'bar' is missing in type 'Base'. [x: string]: Base; // error } @@ -46,8 +46,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~~~~~~~ -!!! error TS2343: Type 'Base' does not satisfy the constraint 'Derived': -!!! error TS2343: Property 'bar' is missing in type 'Base'. +!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. +!!! error TS2344: Property 'bar' is missing in type 'Base'. [x: string]: Derived; // error } @@ -57,25 +57,25 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Base' is not assignable to type 'T'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Base' is not assignable to type 'T'. [x: string]: Base; // error } class B4 extends A { ~~ -!!! error TS2416: Class 'B4' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Derived' is not assignable to type 'T'. +!!! error TS2415: Class 'B4' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Derived' is not assignable to type 'T'. [x: string]: Derived; // error } class B5 extends A { ~~ -!!! error TS2416: Class 'B5' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'Derived2' is not assignable to type 'T'. +!!! error TS2415: Class 'B5' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'Derived2' is not assignable to type 'T'. [x: string]: Derived2; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt b/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt index e788ede4656..6df716791c2 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt +++ b/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(11,7): error TS2416: Class 'B' incorrectly extends base class 'A': - Index signatures are incompatible: - Type 'string' is not assignable to type 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(11,7): error TS2415: Class 'B' incorrectly extends base class 'A'. + Index signatures are incompatible. + Type 'string' is not assignable to type 'Derived'. Property 'bar' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(20,11): error TS2416: Class 'B' incorrectly extends base class 'A': - Index signatures are incompatible: - Type 'string' is not assignable to type 'Base': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(20,11): error TS2415: Class 'B' incorrectly extends base class 'A'. + Index signatures are incompatible. + Type 'string' is not assignable to type 'Base'. Property 'foo' is missing in type 'String'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(20,21): error TS2343: Type 'Base' does not satisfy the constraint 'Derived': +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(20,21): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. Property 'bar' is missing in type 'Base'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(24,11): error TS2416: Class 'B3' incorrectly extends base class 'A': - Index signatures are incompatible: +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(24,11): error TS2415: Class 'B3' incorrectly extends base class 'A'. + Index signatures are incompatible. Type 'string' is not assignable to type 'T'. @@ -26,10 +26,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2416: Class 'B' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'Derived': -!!! error TS2416: Property 'bar' is missing in type 'String'. +!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'Derived'. +!!! error TS2415: Property 'bar' is missing in type 'String'. [x: string]: string; // error } @@ -40,21 +40,21 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2416: Class 'B' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'Base': -!!! error TS2416: Property 'foo' is missing in type 'String'. +!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'Base'. +!!! error TS2415: Property 'foo' is missing in type 'String'. ~~~~~~~ -!!! error TS2343: Type 'Base' does not satisfy the constraint 'Derived': -!!! error TS2343: Property 'bar' is missing in type 'Base'. +!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. +!!! error TS2344: Property 'bar' is missing in type 'Base'. [x: string]: string; // error } class B3 extends A { ~~ -!!! error TS2416: Class 'B3' incorrectly extends base class 'A': -!!! error TS2416: Index signatures are incompatible: -!!! error TS2416: Type 'string' is not assignable to type 'T'. +!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Index signatures are incompatible. +!!! error TS2415: Type 'string' is not assignable to type 'T'. [x: string]: string; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/targetTypeTest3.errors.txt b/tests/baselines/reference/targetTypeTest3.errors.txt index 41b2d027fb5..af82adcace0 100644 --- a/tests/baselines/reference/targetTypeTest3.errors.txt +++ b/tests/baselines/reference/targetTypeTest3.errors.txt @@ -1,5 +1,5 @@ -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': +tests/cases/compiler/targetTypeTest3.ts(4,5): error TS2323: 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 TS2322: Type '(string | numb var a : string[] = [1,2,"3"]; // should produce an error ~ -!!! 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'. +!!! 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'. function func1(stuff:any[]) { return stuff; } diff --git a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.errors.txt b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.errors.txt index 9b068b62e68..b502eaad7e5 100644 --- a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.errors.txt +++ b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.errors.txt @@ -1,8 +1,8 @@ tests/cases/compiler/trailingCommaInHeterogenousArrayLiteral1.ts(5,19): error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'. - 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/trailingCommaInHeterogenousArrayLiteral1.ts(6,19): error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'. - 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'. @@ -14,12 +14,12 @@ tests/cases/compiler/trailingCommaInHeterogenousArrayLiteral1.ts(6,19): error TS this.test([1, 2, "hi", 5, ]); ~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'. -!!! error TS2345: Type 'string | number' is not assignable to type 'number': +!!! error TS2345: Type 'string | number' is not assignable to type 'number'. !!! error TS2345: Type 'string' is not assignable to type 'number'. this.test([1, 2, "hi", 5]); ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'. -!!! error TS2345: Type 'string | number' is not assignable to type 'number': +!!! error TS2345: Type 'string | number' is not assignable to type 'number'. !!! error TS2345: Type 'string' is not assignable to type 'number'. } } diff --git a/tests/baselines/reference/tupleTypes.errors.txt b/tests/baselines/reference/tupleTypes.errors.txt index 8bf6cca4855..6fdbd8a2f12 100644 --- a/tests/baselines/reference/tupleTypes.errors.txt +++ b/tests/baselines/reference/tupleTypes.errors.txt @@ -1,26 +1,26 @@ 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 TS2322: Type 'undefined[]' is not assignable to type '[number, string]': +tests/cases/compiler/tupleTypes.ts(14,1): error TS2323: Type 'undefined[]' is not assignable to type '[number, string]'. Property '0' is missing in type 'undefined[]'. -tests/cases/compiler/tupleTypes.ts(15,1): error TS2322: Type '[number]' is not assignable to type '[number, string]': +tests/cases/compiler/tupleTypes.ts(15,1): error TS2323: Type '[number]' is not assignable to type '[number, string]'. Property '1' is missing in type '[number]'. -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: +tests/cases/compiler/tupleTypes.ts(17,1): error TS2323: 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 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': +tests/cases/compiler/tupleTypes.ts(47,1): error TS2323: 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 TS2322: Type '[number, {}]' is not assignable to type 'number[]': - Types of property 'pop' are incompatible: - Type '() => {}' is not assignable to type '() => number': +tests/cases/compiler/tupleTypes.ts(49,1): error TS2323: 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 TS2322: Type '[number, number]' is not assignable to type '[number, string]': - Types of property '1' are incompatible: +tests/cases/compiler/tupleTypes.ts(50,1): error TS2323: 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 TS2322: Type '[number, {}]' is not assignable to type '[number, string]': - Types of property '1' are incompatible: +tests/cases/compiler/tupleTypes.ts(51,1): error TS2323: 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 TS2322: Type '[number, {}]' is n t = []; // Error ~ -!!! error TS2322: Type 'undefined[]' is not assignable to type '[number, string]': -!!! error TS2322: Property '0' is missing in type 'undefined[]'. +!!! error TS2323: Type 'undefined[]' is not assignable to type '[number, string]'. +!!! error TS2323: Property '0' is missing in type 'undefined[]'. t = [1]; // Error ~ -!!! error TS2322: Type '[number]' is not assignable to type '[number, string]': -!!! error TS2322: Property '1' is missing in type '[number]'. +!!! error TS2323: Type '[number]' is not assignable to type '[number, string]'. +!!! error TS2323: Property '1' is missing in type '[number]'. t = [1, "hello"]; // Ok t = ["hello", 1]; // Error ~ -!!! 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'. +!!! 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'. t = [1, "hello", 2]; // Ok var tf: [string, (x: string) => number] = ["hello", x => x.length]; @@ -87,28 +87,28 @@ tests/cases/compiler/tupleTypes.ts(51,1): error TS2322: Type '[number, {}]' is n var a3: [number, {}]; a = a1; // Error ~ -!!! 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'. +!!! 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'. a = a2; a = a3; // Error ~ -!!! 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'. +!!! 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'. a1 = a2; // Error ~~ -!!! 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'. +!!! 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'. a1 = a3; // Error ~~ -!!! 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'. +!!! 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'. a3 = a1; a3 = a2; \ No newline at end of file diff --git a/tests/baselines/reference/typeArgInference2.errors.txt b/tests/baselines/reference/typeArgInference2.errors.txt index 21fa647f442..08fc2f4e232 100644 --- a/tests/baselines/reference/typeArgInference2.errors.txt +++ b/tests/baselines/reference/typeArgInference2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeArgInference2.ts(12,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/typeArgInference2.ts(12,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ name: string; a: number; }' is not a valid type argument because it is not a supertype of candidate '{ name: string; b: number; }'. @@ -16,5 +16,5 @@ tests/cases/compiler/typeArgInference2.ts(12,10): error TS2453: The type argumen var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number } var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // error ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ name: string; a: number; }' is not a valid type argument because it is not a supertype of candidate '{ name: string; b: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/typeArgInference2WithError.errors.txt b/tests/baselines/reference/typeArgInference2WithError.errors.txt index 3d3e4d35426..8a191ed310e 100644 --- a/tests/baselines/reference/typeArgInference2WithError.errors.txt +++ b/tests/baselines/reference/typeArgInference2WithError.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeArgInference2WithError.ts(7,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/typeArgInference2WithError.ts(7,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. @@ -11,5 +11,5 @@ tests/cases/compiler/typeArgInference2WithError.ts(7,10): error TS2453: The type var z7 = foo("abc", 5); // Error ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInference.errors.txt b/tests/baselines/reference/typeArgumentInference.errors.txt index 8003c0c0e6e..e374de7b13a 100644 --- a/tests/baselines/reference/typeArgumentInference.errors.txt +++ b/tests/baselines/reference/typeArgumentInference.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(68,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(68,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. -tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. @@ -74,7 +74,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11 } var a9a = someGenerics9('', 0, []); ~~~~~~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. var a9a: {}; var a9b = someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); @@ -91,7 +91,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11 } var a9e = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); ~~~~~~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. var a9e: {}; var a9f = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt index de36203acb0..c251f860adb 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt @@ -3,10 +3,10 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(61,39): error TS2345: Argument of type '(x: string) => string' is not assignable to parameter of type '(x: number) => void'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(71,39): error TS2345: Argument of type '(x: string) => string' is not assignable to parameter of type '(x: number) => void'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(81,45): error TS2345: Argument of type '(n: string) => string' is not assignable to parameter of type '(b: number) => number'. -tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(106,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(106,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(118,9): error TS2304: Cannot find name 'Window'. -tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,51): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,56): error TS2304: Cannot find name 'window'. @@ -130,7 +130,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct var someGenerics9: someGenerics9; var a9a = new someGenerics9('', 0, []); ~~~~~~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. var a9a: {}; var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); @@ -149,7 +149,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct } var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ~~~~~~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. ~~~~~~ !!! error TS2304: Cannot find name 'window'. diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt index 96698bc80c1..72db7214c45 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts(7,1): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts(7,1): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'Giraffe' is not a valid type argument because it is not a supertype of candidate 'Elephant'. @@ -11,5 +11,5 @@ tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts(7,1): er var e: Elephant; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal ~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'Giraffe' is not a valid type argument because it is not a supertype of candidate 'Elephant'. \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt index 722f28772dd..a607bc2dc9d 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt @@ -8,10 +8,10 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(49,15): error TS2344: Type 'string' does not satisfy the constraint 'number'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(55,41): error TS2345: Argument of type '(n: string) => string' is not assignable to parameter of type '(b: number) => number'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(66,31): error TS2345: Argument of type '(a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void' is not assignable to parameter of type 'string'. -tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(73,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(73,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(85,9): error TS2304: Cannot find name 'Window'. -tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,47): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,52): error TS2304: Cannot find name 'window'. @@ -112,7 +112,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst } var a9a = someGenerics9('', 0, []); ~~~~~~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. var a9a: {}; var a9b = someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); @@ -131,7 +131,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst } var a9e = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ~~~~~~~~~~~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. ~~~~~~ !!! error TS2304: Cannot find name 'window'. diff --git a/tests/baselines/reference/typeAssertions.errors.txt b/tests/baselines/reference/typeAssertions.errors.txt index 1ec22da4c57..ab5eb19ce2a 100644 --- a/tests/baselines/reference/typeAssertions.errors.txt +++ b/tests/baselines/reference/typeAssertions.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(5,5): error TS2346: Supplied parameters do not match any signature of call target. -tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(31,12): error TS2353: Neither type 'SomeOther' nor type 'SomeBase' is assignable to the other: +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(31,12): error TS2352: Neither type 'SomeOther' nor type 'SomeBase' is assignable to the other. Property 'p' is missing in type 'SomeOther'. -tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(35,15): error TS2353: Neither type 'SomeOther' nor type 'SomeDerived' is assignable to the other: +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(35,15): error TS2352: Neither type 'SomeOther' nor type 'SomeDerived' is assignable to the other. Property 'x' is missing in type 'SomeOther'. tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(37,13): error TS2352: Neither type 'SomeDerived' nor type 'SomeOther' is assignable to the other. tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(38,13): error TS2352: Neither type 'SomeBase' nor type 'SomeOther' is assignable to the other. @@ -42,15 +42,15 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(38,13): err someBase = someBase; someBase = someOther; // Error ~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type 'SomeOther' nor type 'SomeBase' is assignable to the other: -!!! error TS2353: Property 'p' is missing in type 'SomeOther'. +!!! error TS2352: Neither type 'SomeOther' nor type 'SomeBase' is assignable to the other. +!!! error TS2352: Property 'p' is missing in type 'SomeOther'. someDerived = someDerived; someDerived = someBase; someDerived = someOther; // Error ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2353: Neither type 'SomeOther' nor type 'SomeDerived' is assignable to the other: -!!! error TS2353: Property 'x' is missing in type 'SomeOther'. +!!! error TS2352: Neither type 'SomeOther' nor type 'SomeDerived' is assignable to the other. +!!! error TS2352: Property 'x' is missing in type 'SomeOther'. someOther = someDerived; // Error ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt b/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt index 7d25976cb2f..2cae46779a8 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 TS2322: Type 'X_1' is not assignable to type 'Y_1': +tests/cases/compiler/typeIdentityConsidersBrands.ts(30,1): error TS2323: 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 TS2322: Type 'X_1' is not assignable to type 'Y_1': -!!! error TS2322: Types have separate declarations of a private property 'name'. +!!! error TS2323: Type 'X_1' is not assignable to type 'Y_1'. +!!! error TS2323: 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 d7e54ebce27..a56668e62f3 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 TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2': +tests/cases/compiler/typeInfer1.ts(11,5): error TS2323: 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 TS2322: Type '{ Moo: () => strin var yyyyyyyy: ITextWriter2 = { ~~~~~~~~ -!!! error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2': -!!! error TS2322: Property 'Write' is missing in type '{ Moo: () => string; }'. +!!! error TS2323: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'. +!!! error TS2323: Property 'Write' is missing in type '{ Moo: () => string; }'. Moo: function() { return "cow"; } } \ No newline at end of file diff --git a/tests/baselines/reference/typeInferenceConflictingCandidates.errors.txt b/tests/baselines/reference/typeInferenceConflictingCandidates.errors.txt index 836555d7e89..f275e44503a 100644 --- a/tests/baselines/reference/typeInferenceConflictingCandidates.errors.txt +++ b/tests/baselines/reference/typeInferenceConflictingCandidates.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeInferenceConflictingCandidates.ts(3,1): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/typeInferenceConflictingCandidates.ts(3,1): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. @@ -7,5 +7,5 @@ tests/cases/compiler/typeInferenceConflictingCandidates.ts(3,1): error TS2453: T g("", 3, a => a); ~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/typeMatch1.errors.txt b/tests/baselines/reference/typeMatch1.errors.txt index 5921ba0a8d3..ae6eff78528 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 TS2322: Type 'D' is not assignable to type 'C': +tests/cases/compiler/typeMatch1.ts(18,1): error TS2323: 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 TS2322: Type 'typeof C' is not assignable to type 'C': +tests/cases/compiler/typeMatch1.ts(19,1): error TS2323: 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 TS2322: Type 'D' is not assignable to type 'C': -!!! error TS2322: Types have separate declarations of a private property 'x'. +!!! error TS2323: Type 'D' is not assignable to type 'C'. +!!! error TS2323: Types have separate declarations of a private property 'x'. x6=C; ~~ -!!! error TS2322: Type 'typeof C' is not assignable to type 'C': -!!! error TS2322: Property 'x' is missing in type 'typeof C'. +!!! error TS2323: Type 'typeof C' is not assignable to type 'C'. +!!! error TS2323: 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 0bd20bda65f..867ccb93387 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 TS2322: Type '{}' is not assignable to type '{ x: number; y: number; }': +tests/cases/compiler/typeMatch2.ts(3,2): error TS2323: Type '{}' is not assignable to type '{ x: number; y: number; }'. Property 'x' is missing in type '{}'. -tests/cases/compiler/typeMatch2.ts(4,5): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }': +tests/cases/compiler/typeMatch2.ts(4,5): error TS2323: 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 TS2322: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }': +tests/cases/compiler/typeMatch2.ts(6,5): error TS2323: 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 TS2322: Type 'Animal[]' is not assignable to type 'Giraffe[]': - Type 'Animal' is not assignable to type 'Giraffe': +tests/cases/compiler/typeMatch2.ts(18,5): error TS2323: 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 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[]': +tests/cases/compiler/typeMatch2.ts(22,5): error TS2323: 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 TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }': +tests/cases/compiler/typeMatch2.ts(35,5): error TS2323: 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 TS2322: Type '{ x: number; }' is var a = { x: 1, y: 2 }; a = {}; // error ~ -!!! error TS2322: Type '{}' is not assignable to type '{ x: number; y: number; }': -!!! error TS2322: Property 'x' is missing in type '{}'. +!!! error TS2323: Type '{}' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2323: Property 'x' is missing in type '{}'. a = { x: 1 }; // error ~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }': -!!! error TS2322: Property 'y' is missing in type '{ x: number; }'. +!!! error TS2323: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2323: Property 'y' is missing in type '{ x: number; }'. a = { x: 1, y: 2, z: 3 }; a = { x: 1, z: 3 }; // error ~ -!!! 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; }'. +!!! 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; }'. } class Animal { private a; } @@ -44,18 +44,18 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is aa = gg; gg = aa; // error ~~ -!!! 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'. +!!! 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'. var xa = { f1: 5, f2: aa }; var xb = { f1: 5, f2: gg }; xa = xb; // Should be ok xb = xa; // Not ok ~~ -!!! 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'. +!!! 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'. } function f4() { @@ -70,8 +70,8 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is a = { x: 1, y: _any, z:1 }; a = { x: 1 }; // error ~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }': -!!! error TS2322: Property 'y' is missing in type '{ x: number; }'. +!!! error TS2323: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2323: 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 e941b34aaf6..6b896001b5a 100644 --- a/tests/baselines/reference/typeName1.errors.txt +++ b/tests/baselines/reference/typeName1.errors.txt @@ -1,30 +1,30 @@ -tests/cases/compiler/typeName1.ts(9,5): error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; f(n: number): string; }': +tests/cases/compiler/typeName1.ts(9,5): error TS2323: 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 TS2322: Type 'number' is not assignable to type '{ f(s: string): number; }': +tests/cases/compiler/typeName1.ts(10,5): error TS2323: 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 TS2322: 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(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; }'. Property 'x' is missing in type '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; }': +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; }'. Property 'x' is missing in type '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; }; }': +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; }; }'. 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 TS2322: 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(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; }'. 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 TS2322: Type 'number' is not assignable to type 'I': +tests/cases/compiler/typeName1.ts(17,5): error TS2323: Type 'number' is not assignable to type 'I'. Property 'k' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(18,5): error TS2322: Type 'number' is not assignable to type 'I[][][][]': +tests/cases/compiler/typeName1.ts(18,5): error TS2323: Type 'number' is not assignable to type 'I[][][][]'. Property 'length' is missing in type 'Number'. -tests/cases/compiler/typeName1.ts(19,5): error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]': +tests/cases/compiler/typeName1.ts(19,5): error TS2323: 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 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; }; }[][]': +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; }; }[][]'. 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 TS2322: 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 TS2323: 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 TS2322: Type 'number' is not assignable to type '{ (): string; f(x: number): boolean; p: any; q: any; }': +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; }'. 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'. @@ -40,62 +40,62 @@ 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 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'. +!!! 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'. var x2:{ f(s:string):number; } =3; ~~ -!!! error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; }': -!!! error TS2322: Property 'f' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type '{ f(s: string): number; }'. +!!! error TS2323: 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; }'. var x4:{ x;y;z:number;f(n:number):string;f(s:string):number; }=3; ~~ -!!! 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'. +!!! 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'. var x5:{ (s:string):number;(n:number):string;x;y;z:number;f(n:number):string;f(s:string):number; }=3; ~~ -!!! 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'. +!!! 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'. var x6:{ z:number;f:{(n:number):string;(s:string):number;}; }=3; ~~ -!!! 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'. +!!! 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'. var x7:(s:string)=>boolean=3; ~~ !!! error TS2323: 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 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 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 TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'. var x9:I=3; ~~ -!!! error TS2322: Type 'number' is not assignable to type 'I': -!!! error TS2322: Property 'k' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'I'. +!!! error TS2323: Property 'k' is missing in type 'Number'. var x10:I[][][][]=3; ~~~ -!!! error TS2322: Type 'number' is not assignable to type 'I[][][][]': -!!! error TS2322: Property 'length' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'I[][][][]'. +!!! error TS2323: Property 'length' is missing in type 'Number'. var x11:{z:I;x:boolean;}[][]=3; ~~~ -!!! error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]': -!!! error TS2322: Property 'length' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]'. +!!! error TS2323: 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 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 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 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 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'. +!!! 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'. var x14:{ f(x:number):boolean; p; q; ():string; }=3; ~~~ -!!! 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'. +!!! 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'. var x15:number=C; ~~~ !!! error TS2323: Type 'typeof C' is not assignable to type 'number'. diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt index 30ff740ba44..96db3e9110c 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt @@ -1,8 +1,8 @@ -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: +tests/cases/compiler/typeParameterArgumentEquivalence.ts(4,5): error TS2323: 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 TS2322: Type '(item: number) => boolean' is not assignable to type '(item: T) => boolean': - Types of parameters 'item' and 'item' are incompatible: +tests/cases/compiler/typeParameterArgumentEquivalence.ts(5,5): error TS2323: 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 TS2322: Typ var y: (item: T) => boolean; x = y; // Should be an error ~ -!!! 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'. +!!! 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'. y = x; // Shound be an error ~ -!!! 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'. +!!! 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'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt index 76e7960ff61..f1350ebe853 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt @@ -1,8 +1,8 @@ -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: +tests/cases/compiler/typeParameterArgumentEquivalence2.ts(4,5): error TS2323: 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 TS2322: Type '(item: U) => boolean' is not assignable to type '(item: T) => boolean': - Types of parameters 'item' and 'item' are incompatible: +tests/cases/compiler/typeParameterArgumentEquivalence2.ts(5,5): error TS2323: 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 TS2322: Ty var y: (item: T) => boolean; x = y; // Should be an error ~ -!!! 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'. +!!! 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'. y = x; // Shound be an error ~ -!!! 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'. +!!! 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'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt index 80c9a2af69c..59ac7d39e26 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 TS2322: Type '(item: any) => boolean' is not assignable to type '(item: any) => T': +tests/cases/compiler/typeParameterArgumentEquivalence3.ts(4,5): error TS2323: 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 TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => boolean': +tests/cases/compiler/typeParameterArgumentEquivalence3.ts(5,5): error TS2323: 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 TS2322: Ty var y: (item) => boolean; x = y; // Should be an error ~ -!!! error TS2322: Type '(item: any) => boolean' is not assignable to type '(item: any) => T': -!!! error TS2322: Type 'boolean' is not assignable to type 'T'. +!!! error TS2323: Type '(item: any) => boolean' is not assignable to type '(item: any) => T'. +!!! error TS2323: Type 'boolean' is not assignable to type 'T'. y = x; // Shound be an error ~ -!!! error TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => boolean': -!!! error TS2322: Type 'T' is not assignable to type 'boolean'. +!!! error TS2323: Type '(item: any) => T' is not assignable to type '(item: any) => boolean'. +!!! error TS2323: 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 a49aad4067a..f62a5a0e4e7 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 TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => U': +tests/cases/compiler/typeParameterArgumentEquivalence4.ts(4,5): error TS2323: 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 TS2322: Type '(item: any) => U' is not assignable to type '(item: any) => T': +tests/cases/compiler/typeParameterArgumentEquivalence4.ts(5,5): error TS2323: 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 TS2322: Ty var y: (item) => T; x = y; // Should be an error ~ -!!! error TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => U': -!!! error TS2322: Type 'T' is not assignable to type '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'. y = x; // Shound be an error ~ -!!! error TS2322: Type '(item: any) => U' is not assignable to type '(item: any) => T': -!!! error TS2322: Type 'U' is not assignable to type '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'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt index 78edb104786..41d0162af5b 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt @@ -1,8 +1,8 @@ -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': +tests/cases/compiler/typeParameterArgumentEquivalence5.ts(4,5): error TS2323: 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 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': +tests/cases/compiler/typeParameterArgumentEquivalence5.ts(5,5): error TS2323: 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 TS2322: Ty var y: () => (item) => T; x = y; // Should be an error ~ -!!! 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'. +!!! 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'. y = x; // Shound be an error ~ -!!! 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'. +!!! 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'. } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt b/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt index bb778353007..a2692184aff 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 TS2322: Type 'Foo' is not assignable to type 'Foo': +tests/cases/compiler/typeParameterAssignmentCompat1.ts(8,5): error TS2323: Type 'Foo' is not assignable to type 'Foo'. Type 'U' is not assignable to type 'T'. -tests/cases/compiler/typeParameterAssignmentCompat1.ts(9,12): error TS2322: Type 'Foo' is not assignable to type 'Foo': +tests/cases/compiler/typeParameterAssignmentCompat1.ts(9,12): error TS2323: Type 'Foo' is not assignable to type 'Foo'. Type 'T' is not assignable to type 'U'. -tests/cases/compiler/typeParameterAssignmentCompat1.ts(16,9): error TS2322: Type 'Foo' is not assignable to type 'Foo': +tests/cases/compiler/typeParameterAssignmentCompat1.ts(16,9): error TS2323: Type 'Foo' is not assignable to type 'Foo'. Type 'U' is not assignable to type 'T'. -tests/cases/compiler/typeParameterAssignmentCompat1.ts(17,16): error TS2322: Type 'Foo' is not assignable to type 'Foo': +tests/cases/compiler/typeParameterAssignmentCompat1.ts(17,16): error TS2323: 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 TS2322: Typ var y: Foo; x = y; // should be an error ~ -!!! error TS2322: Type 'Foo' is not assignable to type 'Foo': -!!! error TS2322: Type 'U' is not assignable to type 'T'. +!!! error TS2323: Type 'Foo' is not assignable to type 'Foo'. +!!! error TS2323: Type 'U' is not assignable to type 'T'. return x; ~ -!!! error TS2322: Type 'Foo' is not assignable to type 'Foo': -!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'Foo' is not assignable to type 'Foo'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. } class C { @@ -32,11 +32,11 @@ tests/cases/compiler/typeParameterAssignmentCompat1.ts(17,16): error TS2322: Typ var y: Foo; x = y; // should be an error ~ -!!! error TS2322: Type 'Foo' is not assignable to type 'Foo': -!!! error TS2322: Type 'U' is not assignable to type 'T'. +!!! error TS2323: Type 'Foo' is not assignable to type 'Foo'. +!!! error TS2323: Type 'U' is not assignable to type 'T'. return x; ~ -!!! error TS2322: Type 'Foo' is not assignable to type 'Foo': -!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'Foo' is not assignable to type 'Foo'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. } } \ No newline at end of file diff --git a/tests/baselines/reference/typeofAmbientExternalModules.errors.txt b/tests/baselines/reference/typeofAmbientExternalModules.errors.txt index 8057b4f8a11..007581e54f2 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 TS2322: Type 'typeof D' is not assignable to type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"': +tests/cases/compiler/typeofAmbientExternalModules_2.ts(7,1): error TS2323: 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 TS2322: Type 'typeof "tests/cases/compiler/typeofAmbientExternalModules_0"' is not assignable to 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'. 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 TS2322: Type var y1: typeof ext = ext; y1 = exp; ~~ -!!! 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'. +!!! 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'. var y2: typeof exp = exp; y2 = ext; ~~ -!!! 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"'. +!!! 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"'. ==== 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 3290d769226..a7610f299da 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 TS2322: Type 'typeof D' is not assignable to type 'typeof "tests/cases/compiler/typeofExternalModules_external"': +tests/cases/compiler/typeofExternalModules_core.ts(5,1): error TS2323: 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 TS2322: Type 'typeof "tests/cases/compiler/typeofExternalModules_external"' is not assignable to 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'. 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 TS2322: Type 'typ var y1: typeof ext = ext; y1 = exp; ~~ -!!! 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'. +!!! 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'. var y2: typeof exp = exp; y2 = ext; ~~ -!!! 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"'. +!!! 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"'. ==== 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 e4ce2b39c58..7743f70946f 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 TS2322: Type 'typeof Outer' is not assignable to type 'typeof instantiated': +tests/cases/compiler/typeofInternalModules.ts(19,1): error TS2323: 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 TS2322: Type 'typeof instantiated' is not assignable to type 'typeof Outer': +tests/cases/compiler/typeofInternalModules.ts(23,1): error TS2323: 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 TS2322: Type 'typeof var x5: typeof importInst; x5 = Outer; ~~ -!!! error TS2322: Type 'typeof Outer' is not assignable to type 'typeof instantiated': -!!! error TS2322: Property 'C' is missing in type 'typeof Outer'. +!!! error TS2323: Type 'typeof Outer' is not assignable to type 'typeof instantiated'. +!!! error TS2323: 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 TS2322: Type 'typeof var x7: typeof Outer = Outer; x7 = importInst; ~~ -!!! error TS2322: Type 'typeof instantiated' is not assignable to type 'typeof Outer': -!!! error TS2322: Property 'instantiated' is missing in type 'typeof instantiated'. +!!! error TS2323: Type 'typeof instantiated' is not assignable to type 'typeof Outer'. +!!! error TS2323: Property 'instantiated' is missing in type 'typeof instantiated'. \ No newline at end of file diff --git a/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.errors.txt b/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.errors.txt index ca5f6e36cea..d90944c906a 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 TS2322: 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 TS2323: 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 TS2322: Type 'typeo var x: typeof foo0 = {}; var y: {M2: Object} = foo0; ~ -!!! 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"'. +!!! 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"'. ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== export interface Person { diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.errors.txt b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.errors.txt index 5b455a84b59..624d53f95d3 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.errors.txt +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(3,10): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(5,10): error TS2347: Untyped function calls may not accept type arguments. tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(8,10): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(10,7): error TS2421: Class 'C' incorrectly implements interface 'Function': +tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(10,7): error TS2420: Class 'C' incorrectly implements interface 'Function'. Property 'apply' is missing in type 'C'. tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(18,10): error TS2349: Cannot invoke an expression whose type lacks a call signature. tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(20,18): error TS2311: A class may only extend another class. @@ -29,8 +29,8 @@ tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(41,1): error TS2 class C implements Function { ~ -!!! error TS2421: Class 'C' incorrectly implements interface 'Function': -!!! error TS2421: Property 'apply' is missing in type 'C'. +!!! error TS2420: Class 'C' incorrectly implements interface 'Function'. +!!! error TS2420: Property 'apply' is missing in type 'C'. prototype = null; length = 1; arguments = null; diff --git a/tests/baselines/reference/widenedTypes.errors.txt b/tests/baselines/reference/widenedTypes.errors.txt index fb0c38a514e..c65e2873416 100644 --- a/tests/baselines/reference/widenedTypes.errors.txt +++ b/tests/baselines/reference/widenedTypes.errors.txt @@ -4,10 +4,10 @@ tests/cases/compiler/widenedTypes.ts(6,7): error TS2361: The right-hand side of 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 TS2322: Type 'number[]' is not assignable to type 'string[]': +tests/cases/compiler/widenedTypes.ts(23,5): error TS2323: Type 'number[]' is not assignable to type 'string[]'. Type 'number' is not assignable to type '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: +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; }'. + Index signatures are incompatible. Type 'number' is not assignable to type 'string'. @@ -48,10 +48,10 @@ tests/cases/compiler/widenedTypes.ts(24,5): error TS2322: Type '{ [x: string]: n // Highlights the difference between array literals and object literals var arr: string[] = [3, null]; // not assignable because null is not widened. BCT is {} ~~~ -!!! error TS2322: Type 'number[]' is not assignable to type 'string[]': -!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number[]' is not assignable to type 'string[]'. +!!! error TS2323: 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 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 +!!! 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 diff --git a/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt b/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt index a0decc891df..57a4d7e5bc2 100644 --- a/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt +++ b/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/wrappedRecursiveGenericType.ts(13,1): error TS2322: Type 'number' is not assignable to type 'X': +tests/cases/compiler/wrappedRecursiveGenericType.ts(13,1): error TS2323: 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'. @@ -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 TS2322: Type 'number' is not assignable to type 'X': -!!! error TS2322: Property 'e' is missing in type 'Number'. +!!! error TS2323: Type 'number' is not assignable to type 'X'. +!!! error TS2323: 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