From 70447cbcc9dff1df1d005f2647273e79ffb89f28 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 3 Nov 2021 13:29:57 -0700 Subject: [PATCH] Accept baselines And the code is still wrong! --- src/compiler/checker.ts | 2 +- tests/baselines/reference/2dArrays.types | 2 +- ...ssAndModuleWithSameNameAndCommonRoot.types | 4 +- ...ndModuleWithSameNameAndCommonRootES6.types | 4 +- .../reference/ES5For-ofTypeCheck10.types | 4 +- ...uleAndClassWithSameNameAndCommonRoot.types | 4 +- .../abstractProperty(target=es2015).types | 2 +- .../abstractProperty(target=esnext).types | 2 +- .../abstractPropertyInConstructor.errors.txt | 8 +- .../abstractPropertyInConstructor.types | 52 +- ...ccessOverriddenBaseClassMember1.errors.txt | 21 + .../accessOverriddenBaseClassMember1.types | 6 +- .../reference/accessorsOverrideProperty.types | 4 +- .../accessorsOverrideProperty3.types | 4 +- .../accessorsOverrideProperty4.types | 4 +- .../accessorsOverrideProperty6.types | 4 +- .../aliasUsageInAccessorsOfClass.types | 2 +- .../ambiguousCallsWhereReturnTypesAgree.types | 4 +- .../baselines/reference/amdModuleName1.types | 2 +- .../baselines/reference/amdModuleName2.types | 2 +- ...dThisPropertyInitializerDoesntNarrow.types | 4 +- .../reference/anonymousClassExpression2.types | 6 +- .../argumentsReferenceInConstructor1_Js.types | 2 +- .../argumentsReferenceInConstructor2_Js.types | 2 +- .../argumentsReferenceInConstructor3_Js.types | 4 +- .../argumentsReferenceInConstructor4_Js.types | 10 +- .../argumentsReferenceInConstructor5_Js.types | 4 +- .../argumentsReferenceInConstructor6_Js.types | 2 +- .../argumentsReferenceInConstructor7_Js.types | 2 +- .../argumentsReferenceInMethod1_Js.types | 2 +- .../argumentsReferenceInMethod2_Js.types | 2 +- .../argumentsReferenceInMethod3_Js.types | 4 +- .../argumentsReferenceInMethod4_Js.types | 10 +- .../argumentsReferenceInMethod5_Js.types | 4 +- .../argumentsReferenceInMethod6_Js.types | 2 +- .../argumentsReferenceInMethod7_Js.types | 2 +- .../reference/arrayAssignmentTest5.types | 4 +- .../reference/arrayBestCommonTypes.types | 52 +- .../reference/arrayOfExportedClass.types | 2 +- tests/baselines/reference/arrayconcat.types | 4 +- .../arrowFunctionContexts.errors.txt | 8 +- .../reference/arrowFunctionContexts.types | 8 +- .../reference/arrowFunctionExpressions.types | 8 +- .../assertionTypePredicates1.symbols | 2 + .../reference/assertionTypePredicates1.types | 22 +- ...rPropertyToPropertyDeclarationESNext.types | 4 +- .../reference/assignmentLHSIsValue.errors.txt | 5 +- .../reference/assignmentLHSIsValue.types | 4 +- ...rrowFunctionCapturesArguments_es2017.types | 2 +- ...ncArrowFunctionCapturesArguments_es5.types | 2 +- ...ncArrowFunctionCapturesArguments_es6.types | 2 +- ...syncArrowFunctionCapturesThis_es2017.types | 8 +- .../asyncArrowFunctionCapturesThis_es5.types | 8 +- .../asyncArrowFunctionCapturesThis_es6.types | 8 +- tests/baselines/reference/autoLift2.types | 12 +- .../baselines/reference/autolift4.errors.txt | 5 +- tests/baselines/reference/autolift4.types | 20 +- .../reference/awaitedTypeStrictNull.types | 2 +- .../baselines/reference/badThisBinding.types | 4 +- .../baselines/reference/baseCheck.errors.txt | 17 +- tests/baselines/reference/baseCheck.types | 6 +- .../reference/baseConstraintOfDecorator.types | 4 +- ...eTypeWrappingInstantiationChain.errors.txt | 44 + .../baseTypeWrappingInstantiationChain.types | 4 +- tests/baselines/reference/bases.types | 4 +- .../binopAssignmentShouldHaveType.types | 2 +- .../blockScopedVariablesUseBeforeDef.types | 2 +- ...icFunctionWithZeroTypeArguments.errors.txt | 46 + .../reference/callWithMissingVoid.errors.txt | 19 +- .../reference/callWithSpread.errors.txt | 67 + .../baselines/reference/callWithSpread.types | 4 +- .../reference/callWithSpreadES6.errors.txt | 59 + .../reference/callWithSpreadES6.types | 4 +- tests/baselines/reference/callbackTag2.types | 2 +- ...uperPropertyAccessInSuperCall01.errors.txt | 17 + .../captureThisInSuperCall.errors.txt | 14 + .../reference/captureThisInSuperCall.types | 2 +- .../reference/capturedLetConstInLoop10.types | 12 +- .../capturedLetConstInLoop10_ES6.types | 12 +- .../reference/capturedLetConstInLoop13.types | 6 +- .../reference/capturedLetConstInLoop9.types | 2 +- .../capturedLetConstInLoop9_ES6.types | 2 +- ...ConstrainedToOtherTypeParameter.errors.txt | 27 +- ...meterConstrainedToOtherTypeParameter.types | 32 +- ...onstrainedToOtherTypeParameter2.errors.txt | 36 +- ...eterConstrainedToOtherTypeParameter2.types | 88 +- ...onstraintOfJavascriptClassExpression.types | 2 +- tests/baselines/reference/checkJsFiles7.types | 6 +- .../checkJsFiles_noErrorLocation.errors.txt | 25 + .../checkJsFiles_noErrorLocation.types | 2 +- .../checkJsxChildrenProperty12.errors.txt | 93 + .../checkJsxChildrenProperty12.types | 4 +- .../checkJsxChildrenProperty13.errors.txt | 60 +- .../checkJsxChildrenProperty13.types | 2 +- .../checkJsxChildrenProperty3.errors.txt | 71 + .../reference/checkJsxChildrenProperty3.types | 6 +- .../checkJsxChildrenProperty4.errors.txt | 31 +- .../reference/checkJsxChildrenProperty4.types | 6 +- ...sxSubtleSkipContextSensitiveBug.errors.txt | 50 + .../checkSuperCallBeforeThisAccess.errors.txt | 14 +- .../checkSuperCallBeforeThisAccess.types | 48 +- .../checkSuperCallBeforeThisAccessing1.types | 8 +- .../checkSuperCallBeforeThisAccessing2.types | 8 +- .../checkSuperCallBeforeThisAccessing3.types | 8 +- .../checkSuperCallBeforeThisAccessing4.types | 12 +- ...ckSuperCallBeforeThisAccessing5.errors.txt | 5 +- .../checkSuperCallBeforeThisAccessing5.types | 2 +- ...ckSuperCallBeforeThisAccessing6.errors.txt | 16 + .../checkSuperCallBeforeThisAccessing6.types | 6 +- ...ckSuperCallBeforeThisAccessing7.errors.txt | 15 + .../checkSuperCallBeforeThisAccessing7.types | 6 +- ...ckSuperCallBeforeThisAccessing8.errors.txt | 5 +- .../checkSuperCallBeforeThisAccessing8.types | 4 +- .../checkSuperCallBeforeThisAccessing9.types | 8 +- ...eckSwitchStatementIfCaseTypeIsString.types | 2 +- .../reference/circularReference.types | 12 +- .../reference/classAbstractCrashedOnce.types | 2 +- .../reference/classAbstractGeneric.errors.txt | 80 +- .../reference/classAbstractGeneric.types | 4 +- .../classAbstractInstantiations2.types | 2 +- .../reference/classAbstractSuperCalls.types | 4 +- .../classAttributeInferenceTemplate.types | 4 +- .../classAttributeInferenceTemplateJS.types | 4 +- .../classCanExtendConstructorFunction.types | 4 +- .../classConstructorAccessibility2.errors.txt | 11 +- ...structorParametersAccessibility.errors.txt | 5 +- ...ssConstructorParametersAccessibility.types | 2 +- ...tructorParametersAccessibility2.errors.txt | 5 +- ...sConstructorParametersAccessibility2.types | 2 +- ...tructorParametersAccessibility3.errors.txt | 19 + ...sConstructorParametersAccessibility3.types | 2 +- .../reference/classExpressionTest1.errors.txt | 22 + .../reference/classExpressionTest2.errors.txt | 22 + .../reference/classExtendingAny.types | 10 +- .../reference/classExtendingClass.errors.txt | 43 + .../classExtendingClassLikeType.types | 12 +- ...ceThatExtendsClassWithPrivates1.errors.txt | 15 +- .../classImplementsClass5.errors.txt | 18 +- .../classMemberInitializerScoping.types | 6 +- tests/baselines/reference/classOrder2.types | 2 +- tests/baselines/reference/classOrderBug.types | 2 +- .../reference/classSideInheritance2.types | 2 +- .../classSideInheritance3.errors.txt | 8 +- .../classStaticBlock11(target=es2015).types | 2 +- .../classStaticBlock11(target=esnext).types | 2 +- .../reference/classStaticBlock16.types | 2 +- .../reference/classStaticBlock17.types | 4 +- .../reference/classUpdateTests.errors.txt | 14 +- .../reference/classUpdateTests.types | 2 +- .../collectionPatternNoError.errors.txt | 45 + .../reference/collectionPatternNoError.types | 4 +- ...ionCodeGenModuleWithAccessorChildren.types | 6 +- ...erAndLocalFunctionInConstructor.errors.txt | 33 + ...onSuperAndLocalVarInConstructor.errors.txt | 29 + .../collisionSuperAndParameter.types | 40 +- ...ThisExpressionAndLocalVarInAccessors.types | 8 +- ...isExpressionAndLocalVarInConstructor.types | 4 +- ...ionThisExpressionAndLocalVarInMethod.types | 4 +- .../collisionThisExpressionAndParameter.types | 28 +- ...AndPropertyNameAsConstuctorParameter.types | 32 +- .../reference/commentsClassMembers.types | 88 +- .../reference/commentsInheritance.errors.txt | 156 + .../reference/commentsInheritance.types | 2 +- .../reference/commentsdoNotEmitComments.types | 6 +- .../reference/commentsemitComments.types | 6 +- .../reference/complexClassRelationships.types | 4 +- .../reference/complexNarrowingWithAny.types | 206 +- .../compoundAssignmentLHSIsValue.errors.txt | 5 +- .../compoundAssignmentLHSIsValue.types | 8 +- ...onentiationAssignmentLHSIsValue.errors.txt | 5 +- ...ndExponentiationAssignmentLHSIsValue.types | 4 +- .../computedPropertyNames22_ES5.types | 2 +- .../computedPropertyNames22_ES6.types | 2 +- .../computedPropertyNames29_ES5.types | 2 +- .../computedPropertyNames29_ES6.types | 2 +- ...alTypeAssignabilityWhenDeferred.errors.txt | 5 +- ...itionalTypeAssignabilityWhenDeferred.types | 4 +- ...DeclarationShadowedByVarDeclaration3.types | 2 +- .../reference/constructorArgs.errors.txt | 21 + ...tionTypeIsAssignableToBaseType2.errors.txt | 41 + .../constructorOverloads2.errors.txt | 39 + .../constructorWithCapturedSuper.errors.txt | 64 + ...structorWithIncompleteTypeAnnotation.types | 2 +- ...xpressionTypecheckingDoesntBlowStack.types | 4 +- .../contextualTypeAppliedToVarArgs.types | 2 +- .../contextualTypedSpecialAssignment.types | 4 +- .../reference/contextualTyping.types | 2 +- ...travariantInferenceAndTypeGuard.errors.txt | 52 + .../contravariantInferenceAndTypeGuard.types | 6 +- .../reference/controlFlowAliasing.types | 10 +- .../controlFlowForCatchAndFinally.types | 12 +- ...lowForCompoundAssignmentToThisMember.types | 10 +- .../reference/controlFlowGenericTypes.types | 2 +- .../controlFlowPrivateClassField.types | 10 +- ...hIntypeCheckObjectCreationExpression.types | 2 +- .../reference/crashRegressionTest.types | 6 +- .../reference/customAsyncIterator.types | 2 +- .../declFileEmitDeclarationOnly.types | 2 +- .../reference/declFileForTypeParameters.types | 2 +- .../reference/declFileGenericType2.errors.txt | 47 + .../reference/declFileGenericType2.types | 2 +- ...declarationEmitMixinPrivateProtected.types | 4 +- .../declarationEmitProtectedMembers.types | 4 +- .../declarationEmitThisPredicates01.types | 2 +- ...nEmitThisPredicatesWithPrivateName01.types | 2 +- .../reference/declarationFiles.errors.txt | 8 +- .../reference/declarationFiles.types | 30 +- ...nImportTypeAliasInferredAndEmittable.types | 2 +- .../reference/declarationMerging1.types | 2 +- .../reference/declarationMerging2.types | 2 +- ...etadataRestParameterWithImportedType.types | 2 +- ...taWithImportDeclarationNameCollision.types | 4 +- ...aWithImportDeclarationNameCollision2.types | 4 +- ...aWithImportDeclarationNameCollision3.types | 4 +- ...aWithImportDeclarationNameCollision4.types | 4 +- ...aWithImportDeclarationNameCollision5.types | 4 +- ...aWithImportDeclarationNameCollision6.types | 4 +- ...aWithImportDeclarationNameCollision7.types | 4 +- ...aWithImportDeclarationNameCollision8.types | 4 +- ...tPropsEmptyCurlyBecomesAnyForJs.errors.txt | 29 + ...efaultPropsEmptyCurlyBecomesAnyForJs.types | 8 +- .../definiteAssignmentAssertions.types | 2 +- ...niteAssignmentOfDestructuredVariable.types | 2 +- ...onstructorWithExplicitReturns01.errors.txt | 39 + ...lassConstructorWithExplicitReturns01.types | 8 +- ...dClassOverridesPrivateFunction1.errors.txt | 21 +- ...erivedClassOverridesPrivateFunction1.types | 2 +- ...dClassOverridesProtectedMembers.errors.txt | 41 + ...ClassOverridesProtectedMembers2.errors.txt | 69 + ...ClassOverridesProtectedMembers3.errors.txt | 48 +- ...ivedClassOverridesPublicMembers.errors.txt | 5 +- .../derivedClassParameterProperties.types | 18 +- ...rivedClassSuperCallsWithThisArg.errors.txt | 14 +- .../derivedClassSuperCallsWithThisArg.types | 8 +- .../derivedClassTransitivity.errors.txt | 16 +- .../derivedClassTransitivity2.errors.txt | 16 +- .../derivedClassTransitivity3.errors.txt | 84 +- .../derivedClassTransitivity4.errors.txt | 10 +- ...tanceShadowingProtectedInstance.errors.txt | 16 +- ...InstanceShadowingPublicInstance.errors.txt | 16 +- ...rivedClassWithoutExplicitConstructor.types | 4 +- ...ivedClassWithoutExplicitConstructor2.types | 4 +- ...lassWithoutExplicitConstructor3.errors.txt | 8 +- ...ivedClassWithoutExplicitConstructor3.types | 8 +- .../baselines/reference/derivedClasses.types | 4 +- .../derivedGenericClassWithAny.errors.txt | 11 +- ...HiddenBaseCallViaSuperPropertyAccess.types | 2 +- ...ninitializedPropertyDeclaration.errors.txt | 5 +- ...ivedUninitializedPropertyDeclaration.types | 6 +- ...tructuringParameterDeclaration5.errors.txt | 8 +- .../destructuringParameterProperties2.types | 12 +- ...structuringParameterProperties3.errors.txt | 50 +- .../destructuringParameterProperties3.types | 12 +- .../destructuringParameterProperties4.types | 18 +- .../destructuringParameterProperties5.types | 10 +- ...detachedCommentAtStartOfConstructor1.types | 4 +- ...detachedCommentAtStartOfConstructor2.types | 4 +- ...etachedCommentAtStartOfFunctionBody1.types | 2 +- ...etachedCommentAtStartOfFunctionBody2.types | 2 +- ...achedCommentAtStartOfLambdaFunction1.types | 2 +- ...achedCommentAtStartOfLambdaFunction2.types | 2 +- .../divergentAccessorsVisibility1.types | 108 +- ...rowUnionOfConstructorsWithInstanceof.types | 4 +- .../reference/duplicateLocalVariable1.types | 6 +- .../dynamicImportWithNestedThis_es2015.types | 2 +- .../dynamicImportWithNestedThis_es5.types | 2 +- ...itCapturingThisInTupleDestructuring2.types | 6 +- ...ClassDeclarationWithConstructorInES6.types | 4 +- ...thExtensionAndTypeArgumentInES6.errors.txt | 16 + ...lassDeclarationWithGetterSetterInES6.types | 2 +- .../emitClassDeclarationWithMethodInES6.types | 2 +- ...tionWithPropertyAssignmentInES6.errors.txt | 30 + ...clarationWithPropertyAssignmentInES6.types | 4 +- ...ClassDeclarationWithThisKeywordInES6.types | 8 +- ...tionWithTypeArgumentAndOverloadInES6.types | 8 +- ...lassDeclarationWithTypeArgumentInES6.types | 8 +- ...lassExpressionInDeclarationFile.errors.txt | 40 + ...assExpressionInDeclarationFile2.errors.txt | 9 +- .../emitStatementsBeforeSuperCall.types | 2 +- ...mentsBeforeSuperCallWithDefineFields.types | 2 +- ....asyncGenerators.classMethods.es2015.types | 2 +- ....asyncGenerators.classMethods.es2018.types | 2 +- ...ter.asyncGenerators.classMethods.es5.types | 2 +- .../es6ClassSuperCodegenBug.errors.txt | 22 + .../reference/es6ClassTest.errors.txt | 5 +- tests/baselines/reference/es6ClassTest.types | 4 +- .../reference/es6ClassTest2.errors.txt | 5 +- tests/baselines/reference/es6ClassTest2.types | 12 +- tests/baselines/reference/es6ClassTest3.types | 4 +- tests/baselines/reference/es6ClassTest8.types | 14 +- .../baselines/reference/es6DeclOrdering.types | 4 +- .../reference/es6MemberScoping.types | 2 +- .../esNextWeakRefs_IterableWeakMap.errors.txt | 111 + .../esNextWeakRefs_IterableWeakMap.types | 40 +- .../reference/exportNestedNamespaces.types | 2 +- .../expressionTypeNodeShouldError.types | 6 +- ...endAndImplementTheSameBaseType2.errors.txt | 16 +- .../reference/extendsTag2.errors.txt | 5 +- .../reference/extendsTag3.errors.txt | 23 + tests/baselines/reference/fatArrowSelf.types | 4 +- ...ssingTypeArgsOnJSConstructCalls.errors.txt | 5 +- ...lInMissingTypeArgsOnJSConstructCalls.types | 2 +- .../reference/fluentClasses.errors.txt | 24 + .../baselines/reference/fluentClasses.symbols | 4 - tests/baselines/reference/fluentClasses.types | 32 +- .../reference/for-inStatements.errors.txt | 10 +- .../reference/for-inStatements.types | 12 +- .../for-inStatementsInvalid.errors.txt | 10 +- .../reference/for-inStatementsInvalid.types | 12 +- tests/baselines/reference/for-of15.types | 4 +- tests/baselines/reference/for-of16.types | 4 +- tests/baselines/reference/for-of17.types | 4 +- tests/baselines/reference/for-of18.types | 4 +- tests/baselines/reference/for-of19.types | 4 +- tests/baselines/reference/for-of20.types | 4 +- tests/baselines/reference/for-of21.types | 4 +- tests/baselines/reference/for-of22.types | 4 +- tests/baselines/reference/for-of23.types | 4 +- tests/baselines/reference/for-of26.types | 4 +- tests/baselines/reference/for-of28.types | 4 +- tests/baselines/reference/for-of30.types | 4 +- tests/baselines/reference/for-of31.types | 4 +- tests/baselines/reference/for-of34.types | 4 +- tests/baselines/reference/for-of35.types | 4 +- .../reference/functionOverloads7.types | 4 +- .../functionSubtypingOfVarArgs.types | 2 +- .../functionSubtypingOfVarArgs2.types | 2 +- .../functionWithSameNameAsField.types | 6 +- .../functionsInClassExpressions.types | 4 +- tests/baselines/reference/fuzzy.errors.txt | 15 +- tests/baselines/reference/fuzzy.types | 14 +- .../genericBaseClassLiteralProperty.types | 4 +- .../genericBaseClassLiteralProperty2.types | 4 +- ...enericCallTypeArgumentInference.errors.txt | 122 + ...onstraintsTypeArgumentInference.errors.txt | 141 + ...opertyInheritanceSpecialization.errors.txt | 81 + ...ithFunctionTypedMemberArguments.errors.txt | 22 +- .../genericClassWithStaticFactory.types | 82 +- .../baselines/reference/genericClasses4.types | 8 +- .../reference/genericClassesInModule2.types | 12 +- .../genericClassesRedeclaration.errors.txt | 164 +- .../genericCloneReturnTypes.errors.txt | 9 +- .../reference/genericCloneReturnTypes.types | 4 +- .../genericCloneReturnTypes2.errors.txt | 17 +- .../reference/genericCloneReturnTypes2.types | 8 +- ...onstraintOnExtendedBuiltinTypes.errors.txt | 32 + ...ericConstraintOnExtendedBuiltinTypes.types | 2 +- ...nstraintOnExtendedBuiltinTypes2.errors.txt | 31 + ...ricConstraintOnExtendedBuiltinTypes2.types | 2 +- .../reference/genericDefaultsJs.errors.txt | 92 + tests/baselines/reference/genericGetter.types | 2 +- .../baselines/reference/genericGetter2.types | 2 +- .../baselines/reference/genericGetter3.types | 2 +- .../reference/genericInstanceOf.types | 4 +- .../reference/genericMemberFunction.types | 2 +- .../genericObjectLitReturnType.errors.txt | 21 + .../genericOfACloduleType1.errors.txt | 22 + .../genericOfACloduleType2.errors.txt | 25 + ...cRecursiveImplicitConstructorErrors3.types | 14 +- .../genericReturnTypeFromGetter1.types | 2 +- .../genericReversingTypeParameters.errors.txt | 30 + ...genericReversingTypeParameters2.errors.txt | 26 + .../reference/genericSetterInClassType.types | 4 +- .../genericSetterInClassTypeJsDoc.types | 6 +- .../genericSpecializations3.errors.txt | 24 +- .../genericTypeWithCallableMembers.types | 4 +- .../genericWithCallSignatures1.types | 2 +- ...WithIndexerOfTypeParameterType1.errors.txt | 18 + ...nericWithIndexerOfTypeParameterType1.types | 2 +- .../genericWithOpenTypeParameters1.errors.txt | 24 +- .../getAndSetNotIdenticalType2.types | 4 +- .../getAndSetNotIdenticalType3.types | 4 +- .../reference/gettersAndSetters.types | 4 +- .../heterogeneousArrayAndOverloads.types | 8 +- .../reference/implicitAnyCastedValue.types | 8 +- ...mplicitAnyFromCircularInference.errors.txt | 5 +- .../implicitAnyFromCircularInference.types | 2 +- ...nyGetAndSetAccessorWithAnyReturnType.types | 4 +- .../reference/implicitAnyInCatch.types | 4 +- .../importCallExpression4ES2020.types | 2 +- .../importCallExpressionInAMD4.types | 4 +- .../importCallExpressionInCJS5.types | 4 +- .../importCallExpressionInSystem4.types | 4 +- .../importCallExpressionInUMD4.types | 4 +- ...tCallExpressionNoModuleKindSpecified.types | 2 +- .../reference/importHelpersES6.types | 4 +- ...portHelpersNoHelpersForPrivateFields.types | 6 +- .../importTypeGenericTypes.errors.txt | 63 + .../reference/inKeywordTypeguard.errors.txt | 5 +- .../reference/inKeywordTypeguard.symbols | 3 + .../reference/inKeywordTypeguard.types | 16 +- ...bleAssignmentOfIdenticallyNamedTypes.types | 2 +- .../reference/incrementOnTypeParameter.types | 2 +- .../baselines/reference/indexTypeCheck.types | 4 +- .../reference/indexedAccessRelation.types | 2 +- .../indexedAccessTypeConstraints.errors.txt | 60 + .../indexedAccessTypeConstraints.types | 6 +- .../reference/indexersInClassType.types | 4 +- ...FromGenericFunctionReturnTypes1.errors.txt | 37 +- ...inferFromGenericFunctionReturnTypes1.types | 10 +- ...FromGenericFunctionReturnTypes2.errors.txt | 133 + ...inferFromGenericFunctionReturnTypes2.types | 14 +- .../inferenceErasedSignatures.errors.txt | 85 + .../reference/inferenceErasedSignatures.types | 6 +- .../baselines/reference/inferenceLimit.types | 2 +- ...inferringClassMembersFromAssignments.types | 34 +- ...nferringClassMembersFromAssignments3.types | 4 +- ...nferringClassMembersFromAssignments4.types | 4 +- ...nferringClassMembersFromAssignments5.types | 6 +- ...nferringClassMembersFromAssignments7.types | 16 +- ...andParentPrivateMemberCollision.errors.txt | 16 +- ...MemberCollisionWithPublicMember.errors.txt | 16 +- ...emberCollisionWithPrivateMember.errors.txt | 16 +- ...anceMemberPropertyOverridingAccessor.types | 4 +- ...tedConstructorPropertyContextualType.types | 2 +- .../initializerWithThisPropertyAccess.types | 4 +- ...lineJsxFactoryDeclarationsLocalTypes.types | 20 +- .../instanceAndStaticDeclarations1.types | 4 +- ...ropertiesInheritedIntoClassType.errors.txt | 11 +- ...ancePropertiesInheritedIntoClassType.types | 36 +- .../instancePropertyInClassType.errors.txt | 9 +- .../instancePropertyInClassType.types | 8 +- .../reference/interfaceClassMerging.types | 4 +- .../interfaceClassMerging2.errors.txt | 49 + .../reference/interfaceClassMerging2.types | 4 +- .../reference/interfaceContextualType.types | 6 +- ...terfaceExtendsClassWithPrivate2.errors.txt | 40 +- .../intersectionWithConflictingPrivates.types | 2 +- ...ngNonGenericMethodWithTypeArguments1.types | 2 +- ...ngNonGenericMethodWithTypeArguments2.types | 2 +- .../reference/iterableArrayPattern1.types | 4 +- .../reference/iterableArrayPattern10.types | 4 +- .../reference/iterableArrayPattern11.types | 4 +- .../reference/iterableArrayPattern12.types | 4 +- .../reference/iterableArrayPattern13.types | 4 +- .../reference/iterableArrayPattern14.types | 4 +- .../reference/iterableArrayPattern15.types | 4 +- .../reference/iterableArrayPattern16.types | 8 +- .../reference/iterableArrayPattern17.types | 4 +- .../reference/iterableArrayPattern18.types | 4 +- .../reference/iterableArrayPattern19.types | 4 +- .../reference/iterableArrayPattern2.types | 4 +- .../reference/iterableArrayPattern20.types | 4 +- .../reference/iterableArrayPattern3.types | 4 +- .../reference/iterableArrayPattern4.types | 4 +- .../reference/iterableArrayPattern5.types | 4 +- .../reference/iterableArrayPattern6.types | 4 +- .../reference/iterableArrayPattern7.types | 4 +- .../reference/iterableArrayPattern8.types | 4 +- .../reference/iterableArrayPattern9.types | 4 +- .../reference/iteratorSpreadInArray.types | 4 +- .../reference/iteratorSpreadInArray10.types | 4 +- .../reference/iteratorSpreadInArray2.types | 8 +- .../reference/iteratorSpreadInArray3.types | 4 +- .../reference/iteratorSpreadInArray4.types | 4 +- .../reference/iteratorSpreadInArray5.types | 4 +- .../reference/iteratorSpreadInArray6.types | 4 +- .../reference/iteratorSpreadInArray7.types | 4 +- .../reference/iteratorSpreadInArray9.types | 4 +- .../reference/iteratorSpreadInCall.types | 4 +- .../reference/iteratorSpreadInCall10.types | 4 +- .../reference/iteratorSpreadInCall11.types | 4 +- .../reference/iteratorSpreadInCall12.types | 8 +- .../reference/iteratorSpreadInCall2.types | 4 +- .../reference/iteratorSpreadInCall3.types | 4 +- .../reference/iteratorSpreadInCall4.types | 4 +- .../reference/iteratorSpreadInCall5.types | 8 +- .../reference/iteratorSpreadInCall6.types | 8 +- .../reference/iteratorSpreadInCall7.types | 8 +- .../reference/iteratorSpreadInCall8.types | 8 +- .../reference/iteratorSpreadInCall9.types | 8 +- .../jsCheckObjectDefineThisNoCrash.types | 6 +- .../jsDeclarationsClasses.errors.txt | 203 ++ .../reference/jsDeclarationsClasses.js | 4 + .../reference/jsDeclarationsClasses.types | 12 +- ...rationsExportAssignedClassExpression.types | 2 +- ...portAssignedClassExpressionAnonymous.types | 2 +- ...ignedClassExpressionAnonymousWithSub.types | 4 +- ...portAssignedClassExpressionShadowing.types | 2 +- ...DeclarationsExportAssignedVisibility.types | 4 +- .../jsDeclarationsFunctionJSDoc.types | 2 +- .../jsDeclarationsPrivateFields01.types | 6 +- ...onsReferenceToClassInstanceCrossFile.types | 4 +- ...rationsReusesExistingTypeAnnotations.types | 16 +- ...thExplicitNoArgumentConstructor.errors.txt | 19 + .../jsDeclarationsThisTypes.errors.txt | 18 + .../reference/jsDeclarationsThisTypes.types | 2 +- .../jsDeclarationsTypedefAndImportTypes.types | 4 +- .../reference/jsEnumCrossFileExport.types | 2 +- .../reference/jsFileClassPropertyType.types | 2 +- .../reference/jsFileClassPropertyType2.types | 2 +- .../reference/jsFileClassPropertyType3.types | 4 +- .../jsFileClassSelfReferencedProperty.types | 6 +- ...onClassMethodContainingArrowFunction.types | 2 +- ...mplicitAnyNoCascadingReferenceErrors.types | 2 +- .../jsObjectsMarkedAsOpenEnded.types | 4 +- .../reference/jsdocAccessibilityTags.types | 22 +- .../jsdocAccessibilityTagsDeclarations.types | 16 +- .../reference/jsdocAugmentsMissingType.types | 4 +- .../reference/jsdocAugments_noExtends.types | 4 +- .../jsdocAugments_withTypeParameter.types | 2 +- .../reference/jsdocFunctionType.types | 2 +- .../jsdocImplements_class.errors.txt | 18 +- .../jsdocImplements_missingType.types | 2 +- .../jsdocImplements_properties.types | 4 +- .../baselines/reference/jsdocImportType.types | 2 +- .../reference/jsdocImportType2.types | 2 +- tests/baselines/reference/jsdocReadonly.types | 4 +- .../reference/jsdocReadonlyDeclarations.types | 4 +- .../reference/jsdocTemplateClass.types | 2 +- ...peReferenceToImportOfClassExpression.types | 4 +- ...eferenceToImportOfFunctionExpression.types | 2 +- .../reference/jsdocTypeTagCast.errors.txt | 5 +- .../reference/jsdocTypeTagCast.types | 6 +- ...ableWithMultipleChildrenNoError.errors.txt | 50 + .../keyofAndIndexedAccess.errors.txt | 705 +++++ .../reference/keyofAndIndexedAccess.js | 8 +- .../reference/keyofAndIndexedAccess.types | 86 +- .../reference/keyofAndIndexedAccess2.types | 4 +- .../baselines/reference/lambdaArgCrash.types | 4 +- .../baselines/reference/lambdaPropSelf.types | 6 +- .../lateBoundClassMemberAssignmentJS.types | 6 +- .../lateBoundClassMemberAssignmentJS2.types | 6 +- .../lateBoundClassMemberAssignmentJS3.types | 14 +- .../lateBoundMethodNameAssigmentJS.types | 6 +- tests/baselines/reference/lift.errors.txt | 5 +- tests/baselines/reference/lift.types | 6 +- tests/baselines/reference/listFailure.types | 8 +- ...literalTypesWidenInParameterPosition.types | 4 +- .../looseThisTypeInFunctions.errors.txt | 9 +- .../reference/looseThisTypeInFunctions.types | 2 +- .../reference/mappedTypeErrors.errors.txt | 36 +- .../reference/mappedTypeErrors.types | 2 +- .../matchReturnTypeInAllBranches.types | 16 +- ...erFunctionsWithPrivateOverloads.errors.txt | 9 +- ...tionsWithPublicPrivateOverloads.errors.txt | 9 +- .../memberVariableDeclarations1.types | 6 +- .../reference/mergedDeclarations6.types | 2 +- .../reference/methodChainError.types | 2 +- .../missingPropertiesOfClassExpression.types | 2 +- tests/baselines/reference/missingSelf.types | 4 +- .../mixinClassesAnnotated.errors.txt | 75 + .../reference/mixinClassesAnnotated.types | 10 +- .../mixinClassesAnonymous.errors.txt | 74 + .../reference/mixinClassesAnonymous.types | 10 +- .../reference/mixinClassesMembers.errors.txt | 123 + .../reference/mixinClassesMembers.types | 14 +- .../mixingApparentTypeOverrides.types | 2 +- .../reference/moduleExportAssignment6.types | 6 +- .../moduleExportNestedNamespaces.types | 2 +- .../moduleMemberWithoutTypeAnnotation1.types | 4 +- .../reference/moduleMergeConstructor.types | 2 +- .../reference/multipleDeclarations.types | 16 +- .../mutuallyRecursiveInference.types | 4 +- .../reference/narrowingOfDottedNames.types | 2 +- tests/baselines/reference/nestedLoops.types | 2 +- tests/baselines/reference/nestedSelf.types | 2 +- .../reference/neverReturningFunctions1.types | 8 +- tests/baselines/reference/newArrays.types | 6 +- .../reference/newTarget.es5.errors.txt | 38 + .../reference/newTarget.es6.errors.txt | 38 + .../reference/noAsConstNameLookup.types | 4 +- .../reference/noCrashOnThisTypeUsage.types | 8 +- .../noImplicitAnyMissingGetAccessor.types | 2 +- ...dLocals_destructuringAssignment.errors.txt | 22 - ...UnusedLocals_destructuringAssignment.types | 12 +- .../noUnusedLocals_selfReference.errors.txt | 5 +- .../noUnusedLocals_selfReference.types | 2 +- .../noUnusedLocals_writeOnlyProperty.types | 2 +- ...ocals_writeOnlyProperty_dynamicNames.types | 4 +- ...eationOfElementAccessExpression.errors.txt | 20 +- ...ectCreationOfElementAccessExpression.types | 8 +- tests/baselines/reference/objectIndexer.types | 2 +- .../optionalParamArgsTest.errors.txt | 5 +- .../baselines/reference/override6.errors.txt | 5 +- .../baselines/reference/override8.errors.txt | 8 +- tests/baselines/reference/override8.types | 2 +- .../overrideBaseIntersectionMethod.types | 10 +- .../reference/overrideParameterProperty.types | 6 +- tests/baselines/reference/parser509667.types | 2 +- .../reference/parserAstSpans1.errors.txt | 5 +- .../baselines/reference/parserAstSpans1.types | 6 +- tests/baselines/reference/parserClass2.types | 4 +- ...orRecovery_IncompleteMemberVariable1.types | 8 +- ...orRecovery_IncompleteMemberVariable2.types | 8 +- .../parserMissingLambdaOpenBrace1.types | 2 +- .../reference/parserRealSource1.types | 34 +- .../reference/parserRealSource10.errors.txt | 20 +- .../reference/parserRealSource10.types | 30 +- .../reference/parserRealSource11.errors.txt | 143 +- .../reference/parserRealSource11.types | 1380 ++++----- .../reference/parserRealSource12.types | 252 +- .../reference/parserRealSource14.types | 800 ++--- .../reference/parserRealSource4.types | 136 +- .../reference/parserRealSource5.types | 32 +- .../reference/parserRealSource6.types | 30 +- .../reference/parserRealSource8.types | 14 +- .../reference/parserRealSource9.types | 86 +- .../reference/parserSuperExpression3.types | 2 +- .../reference/parserharness.errors.txt | 11 +- tests/baselines/reference/parserharness.types | 348 +-- .../baselines/reference/parserindenter.types | 186 +- .../potentiallyUncalledDecorators.types | 2 +- .../primitiveConstraints2.errors.txt | 10 +- ...meterReferenceInConstructorParameter.types | 6 +- .../reference/privateAccessInSubclass1.types | 2 +- ...teClassPropertyAccessibleWithinClass.types | 18 +- ...sPropertyAccessibleWithinNestedClass.types | 10 +- .../reference/privateIdentifierChain.1.types | 12 +- .../reference/privateInstanceVisibility.types | 10 +- .../reference/privateNameAccessors.types | 8 +- .../privateNameAccessorsAccess.types | 4 +- .../privateNameAccessorsCallExpression.types | 14 +- .../privateNameAndIndexSignature.types | 4 +- .../reference/privateNameBadAssignment.types | 2 +- .../reference/privateNameBadDeclaration.types | 2 +- ...ComputedPropertyName1(target=es2015).types | 24 +- ...ComputedPropertyName1(target=esnext).types | 24 +- ...ComputedPropertyName3(target=es2015).types | 12 +- ...ComputedPropertyName3(target=esnext).types | 12 +- .../reference/privateNameEmitHelpers.types | 4 +- .../reference/privateNameField.types | 2 +- .../reference/privateNameFieldAccess.types | 2 +- .../privateNameFieldAssignment.types | 26 +- .../privateNameFieldCallExpression.types | 16 +- ...ldDestructuredBinding(target=es2015).types | 24 +- ...ldDestructuredBinding(target=esnext).types | 24 +- .../privateNameFieldUnaryMutation.types | 56 +- .../reference/privateNameFieldsESNext.types | 6 +- .../reference/privateNameHashCharName.types | 2 +- .../privateNameImplicitDeclaration.types | 2 +- .../privateNameJsBadAssignment.types | 2 +- .../privateNameJsBadDeclaration.types | 2 +- .../baselines/reference/privateNameJsx.types | 2 +- .../reference/privateNameMethod.types | 6 +- .../reference/privateNameMethodAccess.types | 4 +- .../privateNameMethodAssignment.types | 6 +- .../reference/privateNameMethodAsync.types | 6 +- ...privateNameMethodCallExpression.errors.txt | 30 + .../privateNameMethodCallExpression.types | 22 +- .../privateNameMethodClassExpression.types | 2 +- .../reference/privateNameReadonly.types | 2 +- .../privateNameSetterExprReturnValue.types | 2 +- .../reference/privateNameSetterNoGetter.types | 2 +- .../privateNameStaticFieldAccess.types | 2 +- ...privateNameStaticFieldCallExpression.types | 2 +- ...ldDestructuredBinding(target=es2015).types | 6 +- ...ldDestructuredBinding(target=esnext).types | 6 +- .../privateNameStaticFieldUnaryMutation.types | 28 +- ...eNameStaticMethodCallExpression.errors.txt | 30 + ...vateNameStaticsAndStaticMethods.errors.txt | 36 + .../privateNameUncheckedJsOptionalChain.types | 4 +- .../reference/privateNameUnused.types | 6 +- .../privateNamesAndFields.errors.txt | 21 + .../reference/privateNamesAndFields.types | 4 +- .../privateNamesAndGenericClasses-2.types | 10 +- .../privateNamesAndMethods.errors.txt | 36 + .../reference/privateNamesAndMethods.types | 18 +- .../privateNamesAndStaticFields.errors.txt | 5 +- .../privateNamesAndStaticMethods.errors.txt | 36 + .../reference/privateNamesAssertion.types | 4 +- .../privateNamesInGenericClasses.types | 6 +- .../reference/privateNamesNoDelete.types | 2 +- ...MembersAreNotAccessibleDestructuring.types | 6 +- .../reference/privateVisibility.types | 2 +- .../baselines/reference/privateVisibles.types | 4 +- .../privateWriteOnlyAccessorRead.types | 28 +- .../reference/promiseChaining.errors.txt | 31 + .../reference/promiseChaining.symbols | 2 - .../baselines/reference/promiseChaining.types | 24 +- .../reference/promiseChaining1.errors.txt | 22 +- .../reference/promiseChaining1.types | 4 +- .../reference/promiseChaining2.errors.txt | 22 +- .../reference/promiseChaining2.types | 4 +- .../reference/promiseTypeInference.errors.txt | 21 + .../reference/promiseTypeInference.types | 4 +- ...OnTypeParameterWithConstraints2.errors.txt | 94 + .../reference/propertyOrdering.types | 8 +- .../reference/propertyOrdering2.types | 4 +- .../propertyOverridesAccessors.types | 4 +- .../propertyOverridesAccessors3.types | 6 +- ...edClassPropertyAccessibleWithinClass.types | 18 +- ...sPropertyAccessibleWithinNestedClass.types | 10 +- ...opertyAccessibleWithinNestedSubclass.types | 8 +- ...lassPropertyAccessibleWithinSubclass.types | 10 +- ...assPropertyAccessibleWithinSubclass3.types | 4 +- ...protectedInstanceMemberAccessibility.types | 8 +- .../reference/protectedMembers.types | 4 +- .../baselines/reference/protoInIndexer.types | 2 +- .../quickInfoCommentsClassMembers.baseline | 4 +- ...TypeAtReturnPositionsInaccurate.errors.txt | 16 +- ...kinfoTypeAtReturnPositionsInaccurate.types | 10 +- .../reference/quotedConstructors.types | 10 +- .../reference/quotedPropertyName3.types | 2 +- ...actDefaultPropsInferenceSuccess.errors.txt | 71 +- .../reactDefaultPropsInferenceSuccess.types | 2 +- .../reference/reactHOCSpreadprops.errors.txt | 36 + .../reference/reactHOCSpreadprops.types | 2 +- ...actReadonlyHOCAssignabilityReal.errors.txt | 53 + .../reactReadonlyHOCAssignabilityReal.types | 2 +- ...ssignmentInSubclassOfClassExpression.types | 2 +- .../readonlyConstructorAssignment.errors.txt | 11 +- .../readonlyConstructorAssignment.types | 10 +- .../baselines/reference/readonlyMembers.types | 18 +- .../recursiveClassReferenceTest.types | 8 +- .../reference/recursiveGetterAccess.types | 2 +- .../reference/recursiveProperties.types | 4 +- ...sDeclarationWhenInBaseTypeResolution.types | 2744 ++++++++--------- .../reference/returnInConstructor1.errors.txt | 8 +- .../reference/returnInConstructor1.types | 4 +- .../reference/returnTagTypeGuard.errors.txt | 70 + .../reference/returnTagTypeGuard.types | 4 +- tests/baselines/reference/scannerClass2.types | 4 +- ...heckExtendedClassInsidePublicMethod2.types | 2 +- .../scopeResolutionIdentifiers.types | 2 +- tests/baselines/reference/scopeTests.types | 4 +- .../baselines/reference/selfInCallback.types | 4 +- tests/baselines/reference/selfInLambdas.types | 4 +- .../reference/setterBeforeGetter.types | 4 +- .../reference/shadowPrivateMembers.errors.txt | 16 +- ...servedCompilerDeclarationsWithNoEmit.types | 10 +- .../sourceMap-FileWithComments.types | 8 +- .../baselines/reference/sourceMapSample.types | 2 +- .../reference/sourceMapValidationClass.types | 8 +- .../sourceMapValidationClasses.types | 2 +- .../sourceMapValidationDecorators.types | 8 +- .../reference/spellingUncheckedJS.types | 2 +- .../stackDepthLimitCastingType.types | 2 +- .../staticIndexSignature6.errors.txt | 27 + .../reference/staticOffOfInstance1.types | 2 +- .../reference/staticOffOfInstance2.types | 2 +- .../staticPropertyNotInClassType.errors.txt | 9 +- .../staticPropertyNotInClassType.types | 8 +- .../reference/staticVisibility2.types | 2 +- tests/baselines/reference/statics.types | 14 +- .../reference/strictBindCallApply1.types | 8 +- .../strictBooleanMemberAssignability.types | 2 +- .../strictNullNotNullIndexTypeNoLib.types | 6 +- ...strictNullNotNullIndexTypeShouldWork.types | 6 +- .../strictPropertyInitialization.types | 36 +- ...classWithPolymorphicThisIsAssignable.types | 2 +- .../reference/superAccessCastedCall.types | 2 +- .../reference/superAccessInFatArrow1.types | 2 +- .../superCallArgsMustMatch.errors.txt | 6 +- .../reference/superCallArgsMustMatch.types | 2 +- .../superCallAssignResult.errors.txt | 5 +- .../superCallBeforeThisAccessing1.errors.txt | 22 + .../superCallBeforeThisAccessing1.types | 2 +- .../superCallBeforeThisAccessing2.errors.txt | 16 + .../superCallBeforeThisAccessing2.types | 2 +- .../superCallBeforeThisAccessing3.errors.txt | 5 +- .../superCallBeforeThisAccessing3.types | 4 +- .../superCallBeforeThisAccessing4.types | 4 +- .../superCallBeforeThisAccessing5.types | 2 +- .../superCallBeforeThisAccessing6.errors.txt | 5 +- .../superCallBeforeThisAccessing6.types | 2 +- .../superCallBeforeThisAccessing7.errors.txt | 5 +- .../superCallBeforeThisAccessing7.types | 2 +- .../superCallBeforeThisAccessing8.errors.txt | 19 + .../superCallBeforeThisAccessing8.types | 2 +- ...rCallParameterContextualTyping1.errors.txt | 17 + ...rCallParameterContextualTyping2.errors.txt | 5 +- ...rCallParameterContextualTyping3.errors.txt | 48 + .../superCallWithCommentEmit01.errors.txt | 16 + .../baselines/reference/superCalls.errors.txt | 39 + .../reference/superElementAccess.types | 4 +- .../reference/superNoModifiersCrash.types | 2 +- .../reference/superPropertyAccess.types | 4 +- ...uperPropertyAccessInSuperCall01.errors.txt | 5 +- .../superPropertyAccessNoError.errors.txt | 76 + .../superPropertyAccessNoError.symbols | 2 - .../superPropertyAccessNoError.types | 24 +- .../reference/superPropertyAccess_ES5.types | 4 +- .../reference/superPropertyAccess_ES6.types | 4 +- ...rtyInConstructorBeforeSuperCall.errors.txt | 8 +- .../superWithTypeArgument3.errors.txt | 22 +- ...tEs6DecoratorMetadataImportNotElided.types | 4 +- .../reference/targetTypeBaseCalls.errors.txt | 5 +- .../templateLiteralTypesPatterns.types | 2 +- .../reference/thisBinding.errors.txt | 7 +- tests/baselines/reference/thisBinding.types | 2 +- tests/baselines/reference/thisBinding2.types | 6 +- tests/baselines/reference/thisCapture1.types | 2 +- ...OnMethodReturnOfGenericInstance.errors.txt | 30 + ...ionInCallExpressionWithTypeArguments.types | 4 +- .../thisExpressionOfGenericObject.types | 4 +- .../baselines/reference/thisInAccessors.types | 24 +- .../thisInConstructorParameter2.types | 14 +- .../thisInInvalidContexts.errors.txt | 8 +- .../reference/thisInInvalidContexts.types | 4 +- ...InInvalidContextsExternalModule.errors.txt | 8 +- .../thisInInvalidContextsExternalModule.types | 4 +- tests/baselines/reference/thisInLambda.types | 8 +- .../reference/thisInObjectLiterals.errors.txt | 6 +- .../reference/thisInObjectLiterals.types | 12 +- .../reference/thisInOuterClassBody.types | 22 +- .../thisInPropertyBoundDeclarations.types | 2 +- .../reference/thisInSuperCall.errors.txt | 11 +- .../baselines/reference/thisInSuperCall.types | 6 +- .../reference/thisInSuperCall1.errors.txt | 5 +- .../reference/thisInSuperCall1.types | 2 +- .../reference/thisInSuperCall2.errors.txt | 8 +- .../reference/thisInSuperCall2.types | 4 +- .../reference/thisInSuperCall3.errors.txt | 5 +- .../reference/thisInSuperCall3.types | 2 +- .../baselines/reference/thisMethodCall.types | 2 +- .../thisPropertyAssignmentCircular.types | 8 +- .../thisPropertyOverridesAccessors.types | 2 +- .../reference/thisShadowingErrorSpans.types | 2 +- .../thisTypeAndConstraints.errors.txt | 45 + .../reference/thisTypeAndConstraints.types | 36 +- .../reference/thisTypeErrors2.errors.txt | 7 +- .../baselines/reference/thisTypeErrors2.types | 4 +- .../reference/thisTypeInAccessors.types | 2 +- .../reference/thisTypeInClasses.errors.txt | 63 + .../reference/thisTypeInClasses.types | 34 +- .../reference/thisTypeInFunctions3.types | 8 +- .../thisTypeInFunctionsNegative.types | 2 +- .../reference/thisWhenTypeCheckFails.types | 2 +- .../throwInEnclosingStatements.types | 4 +- tests/baselines/reference/topLevel.types | 12 +- ...lingCommaInHeterogenousArrayLiteral1.types | 4 +- .../truthinessCallExpressionCoercion.types | 4 +- .../truthinessCallExpressionCoercion1.types | 8 +- .../truthinessCallExpressionCoercion2.types | 14 +- .../tsxAttributeResolution15.errors.txt | 12 +- .../tsxAttributeResolution16.errors.txt | 56 + ...tsxCorrectlyParseLessThanComparison1.types | 2 +- ...tsxDefaultAttributesResolution1.errors.txt | 45 + ...tsxDefaultAttributesResolution2.errors.txt | 45 + ...tsxDefaultAttributesResolution3.errors.txt | 31 +- .../reference/tsxDynamicTagName5.types | 2 +- .../reference/tsxDynamicTagName7.types | 2 +- .../reference/tsxDynamicTagName8.types | 4 +- .../reference/tsxDynamicTagName9.types | 4 +- tests/baselines/reference/tsxEmit1.types | 10 +- .../tsxGenericAttributesType3.errors.txt | 73 + .../reference/tsxGenericAttributesType3.types | 2 +- .../tsxGenericAttributesType4.errors.txt | 73 + .../reference/tsxGenericAttributesType4.types | 2 +- .../tsxGenericAttributesType5.errors.txt | 60 + .../reference/tsxGenericAttributesType5.types | 2 +- .../tsxGenericAttributesType6.errors.txt | 60 + .../reference/tsxGenericAttributesType6.types | 2 +- .../tsxGenericAttributesType9.errors.txt | 45 + .../reference/tsxGenericAttributesType9.types | 2 +- .../tsxNotUsingApparentTypeOfSFC.errors.txt | 25 +- tests/baselines/reference/tsxReactEmit1.types | 10 +- ...tsxSpreadAttributesResolution11.errors.txt | 63 + ...tsxSpreadAttributesResolution12.errors.txt | 31 +- .../tsxSpreadAttributesResolution2.errors.txt | 31 +- .../tsxSpreadAttributesResolution3.errors.txt | 53 + .../tsxSpreadAttributesResolution4.errors.txt | 31 +- .../tsxSpreadAttributesResolution5.errors.txt | 41 +- .../tsxSpreadAttributesResolution6.errors.txt | 31 +- .../tsxSpreadAttributesResolution7.errors.txt | 56 + .../tsxSpreadAttributesResolution8.errors.txt | 58 + ...xSpreadDoesNotReportExcessProps.errors.txt | 36 + .../tsxSpreadDoesNotReportExcessProps.types | 2 +- ...tsxStatelessFunctionComponents2.errors.txt | 12 +- .../reference/tsxUnionElementType3.errors.txt | 41 +- .../reference/tsxUnionElementType4.errors.txt | 41 +- .../tsxUnionTypeComponent1.errors.txt | 55 + .../reference/tsxUnionTypeComponent1.types | 2 +- ...peConstraintsWithConstructSignatures.types | 4 +- .../typeFromParamTagForFunction.types | 6 +- .../typeFromPropertyAssignment10.types | 2 +- .../typeFromPropertyAssignment10_1.types | 2 +- .../typeFromPropertyAssignment15.types | 2 +- .../typeFromPropertyAssignment2.types | 2 +- .../typeFromPropertyAssignment23.types | 2 +- .../typeFromPropertyAssignment25.errors.txt | 25 + .../typeFromPropertyAssignment25.types | 4 +- .../typeFromPropertyAssignment26.types | 6 +- .../typeFromPropertyAssignment28.types | 2 +- .../typeFromPropertyAssignment3.types | 2 +- .../typeFromPropertyAssignment35.types | 2 +- .../typeFromPropertyAssignment4.types | 2 +- .../typeGuardFunctionOfFormThis.types | 8 +- ...peGuardFunctionOfFormThisErrors.errors.txt | 5 +- .../typeGuardFunctionOfFormThisErrors.types | 4 +- .../typeGuardOfFormThisMember.errors.txt | 5 +- .../reference/typeGuardOfFormThisMember.types | 4 +- ...typeGuardOfFormThisMemberErrors.errors.txt | 5 +- .../typeGuardOfFormThisMemberErrors.types | 4 +- .../typeGuardOfFromPropNameInUnionType.types | 10 +- .../reference/typeGuardsInProperties.types | 12 +- .../reference/typeGuardsOnClassProperty.types | 8 +- .../reference/typeInferenceLiteralUnion.types | 4 +- ...typeInferenceReturnTypeCallback.errors.txt | 38 + .../typeInferenceReturnTypeCallback.types | 2 +- .../reference/typeOfThisGeneral.errors.txt | 26 +- .../reference/typeOfThisGeneral.types | 84 +- .../reference/typeOfThisInAccessor.types | 8 +- .../typeOfThisInInstanceMember.types | 36 +- .../typeOfThisInInstanceMember2.errors.txt | 9 +- .../typeOfThisInInstanceMember2.types | 36 +- .../typeOfThisInMemberFunctions.types | 12 +- ...peOfThisInStaticMembers8(target=es5).types | 2 +- ...peOfThisInStaticMembers8(target=es6).types | 2 +- ...fThisInStaticMembers8(target=esnext).types | 2 +- ...anceMemberNarrowedWithLoopAntecedent.types | 12 +- ...arametersAvailableInNestedScope.errors.txt | 31 + ...tiatedWithDefaultWhenCheckingDefault.types | 2 +- .../reference/typeRelationships.errors.txt | 21 +- .../reference/typeRelationships.types | 162 +- .../typeVariableTypeGuards.errors.txt | 108 + .../reference/typeVariableTypeGuards.types | 12 +- tests/baselines/reference/typeofThis.types | 54 +- .../reference/underscoreMapFirst.types | 2 +- .../underscoreThisInDerivedClass01.errors.txt | 29 + .../underscoreThisInDerivedClass02.errors.txt | 24 + .../reference/unionOfClassCalls.errors.txt | 11 +- .../reference/unknownSymbols1.errors.txt | 5 +- .../baselines/reference/unknownSymbols1.types | 2 +- .../reference/unspecializedConstraints.types | 36 +- .../reference/unusedGetterInClass.types | 2 +- .../unusedIdentifiersConsolidated1.types | 4 +- .../reference/unusedLocalProperty.types | 2 +- .../unusedPrivateMethodInClass4.types | 2 +- .../unusedPrivateVariableInClass4.types | 2 +- .../unusedPrivateVariableInClass5.types | 2 +- .../reference/unusedSetterInClass.types | 2 +- .../reference/unusedSetterInClass2.types | 2 +- .../reference/unusedTypeParameters2.types | 2 +- .../reference/unusedTypeParameters3.types | 2 +- .../unusedTypeParameters_templateTag2.types | 4 +- .../validUseOfThisInSuper.errors.txt | 15 + .../reference/validUseOfThisInSuper.types | 8 +- .../varArgsOnConstructorTypes.errors.txt | 30 + .../reference/varArgsOnConstructorTypes.types | 4 +- .../reference/varRequireFromJavascript.types | 4 +- ...aratorResolvedDuringContextualTyping.types | 6 +- tests/baselines/reference/variance.types | 2 +- ...eroOrderIndexSignatureRelationsAlign.types | 4 +- ...roOrderIndexSignatureRelationsAlign2.types | 4 +- tests/baselines/reference/witness.types | 8 +- .../wrappedAndRecursiveConstraints.errors.txt | 26 + 938 files changed, 13550 insertions(+), 5927 deletions(-) create mode 100644 tests/baselines/reference/accessOverriddenBaseClassMember1.errors.txt create mode 100644 tests/baselines/reference/baseTypeWrappingInstantiationChain.errors.txt create mode 100644 tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.errors.txt create mode 100644 tests/baselines/reference/callWithSpread.errors.txt create mode 100644 tests/baselines/reference/callWithSpreadES6.errors.txt create mode 100644 tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.errors.txt create mode 100644 tests/baselines/reference/captureThisInSuperCall.errors.txt create mode 100644 tests/baselines/reference/checkJsFiles_noErrorLocation.errors.txt create mode 100644 tests/baselines/reference/checkJsxChildrenProperty12.errors.txt create mode 100644 tests/baselines/reference/checkJsxChildrenProperty3.errors.txt create mode 100644 tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.errors.txt create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing6.errors.txt create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing7.errors.txt create mode 100644 tests/baselines/reference/classConstructorParametersAccessibility3.errors.txt create mode 100644 tests/baselines/reference/classExpressionTest1.errors.txt create mode 100644 tests/baselines/reference/classExpressionTest2.errors.txt create mode 100644 tests/baselines/reference/classExtendingClass.errors.txt create mode 100644 tests/baselines/reference/collectionPatternNoError.errors.txt create mode 100644 tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt create mode 100644 tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt create mode 100644 tests/baselines/reference/commentsInheritance.errors.txt create mode 100644 tests/baselines/reference/constructorArgs.errors.txt create mode 100644 tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.errors.txt create mode 100644 tests/baselines/reference/constructorOverloads2.errors.txt create mode 100644 tests/baselines/reference/constructorWithCapturedSuper.errors.txt create mode 100644 tests/baselines/reference/contravariantInferenceAndTypeGuard.errors.txt create mode 100644 tests/baselines/reference/declFileGenericType2.errors.txt create mode 100644 tests/baselines/reference/defaultPropsEmptyCurlyBecomesAnyForJs.errors.txt create mode 100644 tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.errors.txt create mode 100644 tests/baselines/reference/derivedClassOverridesProtectedMembers.errors.txt create mode 100644 tests/baselines/reference/derivedClassOverridesProtectedMembers2.errors.txt create mode 100644 tests/baselines/reference/emitClassDeclarationWithExtensionAndTypeArgumentInES6.errors.txt create mode 100644 tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.errors.txt create mode 100644 tests/baselines/reference/emitClassExpressionInDeclarationFile.errors.txt create mode 100644 tests/baselines/reference/es6ClassSuperCodegenBug.errors.txt create mode 100644 tests/baselines/reference/esNextWeakRefs_IterableWeakMap.errors.txt create mode 100644 tests/baselines/reference/extendsTag3.errors.txt create mode 100644 tests/baselines/reference/fluentClasses.errors.txt create mode 100644 tests/baselines/reference/genericCallTypeArgumentInference.errors.txt create mode 100644 tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.errors.txt create mode 100644 tests/baselines/reference/genericClassPropertyInheritanceSpecialization.errors.txt create mode 100644 tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.errors.txt create mode 100644 tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.errors.txt create mode 100644 tests/baselines/reference/genericDefaultsJs.errors.txt create mode 100644 tests/baselines/reference/genericObjectLitReturnType.errors.txt create mode 100644 tests/baselines/reference/genericOfACloduleType1.errors.txt create mode 100644 tests/baselines/reference/genericOfACloduleType2.errors.txt create mode 100644 tests/baselines/reference/genericReversingTypeParameters.errors.txt create mode 100644 tests/baselines/reference/genericReversingTypeParameters2.errors.txt create mode 100644 tests/baselines/reference/genericWithIndexerOfTypeParameterType1.errors.txt create mode 100644 tests/baselines/reference/importTypeGenericTypes.errors.txt create mode 100644 tests/baselines/reference/indexedAccessTypeConstraints.errors.txt create mode 100644 tests/baselines/reference/inferFromGenericFunctionReturnTypes2.errors.txt create mode 100644 tests/baselines/reference/inferenceErasedSignatures.errors.txt create mode 100644 tests/baselines/reference/interfaceClassMerging2.errors.txt create mode 100644 tests/baselines/reference/jsDeclarationsClasses.errors.txt create mode 100644 tests/baselines/reference/jsDeclarationsSubclassWithExplicitNoArgumentConstructor.errors.txt create mode 100644 tests/baselines/reference/jsDeclarationsThisTypes.errors.txt create mode 100644 tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.errors.txt create mode 100644 tests/baselines/reference/keyofAndIndexedAccess.errors.txt create mode 100644 tests/baselines/reference/mixinClassesAnnotated.errors.txt create mode 100644 tests/baselines/reference/mixinClassesAnonymous.errors.txt create mode 100644 tests/baselines/reference/mixinClassesMembers.errors.txt create mode 100644 tests/baselines/reference/newTarget.es5.errors.txt create mode 100644 tests/baselines/reference/newTarget.es6.errors.txt delete mode 100644 tests/baselines/reference/noUnusedLocals_destructuringAssignment.errors.txt create mode 100644 tests/baselines/reference/privateNameMethodCallExpression.errors.txt create mode 100644 tests/baselines/reference/privateNameStaticMethodCallExpression.errors.txt create mode 100644 tests/baselines/reference/privateNameStaticsAndStaticMethods.errors.txt create mode 100644 tests/baselines/reference/privateNamesAndFields.errors.txt create mode 100644 tests/baselines/reference/privateNamesAndMethods.errors.txt create mode 100644 tests/baselines/reference/privateNamesAndStaticMethods.errors.txt create mode 100644 tests/baselines/reference/promiseChaining.errors.txt create mode 100644 tests/baselines/reference/promiseTypeInference.errors.txt create mode 100644 tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.errors.txt create mode 100644 tests/baselines/reference/reactHOCSpreadprops.errors.txt create mode 100644 tests/baselines/reference/reactReadonlyHOCAssignabilityReal.errors.txt create mode 100644 tests/baselines/reference/returnTagTypeGuard.errors.txt create mode 100644 tests/baselines/reference/staticIndexSignature6.errors.txt create mode 100644 tests/baselines/reference/superCallBeforeThisAccessing1.errors.txt create mode 100644 tests/baselines/reference/superCallBeforeThisAccessing2.errors.txt create mode 100644 tests/baselines/reference/superCallBeforeThisAccessing8.errors.txt create mode 100644 tests/baselines/reference/superCallParameterContextualTyping1.errors.txt create mode 100644 tests/baselines/reference/superCallParameterContextualTyping3.errors.txt create mode 100644 tests/baselines/reference/superCallWithCommentEmit01.errors.txt create mode 100644 tests/baselines/reference/superCalls.errors.txt create mode 100644 tests/baselines/reference/superPropertyAccessNoError.errors.txt create mode 100644 tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.errors.txt create mode 100644 tests/baselines/reference/thisTypeAndConstraints.errors.txt create mode 100644 tests/baselines/reference/thisTypeInClasses.errors.txt create mode 100644 tests/baselines/reference/tsxAttributeResolution16.errors.txt create mode 100644 tests/baselines/reference/tsxDefaultAttributesResolution1.errors.txt create mode 100644 tests/baselines/reference/tsxDefaultAttributesResolution2.errors.txt create mode 100644 tests/baselines/reference/tsxGenericAttributesType3.errors.txt create mode 100644 tests/baselines/reference/tsxGenericAttributesType4.errors.txt create mode 100644 tests/baselines/reference/tsxGenericAttributesType5.errors.txt create mode 100644 tests/baselines/reference/tsxGenericAttributesType6.errors.txt create mode 100644 tests/baselines/reference/tsxGenericAttributesType9.errors.txt create mode 100644 tests/baselines/reference/tsxSpreadAttributesResolution11.errors.txt create mode 100644 tests/baselines/reference/tsxSpreadAttributesResolution3.errors.txt create mode 100644 tests/baselines/reference/tsxSpreadAttributesResolution7.errors.txt create mode 100644 tests/baselines/reference/tsxSpreadAttributesResolution8.errors.txt create mode 100644 tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.errors.txt create mode 100644 tests/baselines/reference/tsxUnionTypeComponent1.errors.txt create mode 100644 tests/baselines/reference/typeFromPropertyAssignment25.errors.txt create mode 100644 tests/baselines/reference/typeInferenceReturnTypeCallback.errors.txt create mode 100644 tests/baselines/reference/typeParametersAvailableInNestedScope.errors.txt create mode 100644 tests/baselines/reference/typeVariableTypeGuards.errors.txt create mode 100644 tests/baselines/reference/underscoreThisInDerivedClass01.errors.txt create mode 100644 tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt create mode 100644 tests/baselines/reference/validUseOfThisInSuper.errors.txt create mode 100644 tests/baselines/reference/varArgsOnConstructorTypes.errors.txt create mode 100644 tests/baselines/reference/wrappedAndRecursiveConstraints.errors.txt diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f71915df3d8..54f93c34569 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -12712,7 +12712,7 @@ namespace ts { } else { // TODO: should provide this=the 'this' argument of the call (if it's a call) - return (getDeclaredTypeOfSymbol(symbol) as InterfaceType).thisType; + return (getDeclaredTypeOfSymbol(symbol) as InterfaceType) //.thisType } } } diff --git a/tests/baselines/reference/2dArrays.types b/tests/baselines/reference/2dArrays.types index 341a8234bde..2426ee941e4 100644 --- a/tests/baselines/reference/2dArrays.types +++ b/tests/baselines/reference/2dArrays.types @@ -26,7 +26,7 @@ class Board { >this.ships.every(function (val) { return val.isSunk; }) : boolean >this.ships.every : { (predicate: (value: Ship, index: number, array: Ship[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: Ship, index: number, array: Ship[]) => unknown, thisArg?: any): boolean; } >this.ships : Ship[] ->this : this +>this : Board >ships : Ship[] >every : { (predicate: (value: Ship, index: number, array: Ship[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: Ship, index: number, array: Ship[]) => unknown, thisArg?: any): boolean; } >function (val) { return val.isSunk; } : (val: Ship) => boolean diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.types b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.types index f3e05acf116..f2300dbd006 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.types +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.types @@ -13,14 +13,14 @@ module X.Y { this.x = x; >this.x = x : number >this.x : number ->this : this +>this : Point >x : number >x : number this.y = y; >this.y = y : number >this.y : number ->this : this +>this : Point >y : number >y : number } diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.types b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.types index f3e05acf116..f2300dbd006 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.types +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.types @@ -13,14 +13,14 @@ module X.Y { this.x = x; >this.x = x : number >this.x : number ->this : this +>this : Point >x : number >x : number this.y = y; >this.y = y : number >this.y : number ->this : this +>this : Point >y : number >y : number } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.types b/tests/baselines/reference/ES5For-ofTypeCheck10.types index a8f8d990506..15f61451638 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck10.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.types @@ -20,13 +20,13 @@ class StringIterator { }; } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => StringIterator >Symbol.iterator : any >Symbol : any >iterator : any return this; ->this : this +>this : StringIterator } } diff --git a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.types b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.types index 0041418426a..f3ddd2ca149 100644 --- a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.types +++ b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.types @@ -31,14 +31,14 @@ module X.Y { this.x = x; >this.x = x : number >this.x : number ->this : this +>this : Point >x : number >x : number this.y = y; >this.y = y : number >this.y : number ->this : this +>this : Point >y : number >y : number } diff --git a/tests/baselines/reference/abstractProperty(target=es2015).types b/tests/baselines/reference/abstractProperty(target=es2015).types index 557c5833185..3cbe3276105 100644 --- a/tests/baselines/reference/abstractProperty(target=es2015).types +++ b/tests/baselines/reference/abstractProperty(target=es2015).types @@ -14,7 +14,7 @@ abstract class A { >console : Console >log : (...data: any[]) => void >this.x : string ->this : this +>this : A >x : string } } diff --git a/tests/baselines/reference/abstractProperty(target=esnext).types b/tests/baselines/reference/abstractProperty(target=esnext).types index 557c5833185..3cbe3276105 100644 --- a/tests/baselines/reference/abstractProperty(target=esnext).types +++ b/tests/baselines/reference/abstractProperty(target=esnext).types @@ -14,7 +14,7 @@ abstract class A { >console : Console >log : (...data: any[]) => void >this.x : string ->this : this +>this : A >x : string } } diff --git a/tests/baselines/reference/abstractPropertyInConstructor.errors.txt b/tests/baselines/reference/abstractPropertyInConstructor.errors.txt index 8b98c0816e9..edbc74b7c98 100644 --- a/tests/baselines/reference/abstractPropertyInConstructor.errors.txt +++ b/tests/baselines/reference/abstractPropertyInConstructor.errors.txt @@ -3,7 +3,9 @@ tests/cases/compiler/abstractPropertyInConstructor.ts(7,18): error TS2715: Abstr tests/cases/compiler/abstractPropertyInConstructor.ts(9,14): error TS2715: Abstract property 'cb' in class 'AbstractClass' cannot be accessed in the constructor. tests/cases/compiler/abstractPropertyInConstructor.ts(25,18): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. tests/cases/compiler/abstractPropertyInConstructor.ts(25,18): error TS2729: Property 'prop' is used before its initialization. +tests/cases/compiler/abstractPropertyInConstructor.ts(37,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AbstractClass'. tests/cases/compiler/abstractPropertyInConstructor.ts(39,22): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. +tests/cases/compiler/abstractPropertyInConstructor.ts(54,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'DerivedAbstractClass'. tests/cases/compiler/abstractPropertyInConstructor.ts(78,15): error TS2715: Abstract property 'x' in class 'C1' cannot be accessed in the constructor. tests/cases/compiler/abstractPropertyInConstructor.ts(78,18): error TS2715: Abstract property 'y' in class 'C1' cannot be accessed in the constructor. tests/cases/compiler/abstractPropertyInConstructor.ts(79,12): error TS2715: Abstract property 'x' in class 'C1' cannot be accessed in the constructor. @@ -11,7 +13,7 @@ tests/cases/compiler/abstractPropertyInConstructor.ts(79,15): error TS2715: Abst tests/cases/compiler/abstractPropertyInConstructor.ts(79,22): error TS2715: Abstract property 'y' in class 'C1' cannot be accessed in the constructor. -==== tests/cases/compiler/abstractPropertyInConstructor.ts (11 errors) ==== +==== tests/cases/compiler/abstractPropertyInConstructor.ts (13 errors) ==== abstract class AbstractClass { constructor(str: string, other: AbstractClass) { this.method(parseInt(str)); @@ -60,6 +62,8 @@ tests/cases/compiler/abstractPropertyInConstructor.ts(79,22): error TS2715: Abst constructor(str: string, other: AbstractClass, yetAnother: DerivedAbstractClass) { super(str, other); + ~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AbstractClass'. // there is no implementation of 'prop' in any base class this.cb(this.prop.toLowerCase()); ~~~~ @@ -79,6 +83,8 @@ tests/cases/compiler/abstractPropertyInConstructor.ts(79,22): error TS2715: Abst constructor(str: string, other: AbstractClass, yetAnother: DerivedAbstractClass) { super(str, other, yetAnother); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'DerivedAbstractClass'. this.cb(this.prop); } diff --git a/tests/baselines/reference/abstractPropertyInConstructor.types b/tests/baselines/reference/abstractPropertyInConstructor.types index ee8500d7027..bfc58cc26ef 100644 --- a/tests/baselines/reference/abstractPropertyInConstructor.types +++ b/tests/baselines/reference/abstractPropertyInConstructor.types @@ -9,7 +9,7 @@ abstract class AbstractClass { this.method(parseInt(str)); >this.method(parseInt(str)) : void >this.method : (num: number) => void ->this : this +>this : AbstractClass >method : (num: number) => void >parseInt(str) : number >parseInt : (string: string, radix?: number) => number @@ -20,7 +20,7 @@ abstract class AbstractClass { >this.prop.toLowerCase() : string >this.prop.toLowerCase : () => string >this.prop : string ->this : this +>this : AbstractClass >prop : string >toLowerCase : () => string @@ -31,14 +31,14 @@ abstract class AbstractClass { this.prop = "Hello World"; >this.prop = "Hello World" : "Hello World" >this.prop : string ->this : this +>this : AbstractClass >prop : string >"Hello World" : "Hello World" } this.cb(str); >this.cb(str) : void >this.cb : (s: string) => void ->this : this +>this : AbstractClass >cb : (s: string) => void >str : string @@ -49,7 +49,7 @@ abstract class AbstractClass { return this.prop; >this.prop : string ->this : this +>this : AbstractClass >prop : string } @@ -94,11 +94,11 @@ abstract class AbstractClass { this.prop = this.prop + "!"; >this.prop = this.prop + "!" : string >this.prop : string ->this : this +>this : AbstractClass >prop : string >this.prop + "!" : string >this.prop : string ->this : this +>this : AbstractClass >prop : string >"!" : "!" } @@ -128,19 +128,19 @@ abstract class DerivedAbstractClass extends AbstractClass { this.cb(this.prop.toLowerCase()); >this.cb(this.prop.toLowerCase()) : void >this.cb : (s: string) => void ->this : this +>this : DerivedAbstractClass >cb : (s: string) => void >this.prop.toLowerCase() : string >this.prop.toLowerCase : () => string >this.prop : string ->this : this +>this : DerivedAbstractClass >prop : string >toLowerCase : () => string this.method(1); >this.method(1) : void >this.method : (num: number) => void ->this : this +>this : DerivedAbstractClass >method : (num: number) => void >1 : 1 @@ -193,10 +193,10 @@ class Implementation extends DerivedAbstractClass { this.cb(this.prop); >this.cb(this.prop) : void >this.cb : (s: string) => void ->this : this +>this : Implementation >cb : (s: string) => void >this.prop : string ->this : this +>this : Implementation >prop : string } @@ -207,11 +207,11 @@ class Implementation extends DerivedAbstractClass { this.cb(this.prop + n); >this.cb(this.prop + n) : void >this.cb : (s: string) => void ->this : this +>this : Implementation >cb : (s: string) => void >this.prop + n : string >this.prop : string ->this : this +>this : Implementation >prop : string >n : number } @@ -261,25 +261,25 @@ abstract class C1 { constructor() { let self = this; // ok ->self : this ->this : this +>self : C1 +>this : C1 let { x, y: y1 } = this; // error >x : string >y : any >y1 : string ->this : this +>this : C1 ({ x, y: y1, "y": y1 } = this); // error ->({ x, y: y1, "y": y1 } = this) : this ->{ x, y: y1, "y": y1 } = this : this +>({ x, y: y1, "y": y1 } = this) : C1 +>{ x, y: y1, "y": y1 } = this : C1 >{ x, y: y1, "y": y1 } : { x: string; y: string; } >x : string >y : string >y1 : string >"y" : string >y1 : string ->this : this +>this : C1 } } @@ -294,25 +294,25 @@ class C2 { constructor() { let self = this; // ok ->self : this ->this : this +>self : C2 +>this : C2 let { x, y: y1 } = this; // ok >x : string >y : any >y1 : string ->this : this +>this : C2 ({ x, y: y1, "y": y1 } = this); // ok ->({ x, y: y1, "y": y1 } = this) : this ->{ x, y: y1, "y": y1 } = this : this +>({ x, y: y1, "y": y1 } = this) : C2 +>{ x, y: y1, "y": y1 } = this : C2 >{ x, y: y1, "y": y1 } : { x: string; y: string; } >x : string >y : string >y1 : string >"y" : string >y1 : string ->this : this +>this : C2 } } diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.errors.txt b/tests/baselines/reference/accessOverriddenBaseClassMember1.errors.txt new file mode 100644 index 00000000000..3ea12ac4e72 --- /dev/null +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.errors.txt @@ -0,0 +1,21 @@ +tests/cases/compiler/accessOverriddenBaseClassMember1.ts(9,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Point'. + + +==== tests/cases/compiler/accessOverriddenBaseClassMember1.ts (1 errors) ==== + class Point { + constructor(public x: number, public y: number) { } + public toString() { + return "x=" + this.x + " y=" + this.y; + } + } + class ColoredPoint extends Point { + constructor(x: number, y: number, public color: string) { + super(x, y); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Point'. + } + public toString() { + return super.toString() + " color=" + this.color; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.types b/tests/baselines/reference/accessOverriddenBaseClassMember1.types index f0dad0ccafc..9f4cabc018b 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.types +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.types @@ -15,11 +15,11 @@ class Point { >"x=" + this.x : string >"x=" : "x=" >this.x : number ->this : this +>this : Point >x : number >" y=" : " y=" >this.y : number ->this : this +>this : Point >y : number } } @@ -50,7 +50,7 @@ class ColoredPoint extends Point { >toString : () => string >" color=" : " color=" >this.color : string ->this : this +>this : ColoredPoint >color : string } } diff --git a/tests/baselines/reference/accessorsOverrideProperty.types b/tests/baselines/reference/accessorsOverrideProperty.types index 4e3021e7024..fdd293c35c1 100644 --- a/tests/baselines/reference/accessorsOverrideProperty.types +++ b/tests/baselines/reference/accessorsOverrideProperty.types @@ -32,7 +32,7 @@ class D extends C { get p() { return this._secret } // error >p : number >this._secret : number ->this : this +>this : D >_secret : number set p(value) { this._secret = value } // error @@ -40,7 +40,7 @@ class D extends C { >value : number >this._secret = value : number >this._secret : number ->this : this +>this : D >_secret : number >value : number } diff --git a/tests/baselines/reference/accessorsOverrideProperty3.types b/tests/baselines/reference/accessorsOverrideProperty3.types index 6fa0efd42f5..7c1212ddc90 100644 --- a/tests/baselines/reference/accessorsOverrideProperty3.types +++ b/tests/baselines/reference/accessorsOverrideProperty3.types @@ -16,7 +16,7 @@ class Lion extends Animal { get sound() { return this._sound } // error here >sound : string >this._sound : string ->this : this +>this : Lion >_sound : string set sound(val) { this._sound = val } @@ -24,7 +24,7 @@ class Lion extends Animal { >val : string >this._sound = val : string >this._sound : string ->this : this +>this : Lion >_sound : string >val : string } diff --git a/tests/baselines/reference/accessorsOverrideProperty4.types b/tests/baselines/reference/accessorsOverrideProperty4.types index e553e5f37f0..a392ab9e7fe 100644 --- a/tests/baselines/reference/accessorsOverrideProperty4.types +++ b/tests/baselines/reference/accessorsOverrideProperty4.types @@ -16,7 +16,7 @@ class Lion extends Animal { get sound(): string { return this._sound } >sound : string >this._sound : string ->this : this +>this : Lion >_sound : string set sound(val: string) { this._sound = val } @@ -24,7 +24,7 @@ class Lion extends Animal { >val : string >this._sound = val : string >this._sound : string ->this : this +>this : Lion >_sound : string >val : string } diff --git a/tests/baselines/reference/accessorsOverrideProperty6.types b/tests/baselines/reference/accessorsOverrideProperty6.types index 594dbd372ad..c59cff162ea 100644 --- a/tests/baselines/reference/accessorsOverrideProperty6.types +++ b/tests/baselines/reference/accessorsOverrideProperty6.types @@ -32,7 +32,7 @@ class D extends C { get p() { return this._secret } // error >p : number >this._secret : number ->this : this +>this : D >_secret : number set p(value) { this._secret = value } // error @@ -40,7 +40,7 @@ class D extends C { >value : number >this._secret = value : number >this._secret : number ->this : this +>this : D >_secret : number >value : number } diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.types b/tests/baselines/reference/aliasUsageInAccessorsOfClass.types index e5dfdfd6366..de54b8febb3 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.types +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.types @@ -23,7 +23,7 @@ class C2 { return this.x; >this.x : IHasVisualizationModel ->this : this +>this : C2 >x : IHasVisualizationModel } set A(x) { diff --git a/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.types b/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.types index b3153722ee3..4c9fd45b6f9 100644 --- a/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.types +++ b/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.types @@ -31,7 +31,7 @@ class TestClass { this.bar(x); // should not error >this.bar(x) : void >this.bar : { (x: string): void; (x: string[]): void; } ->this : this +>this : TestClass >bar : { (x: string): void; (x: string[]): void; } >x : any } @@ -71,7 +71,7 @@ class TestClass2 { return this.bar(x); // should not error >this.bar(x) : number >this.bar : { (x: string): number; (x: string[]): number; } ->this : this +>this : TestClass2 >bar : { (x: string): number; (x: string[]): number; } >x : any } diff --git a/tests/baselines/reference/amdModuleName1.types b/tests/baselines/reference/amdModuleName1.types index f7384ddf057..379b2b51405 100644 --- a/tests/baselines/reference/amdModuleName1.types +++ b/tests/baselines/reference/amdModuleName1.types @@ -10,7 +10,7 @@ class Foo { this.x = 5; >this.x = 5 : 5 >this.x : number ->this : this +>this : Foo >x : number >5 : 5 } diff --git a/tests/baselines/reference/amdModuleName2.types b/tests/baselines/reference/amdModuleName2.types index 7989db303ff..08951c1aaf4 100644 --- a/tests/baselines/reference/amdModuleName2.types +++ b/tests/baselines/reference/amdModuleName2.types @@ -11,7 +11,7 @@ class Foo { this.x = 5; >this.x = 5 : 5 >this.x : number ->this : this +>this : Foo >x : number >5 : 5 } diff --git a/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types b/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types index 2772c19c75c..8cc74c1282c 100644 --- a/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types +++ b/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types @@ -13,7 +13,7 @@ export class C { this.assets = {}; >this.assets = {} : {} >this.assets : { [assetName: string]: number; } ->this : this +>this : C >assets : { [assetName: string]: number; } >{} : {} } @@ -24,7 +24,7 @@ export class C { >mappy(this.assets) : void >mappy : (map: { [s: string]: number; }) => void >this.assets : { [assetName: string]: number; } ->this : this +>this : C >assets : { [assetName: string]: number; } } } diff --git a/tests/baselines/reference/anonymousClassExpression2.types b/tests/baselines/reference/anonymousClassExpression2.types index f26f8e497ca..43628539d09 100644 --- a/tests/baselines/reference/anonymousClassExpression2.types +++ b/tests/baselines/reference/anonymousClassExpression2.types @@ -12,7 +12,7 @@ while (0) { >methodA : () => void this; //note: a this reference of some kind is required to trigger the bug ->this : this +>this : A } } @@ -24,12 +24,12 @@ while (0) { this.methodA; // error >this.methodA : any ->this : this +>this : B >methodA : any this.methodB; // ok >this.methodB : () => void ->this : this +>this : B >methodB : () => void } } diff --git a/tests/baselines/reference/argumentsReferenceInConstructor1_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor1_Js.types index e5af557f694..36f19052779 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor1_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor1_Js.types @@ -17,7 +17,7 @@ class A { this.arguments = foo; >this.arguments = foo : any >this.arguments : any ->this : this +>this : A >arguments : any >foo : any } diff --git a/tests/baselines/reference/argumentsReferenceInConstructor2_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor2_Js.types index 11d31ed941d..99c4f025f6e 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor2_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor2_Js.types @@ -17,7 +17,7 @@ class A { this["arguments"] = foo; >this["arguments"] = foo : any >this["arguments"] : any ->this : this +>this : A >"arguments" : "arguments" >foo : any } diff --git a/tests/baselines/reference/argumentsReferenceInConstructor3_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor3_Js.types index 4b6557cd1b9..2f9775b4ae6 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor3_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor3_Js.types @@ -35,7 +35,7 @@ class B extends A { this.foo = foo; >this.foo = foo : any >this.foo : any ->this : this +>this : B >foo : any >foo : any @@ -45,7 +45,7 @@ class B extends A { this.bar = super.arguments.foo; >this.bar = super.arguments.foo : error >this.bar : any ->this : this +>this : B >bar : any >super.arguments.foo : error >super.arguments : { bar: {}; } diff --git a/tests/baselines/reference/argumentsReferenceInConstructor4_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor4_Js.types index 8b43e3d7ddb..a0ee2d1b657 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor4_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor4_Js.types @@ -21,7 +21,7 @@ class A { this.foo = foo; >this.foo = foo : any >this.foo : any ->this : this +>this : A >foo : any >foo : any @@ -31,7 +31,7 @@ class A { const arguments = this.arguments; >arguments : any >this.arguments : { bar: {}; } ->this : this +>this : A >arguments : { bar: {}; } /** @@ -40,7 +40,7 @@ class A { this.bar = arguments.bar; >this.bar = arguments.bar : any >this.bar : any ->this : this +>this : A >bar : any >arguments.bar : any >arguments : any @@ -52,7 +52,7 @@ class A { this.baz = arguments[key]; >this.baz = arguments[key] : any >this.baz : any ->this : this +>this : A >baz : any >arguments[key] : any >arguments : any @@ -64,7 +64,7 @@ class A { this.options = arguments; >this.options = arguments : any >this.options : any ->this : this +>this : A >options : any >arguments : any } diff --git a/tests/baselines/reference/argumentsReferenceInConstructor5_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor5_Js.types index 0629cc868c2..d2bde023287 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor5_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor5_Js.types @@ -26,7 +26,7 @@ class A { this.foo = foo; >this.foo = foo : any >this.foo : any ->this : this +>this : A >foo : any >foo : any @@ -36,7 +36,7 @@ class A { this.bar = bar.arguments; >this.bar = bar.arguments : {} >this.bar : any ->this : this +>this : A >bar : any >bar.arguments : {} >bar : { arguments: {}; } diff --git a/tests/baselines/reference/argumentsReferenceInConstructor6_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor6_Js.types index af93a74e105..993fb878e2d 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor6_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor6_Js.types @@ -9,7 +9,7 @@ class A { this.foo = arguments; >this.foo = arguments : IArguments >this.foo : any ->this : this +>this : A >foo : any >arguments : IArguments } diff --git a/tests/baselines/reference/argumentsReferenceInConstructor7_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor7_Js.types index bf4fb7d4a7b..a44a3effe2b 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor7_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor7_Js.types @@ -9,7 +9,7 @@ class A { this.callee = arguments.callee; >this.callee = arguments.callee : Function >this.callee : Function ->this : this +>this : A >callee : Function >arguments.callee : Function >arguments : IArguments diff --git a/tests/baselines/reference/argumentsReferenceInMethod1_Js.types b/tests/baselines/reference/argumentsReferenceInMethod1_Js.types index 828e96065df..ad72145bbab 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod1_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod1_Js.types @@ -16,7 +16,7 @@ class A { this.arguments = foo; >this.arguments = foo : any >this.arguments : any ->this : this +>this : A >arguments : any >foo : any } diff --git a/tests/baselines/reference/argumentsReferenceInMethod2_Js.types b/tests/baselines/reference/argumentsReferenceInMethod2_Js.types index dae5b75fe5d..e8abee325b9 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod2_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod2_Js.types @@ -16,7 +16,7 @@ class A { this["arguments"] = foo; >this["arguments"] = foo : any >this["arguments"] : any ->this : this +>this : A >"arguments" : "arguments" >foo : any } diff --git a/tests/baselines/reference/argumentsReferenceInMethod3_Js.types b/tests/baselines/reference/argumentsReferenceInMethod3_Js.types index 641078846e7..d12c86a81f7 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod3_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod3_Js.types @@ -30,7 +30,7 @@ class B extends A { this.x = foo; >this.x = foo : any >this.x : any ->this : this +>this : B >x : any >foo : any @@ -40,7 +40,7 @@ class B extends A { this.y = super.arguments.bar; >this.y = super.arguments.bar : {} >this.y : any ->this : this +>this : B >y : any >super.arguments.bar : {} >super.arguments : { bar: {}; } diff --git a/tests/baselines/reference/argumentsReferenceInMethod4_Js.types b/tests/baselines/reference/argumentsReferenceInMethod4_Js.types index 0e913014741..2623901645f 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod4_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod4_Js.types @@ -20,7 +20,7 @@ class A { this.foo = foo; >this.foo = foo : any >this.foo : any ->this : this +>this : A >foo : any >foo : any @@ -30,7 +30,7 @@ class A { const arguments = this.arguments; >arguments : any >this.arguments : { bar: {}; } ->this : this +>this : A >arguments : { bar: {}; } /** @@ -39,7 +39,7 @@ class A { this.bar = arguments.bar; >this.bar = arguments.bar : any >this.bar : any ->this : this +>this : A >bar : any >arguments.bar : any >arguments : any @@ -51,7 +51,7 @@ class A { this.baz = arguments[key]; >this.baz = arguments[key] : any >this.baz : any ->this : this +>this : A >baz : any >arguments[key] : any >arguments : any @@ -63,7 +63,7 @@ class A { this.options = arguments; >this.options = arguments : any >this.options : any ->this : this +>this : A >options : any >arguments : any } diff --git a/tests/baselines/reference/argumentsReferenceInMethod5_Js.types b/tests/baselines/reference/argumentsReferenceInMethod5_Js.types index edc563a2a27..e40f4b91e1f 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod5_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod5_Js.types @@ -25,7 +25,7 @@ class A { this.foo = foo; >this.foo = foo : any >this.foo : any ->this : this +>this : A >foo : any >foo : any @@ -35,7 +35,7 @@ class A { this.bar = bar.arguments; >this.bar = bar.arguments : {} >this.bar : any ->this : this +>this : A >bar : any >bar.arguments : {} >bar : { arguments: {}; } diff --git a/tests/baselines/reference/argumentsReferenceInMethod6_Js.types b/tests/baselines/reference/argumentsReferenceInMethod6_Js.types index 6874875e316..515ec013585 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod6_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod6_Js.types @@ -11,7 +11,7 @@ class A { this.foo = arguments; >this.foo = arguments : IArguments >this.foo : any ->this : this +>this : A >foo : any >arguments : IArguments } diff --git a/tests/baselines/reference/argumentsReferenceInMethod7_Js.types b/tests/baselines/reference/argumentsReferenceInMethod7_Js.types index eda08df6a3e..7b2c7631a82 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod7_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod7_Js.types @@ -11,7 +11,7 @@ class A { this.callee = arguments.callee; >this.callee = arguments.callee : Function >this.callee : Function ->this : this +>this : A >callee : Function >arguments.callee : Function >arguments : IArguments diff --git a/tests/baselines/reference/arrayAssignmentTest5.types b/tests/baselines/reference/arrayAssignmentTest5.types index 64a866d2346..43185fc581e 100644 --- a/tests/baselines/reference/arrayAssignmentTest5.types +++ b/tests/baselines/reference/arrayAssignmentTest5.types @@ -47,7 +47,7 @@ module Test { >lineTokens : ILineTokens >this.tokenize(line, state, true) : ILineTokens >this.tokenize : (line: string, state: IState, includeStates: boolean) => ILineTokens ->this : this +>this : Bug >tokenize : (line: string, state: IState, includeStates: boolean) => ILineTokens >line : string >state : IState @@ -69,7 +69,7 @@ module Test { return this.onEnter(line, tokens, offset); // <== this should produce an error since onEnter can not be called with (string, IStateToken[], offset) >this.onEnter(line, tokens, offset) : IAction >this.onEnter : (line: string, state: IState, offset: number) => IAction ->this : this +>this : Bug >onEnter : (line: string, state: IState, offset: number) => IAction >line : string >tokens : IStateToken[] diff --git a/tests/baselines/reference/arrayBestCommonTypes.types b/tests/baselines/reference/arrayBestCommonTypes.types index e08644c7561..6e9ccacc3b1 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.types +++ b/tests/baselines/reference/arrayBestCommonTypes.types @@ -47,7 +47,7 @@ module EmptyTypes { >(this.voidIfAny([4, 2][0])) : number >this.voidIfAny([4, 2][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[4, 2][0] : number >[4, 2] : number[] @@ -60,7 +60,7 @@ module EmptyTypes { >(this.voidIfAny([4, 2, undefined][0])) : number >this.voidIfAny([4, 2, undefined][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[4, 2, undefined][0] : number >[4, 2, undefined] : number[] @@ -74,7 +74,7 @@ module EmptyTypes { >(this.voidIfAny([undefined, 2, 4][0])) : number >this.voidIfAny([undefined, 2, 4][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[undefined, 2, 4][0] : number >[undefined, 2, 4] : number[] @@ -88,7 +88,7 @@ module EmptyTypes { >(this.voidIfAny([null, 2, 4][0])) : number >this.voidIfAny([null, 2, 4][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[null, 2, 4][0] : number >[null, 2, 4] : number[] @@ -102,7 +102,7 @@ module EmptyTypes { >(this.voidIfAny([2, 4, null][0])) : number >this.voidIfAny([2, 4, null][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[2, 4, null][0] : number >[2, 4, null] : number[] @@ -116,7 +116,7 @@ module EmptyTypes { >(this.voidIfAny([undefined, 4, null][0])) : number >this.voidIfAny([undefined, 4, null][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[undefined, 4, null][0] : number >[undefined, 4, null] : number[] @@ -130,7 +130,7 @@ module EmptyTypes { >(this.voidIfAny(['', "q"][0])) : number >this.voidIfAny(['', "q"][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >['', "q"][0] : string >['', "q"] : string[] @@ -143,7 +143,7 @@ module EmptyTypes { >(this.voidIfAny(['', "q", undefined][0])) : number >this.voidIfAny(['', "q", undefined][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >['', "q", undefined][0] : string >['', "q", undefined] : string[] @@ -157,7 +157,7 @@ module EmptyTypes { >(this.voidIfAny([undefined, "q", ''][0])) : number >this.voidIfAny([undefined, "q", ''][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[undefined, "q", ''][0] : string >[undefined, "q", ''] : string[] @@ -171,7 +171,7 @@ module EmptyTypes { >(this.voidIfAny([null, "q", ''][0])) : number >this.voidIfAny([null, "q", ''][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[null, "q", ''][0] : string >[null, "q", ''] : string[] @@ -185,7 +185,7 @@ module EmptyTypes { >(this.voidIfAny(["q", '', null][0])) : number >this.voidIfAny(["q", '', null][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >["q", '', null][0] : string >["q", '', null] : string[] @@ -199,7 +199,7 @@ module EmptyTypes { >(this.voidIfAny([undefined, '', null][0])) : number >this.voidIfAny([undefined, '', null][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[undefined, '', null][0] : string >[undefined, '', null] : string[] @@ -213,7 +213,7 @@ module EmptyTypes { >(this.voidIfAny([[3, 4], [null]][0][0])) : number >this.voidIfAny([[3, 4], [null]][0][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[[3, 4], [null]][0][0] : number >[[3, 4], [null]][0] : number[] @@ -443,7 +443,7 @@ module NonEmptyTypes { >(this.voidIfAny([4, 2][0])) : number >this.voidIfAny([4, 2][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[4, 2][0] : number >[4, 2] : number[] @@ -456,7 +456,7 @@ module NonEmptyTypes { >(this.voidIfAny([4, 2, undefined][0])) : number >this.voidIfAny([4, 2, undefined][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[4, 2, undefined][0] : number >[4, 2, undefined] : number[] @@ -470,7 +470,7 @@ module NonEmptyTypes { >(this.voidIfAny([undefined, 2, 4][0])) : number >this.voidIfAny([undefined, 2, 4][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[undefined, 2, 4][0] : number >[undefined, 2, 4] : number[] @@ -484,7 +484,7 @@ module NonEmptyTypes { >(this.voidIfAny([null, 2, 4][0])) : number >this.voidIfAny([null, 2, 4][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[null, 2, 4][0] : number >[null, 2, 4] : number[] @@ -498,7 +498,7 @@ module NonEmptyTypes { >(this.voidIfAny([2, 4, null][0])) : number >this.voidIfAny([2, 4, null][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[2, 4, null][0] : number >[2, 4, null] : number[] @@ -512,7 +512,7 @@ module NonEmptyTypes { >(this.voidIfAny([undefined, 4, null][0])) : number >this.voidIfAny([undefined, 4, null][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[undefined, 4, null][0] : number >[undefined, 4, null] : number[] @@ -526,7 +526,7 @@ module NonEmptyTypes { >(this.voidIfAny(['', "q"][0])) : number >this.voidIfAny(['', "q"][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >['', "q"][0] : string >['', "q"] : string[] @@ -539,7 +539,7 @@ module NonEmptyTypes { >(this.voidIfAny(['', "q", undefined][0])) : number >this.voidIfAny(['', "q", undefined][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >['', "q", undefined][0] : string >['', "q", undefined] : string[] @@ -553,7 +553,7 @@ module NonEmptyTypes { >(this.voidIfAny([undefined, "q", ''][0])) : number >this.voidIfAny([undefined, "q", ''][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[undefined, "q", ''][0] : string >[undefined, "q", ''] : string[] @@ -567,7 +567,7 @@ module NonEmptyTypes { >(this.voidIfAny([null, "q", ''][0])) : number >this.voidIfAny([null, "q", ''][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[null, "q", ''][0] : string >[null, "q", ''] : string[] @@ -581,7 +581,7 @@ module NonEmptyTypes { >(this.voidIfAny(["q", '', null][0])) : number >this.voidIfAny(["q", '', null][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >["q", '', null][0] : string >["q", '', null] : string[] @@ -595,7 +595,7 @@ module NonEmptyTypes { >(this.voidIfAny([undefined, '', null][0])) : number >this.voidIfAny([undefined, '', null][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[undefined, '', null][0] : string >[undefined, '', null] : string[] @@ -609,7 +609,7 @@ module NonEmptyTypes { >(this.voidIfAny([[3, 4], [null]][0][0])) : number >this.voidIfAny([[3, 4], [null]][0][0]) : number >this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } ->this : this +>this : f >voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; } >[[3, 4], [null]][0][0] : number >[[3, 4], [null]][0] : number[] diff --git a/tests/baselines/reference/arrayOfExportedClass.types b/tests/baselines/reference/arrayOfExportedClass.types index 74676750a9a..01ae124c722 100644 --- a/tests/baselines/reference/arrayOfExportedClass.types +++ b/tests/baselines/reference/arrayOfExportedClass.types @@ -16,7 +16,7 @@ class Road { this.cars = cars; >this.cars = cars : Car[] >this.cars : Car[] ->this : this +>this : Road >cars : Car[] >cars : Car[] } diff --git a/tests/baselines/reference/arrayconcat.types b/tests/baselines/reference/arrayconcat.types index 9a221314aa0..c31ef2f4baa 100644 --- a/tests/baselines/reference/arrayconcat.types +++ b/tests/baselines/reference/arrayconcat.types @@ -35,12 +35,12 @@ class parser { this.options = this.options.sort(function(a, b) { >this.options = this.options.sort(function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } }) : IOptions[] >this.options : IOptions[] ->this : this +>this : parser >options : IOptions[] >this.options.sort(function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } }) : IOptions[] >this.options.sort : (compareFn?: (a: IOptions, b: IOptions) => number) => IOptions[] >this.options : IOptions[] ->this : this +>this : parser >options : IOptions[] >sort : (compareFn?: (a: IOptions, b: IOptions) => number) => IOptions[] >function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } } : (a: IOptions, b: IOptions) => 1 | -1 | 0 diff --git a/tests/baselines/reference/arrowFunctionContexts.errors.txt b/tests/baselines/reference/arrowFunctionContexts.errors.txt index 2a8fcbd2ca7..2980d017fd5 100644 --- a/tests/baselines/reference/arrowFunctionContexts.errors.txt +++ b/tests/baselines/reference/arrowFunctionContexts.errors.txt @@ -1,12 +1,14 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(13,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(30,9): error TS18033: Only numeric enums can have computed members, but this expression has type '() => number'. If you do not need exhaustiveness checks, consider using an object literal instead. tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(54,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(71,13): error TS18033: Only numeric enums can have computed members, but this expression has type '() => number'. If you do not need exhaustiveness checks, consider using an object literal instead. tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts (6 errors) ==== +==== tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts (8 errors) ==== // Arrow function used in with statement with (window) { ~~~~~~~~~~~~~ @@ -22,6 +24,8 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): e class Derived extends Base { constructor() { super(() => this); + ~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } } @@ -69,6 +73,8 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): e class Derived extends Base { constructor() { super(() => this); + ~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } } diff --git a/tests/baselines/reference/arrowFunctionContexts.types b/tests/baselines/reference/arrowFunctionContexts.types index 81c5ada2d5d..fdcc1c335a0 100644 --- a/tests/baselines/reference/arrowFunctionContexts.types +++ b/tests/baselines/reference/arrowFunctionContexts.types @@ -25,8 +25,8 @@ class Derived extends Base { super(() => this); >super(() => this) : void >super : typeof Base ->() => this : () => this ->this : this +>() => this : () => Derived +>this : Derived } } @@ -128,8 +128,8 @@ module M2 { super(() => this); >super(() => this) : void >super : typeof Base ->() => this : () => this ->this : this +>() => this : () => Derived +>this : Derived } } diff --git a/tests/baselines/reference/arrowFunctionExpressions.types b/tests/baselines/reference/arrowFunctionExpressions.types index 9eb9b091813..05ae9ccb649 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.types +++ b/tests/baselines/reference/arrowFunctionExpressions.types @@ -148,12 +148,12 @@ class MyClass { >1 : 1 var p = (n) => n && this; ->p : (n: any) => this ->(n) => n && this : (n: any) => this +>p : (n: any) => MyClass +>(n) => n && this : (n: any) => MyClass >n : any ->n && this : this +>n && this : MyClass >n : any ->this : this +>this : MyClass } } diff --git a/tests/baselines/reference/assertionTypePredicates1.symbols b/tests/baselines/reference/assertionTypePredicates1.symbols index d8dea6959ba..2d1a7f783ca 100644 --- a/tests/baselines/reference/assertionTypePredicates1.symbols +++ b/tests/baselines/reference/assertionTypePredicates1.symbols @@ -333,6 +333,7 @@ class Test { this.z; >this.z : Symbol(Test2.z, Decl(assertionTypePredicates1.ts, 129, 26)) +>this : Symbol(Test2, Decl(assertionTypePredicates1.ts, 127, 1)) >z : Symbol(Test2.z, Decl(assertionTypePredicates1.ts, 129, 26)) } this.assertIsTest2(); @@ -342,6 +343,7 @@ class Test { this.z; >this.z : Symbol(Test2.z, Decl(assertionTypePredicates1.ts, 129, 26)) +>this : Symbol(Test2, Decl(assertionTypePredicates1.ts, 127, 1)) >z : Symbol(Test2.z, Decl(assertionTypePredicates1.ts, 129, 26)) } baz(x: number) { diff --git a/tests/baselines/reference/assertionTypePredicates1.types b/tests/baselines/reference/assertionTypePredicates1.types index e72b3077c9b..79d35967922 100644 --- a/tests/baselines/reference/assertionTypePredicates1.types +++ b/tests/baselines/reference/assertionTypePredicates1.types @@ -372,7 +372,7 @@ class Test { return this instanceof Test2; >this instanceof Test2 : boolean ->this : this +>this : Test >Test2 : typeof Test2 } assertIsTest2(): asserts this is Test2 { @@ -380,7 +380,7 @@ class Test { if (this instanceof Test2) return; >this instanceof Test2 : boolean ->this : this +>this : Test >Test2 : typeof Test2 throw new Error(); @@ -392,7 +392,7 @@ class Test { if (!this) return; >!this : false ->this : this +>this : Test throw new Error(); >new Error() : Error @@ -404,11 +404,11 @@ class Test { this.assertThis(); >this.assertThis() : void >this.assertThis : () => asserts this ->this : this +>this : Test >assertThis : () => asserts this this; ->this : this +>this : Test } foo(x: unknown) { >foo : (x: unknown) => void @@ -417,7 +417,7 @@ class Test { this.assert(typeof x === "string"); >this.assert(typeof x === "string") : void >this.assert : (value: unknown) => asserts value ->this : this +>this : Test >assert : (value: unknown) => asserts value >typeof x === "string" : boolean >typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" @@ -432,23 +432,23 @@ class Test { if (this.isTest2()) { >this.isTest2() : boolean >this.isTest2 : () => this is Test2 ->this : this +>this : Test >isTest2 : () => this is Test2 this.z; >this.z : number ->this : this & Test2 +>this : Test2 >z : number } this.assertIsTest2(); >this.assertIsTest2() : void >this.assertIsTest2 : () => asserts this is Test2 ->this : this +>this : Test >assertIsTest2 : () => asserts this is Test2 this.z; >this.z : number ->this : this & Test2 +>this : Test2 >z : number } baz(x: number) { @@ -458,7 +458,7 @@ class Test { this.assert(false); >this.assert(false) : void >this.assert : (value: unknown) => asserts value ->this : this +>this : Test >assert : (value: unknown) => asserts value >false : false diff --git a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.types b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.types index a041399c6be..5d1660903fd 100644 --- a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.types +++ b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.types @@ -39,7 +39,7 @@ class C { this.foo // ok >this.foo : string ->this : this +>this : C >foo : string } m3 = function() { } @@ -72,7 +72,7 @@ class C { this.foo // ok >this.foo : string ->this : this +>this : C >foo : string } } diff --git a/tests/baselines/reference/assignmentLHSIsValue.errors.txt b/tests/baselines/reference/assignmentLHSIsValue.errors.txt index 71809b4605f..30d1226ea37 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/assignmentLHSIsValue.errors.txt @@ -16,6 +16,7 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(3 tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(35,9): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(38,2): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(38,6): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(42,21): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(42,36): error TS1034: 'super' must be followed by an argument list or member access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(44,19): error TS1034: 'super' must be followed by an argument list or member access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(46,27): error TS1034: 'super' must be followed by an argument list or member access. @@ -39,7 +40,7 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(6 tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(70,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -==== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts (39 errors) ==== +==== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts (40 errors) ==== // expected error for all the LHS of assignments var value: any; @@ -118,6 +119,8 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(7 // super class Derived extends C { constructor() { super(); super = value; } + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. ~ !!! error TS1034: 'super' must be followed by an argument list or member access. diff --git a/tests/baselines/reference/assignmentLHSIsValue.types b/tests/baselines/reference/assignmentLHSIsValue.types index ad4905acc94..0d6b957814b 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.types +++ b/tests/baselines/reference/assignmentLHSIsValue.types @@ -9,13 +9,13 @@ class C { constructor() { this = value; } >this = value : any ->this : this +>this : C >value : any foo() { this = value; } >foo : () => void >this = value : any ->this : this +>this : C >value : any static sfoo() { this = value; } diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.types b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.types index a7a80424e19..9f7e0d54a25 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.types @@ -16,7 +16,7 @@ class C { >other.apply : (this: Function, thisArg: any, argArray?: any) => any >other : () => void >apply : (this: Function, thisArg: any, argArray?: any) => any ->this : this +>this : C >arguments : IArguments } } diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.types b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.types index 6eaff62c0bf..32176b23595 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.types @@ -16,7 +16,7 @@ class C { >other.apply : (this: Function, thisArg: any, argArray?: any) => any >other : () => void >apply : (this: Function, thisArg: any, argArray?: any) => any ->this : this +>this : C >arguments : IArguments } } diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types index bb9df9af139..483ee4a5358 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types @@ -16,7 +16,7 @@ class C { >other.apply : (this: Function, thisArg: any, argArray?: any) => any >other : () => void >apply : (this: Function, thisArg: any, argArray?: any) => any ->this : this +>this : C >arguments : IArguments } } diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.types b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.types index 57f59302bb5..6e756cdb45b 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.types @@ -6,10 +6,10 @@ class C { >method : () => void var fn = async () => await this; ->fn : () => Promise ->async () => await this : () => Promise ->await this : this ->this : this +>fn : () => Promise +>async () => await this : () => Promise +>await this : C +>this : C } } diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.types b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.types index da378ee2718..38897f485b3 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.types @@ -6,10 +6,10 @@ class C { >method : () => void var fn = async () => await this; ->fn : () => Promise ->async () => await this : () => Promise ->await this : this ->this : this +>fn : () => Promise +>async () => await this : () => Promise +>await this : C +>this : C } } diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types index 5386a956ada..6c5bd10c32f 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types @@ -6,10 +6,10 @@ class C { >method : () => void var fn = async () => await this; ->fn : () => Promise ->async () => await this : () => Promise ->await this : this ->this : this +>fn : () => Promise +>async () => await this : () => Promise +>await this : C +>this : C } } diff --git a/tests/baselines/reference/autoLift2.types b/tests/baselines/reference/autoLift2.types index fe2f34ad8a2..68d1398255a 100644 --- a/tests/baselines/reference/autoLift2.types +++ b/tests/baselines/reference/autoLift2.types @@ -6,13 +6,13 @@ class A constructor() { this.foo: any; >this.foo : any ->this : this +>this : A >foo : any >any : any this.bar: any; >this.bar : any ->this : this +>this : A >bar : any >any : any } @@ -24,14 +24,14 @@ class A this.foo = "foo"; >this.foo = "foo" : "foo" >this.foo : any ->this : this +>this : A >foo : any >"foo" : "foo" this.bar = "bar"; >this.bar = "bar" : "bar" >this.bar : any ->this : this +>this : A >bar : any >"bar" : "bar" @@ -45,7 +45,7 @@ class A >(p) => this.foo : (p: number) => any >p : number >this.foo : any ->this : this +>this : A >foo : any [1, 2].forEach((p) => this.bar); @@ -58,7 +58,7 @@ class A >(p) => this.bar : (p: number) => any >p : number >this.bar : any ->this : this +>this : A >bar : any } diff --git a/tests/baselines/reference/autolift4.errors.txt b/tests/baselines/reference/autolift4.errors.txt index b548479b692..2c0949591ec 100644 --- a/tests/baselines/reference/autolift4.errors.txt +++ b/tests/baselines/reference/autolift4.errors.txt @@ -1,7 +1,8 @@ +tests/cases/compiler/autolift4.ts(15,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Point'. tests/cases/compiler/autolift4.ts(19,70): error TS2339: Property 'm' does not exist on type 'Point3D'. -==== tests/cases/compiler/autolift4.ts (1 errors) ==== +==== tests/cases/compiler/autolift4.ts (2 errors) ==== class Point { constructor(public x: number, public y: number) { @@ -17,6 +18,8 @@ tests/cases/compiler/autolift4.ts(19,70): error TS2339: Property 'm' does not ex constructor(x: number, y: number, public z: number, m:number) { super(x, y); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Point'. } getDist() { diff --git a/tests/baselines/reference/autolift4.types b/tests/baselines/reference/autolift4.types index dc34da815fc..2c997b61182 100644 --- a/tests/baselines/reference/autolift4.types +++ b/tests/baselines/reference/autolift4.types @@ -18,17 +18,17 @@ class Point { >this.x*this.x + this.y*this.y : number >this.x*this.x : number >this.x : number ->this : this +>this : Point >x : number >this.x : number ->this : this +>this : Point >x : number >this.y*this.y : number >this.y : number ->this : this +>this : Point >y : number >this.y : number ->this : this +>this : Point >y : number } static origin = new Point(0,0); @@ -68,24 +68,24 @@ class Point3D extends Point { >this.x*this.x + this.y*this.y : number >this.x*this.x : number >this.x : number ->this : this +>this : Point3D >x : number >this.x : number ->this : this +>this : Point3D >x : number >this.y*this.y : number >this.y : number ->this : this +>this : Point3D >y : number >this.y : number ->this : this +>this : Point3D >y : number >this.z*this.m : number >this.z : number ->this : this +>this : Point3D >z : number >this.m : any ->this : this +>this : Point3D >m : any } } diff --git a/tests/baselines/reference/awaitedTypeStrictNull.types b/tests/baselines/reference/awaitedTypeStrictNull.types index f5824eb476e..7e4bd615cfe 100644 --- a/tests/baselines/reference/awaitedTypeStrictNull.types +++ b/tests/baselines/reference/awaitedTypeStrictNull.types @@ -137,7 +137,7 @@ class Api { >post : () => Promise >this.request() : Promise >this.request : () => Promise ->this : this +>this : Api >request : () => Promise async request(): Promise { throw new Error(); } diff --git a/tests/baselines/reference/badThisBinding.types b/tests/baselines/reference/badThisBinding.types index 201f3e70288..a6b1c478d53 100644 --- a/tests/baselines/reference/badThisBinding.types +++ b/tests/baselines/reference/badThisBinding.types @@ -22,8 +22,8 @@ class Greeter { >() => { var x = this; } : () => void var x = this; ->x : this ->this : this +>x : Greeter +>this : Greeter }); }); diff --git a/tests/baselines/reference/baseCheck.errors.txt b/tests/baselines/reference/baseCheck.errors.txt index 16bdd632b50..93f31abf711 100644 --- a/tests/baselines/reference/baseCheck.errors.txt +++ b/tests/baselines/reference/baseCheck.errors.txt @@ -1,24 +1,31 @@ +tests/cases/compiler/baseCheck.ts(4,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. +tests/cases/compiler/baseCheck.ts(9,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. tests/cases/compiler/baseCheck.ts(9,18): error TS2552: Cannot find name 'loc'. Did you mean 'ELoc'? tests/cases/compiler/baseCheck.ts(17,53): error TS2554: Expected 2 arguments, but got 1. tests/cases/compiler/baseCheck.ts(17,59): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/baseCheck.ts(18,53): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. tests/cases/compiler/baseCheck.ts(18,62): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/compiler/baseCheck.ts(19,59): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/compiler/baseCheck.ts(19,53): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. tests/cases/compiler/baseCheck.ts(19,68): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/baseCheck.ts(22,9): error TS2304: Cannot find name 'x'. tests/cases/compiler/baseCheck.ts(23,7): error TS2304: Cannot find name 'x'. tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. -==== tests/cases/compiler/baseCheck.ts (9 errors) ==== +==== tests/cases/compiler/baseCheck.ts (12 errors) ==== class C { constructor(x: number, y: number) { } } class ELoc extends C { constructor(x: number) { super(0, x); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. } } class ELocVar extends C { constructor(x: number) { super(0, loc); + ~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. ~~~ !!! error TS2552: Cannot find name 'loc'. Did you mean 'ELoc'? !!! related TS2728 tests/cases/compiler/baseCheck.ts:2:7: 'ELoc' is declared here. @@ -36,11 +43,13 @@ tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. class E extends C { constructor(public z: number) { super(0, this.z) } } + ~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. class F extends C { constructor(public z: number) { super("hello", this.z) } } // first param type - ~~~~~~~ -!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. diff --git a/tests/baselines/reference/baseCheck.types b/tests/baselines/reference/baseCheck.types index a5e3976d0ea..845d60e8ce7 100644 --- a/tests/baselines/reference/baseCheck.types +++ b/tests/baselines/reference/baseCheck.types @@ -48,7 +48,7 @@ class D extends C { constructor(public z: number) { super(this.z) } } // too fe >super(this.z) : void >super : typeof C >this.z : number ->this : this +>this : D >z : number class E extends C { constructor(public z: number) { super(0, this.z) } } @@ -59,7 +59,7 @@ class E extends C { constructor(public z: number) { super(0, this.z) } } >super : typeof C >0 : 0 >this.z : number ->this : this +>this : E >z : number class F extends C { constructor(public z: number) { super("hello", this.z) } } // first param type @@ -70,7 +70,7 @@ class F extends C { constructor(public z: number) { super("hello", this.z) } } / >super : typeof C >"hello" : "hello" >this.z : number ->this : this +>this : F >z : number function f() { diff --git a/tests/baselines/reference/baseConstraintOfDecorator.types b/tests/baselines/reference/baseConstraintOfDecorator.types index 78c77ee78a2..a5b0c20e48c 100644 --- a/tests/baselines/reference/baseConstraintOfDecorator.types +++ b/tests/baselines/reference/baseConstraintOfDecorator.types @@ -23,7 +23,7 @@ export function classExtender(superClass: TFunction, _instanceModifie _instanceModifier(this, args); >_instanceModifier(this, args) : void >_instanceModifier : (instance: any, args: any[]) => void ->this : this +>this : decoratorFunc >args : any[] } }; @@ -58,7 +58,7 @@ export function classExtender2 MyCl _instanceModifier(this, args); >_instanceModifier(this, args) : void >_instanceModifier : (instance: any, args: any[]) => void ->this : this +>this : decoratorFunc >args : any[] } }; diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.errors.txt b/tests/baselines/reference/baseTypeWrappingInstantiationChain.errors.txt new file mode 100644 index 00000000000..1402ebe9034 --- /dev/null +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.errors.txt @@ -0,0 +1,44 @@ +tests/cases/compiler/baseTypeWrappingInstantiationChain.ts(19,36): error TS2345: Argument of type 'C' is not assignable to parameter of type 'Parameter>'. + Types of property 'method' are incompatible. + Type '(t: Wrapper) => void' is not assignable to type '(t: Wrapper) => void'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Parameter' is missing the following properties from type 'C': works, alsoWorks +tests/cases/compiler/baseTypeWrappingInstantiationChain.ts(22,23): error TS2345: Argument of type 'C' is not assignable to parameter of type 'Parameter>'. + + +==== tests/cases/compiler/baseTypeWrappingInstantiationChain.ts (2 errors) ==== + class CBaseBase { + constructor(x: Parameter) { } + } + + class CBase extends CBaseBase> { + + } + + class Parameter { + method(t: T4) { } + } + + class Wrapper { + property: T5; + } + + class C extends CBase { + public works() { + new CBaseBase>(this); + ~~~~ +!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'Parameter>'. +!!! error TS2345: Types of property 'method' are incompatible. +!!! error TS2345: Type '(t: Wrapper) => void' is not assignable to type '(t: Wrapper) => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2345: The 'this' types of each signature are incompatible. +!!! error TS2345: Type 'Parameter' is missing the following properties from type 'C': works, alsoWorks + } + public alsoWorks() { + new CBase(this); // Should not error, parameter is of type Parameter> + ~~~~ +!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'Parameter>'. + } + + public method(t: Wrapper) { } + } + \ No newline at end of file diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.types b/tests/baselines/reference/baseTypeWrappingInstantiationChain.types index 127241a26c7..18f1a9d8f70 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.types +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.types @@ -37,7 +37,7 @@ class C extends CBase { new CBaseBase>(this); >new CBaseBase>(this) : CBaseBase> >CBaseBase : typeof CBaseBase ->this : this +>this : C } public alsoWorks() { >alsoWorks : () => void @@ -45,7 +45,7 @@ class C extends CBase { new CBase(this); // Should not error, parameter is of type Parameter> >new CBase(this) : CBase >CBase : typeof CBase ->this : this +>this : C } public method(t: Wrapper) { } diff --git a/tests/baselines/reference/bases.types b/tests/baselines/reference/bases.types index 60bc5b786fb..4184f57c393 100644 --- a/tests/baselines/reference/bases.types +++ b/tests/baselines/reference/bases.types @@ -10,7 +10,7 @@ class B { constructor() { this.y: any; >this.y : any ->this : this +>this : B >y : any >any : any } @@ -23,7 +23,7 @@ class C extends B implements I { constructor() { this.x: any; >this.x : any ->this : this +>this : C >x : any >any : any } diff --git a/tests/baselines/reference/binopAssignmentShouldHaveType.types b/tests/baselines/reference/binopAssignmentShouldHaveType.types index 7adfb46792e..98fccf0b955 100644 --- a/tests/baselines/reference/binopAssignmentShouldHaveType.types +++ b/tests/baselines/reference/binopAssignmentShouldHaveType.types @@ -32,7 +32,7 @@ module Test { >name : string >this.getName() : string >this.getName : () => string ->this : this +>this : Bug >getName : () => string >length : number >0 : 0 diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types index 3098b8c0f91..b8f8def70ab 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types @@ -185,7 +185,7 @@ function foo12() { this.a = x; >this.a = x : any >this.a : any ->this : this +>this : y >a : any >x : any } diff --git a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.errors.txt b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.errors.txt new file mode 100644 index 00000000000..67ef837d4dd --- /dev/null +++ b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.errors.txt @@ -0,0 +1,46 @@ +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts(30,10): error TS2684: The 'this' context of type 'C2' is not assignable to method's 'this' of type 'C2'. + Type 'unknown' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'unknown'. + + +==== tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts (1 errors) ==== + // valid invocations of generic functions with no explicit type arguments provided + + function f(x: T): T { return null; } + var r = f(1); + + var f2 = (x: T): T => { return null; } + var r2 = f2(1); + + var f3: { (x: T): T; } + var r3 = f3(1); + + class C { + f(x: T): T { + return null; + } + } + var r4 = (new C()).f(1); + + interface I { + f(x: T): T; + } + var i: I; + var r5 = i.f(1); + + class C2 { + f(x: T): T { + return null; + } + } + var r6 = (new C2()).f(1); + ~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'C2' is not assignable to method's 'this' of type 'C2'. +!!! error TS2684: Type 'unknown' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'unknown'. + + interface I2 { + f(x: T): T; + } + var i2: I2; + var r7 = i2.f(1); \ No newline at end of file diff --git a/tests/baselines/reference/callWithMissingVoid.errors.txt b/tests/baselines/reference/callWithMissingVoid.errors.txt index dcce7a005e2..4173cec4682 100644 --- a/tests/baselines/reference/callWithMissingVoid.errors.txt +++ b/tests/baselines/reference/callWithMissingVoid.errors.txt @@ -1,3 +1,10 @@ +tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(9,1): error TS2684: The 'this' context of type 'X' is not assignable to method's 'this' of type 'X'. + Type 'void' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. +tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(12,1): error TS2684: The 'this' context of type 'X' is not assignable to method's 'this' of type 'X'. + Type 'number | void' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number | void'. +tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(13,1): error TS2684: The 'this' context of type 'X' is not assignable to method's 'this' of type 'X'. tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(16,6): error TS2554: Expected 1 arguments, but got 0. tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(19,10): error TS2554: Expected 1 arguments, but got 0. tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(22,8): error TS2554: Expected 1 arguments, but got 0. @@ -11,7 +18,7 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(57,1): tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1): error TS2554: Expected 3 arguments, but got 1. -==== tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts (11 errors) ==== +==== tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts (14 errors) ==== // From #4260 class X { f(t: T) { @@ -21,10 +28,20 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1): declare const x: X; x.f() // no error because f expects void + ~ +!!! error TS2684: The 'this' context of type 'X' is not assignable to method's 'this' of type 'X'. +!!! error TS2684: Type 'void' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. declare const xUnion: X; xUnion.f(42) // no error because f accepts number + ~~~~~~ +!!! error TS2684: The 'this' context of type 'X' is not assignable to method's 'this' of type 'X'. +!!! error TS2684: Type 'number | void' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number | void'. xUnion.f() // no error because f accepts void + ~~~~~~ +!!! error TS2684: The 'this' context of type 'X' is not assignable to method's 'this' of type 'X'. declare const xAny: X; xAny.f() // error, any still expects an argument diff --git a/tests/baselines/reference/callWithSpread.errors.txt b/tests/baselines/reference/callWithSpread.errors.txt new file mode 100644 index 00000000000..203fc0b38b9 --- /dev/null +++ b/tests/baselines/reference/callWithSpread.errors.txt @@ -0,0 +1,67 @@ +tests/cases/conformance/expressions/functionCalls/callWithSpread.ts(50,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/expressions/functionCalls/callWithSpread.ts(51,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + + +==== tests/cases/conformance/expressions/functionCalls/callWithSpread.ts (2 errors) ==== + interface X { + foo(x: number, y: number, ...z: string[]): X; + } + + function foo(x: number, y: number, ...z: string[]) { + } + + var a: string[]; + var z: number[]; + var obj: X; + var xa: X[]; + + foo(1, 2, "abc"); + foo(1, 2, ...a); + foo(1, 2, ...a, "abc"); + + obj.foo(1, 2, "abc"); + obj.foo(1, 2, ...a); + obj.foo(1, 2, ...a, "abc"); + + obj.foo(1, 2, ...a).foo(1, 2, "abc"); + obj.foo(1, 2, ...a).foo(1, 2, ...a); + obj.foo(1, 2, ...a).foo(1, 2, ...a, "abc"); + + (obj.foo)(1, 2, "abc"); + (obj.foo)(1, 2, ...a); + (obj.foo)(1, 2, ...a, "abc"); + + ((obj.foo)(1, 2, ...a).foo)(1, 2, "abc"); + ((obj.foo)(1, 2, ...a).foo)(1, 2, ...a); + ((obj.foo)(1, 2, ...a).foo)(1, 2, ...a, "abc"); + + xa[1].foo(1, 2, "abc"); + xa[1].foo(1, 2, ...a); + xa[1].foo(1, 2, ...a, "abc"); + + (xa[1].foo)(...[1, 2, "abc"]); + + class C { + constructor(x: number, y: number, ...z: string[]) { + this.foo(x, y); + this.foo(x, y, ...z); + } + foo(x: number, y: number, ...z: string[]) { + } + } + + class D extends C { + constructor() { + super(1, 2); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + super(1, 2, ...a); + ~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + } + foo() { + super.foo(1, 2); + super.foo(1, 2, ...a); + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/callWithSpread.types b/tests/baselines/reference/callWithSpread.types index 016b03a6682..3c4a7bc6475 100644 --- a/tests/baselines/reference/callWithSpread.types +++ b/tests/baselines/reference/callWithSpread.types @@ -283,7 +283,7 @@ class C { this.foo(x, y); >this.foo(x, y) : void >this.foo : (x: number, y: number, ...z: string[]) => void ->this : this +>this : C >foo : (x: number, y: number, ...z: string[]) => void >x : number >y : number @@ -291,7 +291,7 @@ class C { this.foo(x, y, ...z); >this.foo(x, y, ...z) : void >this.foo : (x: number, y: number, ...z: string[]) => void ->this : this +>this : C >foo : (x: number, y: number, ...z: string[]) => void >x : number >y : number diff --git a/tests/baselines/reference/callWithSpreadES6.errors.txt b/tests/baselines/reference/callWithSpreadES6.errors.txt new file mode 100644 index 00000000000..665a5470bd9 --- /dev/null +++ b/tests/baselines/reference/callWithSpreadES6.errors.txt @@ -0,0 +1,59 @@ +tests/cases/conformance/expressions/functionCalls/callWithSpreadES6.ts(42,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/expressions/functionCalls/callWithSpreadES6.ts(43,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + + +==== tests/cases/conformance/expressions/functionCalls/callWithSpreadES6.ts (2 errors) ==== + interface X { + foo(x: number, y: number, ...z: string[]); + } + + function foo(x: number, y: number, ...z: string[]) { + } + + var a: string[]; + var z: number[]; + var obj: X; + var xa: X[]; + + foo(1, 2, "abc"); + foo(1, 2, ...a); + foo(1, 2, ...a, "abc"); + + obj.foo(1, 2, "abc"); + obj.foo(1, 2, ...a); + obj.foo(1, 2, ...a, "abc"); + + (obj.foo)(1, 2, "abc"); + (obj.foo)(1, 2, ...a); + (obj.foo)(1, 2, ...a, "abc"); + + xa[1].foo(1, 2, "abc"); + xa[1].foo(1, 2, ...a); + xa[1].foo(1, 2, ...a, "abc"); + + (xa[1].foo)(...[1, 2, "abc"]); + + class C { + constructor(x: number, y: number, ...z: string[]) { + this.foo(x, y); + this.foo(x, y, ...z); + } + foo(x: number, y: number, ...z: string[]) { + } + } + + class D extends C { + constructor() { + super(1, 2); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + super(1, 2, ...a); + ~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + } + foo() { + super.foo(1, 2); + super.foo(1, 2, ...a); + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/callWithSpreadES6.types b/tests/baselines/reference/callWithSpreadES6.types index 93ad15809bb..d95f9dee191 100644 --- a/tests/baselines/reference/callWithSpreadES6.types +++ b/tests/baselines/reference/callWithSpreadES6.types @@ -175,7 +175,7 @@ class C { this.foo(x, y); >this.foo(x, y) : void >this.foo : (x: number, y: number, ...z: string[]) => void ->this : this +>this : C >foo : (x: number, y: number, ...z: string[]) => void >x : number >y : number @@ -183,7 +183,7 @@ class C { this.foo(x, y, ...z); >this.foo(x, y, ...z) : void >this.foo : (x: number, y: number, ...z: string[]) => void ->this : this +>this : C >foo : (x: number, y: number, ...z: string[]) => void >x : number >y : number diff --git a/tests/baselines/reference/callbackTag2.types b/tests/baselines/reference/callbackTag2.types index 670298bb56b..a0904cce21f 100644 --- a/tests/baselines/reference/callbackTag2.types +++ b/tests/baselines/reference/callbackTag2.types @@ -27,7 +27,7 @@ class SharedClass { /** @type {SharedId} */ this.id; >this.id : SharedId ->this : this +>this : SharedClass >id : SharedId } } diff --git a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.errors.txt b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.errors.txt new file mode 100644 index 00000000000..5f5f51a4105 --- /dev/null +++ b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.errors.txt @@ -0,0 +1,17 @@ +tests/cases/compiler/captureSuperPropertyAccessInSuperCall01.ts(9,3): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/compiler/captureSuperPropertyAccessInSuperCall01.ts (1 errors) ==== + class A { + constructor(f: () => string) { + } + public blah(): string { return ""; } + } + + class B extends A { + constructor() { + super(() => { return super.blah(); }) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/captureThisInSuperCall.errors.txt b/tests/baselines/reference/captureThisInSuperCall.errors.txt new file mode 100644 index 00000000000..74fed054d13 --- /dev/null +++ b/tests/baselines/reference/captureThisInSuperCall.errors.txt @@ -0,0 +1,14 @@ +tests/cases/compiler/captureThisInSuperCall.ts(6,21): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/compiler/captureThisInSuperCall.ts (1 errors) ==== + class A { + constructor(p:any) {} + } + + class B extends A { + constructor() { super({ test: () => this.someMethod()}); } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + someMethod() {} + } \ No newline at end of file diff --git a/tests/baselines/reference/captureThisInSuperCall.types b/tests/baselines/reference/captureThisInSuperCall.types index 4a0902e9f1e..faa7d2ad97e 100644 --- a/tests/baselines/reference/captureThisInSuperCall.types +++ b/tests/baselines/reference/captureThisInSuperCall.types @@ -18,7 +18,7 @@ class B extends A { >() => this.someMethod() : () => void >this.someMethod() : void >this.someMethod : () => void ->this : this +>this : B >someMethod : () => void someMethod() {} diff --git a/tests/baselines/reference/capturedLetConstInLoop10.types b/tests/baselines/reference/capturedLetConstInLoop10.types index 19f328f72bd..67f0e031b92 100644 --- a/tests/baselines/reference/capturedLetConstInLoop10.types +++ b/tests/baselines/reference/capturedLetConstInLoop10.types @@ -18,7 +18,7 @@ class A { this.bar(f()); >this.bar(f()) : void >this.bar : (a: number) => void ->this : this +>this : A >bar : (a: number) => void >f() : number >f : () => number @@ -55,7 +55,7 @@ class A { this.bar(b()); >this.bar(b()) : void >this.bar : (a: number) => void ->this : this +>this : A >bar : (a: number) => void >b() : number >b : () => number @@ -63,7 +63,7 @@ class A { this.bar(a()); >this.bar(a()) : void >this.bar : (a: number) => void ->this : this +>this : A >bar : (a: number) => void >a() : number >a : () => number @@ -85,7 +85,7 @@ class A { this.bar(a()); >this.bar(a()) : void >this.bar : (a: number) => void ->this : this +>this : A >bar : (a: number) => void >a() : number >a : () => number @@ -103,7 +103,7 @@ class A { this.bar(b()); >this.bar(b()) : void >this.bar : (a: number) => void ->this : this +>this : A >bar : (a: number) => void >b() : number >b : () => number @@ -137,7 +137,7 @@ class B { this.bar(f()); >this.bar(f()) : void >this.bar : (a: number) => void ->this : this +>this : B >bar : (a: number) => void >f() : number >f : () => number diff --git a/tests/baselines/reference/capturedLetConstInLoop10_ES6.types b/tests/baselines/reference/capturedLetConstInLoop10_ES6.types index 9807d60a1cd..de0bcca3d1d 100644 --- a/tests/baselines/reference/capturedLetConstInLoop10_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop10_ES6.types @@ -18,7 +18,7 @@ class A { this.bar(f()); >this.bar(f()) : void >this.bar : (a: number) => void ->this : this +>this : A >bar : (a: number) => void >f() : number >f : () => number @@ -55,7 +55,7 @@ class A { this.bar(b()); >this.bar(b()) : void >this.bar : (a: number) => void ->this : this +>this : A >bar : (a: number) => void >b() : number >b : () => number @@ -63,7 +63,7 @@ class A { this.bar(a()); >this.bar(a()) : void >this.bar : (a: number) => void ->this : this +>this : A >bar : (a: number) => void >a() : number >a : () => number @@ -85,7 +85,7 @@ class A { this.bar(a()); >this.bar(a()) : void >this.bar : (a: number) => void ->this : this +>this : A >bar : (a: number) => void >a() : number >a : () => number @@ -103,7 +103,7 @@ class A { this.bar(b()); >this.bar(b()) : void >this.bar : (a: number) => void ->this : this +>this : A >bar : (a: number) => void >b() : number >b : () => number @@ -137,7 +137,7 @@ class B { this.bar(f()); >this.bar(f()) : void >this.bar : (a: number) => void ->this : this +>this : B >bar : (a: number) => void >f() : number >f : () => number diff --git a/tests/baselines/reference/capturedLetConstInLoop13.types b/tests/baselines/reference/capturedLetConstInLoop13.types index 68348e469fe..e3e0a69dc43 100644 --- a/tests/baselines/reference/capturedLetConstInLoop13.types +++ b/tests/baselines/reference/capturedLetConstInLoop13.types @@ -6,7 +6,7 @@ class Main { this.register("a", "b", "c"); >this.register("a", "b", "c") : void >this.register : (...names: string[]) => void ->this : this +>this : Main >register : (...names: string[]) => void >"a" : "a" >"b" : "b" @@ -24,7 +24,7 @@ class Main { this.bar({ >this.bar({ [name + ".a"]: () => { this.foo(name); }, }) : void >this.bar : (a: any) => void ->this : this +>this : Main >bar : (a: any) => void >{ [name + ".a"]: () => { this.foo(name); }, } : { [x: string]: () => void; } @@ -36,7 +36,7 @@ class Main { >() => { this.foo(name); } : () => void >this.foo(name) : void >this.foo : (name: string) => void ->this : this +>this : Main >foo : (name: string) => void >name : string diff --git a/tests/baselines/reference/capturedLetConstInLoop9.types b/tests/baselines/reference/capturedLetConstInLoop9.types index 486697b8d84..e9048ad4232 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9.types +++ b/tests/baselines/reference/capturedLetConstInLoop9.types @@ -319,7 +319,7 @@ class C { >() => this.N * i : () => number >this.N * i : number >this.N : number ->this : this +>this : C >N : number >i : number } diff --git a/tests/baselines/reference/capturedLetConstInLoop9_ES6.types b/tests/baselines/reference/capturedLetConstInLoop9_ES6.types index 26d2b770a31..d42934e9b34 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop9_ES6.types @@ -318,7 +318,7 @@ class C { >() => this.N * i : () => number >this.N * i : number >this.N : number ->this : this +>this : C >N : number >i : number } diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt index 777130d8893..3ebeee0cee1 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt @@ -1,8 +1,12 @@ -tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,64): error TS2741: Property 'z' is missing in type 'B' but required in type 'C'. -tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,81): error TS2739: Type 'A' is missing the following properties from type 'C': z, y +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,1): error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. + Type 'A' is not assignable to type 'T'. + 'A' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,1): error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,1): error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,1): error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. -==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts (2 errors) ==== +==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts (4 errors) ==== class Chain { constructor(public value: T) { } then(cb: (x: T) => S): Chain { @@ -22,10 +26,13 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParamete // Ok to go down the chain, but error to try to climb back up (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); - ~~~~~ -!!! error TS2741: Property 'z' is missing in type 'B' but required in type 'C'. -!!! related TS2728 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:15:5: 'z' is declared here. -!!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. - ~~~~~ -!!! error TS2739: Type 'A' is missing the following properties from type 'C': z, y -!!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. \ No newline at end of file + ~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. +!!! error TS2684: Type 'A' is not assignable to type 'T'. +!!! error TS2684: 'A' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types index d6712329fc4..c15b935cb6b 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types @@ -38,13 +38,13 @@ class C extends B { // Ok to go down the chain, but error to try to climb back up (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); ->(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A) : Chain ->(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then : (cb: (x: C) => S) => Chain ->(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B) : Chain ->(new Chain(new A)).then(a => new B).then(b => new C).then : (cb: (x: C) => S) => Chain ->(new Chain(new A)).then(a => new B).then(b => new C) : Chain ->(new Chain(new A)).then(a => new B).then : (cb: (x: B) => S) => Chain ->(new Chain(new A)).then(a => new B) : Chain +>(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A) : Chain +>(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then : (cb: (x: A) => S) => Chain +>(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B) : Chain +>(new Chain(new A)).then(a => new B).then(b => new C).then : (cb: (x: A) => S) => Chain +>(new Chain(new A)).then(a => new B).then(b => new C) : Chain +>(new Chain(new A)).then(a => new B).then : (cb: (x: A) => S) => Chain +>(new Chain(new A)).then(a => new B) : Chain >(new Chain(new A)).then : (cb: (x: A) => S) => Chain >(new Chain(new A)) : Chain >new Chain(new A) : Chain @@ -56,19 +56,19 @@ class C extends B { >a : A >new B : B >B : typeof B ->then : (cb: (x: B) => S) => Chain ->b => new C : (b: B) => C ->b : B +>then : (cb: (x: A) => S) => Chain +>b => new C : (b: A) => C +>b : A >new C : C >C : typeof C ->then : (cb: (x: C) => S) => Chain ->c => new B : (c: C) => B ->c : C +>then : (cb: (x: A) => S) => Chain +>c => new B : (c: A) => B +>c : A >new B : B >B : typeof B ->then : (cb: (x: C) => S) => Chain ->b => new A : (b: C) => A ->b : C +>then : (cb: (x: A) => S) => Chain +>b => new A : (b: A) => A +>b : A >new A : A >A : typeof A diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt index 6926ee47722..357024410ed 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt @@ -2,12 +2,24 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParamete 'S' could be instantiated with an arbitrary type which could be unrelated to 'T'. tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(10,35): error TS2322: Type 'T' is not assignable to type 'S'. 'S' could be instantiated with an arbitrary type which could be unrelated to 'T'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(32,9): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. + Type 'I' is not assignable to type 'T'. + 'I' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'I'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(32,9): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(32,9): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(36,9): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(36,9): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(36,9): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(36,9): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(36,9): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS2322: Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts (5 errors) ==== +==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts (15 errors) ==== class Chain { constructor(public value: T) { } then(cb: (x: T) => S): Chain { @@ -48,15 +60,37 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParamete // Ok to go down the chain, check the constraint at the end. // Should get an error that we are assigning a string to a number (new Chain2(i)).then(ii => t).then(tt => s).value.x = ""; + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. +!!! error TS2684: Type 'I' is not assignable to type 'T'. +!!! error TS2684: 'I' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'I'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'number'. // Staying at T or S should keep the constraint. // Get an error when we assign a string to a number in both cases (new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t).value.x = ""; + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'number'. (new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s).value.x = ""; + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'number'. diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types index 91b0d4fcb37..3cec85b0716 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types @@ -132,10 +132,10 @@ class Chain2 { (new Chain2(i)).then(ii => t).then(tt => s).value.x = ""; >(new Chain2(i)).then(ii => t).then(tt => s).value.x = "" : "" >(new Chain2(i)).then(ii => t).then(tt => s).value.x : number ->(new Chain2(i)).then(ii => t).then(tt => s).value : S ->(new Chain2(i)).then(ii => t).then(tt => s) : Chain2 ->(new Chain2(i)).then(ii => t).then : (cb: (x: T) => S) => Chain2 ->(new Chain2(i)).then(ii => t) : Chain2 +>(new Chain2(i)).then(ii => t).then(tt => s).value : I +>(new Chain2(i)).then(ii => t).then(tt => s) : Chain2 +>(new Chain2(i)).then(ii => t).then : (cb: (x: I) => S) => Chain2 +>(new Chain2(i)).then(ii => t) : Chain2 >(new Chain2(i)).then : (cb: (x: I) => S) => Chain2 >(new Chain2(i)) : Chain2 >new Chain2(i) : Chain2 @@ -145,11 +145,11 @@ class Chain2 { >ii => t : (ii: I) => T >ii : I >t : T ->then : (cb: (x: T) => S) => Chain2 ->tt => s : (tt: T) => S ->tt : T +>then : (cb: (x: I) => S) => Chain2 +>tt => s : (tt: I) => S +>tt : I >s : S ->value : S +>value : I >x : number >"" : "" @@ -158,14 +158,14 @@ class Chain2 { (new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t).value.x = ""; >(new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t).value.x = "" : "" >(new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t).value.x : number ->(new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t).value : T ->(new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t) : Chain2 ->(new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then : (cb: (x: T) => S) => Chain2 ->(new Chain2(i)).then(ii => t).then(tt => t).then(tt => t) : Chain2 ->(new Chain2(i)).then(ii => t).then(tt => t).then : (cb: (x: T) => S) => Chain2 ->(new Chain2(i)).then(ii => t).then(tt => t) : Chain2 ->(new Chain2(i)).then(ii => t).then : (cb: (x: T) => S) => Chain2 ->(new Chain2(i)).then(ii => t) : Chain2 +>(new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t).value : I +>(new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t) : Chain2 +>(new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then : (cb: (x: I) => S) => Chain2 +>(new Chain2(i)).then(ii => t).then(tt => t).then(tt => t) : Chain2 +>(new Chain2(i)).then(ii => t).then(tt => t).then : (cb: (x: I) => S) => Chain2 +>(new Chain2(i)).then(ii => t).then(tt => t) : Chain2 +>(new Chain2(i)).then(ii => t).then : (cb: (x: I) => S) => Chain2 +>(new Chain2(i)).then(ii => t) : Chain2 >(new Chain2(i)).then : (cb: (x: I) => S) => Chain2 >(new Chain2(i)) : Chain2 >new Chain2(i) : Chain2 @@ -175,33 +175,33 @@ class Chain2 { >ii => t : (ii: I) => T >ii : I >t : T ->then : (cb: (x: T) => S) => Chain2 ->tt => t : (tt: T) => T ->tt : T +>then : (cb: (x: I) => S) => Chain2 +>tt => t : (tt: I) => T +>tt : I >t : T ->then : (cb: (x: T) => S) => Chain2 ->tt => t : (tt: T) => T ->tt : T +>then : (cb: (x: I) => S) => Chain2 +>tt => t : (tt: I) => T +>tt : I >t : T ->then : (cb: (x: T) => S) => Chain2 ->tt => t : (tt: T) => T ->tt : T +>then : (cb: (x: I) => S) => Chain2 +>tt => t : (tt: I) => T +>tt : I >t : T ->value : T +>value : I >x : number >"" : "" (new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s).value.x = ""; >(new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s).value.x = "" : "" >(new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s).value.x : number ->(new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s).value : S ->(new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s) : Chain2 ->(new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then : (cb: (x: S) => S) => Chain2 ->(new Chain2(i)).then(ii => s).then(ss => s).then(ss => s) : Chain2 ->(new Chain2(i)).then(ii => s).then(ss => s).then : (cb: (x: S) => S) => Chain2 ->(new Chain2(i)).then(ii => s).then(ss => s) : Chain2 ->(new Chain2(i)).then(ii => s).then : (cb: (x: S) => S) => Chain2 ->(new Chain2(i)).then(ii => s) : Chain2 +>(new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s).value : I +>(new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s) : Chain2 +>(new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then : (cb: (x: I) => S) => Chain2 +>(new Chain2(i)).then(ii => s).then(ss => s).then(ss => s) : Chain2 +>(new Chain2(i)).then(ii => s).then(ss => s).then : (cb: (x: I) => S) => Chain2 +>(new Chain2(i)).then(ii => s).then(ss => s) : Chain2 +>(new Chain2(i)).then(ii => s).then : (cb: (x: I) => S) => Chain2 +>(new Chain2(i)).then(ii => s) : Chain2 >(new Chain2(i)).then : (cb: (x: I) => S) => Chain2 >(new Chain2(i)) : Chain2 >new Chain2(i) : Chain2 @@ -211,19 +211,19 @@ class Chain2 { >ii => s : (ii: I) => S >ii : I >s : S ->then : (cb: (x: S) => S) => Chain2 ->ss => s : (ss: S) => S ->ss : S +>then : (cb: (x: I) => S) => Chain2 +>ss => s : (ss: I) => S +>ss : I >s : S ->then : (cb: (x: S) => S) => Chain2 ->ss => s : (ss: S) => S ->ss : S +>then : (cb: (x: I) => S) => Chain2 +>ss => s : (ss: I) => S +>ss : I >s : S ->then : (cb: (x: S) => S) => Chain2 ->ss => s : (ss: S) => S ->ss : S +>then : (cb: (x: I) => S) => Chain2 +>ss => s : (ss: I) => S +>ss : I >s : S ->value : S +>value : I >x : number >"" : "" diff --git a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.types b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.types index 465e3faea62..fc8480eab28 100644 --- a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.types +++ b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.types @@ -24,7 +24,7 @@ someFunction(function(BaseClass) { this.foo = "bar"; >this.foo = "bar" : "bar" >this.foo : any ->this : this +>this : Hello >foo : any >"bar" : "bar" } diff --git a/tests/baselines/reference/checkJsFiles7.types b/tests/baselines/reference/checkJsFiles7.types index a86767b5e44..e0692181184 100644 --- a/tests/baselines/reference/checkJsFiles7.types +++ b/tests/baselines/reference/checkJsFiles7.types @@ -7,19 +7,19 @@ class C { this.a = true; >this.a = true : true >this.a : boolean ->this : this +>this : C >a : boolean >true : true this.a = !!this.a; >this.a = !!this.a : boolean >this.a : boolean ->this : this +>this : C >a : boolean >!!this.a : boolean >!this.a : boolean >this.a : true ->this : this +>this : C >a : true } } diff --git a/tests/baselines/reference/checkJsFiles_noErrorLocation.errors.txt b/tests/baselines/reference/checkJsFiles_noErrorLocation.errors.txt new file mode 100644 index 00000000000..e870315ee8d --- /dev/null +++ b/tests/baselines/reference/checkJsFiles_noErrorLocation.errors.txt @@ -0,0 +1,25 @@ +tests/cases/compiler/a.js(13,5): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/compiler/a.js (1 errors) ==== + // @ts-check + class A { + constructor() { + + } + foo() { + return 4; + } + } + + class B extends A { + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + this.foo = () => 3; + } + } + + const i = new B(); + i.foo(); \ No newline at end of file diff --git a/tests/baselines/reference/checkJsFiles_noErrorLocation.types b/tests/baselines/reference/checkJsFiles_noErrorLocation.types index b0dceb2d33c..f1a3db4954c 100644 --- a/tests/baselines/reference/checkJsFiles_noErrorLocation.types +++ b/tests/baselines/reference/checkJsFiles_noErrorLocation.types @@ -26,7 +26,7 @@ class B extends A { this.foo = () => 3; >this.foo = () => 3 : () => number >this.foo : any ->this : this +>this : B >foo : any >() => 3 : () => number >3 : 3 diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty12.errors.txt new file mode 100644 index 00000000000..f68fbfd0b1d --- /dev/null +++ b/tests/baselines/reference/checkJsxChildrenProperty12.errors.txt @@ -0,0 +1,93 @@ +tests/cases/conformance/jsx/file.tsx(10,5): error TS2416: Property 'render' in type 'Button' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'Button'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Button' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: any, props: ButtonProp) => any, callback?: () => any): void; (state: any, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'props' and 'props' are incompatible. + Type 'ButtonProp' is not assignable to type 'P'. + 'P' could be instantiated with an arbitrary type which could be unrelated to 'ButtonProp'. +tests/cases/conformance/jsx/file.tsx(28,2): error TS2416: Property 'render' in type 'InnerButton' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'InnerButton'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'InnerButton' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: any, props: InnerButtonProp) => any, callback?: () => any): void; (state: any, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'props' and 'props' are incompatible. + Type 'InnerButtonProp' is not assignable to type 'P'. + 'P' could be instantiated with an arbitrary type which could be unrelated to 'InnerButtonProp'. + + +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== + import React = require('react'); + + interface ButtonProp { + a: number, + b: string, + children: Button; + } + + class Button extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'Button' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'Button'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Button' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: any, props: ButtonProp) => any, callback?: () => any): void; (state: any, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'props' and 'props' are incompatible. +!!! error TS2416: Type 'ButtonProp' is not assignable to type 'P'. +!!! error TS2416: 'P' could be instantiated with an arbitrary type which could be unrelated to 'ButtonProp'. + let condition: boolean; + if (condition) { + return + } + else { + return ( +
Hello World
+
); + } + } + } + + interface InnerButtonProp { + a: number + } + + class InnerButton extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'InnerButton' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'InnerButton'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'InnerButton' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: any, props: InnerButtonProp) => any, callback?: () => any): void; (state: any, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'props' and 'props' are incompatible. +!!! error TS2416: Type 'InnerButtonProp' is not assignable to type 'P'. +!!! error TS2416: 'P' could be instantiated with an arbitrary type which could be unrelated to 'InnerButtonProp'. + return (); + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.types b/tests/baselines/reference/checkJsxChildrenProperty12.types index 9204e4985d2..d3e3282a46d 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty12.types +++ b/tests/baselines/reference/checkJsxChildrenProperty12.types @@ -32,7 +32,7 @@ class Button extends React.Component { > : JSX.Element >InnerButton : typeof InnerButton >this.props : ButtonProp & { children?: React.ReactNode; } ->this : this +>this : Button >props : ButtonProp & { children?: React.ReactNode; } } else { @@ -41,7 +41,7 @@ class Button extends React.Component { >
Hello World
: JSX.Element >InnerButton : typeof InnerButton >this.props : ButtonProp & { children?: React.ReactNode; } ->this : this +>this : Button >props : ButtonProp & { children?: React.ReactNode; }
Hello World
diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt index c926980cab1..152b92ad2d1 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt @@ -1,7 +1,35 @@ +tests/cases/conformance/jsx/file.tsx(10,5): error TS2416: Property 'render' in type 'Button' is not assignable to the same property in base type 'Component'. + Type '() => Element' is not assignable to type '() => Element | null'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'Button'. + Types of property 'render' are incompatible. + Type '() => Element | null' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'Button' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: any, props: ButtonProp) => any, callback?: (() => any) | undefined): void; (state: any, callback?: (() => any) | undefined): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: (() => any) | undefined): void; (state: S, callback?: (() => any) | undefined): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'props' and 'props' are incompatible. + Type 'ButtonProp' is not assignable to type 'P'. + 'P' could be instantiated with an arbitrary type which could be unrelated to 'ButtonProp'. tests/cases/conformance/jsx/file.tsx(12,30): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten. +tests/cases/conformance/jsx/file.tsx(23,2): error TS2416: Property 'render' in type 'InnerButton' is not assignable to the same property in base type 'Component'. + Type '() => Element' is not assignable to type '() => Element | null'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'InnerButton'. + Types of property 'render' are incompatible. + Type '() => Element | null' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'InnerButton' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: any, props: InnerButtonProp) => any, callback?: (() => any) | undefined): void; (state: any, callback?: (() => any) | undefined): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: (() => any) | undefined): void; (state: S, callback?: (() => any) | undefined): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'props' and 'props' are incompatible. + Type 'InnerButtonProp' is not assignable to type 'P'. + 'P' could be instantiated with an arbitrary type which could be unrelated to 'InnerButtonProp'. -==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== import React = require('react'); interface ButtonProp { @@ -12,6 +40,21 @@ tests/cases/conformance/jsx/file.tsx(12,30): error TS2710: 'children' are specif class Button extends React.Component { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'Button' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => Element' is not assignable to type '() => Element | null'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'Button'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => Element | null' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Button' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: any, props: ButtonProp) => any, callback?: (() => any) | undefined): void; (state: any, callback?: (() => any) | undefined): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: (() => any) | undefined): void; (state: S, callback?: (() => any) | undefined): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'props' and 'props' are incompatible. +!!! error TS2416: Type 'ButtonProp' is not assignable to type 'P'. +!!! error TS2416: 'P' could be instantiated with an arbitrary type which could be unrelated to 'ButtonProp'. // Error children are specified twice return ( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -27,6 +70,21 @@ tests/cases/conformance/jsx/file.tsx(12,30): error TS2710: 'children' are specif class InnerButton extends React.Component { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'InnerButton' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => Element' is not assignable to type '() => Element | null'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'InnerButton'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => Element | null' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'InnerButton' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: any, props: InnerButtonProp) => any, callback?: (() => any) | undefined): void; (state: any, callback?: (() => any) | undefined): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: (() => any) | undefined): void; (state: S, callback?: (() => any) | undefined): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'props' and 'props' are incompatible. +!!! error TS2416: Type 'InnerButtonProp' is not assignable to type 'P'. +!!! error TS2416: 'P' could be instantiated with an arbitrary type which could be unrelated to 'InnerButtonProp'. return (); } } diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.types b/tests/baselines/reference/checkJsxChildrenProperty13.types index 38cc2660c08..b86792dc528 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.types +++ b/tests/baselines/reference/checkJsxChildrenProperty13.types @@ -28,7 +28,7 @@ class Button extends React.Component { >
Hello World
: JSX.Element >InnerButton : typeof InnerButton >this.props : ButtonProp & { children?: React.ReactNode | undefined; } ->this : this +>this : Button >props : ButtonProp & { children?: React.ReactNode | undefined; } >children : string diff --git a/tests/baselines/reference/checkJsxChildrenProperty3.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty3.errors.txt new file mode 100644 index 00000000000..6cc1740e090 --- /dev/null +++ b/tests/baselines/reference/checkJsxChildrenProperty3.errors.txt @@ -0,0 +1,71 @@ +tests/cases/conformance/jsx/file.tsx(12,5): error TS2416: Property 'render' in type 'FetchUser' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'FetchUser'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'FetchUser' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: any, props: IFetchUserProps) => any, callback?: () => any): void; (state: any, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'props' and 'props' are incompatible. + Type 'IFetchUserProps' is not assignable to type 'P'. + 'P' could be instantiated with an arbitrary type which could be unrelated to 'IFetchUserProps'. + + +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== + import React = require('react'); + + interface IUser { + Name: string; + } + + interface IFetchUserProps { + children: (user: IUser) => JSX.Element; + } + + class FetchUser extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'FetchUser' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'FetchUser'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'FetchUser' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: any, props: IFetchUserProps) => any, callback?: () => any): void; (state: any, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'props' and 'props' are incompatible. +!!! error TS2416: Type 'IFetchUserProps' is not assignable to type 'P'. +!!! error TS2416: 'P' could be instantiated with an arbitrary type which could be unrelated to 'IFetchUserProps'. + return this.state + ? this.props.children(this.state.result) + : null; + } + } + + // Ok + function UserName0() { + return ( + + { user => ( +

{ user.Name }

+ ) } +
+ ); + } + + function UserName1() { + return ( + + + { user => ( +

{ user.Name }

+ ) } +
+ ); + } \ No newline at end of file diff --git a/tests/baselines/reference/checkJsxChildrenProperty3.types b/tests/baselines/reference/checkJsxChildrenProperty3.types index ceb2a1cf09f..ad697d4ad82 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty3.types +++ b/tests/baselines/reference/checkJsxChildrenProperty3.types @@ -26,19 +26,19 @@ class FetchUser extends React.Component { return this.state >this.state ? this.props.children(this.state.result) : null : JSX.Element >this.state : any ->this : this +>this : FetchUser >state : any ? this.props.children(this.state.result) >this.props.children(this.state.result) : JSX.Element >this.props.children : ((user: IUser) => JSX.Element) & React.ReactNode >this.props : IFetchUserProps & { children?: React.ReactNode; } ->this : this +>this : FetchUser >props : IFetchUserProps & { children?: React.ReactNode; } >children : ((user: IUser) => JSX.Element) & React.ReactNode >this.state.result : any >this.state : any ->this : this +>this : FetchUser >state : any >result : any diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt index 98afca17324..30cf377646e 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt @@ -1,3 +1,17 @@ +tests/cases/conformance/jsx/file.tsx(12,5): error TS2416: Property 'render' in type 'FetchUser' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'FetchUser'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'FetchUser' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: any, props: IFetchUserProps) => any, callback?: () => any): void; (state: any, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'props' and 'props' are incompatible. + Type 'IFetchUserProps' is not assignable to type 'P'. + 'P' could be instantiated with an arbitrary type which could be unrelated to 'IFetchUserProps'. tests/cases/conformance/jsx/file.tsx(24,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'? tests/cases/conformance/jsx/file.tsx(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'. Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props @@ -5,7 +19,7 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) = Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props -==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (4 errors) ==== import React = require('react'); interface IUser { @@ -18,6 +32,21 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) = class FetchUser extends React.Component { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'FetchUser' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'FetchUser'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'FetchUser' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: any, props: IFetchUserProps) => any, callback?: () => any): void; (state: any, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'props' and 'props' are incompatible. +!!! error TS2416: Type 'IFetchUserProps' is not assignable to type 'P'. +!!! error TS2416: 'P' could be instantiated with an arbitrary type which could be unrelated to 'IFetchUserProps'. return this.state ? this.props.children(this.state.result) : null; diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.types b/tests/baselines/reference/checkJsxChildrenProperty4.types index a8828ed5520..1b59de95817 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.types +++ b/tests/baselines/reference/checkJsxChildrenProperty4.types @@ -26,19 +26,19 @@ class FetchUser extends React.Component { return this.state >this.state ? this.props.children(this.state.result) : null : JSX.Element >this.state : any ->this : this +>this : FetchUser >state : any ? this.props.children(this.state.result) >this.props.children(this.state.result) : JSX.Element >this.props.children : ((user: IUser) => JSX.Element) & React.ReactNode >this.props : IFetchUserProps & { children?: React.ReactNode; } ->this : this +>this : FetchUser >props : IFetchUserProps & { children?: React.ReactNode; } >children : ((user: IUser) => JSX.Element) & React.ReactNode >this.state.result : any >this.state : any ->this : this +>this : FetchUser >state : any >result : any diff --git a/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.errors.txt b/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.errors.txt new file mode 100644 index 00000000000..9602e5bc8c3 --- /dev/null +++ b/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.errors.txt @@ -0,0 +1,50 @@ +tests/cases/conformance/jsx/checkJsxSubtleSkipContextSensitiveBug.tsx(13,5): error TS2416: Property 'render' in type 'AsyncLoader' is not assignable to the same property in base type 'Component, {}, any>'. + Type '() => null' is not assignable to type '() => ReactNode'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'AsyncLoader'. + Types of property 'render' are incompatible. + Type '() => ReactNode' is not assignable to type '() => null'. + The 'this' types of each signature are incompatible. + Type 'AsyncLoader' is not assignable to type 'Component'. + Types of property 'props' are incompatible. + Type 'Readonly<{ children?: ReactNode; }> & Readonly>' is not assignable to type 'Readonly<{ children?: ReactNode; }> & Readonly

'. + Type 'Readonly<{ children?: ReactNode; }> & Readonly>' is not assignable to type 'Readonly

'. + + +==== tests/cases/conformance/jsx/checkJsxSubtleSkipContextSensitiveBug.tsx (1 errors) ==== + /// + import * as React from "react"; + + interface ErrorResult { error: true } + + interface AsyncLoaderProps { + readonly prop1: () => Promise; + + readonly prop2: (result: Exclude) => any; + } + + class AsyncLoader extends React.Component> { + render() { return null; } + ~~~~~~ +!!! error TS2416: Property 'render' in type 'AsyncLoader' is not assignable to the same property in base type 'Component, {}, any>'. +!!! error TS2416: Type '() => null' is not assignable to type '() => ReactNode'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'AsyncLoader'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => ReactNode' is not assignable to type '() => null'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'AsyncLoader' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'props' are incompatible. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly>' is not assignable to type 'Readonly<{ children?: ReactNode; }> & Readonly

'. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly>' is not assignable to type 'Readonly

'. + } + + async function load(): Promise<{ success: true } | ErrorResult> { + return { success: true }; + } + + const loader = result} + />; + \ No newline at end of file diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccess.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccess.errors.txt index 4b38d7146f4..2785ed422d9 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccess.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccess.errors.txt @@ -10,10 +10,14 @@ tests/cases/compiler/checkSuperCallBeforeThisAccess.ts(43,18): error TS17009: 's tests/cases/compiler/checkSuperCallBeforeThisAccess.ts(44,18): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/checkSuperCallBeforeThisAccess.ts(45,18): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class. tests/cases/compiler/checkSuperCallBeforeThisAccess.ts(59,27): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/checkSuperCallBeforeThisAccess.ts(60,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. +tests/cases/compiler/checkSuperCallBeforeThisAccess.ts(63,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. +tests/cases/compiler/checkSuperCallBeforeThisAccess.ts(72,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. tests/cases/compiler/checkSuperCallBeforeThisAccess.ts(75,27): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/checkSuperCallBeforeThisAccess.ts(76,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. -==== tests/cases/compiler/checkSuperCallBeforeThisAccess.ts (13 errors) ==== +==== tests/cases/compiler/checkSuperCallBeforeThisAccess.ts (17 errors) ==== class A { x = 1; } @@ -98,9 +102,13 @@ tests/cases/compiler/checkSuperCallBeforeThisAccess.ts(75,27): error TS17009: 's ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. super(value); + ~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. } else { super(1337); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. } } bar(): number { return 4; } @@ -110,12 +118,16 @@ tests/cases/compiler/checkSuperCallBeforeThisAccess.ts(75,27): error TS17009: 's constructor(something: boolean) { if (something) { super(1337); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. } else { const value = this.bar(); // Error ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. super(value); + ~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. } } bar(): number { return 4; } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccess.types b/tests/baselines/reference/checkSuperCallBeforeThisAccess.types index 7a6914107f2..a15a0097088 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccess.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccess.types @@ -15,13 +15,13 @@ class C1 extends A { >n : number let a1 = this; // Error ->a1 : this ->this : this +>a1 : C1 +>this : C1 let a2 = this.x; // Error >a2 : number >this.x : number ->this : this +>this : C1 >x : number let a3 = super.x; // Error @@ -31,15 +31,15 @@ class C1 extends A { >x : number let a4 = () => this; ->a4 : () => this ->() => this : () => this ->this : this +>a4 : () => C1 +>() => this : () => C1 +>this : C1 let a5 = () => this.x; >a5 : () => number >() => this.x : () => number >this.x : number ->this : this +>this : C1 >x : number let a6 = () => super.x; @@ -59,13 +59,13 @@ class C1 extends A { >super : typeof A let b1 = this; ->b1 : this ->this : this +>b1 : C1 +>this : C1 let b2 = this.x; >b2 : number >this.x : number ->this : this +>this : C1 >x : number let b3 = super.x; @@ -76,13 +76,13 @@ class C1 extends A { } else { let c1 = this; // Error ->c1 : this ->this : this +>c1 : C1 +>this : C1 let c2 = this.x; // Error >c2 : number >this.x : number ->this : this +>this : C1 >x : number let c3 = super.x; // Error @@ -109,7 +109,7 @@ class C1 extends A { let d1 = this.x; >d1 : number >this.x : number ->this : this +>this : C1 >x : number case 2: @@ -118,7 +118,7 @@ class C1 extends A { let d2 = this.x; // Error >d2 : number >this.x : number ->this : this +>this : C1 >x : number default: @@ -129,13 +129,13 @@ class C1 extends A { let d3 = this.x; >d3 : number >this.x : number ->this : this +>this : C1 >x : number } let d4 = this.x; >d4 : number >this.x : number ->this : this +>this : C1 >x : number } if (!!true) { @@ -158,7 +158,7 @@ class C1 extends A { let e2 = this.x; // Error >e2 : number >this.x : number ->this : this +>this : C1 >x : number let e3 = { w: !!true ? super() : super() }; @@ -177,17 +177,17 @@ class C1 extends A { let e4 = this.x; >e4 : number >this.x : number ->this : this +>this : C1 >x : number } let f1 = this; // Error ->f1 : this ->this : this +>f1 : C1 +>this : C1 let f2 = this.x; // Error >f2 : number >this.x : number ->this : this +>this : C1 >x : number let f3 = super.x; // Error @@ -223,7 +223,7 @@ export class BarCorrectlyFails extends Foo { >value : number >this.bar() : number >this.bar : () => number ->this : this +>this : BarCorrectlyFails >bar : () => number super(value); @@ -263,7 +263,7 @@ export class BarIncorrectlyWorks extends Foo { >value : number >this.bar() : number >this.bar : () => number ->this : this +>this : BarIncorrectlyWorks >bar : () => number super(value); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types index 85a1af6fbdc..fdb5769eb61 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types @@ -15,17 +15,17 @@ class Derived extends Based { >super : typeof Based this; ->this : this +>this : Derived this.x = 10; >this.x = 10 : 10 >this.x : number ->this : this +>this : Derived >x : number >10 : 10 var that = this; ->that : this ->this : this +>that : Derived +>this : Derived } } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.types index 20a52ea9992..503ef1c74e7 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.types @@ -13,7 +13,7 @@ class Derived extends Based { this.x = 100; >this.x = 100 : 100 >this.x : number ->this : this +>this : Derived >x : number >100 : 100 @@ -24,12 +24,12 @@ class Derived extends Based { this.x = 10; >this.x = 10 : 10 >this.x : number ->this : this +>this : Derived >x : number >10 : 10 var that = this; ->that : this ->this : this +>that : Derived +>this : Derived } } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types index 60179ec27bf..c76c7d3d8a8 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types @@ -20,7 +20,7 @@ class Derived extends Based { this.y = true; >this.y = true : true >this.y : boolean ->this : this +>this : innver >y : boolean >true : true } @@ -32,12 +32,12 @@ class Derived extends Based { this.x = 10; >this.x = 10 : 10 >this.x : number ->this : this +>this : Derived >x : number >10 : 10 var that = this; ->that : this ->this : this +>that : Derived +>this : Derived } } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types index b2bf4824721..56b3195d0a5 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types @@ -15,14 +15,14 @@ class Derived extends Based { >() => { this; // No error } : () => void this; // No error ->this : this +>this : Derived }); () => { >() => { this; // No error } : () => void this; // No error ->this : this +>this : Derived }; (() => { @@ -31,7 +31,7 @@ class Derived extends Based { >() => { this; // No error } : () => void this; // No error ->this : this +>this : Derived })(); super(); @@ -45,12 +45,12 @@ class Derived extends Based { this.x = 10; >this.x = 10 : 10 >this.x : number ->this : this +>this : Derived >x : number >10 : 10 var that = this; ->that : this ->this : this +>that : Derived +>this : Derived } } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt index a0b86e28cf0..a38ced21ffc 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt @@ -1,12 +1,15 @@ +tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Based'. tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts (1 errors) ==== +==== tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts (2 errors) ==== class Based { constructor(...arg) { } } class Derived extends Based { public x: number; constructor() { super(this.x); + ~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Based'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.types index c81a87f63f3..31be1d821c9 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.types @@ -15,7 +15,7 @@ class Derived extends Based { >super(this.x) : void >super : typeof Based >this.x : number ->this : this +>this : Derived >x : number } } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.errors.txt new file mode 100644 index 00000000000..3de51adba34 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts(8,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + + +==== tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts (1 errors) ==== + class Base { + constructor(...arg) { + } + } + class Super extends Base { + constructor() { + (() => this); // No Error + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types index 826dab0c400..8e2d285d85b 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types @@ -12,9 +12,9 @@ class Super extends Base { constructor() { (() => this); // No Error ->(() => this) : () => this ->() => this : () => this ->this : this +>(() => this) : () => Super +>() => this : () => Super +>this : Super super(); >super() : void diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.errors.txt new file mode 100644 index 00000000000..3653407208f --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/checkSuperCallBeforeThisAccessing7.ts(7,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + + +==== tests/cases/compiler/checkSuperCallBeforeThisAccessing7.ts (1 errors) ==== + class Base { + constructor(func: ()=>Base) { + } + } + class Super extends Base { + constructor() { + super((() => this)); // No error + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types index 826af6b1987..79368364ada 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types @@ -14,8 +14,8 @@ class Super extends Base { super((() => this)); // No error >super((() => this)) : void >super : typeof Base ->(() => this) : () => this ->() => this : () => this ->this : this +>(() => this) : () => Super +>() => this : () => Super +>this : Super } } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt index 2c8c8d9fb06..67ee38e2a75 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt @@ -1,7 +1,8 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(7,20): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(8,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. -==== tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts (1 errors) ==== +==== tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts (2 errors) ==== class Base { constructor(...arg) { } @@ -12,5 +13,7 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(7,20): error TS17009: ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } } \ No newline at end of file diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.types index 4bb0c8ae172..ed89525a2f7 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.types @@ -12,8 +12,8 @@ class Super extends Base { constructor() { var that = this; ->that : this ->this : this +>that : Super +>this : Super super(); >super() : void diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing9.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing9.types index c39389422f0..d2db62a8750 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing9.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing9.types @@ -8,18 +8,18 @@ class Derived { constructor() { this; ->this : this +>this : Derived this.x = 10; >this.x = 10 : 10 >this.x : any ->this : this +>this : Derived >x : any >10 : 10 var that = this; ->that : this ->this : this +>that : Derived +>this : Derived } } diff --git a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types index 225de65d66a..33b81ff8bb6 100644 --- a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types +++ b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types @@ -25,7 +25,7 @@ class A { >"test" : "test" >use(this) : void >use : (a: any) => void ->this : this +>this : A } }); } diff --git a/tests/baselines/reference/circularReference.types b/tests/baselines/reference/circularReference.types index 29594b5c9aa..66263ebf005 100644 --- a/tests/baselines/reference/circularReference.types +++ b/tests/baselines/reference/circularReference.types @@ -20,7 +20,7 @@ export module M1 { this.m1 = new foo1.M1.C1(); >this.m1 = new foo1.M1.C1() : foo1.M1.C1 >this.m1 : foo1.M1.C1 ->this : this +>this : C1 >m1 : foo1.M1.C1 >new foo1.M1.C1() : foo1.M1.C1 >foo1.M1.C1 : typeof foo1.M1.C1 @@ -33,7 +33,7 @@ export module M1 { >this.m1.y = 10 : 10 >this.m1.y : any >this.m1 : foo1.M1.C1 ->this : this +>this : C1 >m1 : foo1.M1.C1 >y : any >10 : 10 @@ -42,7 +42,7 @@ export module M1 { >this.m1.x = 20 : 20 >this.m1.x : number >this.m1 : foo1.M1.C1 ->this : this +>this : C1 >m1 : foo1.M1.C1 >x : number >20 : 20 @@ -93,7 +93,7 @@ export module M1 { this.m1 = new foo2.M1.C1(); >this.m1 = new foo2.M1.C1() : foo2.M1.C1 >this.m1 : foo2.M1.C1 ->this : this +>this : C1 >m1 : foo2.M1.C1 >new foo2.M1.C1() : foo2.M1.C1 >foo2.M1.C1 : typeof foo2.M1.C1 @@ -106,7 +106,7 @@ export module M1 { >this.m1.y = 10 : 10 >this.m1.y : number >this.m1 : foo2.M1.C1 ->this : this +>this : C1 >m1 : foo2.M1.C1 >y : number >10 : 10 @@ -115,7 +115,7 @@ export module M1 { >this.m1.x = 20 : 20 >this.m1.x : any >this.m1 : foo2.M1.C1 ->this : this +>this : C1 >m1 : foo2.M1.C1 >x : any >20 : 20 diff --git a/tests/baselines/reference/classAbstractCrashedOnce.types b/tests/baselines/reference/classAbstractCrashedOnce.types index af7695a0b80..200aeeeee24 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.types +++ b/tests/baselines/reference/classAbstractCrashedOnce.types @@ -15,7 +15,7 @@ class bar extends foo { this. >this. : any ->this : this +>this : bar } > : any } diff --git a/tests/baselines/reference/classAbstractGeneric.errors.txt b/tests/baselines/reference/classAbstractGeneric.errors.txt index fb5a4c32a39..6b42255185f 100644 --- a/tests/baselines/reference/classAbstractGeneric.errors.txt +++ b/tests/baselines/reference/classAbstractGeneric.errors.txt @@ -3,10 +3,47 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts(12,7): error TS2515: Non-abstract class 'D' does not implement inherited abstract member 'bar' from class 'A'. tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts(12,7): error TS2515: Non-abstract class 'D' does not implement inherited abstract member 'foo' from class 'A'. tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts(14,7): error TS2515: Non-abstract class 'E' does not implement inherited abstract member 'bar' from class 'A'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts(15,5): error TS2416: Property 'foo' in type 'E' is not assignable to the same property in base type 'A'. + Type '() => T' is not assignable to type '() => T'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'A' is not assignable to type 'E'. + Types of property 'foo' are incompatible. + Type '() => T' is not assignable to type '() => T'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'E' is not assignable to type 'A'. + Types of property 't' are incompatible. + Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts(18,7): error TS2515: Non-abstract class 'F' does not implement inherited abstract member 'foo' from class 'A'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts(19,5): error TS2416: Property 'bar' in type 'F' is not assignable to the same property in base type 'A'. + Type '(t: T) => void' is not assignable to type '(t: T) => any'. + The 'this' types of each signature are incompatible. + Type 'A' is not assignable to type 'F'. + Types of property 'bar' are incompatible. + Type '(t: T) => any' is not assignable to type '(t: T) => void'. + The 'this' types of each signature are incompatible. + Type 'F' is not assignable to type 'A'. + Types of property 't' are incompatible. + Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts(23,5): error TS2416: Property 'foo' in type 'G' is not assignable to the same property in base type 'A'. + Type '() => T' is not assignable to type '() => T'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'A' is not assignable to type 'G'. + Types of property 'foo' are incompatible. + Type '() => T' is not assignable to type '() => T'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'G' is not assignable to type 'A'. + Types of property 't' are incompatible. + Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts(24,5): error TS2416: Property 'bar' in type 'G' is not assignable to the same property in base type 'A'. + Type '(t: T) => void' is not assignable to type '(t: T) => any'. + The 'this' types of each signature are incompatible. + Type 'A' is not assignable to type 'G'. -==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts (6 errors) ==== +==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts (10 errors) ==== abstract class A { t: T; @@ -32,15 +69,56 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst ~ !!! error TS2515: Non-abstract class 'E' does not implement inherited abstract member 'bar' from class 'A'. foo() { return this.t; } + ~~~ +!!! error TS2416: Property 'foo' in type 'E' is not assignable to the same property in base type 'A'. +!!! error TS2416: Type '() => T' is not assignable to type '() => T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'A' is not assignable to type 'E'. +!!! error TS2416: Types of property 'foo' are incompatible. +!!! error TS2416: Type '() => T' is not assignable to type '() => T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'E' is not assignable to type 'A'. +!!! error TS2416: Types of property 't' are incompatible. +!!! error TS2416: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. } class F extends A { // error -- doesn't implement foo ~ !!! error TS2515: Non-abstract class 'F' does not implement inherited abstract member 'foo' from class 'A'. bar(t : T) {} + ~~~ +!!! error TS2416: Property 'bar' in type 'F' is not assignable to the same property in base type 'A'. +!!! error TS2416: Type '(t: T) => void' is not assignable to type '(t: T) => any'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'A' is not assignable to type 'F'. +!!! error TS2416: Types of property 'bar' are incompatible. +!!! error TS2416: Type '(t: T) => any' is not assignable to type '(t: T) => void'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'F' is not assignable to type 'A'. +!!! error TS2416: Types of property 't' are incompatible. +!!! error TS2416: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. } class G extends A { foo() { return this.t; } + ~~~ +!!! error TS2416: Property 'foo' in type 'G' is not assignable to the same property in base type 'A'. +!!! error TS2416: Type '() => T' is not assignable to type '() => T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'A' is not assignable to type 'G'. +!!! error TS2416: Types of property 'foo' are incompatible. +!!! error TS2416: Type '() => T' is not assignable to type '() => T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'G' is not assignable to type 'A'. +!!! error TS2416: Types of property 't' are incompatible. +!!! error TS2416: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. bar(t: T) { } + ~~~ +!!! error TS2416: Property 'bar' in type 'G' is not assignable to the same property in base type 'A'. +!!! error TS2416: Type '(t: T) => void' is not assignable to type '(t: T) => any'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'A' is not assignable to type 'G'. } \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractGeneric.types b/tests/baselines/reference/classAbstractGeneric.types index 4ebb7566b61..1cc86fa68e2 100644 --- a/tests/baselines/reference/classAbstractGeneric.types +++ b/tests/baselines/reference/classAbstractGeneric.types @@ -32,7 +32,7 @@ class E extends A { // error -- doesn't implement bar foo() { return this.t; } >foo : () => T >this.t : T ->this : this +>this : E >t : T } @@ -52,7 +52,7 @@ class G extends A { foo() { return this.t; } >foo : () => T >this.t : T ->this : this +>this : G >t : T bar(t: T) { } diff --git a/tests/baselines/reference/classAbstractInstantiations2.types b/tests/baselines/reference/classAbstractInstantiations2.types index bd28ec4e179..bc0a392827a 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.types +++ b/tests/baselines/reference/classAbstractInstantiations2.types @@ -12,7 +12,7 @@ abstract class B { >foo : () => number >this.bar() : number >this.bar : () => number ->this : this +>this : B >bar : () => number abstract bar() : number; diff --git a/tests/baselines/reference/classAbstractSuperCalls.types b/tests/baselines/reference/classAbstractSuperCalls.types index 7c76ea9014e..9cb2199d86e 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.types +++ b/tests/baselines/reference/classAbstractSuperCalls.types @@ -24,7 +24,7 @@ abstract class B extends A { baz() { return this.foo; } >baz : () => () => any >this.foo : () => any ->this : this +>this : B >foo : () => any } @@ -66,7 +66,7 @@ class AA { >bar : () => number >this.foo() : number >this.foo : () => number ->this : this +>this : AA >foo : () => number } diff --git a/tests/baselines/reference/classAttributeInferenceTemplate.types b/tests/baselines/reference/classAttributeInferenceTemplate.types index 90f1f381900..1ea94e931e4 100644 --- a/tests/baselines/reference/classAttributeInferenceTemplate.types +++ b/tests/baselines/reference/classAttributeInferenceTemplate.types @@ -16,14 +16,14 @@ class MyClass { this.property = `foo`; // Correctly inferred as `string` >this.property = `foo` : "foo" >this.property : string ->this : this +>this : MyClass >property : string >`foo` : "foo" this.property2 = `foo-${variable}`; // Causes an error >this.property2 = `foo-${variable}` : string >this.property2 : string ->this : this +>this : MyClass >property2 : string >`foo-${variable}` : string >variable : "something" diff --git a/tests/baselines/reference/classAttributeInferenceTemplateJS.types b/tests/baselines/reference/classAttributeInferenceTemplateJS.types index 29cf5086be3..433a114c842 100644 --- a/tests/baselines/reference/classAttributeInferenceTemplateJS.types +++ b/tests/baselines/reference/classAttributeInferenceTemplateJS.types @@ -16,14 +16,14 @@ class MyClass { this.property = `foo`; // Correctly inferred as `string` >this.property = `foo` : "foo" >this.property : string ->this : this +>this : MyClass >property : string >`foo` : "foo" this.property2 = `foo-${variable}`; // Causes an error >this.property2 = `foo-${variable}` : string >this.property2 : string ->this : this +>this : MyClass >property2 : string >`foo-${variable}` : string >variable : "something" diff --git a/tests/baselines/reference/classCanExtendConstructorFunction.types b/tests/baselines/reference/classCanExtendConstructorFunction.types index a060d27e54d..429fab0777f 100644 --- a/tests/baselines/reference/classCanExtendConstructorFunction.types +++ b/tests/baselines/reference/classCanExtendConstructorFunction.types @@ -92,7 +92,7 @@ class Sql extends Wagon { this.foonly = 12 >this.foonly = 12 : 12 >this.foonly : any ->this : this +>this : Sql >foonly : any >12 : 12 } @@ -252,7 +252,7 @@ class Chowder extends Soup { return this.flavour >this.flavour : { claim: "ignorant" | "malicious"; } ->this : this +>this : Chowder >flavour : { claim: "ignorant" | "malicious"; } } } diff --git a/tests/baselines/reference/classConstructorAccessibility2.errors.txt b/tests/baselines/reference/classConstructorAccessibility2.errors.txt index 2bb111617cd..5d915bb54da 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.errors.txt +++ b/tests/baselines/reference/classConstructorAccessibility2.errors.txt @@ -1,11 +1,14 @@ +tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(18,37): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseA'. +tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(25,37): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseB'. tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(31,24): error TS2675: Cannot extend a class 'BaseC'. Class constructor is marked as private. +tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(32,37): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseC'. tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(34,28): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(35,35): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(39,10): error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration. tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(40,10): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. -==== tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts (5 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts (8 errors) ==== class BaseA { public constructor(public x: number) { } createInstance() { new BaseA(1); } @@ -24,6 +27,8 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessib class DerivedA extends BaseA { constructor(public x: number) { super(x); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseA'. createInstance() { new DerivedA(5); } createBaseInstance() { new BaseA(6); } static staticBaseInstance() { new BaseA(7); } @@ -31,6 +36,8 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessib class DerivedB extends BaseB { constructor(public x: number) { super(x); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseB'. createInstance() { new DerivedB(7); } createBaseInstance() { new BaseB(8); } // ok static staticBaseInstance() { new BaseB(9); } // ok @@ -40,6 +47,8 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessib ~~~~~ !!! error TS2675: Cannot extend a class 'BaseC'. Class constructor is marked as private. constructor(public x: number) { super(x); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseC'. createInstance() { new DerivedC(9); } createBaseInstance() { new BaseC(10); } // error ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.errors.txt b/tests/baselines/reference/classConstructorParametersAccessibility.errors.txt index 97b8655ab87..1634d276094 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.errors.txt +++ b/tests/baselines/reference/classConstructorParametersAccessibility.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility.ts(12,4): error TS2341: Property 'p' is private and only accessible within class 'C2'. tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility.ts(19,4): error TS2445: Property 'p' is protected and only accessible within class 'C3' and its subclasses. +tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility.ts(22,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C3'. -==== tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility.ts (2 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility.ts (3 errors) ==== class C1 { constructor(public x: number) { } } @@ -29,6 +30,8 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorParamete class Derived extends C3 { constructor(p: number) { super(p); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C3'. this.p; // OK } } diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.types b/tests/baselines/reference/classConstructorParametersAccessibility.types index a2410b51bf6..d41cb884350 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.types +++ b/tests/baselines/reference/classConstructorParametersAccessibility.types @@ -57,7 +57,7 @@ class Derived extends C3 { this.p; // OK >this.p : number ->this : this +>this : Derived >p : number } } diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.errors.txt b/tests/baselines/reference/classConstructorParametersAccessibility2.errors.txt index 2a27d24b280..02f21e1b84a 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.errors.txt +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility2.ts(12,4): error TS2341: Property 'p' is private and only accessible within class 'C2'. tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility2.ts(19,4): error TS2445: Property 'p' is protected and only accessible within class 'C3' and its subclasses. +tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility2.ts(22,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C3'. -==== tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility2.ts (2 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility2.ts (3 errors) ==== class C1 { constructor(public x?: number) { } } @@ -29,6 +30,8 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorParamete class Derived extends C3 { constructor(p: number) { super(p); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C3'. this.p; // OK } } diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.types b/tests/baselines/reference/classConstructorParametersAccessibility2.types index 025ec8ee3ed..717bb055faf 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.types +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.types @@ -57,7 +57,7 @@ class Derived extends C3 { this.p; // OK >this.p : number ->this : this +>this : Derived >p : number } } diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.errors.txt b/tests/baselines/reference/classConstructorParametersAccessibility3.errors.txt new file mode 100644 index 00000000000..4db54c98e7a --- /dev/null +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.errors.txt @@ -0,0 +1,19 @@ +tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility3.ts(7,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + + +==== tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility3.ts (1 errors) ==== + class Base { + constructor(protected p: number) { } + } + + class Derived extends Base { + constructor(public p: number) { + super(p); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + this.p; // OK + } + } + + var d: Derived; + d.p; // public, OK \ No newline at end of file diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.types b/tests/baselines/reference/classConstructorParametersAccessibility3.types index 26f41898589..3b3424e7799 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.types +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.types @@ -20,7 +20,7 @@ class Derived extends Base { this.p; // OK >this.p : number ->this : this +>this : Derived >p : number } } diff --git a/tests/baselines/reference/classExpressionTest1.errors.txt b/tests/baselines/reference/classExpressionTest1.errors.txt new file mode 100644 index 00000000000..d9cc72238fa --- /dev/null +++ b/tests/baselines/reference/classExpressionTest1.errors.txt @@ -0,0 +1,22 @@ +tests/cases/compiler/classExpressionTest1.ts(11,12): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'number' is not assignable to type 'X'. + 'X' could be instantiated with an arbitrary type which could be unrelated to 'number'. + + +==== tests/cases/compiler/classExpressionTest1.ts (1 errors) ==== + function M() { + class C { + f() { + var t: T; + var x: X; + return { t, x }; + } + } + + var v = new C(); + return v.f(); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'number' is not assignable to type 'X'. +!!! error TS2684: 'X' could be instantiated with an arbitrary type which could be unrelated to 'number'. + } \ No newline at end of file diff --git a/tests/baselines/reference/classExpressionTest2.errors.txt b/tests/baselines/reference/classExpressionTest2.errors.txt new file mode 100644 index 00000000000..6f5ba5035c9 --- /dev/null +++ b/tests/baselines/reference/classExpressionTest2.errors.txt @@ -0,0 +1,22 @@ +tests/cases/compiler/classExpressionTest2.ts(11,12): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'number' is not assignable to type 'X'. + 'X' could be instantiated with an arbitrary type which could be unrelated to 'number'. + + +==== tests/cases/compiler/classExpressionTest2.ts (1 errors) ==== + function M() { + var m = class C { + f() { + var t: T; + var x: X; + return { t, x }; + } + } + + var v = new m(); + return v.f(); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'number' is not assignable to type 'X'. +!!! error TS2684: 'X' could be instantiated with an arbitrary type which could be unrelated to 'number'. + } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendingAny.types b/tests/baselines/reference/classExtendingAny.types index 0916674963d..eaa6c62c834 100644 --- a/tests/baselines/reference/classExtendingAny.types +++ b/tests/baselines/reference/classExtendingAny.types @@ -36,7 +36,7 @@ class A extends Err { return this.payload + "!"; >this.payload + "!" : string >this.payload : string ->this : this +>this : A >payload : string >"!" : "!" } @@ -68,7 +68,7 @@ class B extends Err { this.wat = 12 >this.wat = 12 : 12 >this.wat : any ->this : this +>this : B >wat : any >12 : 12 } @@ -77,17 +77,17 @@ class B extends Err { this.wat >this.wat : number ->this : this +>this : B >wat : number this.wit >this.wit : any ->this : this +>this : B >wit : any this['wot'] >this['wot'] : any ->this : this +>this : B >'wot' : "wot" super.alsoBad diff --git a/tests/baselines/reference/classExtendingClass.errors.txt b/tests/baselines/reference/classExtendingClass.errors.txt new file mode 100644 index 00000000000..aa9a63c1f9e --- /dev/null +++ b/tests/baselines/reference/classExtendingClass.errors.txt @@ -0,0 +1,43 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingClass.ts(30,10): error TS2684: The 'this' context of type 'D2' is not assignable to method's 'this' of type 'C2'. + Types of property 'foo' are incompatible. + Type 'string' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. + + +==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingClass.ts (1 errors) ==== + class C { + foo: string; + thing() { } + static other() { } + } + + class D extends C { + bar: string; + } + + var d: D; + var r = d.foo; + var r2 = d.bar; + var r3 = d.thing(); + var r4 = D.other(); + + class C2 { + foo: T; + thing(x: T) { } + static other(x: T) { } + } + + class D2 extends C2 { + bar: string; + } + + var d2: D2; + var r5 = d2.foo; + var r6 = d2.bar; + var r7 = d2.thing(''); + ~~ +!!! error TS2684: The 'this' context of type 'D2' is not assignable to method's 'this' of type 'C2'. +!!! error TS2684: Types of property 'foo' are incompatible. +!!! error TS2684: Type 'string' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. + var r8 = D2.other(1); \ No newline at end of file diff --git a/tests/baselines/reference/classExtendingClassLikeType.types b/tests/baselines/reference/classExtendingClassLikeType.types index 25f0688c2ee..5ff7bf8e75c 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.types +++ b/tests/baselines/reference/classExtendingClassLikeType.types @@ -48,14 +48,14 @@ class D1 extends getBase() { this.x = "x"; >this.x = "x" : "x" >this.x : string ->this : this +>this : D1 >x : string >"x" : "x" this.y = "y"; >this.y = "y" : "y" >this.y : string ->this : this +>this : D1 >y : string >"y" : "y" } @@ -81,14 +81,14 @@ class D2 extends getBase() { this.x = 1; >this.x = 1 : 1 >this.x : number ->this : this +>this : D2 >x : number >1 : 1 this.y = 2; >this.y = 2 : 2 >this.y : number ->this : this +>this : D2 >y : number >2 : 2 } @@ -109,14 +109,14 @@ class D3 extends getBase() { this.x = "x"; >this.x = "x" : "x" >this.x : string ->this : this +>this : D3 >x : string >"x" : "x" this.y = 2; >this.y = 2 : 2 >this.y : number ->this : this +>this : D3 >y : number >2 : 2 } diff --git a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt index ea3927b51d1..1a8b931f8f0 100644 --- a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt +++ b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt @@ -1,5 +1,7 @@ -tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7): error TS2420: Class 'D2' incorrectly implements interface 'I'. - Types have separate declarations of a private property 'x'. +tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(11,12): error TS2416: Property 'foo' in type 'D2' is not assignable to the same property in base type 'I'. + Type '(x: any) => any' is not assignable to type '(x: any) => any'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Property 'other' is missing in type 'C' but required in type 'D2'. ==== tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts (1 errors) ==== @@ -13,10 +15,13 @@ tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7) } class D2 implements I { - ~~ -!!! 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 } + ~~~ +!!! error TS2416: Property 'foo' in type 'D2' is not assignable to the same property in base type 'I'. +!!! error TS2416: Type '(x: any) => any' is not assignable to type '(x: any) => any'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Property 'other' is missing in type 'C' but required in type 'D2'. +!!! related TS2728 tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts:13:5: 'other' is declared here. private x = 3; other(x: any) { return x } } \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass5.errors.txt b/tests/baselines/reference/classImplementsClass5.errors.txt index a291da15407..7ac280ee60b 100644 --- a/tests/baselines/reference/classImplementsClass5.errors.txt +++ b/tests/baselines/reference/classImplementsClass5.errors.txt @@ -1,7 +1,9 @@ -tests/cases/compiler/classImplementsClass5.ts(5,7): error TS2720: Class 'C' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? - Types have separate declarations of a private property 'x'. +tests/cases/compiler/classImplementsClass5.ts(7,5): error TS2416: Property 'foo' in type 'C' is not assignable to the same property in base type 'A'. + Type '() => number' is not assignable to type '() => number'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'A' is not assignable to type 'C'. + 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'. - 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'. Types have separate declarations of a private property 'x'. @@ -12,11 +14,14 @@ tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is n foo(): number { return 1; } } class C implements A { - ~ -!!! error TS2720: Class 'C' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? -!!! error TS2720: Types have separate declarations of a private property 'x'. private x = 1; foo() { + ~~~ +!!! error TS2416: Property 'foo' in type 'C' is not assignable to the same property in base type 'A'. +!!! error TS2416: Type '() => number' is not assignable to type '() => number'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'A' is not assignable to type 'C'. +!!! error TS2416: Types have separate declarations of a private property 'x'. return 1; } } @@ -28,7 +33,6 @@ tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is n c = c2; ~ !!! error TS2322: Type 'C2' is not assignable to type 'C'. -!!! error TS2322: Types have separate declarations of a private property 'x'. c2 = c; ~~ !!! error TS2322: Type 'C' is not assignable to type 'C2'. diff --git a/tests/baselines/reference/classMemberInitializerScoping.types b/tests/baselines/reference/classMemberInitializerScoping.types index 3521d26c00f..bd7ea28647e 100644 --- a/tests/baselines/reference/classMemberInitializerScoping.types +++ b/tests/baselines/reference/classMemberInitializerScoping.types @@ -20,7 +20,7 @@ class CCC { this.y = ''; // was: error, cannot assign string to number >this.y = '' : "" >this.y : number ->this : this +>this : CCC >y : number >'' : "" } @@ -43,14 +43,14 @@ class CCCC { this.y = aaaa; >this.y = aaaa : any >this.y : any ->this : this +>this : CCCC >y : any >aaaa : any this.y = ''; >this.y = '' : "" >this.y : any ->this : this +>this : CCCC >y : any >'' : "" } diff --git a/tests/baselines/reference/classOrder2.types b/tests/baselines/reference/classOrder2.types index 4d1e996f9d7..97acb17c8ca 100644 --- a/tests/baselines/reference/classOrder2.types +++ b/tests/baselines/reference/classOrder2.types @@ -7,7 +7,7 @@ class A extends B { >foo : () => void >this.bar() : void >this.bar : () => void ->this : this +>this : A >bar : () => void } diff --git a/tests/baselines/reference/classOrderBug.types b/tests/baselines/reference/classOrderBug.types index 26aaf72fa3f..f9bd8b1ea29 100644 --- a/tests/baselines/reference/classOrderBug.types +++ b/tests/baselines/reference/classOrderBug.types @@ -10,7 +10,7 @@ class bar { this.baz = new foo(); >this.baz = new foo() : foo >this.baz : foo ->this : this +>this : bar >baz : foo >new foo() : foo >foo : typeof foo diff --git a/tests/baselines/reference/classSideInheritance2.types b/tests/baselines/reference/classSideInheritance2.types index 7aecaad1dc9..4acea1eccaa 100644 --- a/tests/baselines/reference/classSideInheritance2.types +++ b/tests/baselines/reference/classSideInheritance2.types @@ -33,7 +33,7 @@ class TextBase implements IText { return new SubText(this, span); >new SubText(this, span) : SubText >SubText : typeof SubText ->this : this +>this : TextBase >span : TextSpan } } diff --git a/tests/baselines/reference/classSideInheritance3.errors.txt b/tests/baselines/reference/classSideInheritance3.errors.txt index cdad6599715..44de922a961 100644 --- a/tests/baselines/reference/classSideInheritance3.errors.txt +++ b/tests/baselines/reference/classSideInheritance3.errors.txt @@ -1,3 +1,5 @@ +tests/cases/compiler/classSideInheritance3.ts(7,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. +tests/cases/compiler/classSideInheritance3.ts(12,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. tests/cases/compiler/classSideInheritance3.ts(16,5): error TS2322: Type 'typeof B' is not assignable to type 'typeof A'. Types of construct signatures are incompatible. Type 'new (x: string, data: string) => B' is not assignable to type 'new (x: string) => A'. @@ -6,7 +8,7 @@ tests/cases/compiler/classSideInheritance3.ts(17,5): error TS2322: Type 'typeof Type 'new (x: string, data: string) => B' is not assignable to type 'new (x: string) => A'. -==== tests/cases/compiler/classSideInheritance3.ts (2 errors) ==== +==== tests/cases/compiler/classSideInheritance3.ts (4 errors) ==== class A { constructor(public x: string) { } @@ -14,11 +16,15 @@ tests/cases/compiler/classSideInheritance3.ts(17,5): error TS2322: Type 'typeof class B extends A { constructor(x: string, public data: string) { super(x); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. } } class C extends A { constructor(x: string) { super(x); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. } } diff --git a/tests/baselines/reference/classStaticBlock11(target=es2015).types b/tests/baselines/reference/classStaticBlock11(target=es2015).types index c295e7b93df..320ce5379bc 100644 --- a/tests/baselines/reference/classStaticBlock11(target=es2015).types +++ b/tests/baselines/reference/classStaticBlock11(target=es2015).types @@ -15,7 +15,7 @@ class C { this.#x = x; >this.#x = x : number >this.#x : number ->this : this +>this : C >x : number } diff --git a/tests/baselines/reference/classStaticBlock11(target=esnext).types b/tests/baselines/reference/classStaticBlock11(target=esnext).types index c295e7b93df..320ce5379bc 100644 --- a/tests/baselines/reference/classStaticBlock11(target=esnext).types +++ b/tests/baselines/reference/classStaticBlock11(target=esnext).types @@ -15,7 +15,7 @@ class C { this.#x = x; >this.#x = x : number >this.#x : number ->this : this +>this : C >x : number } diff --git a/tests/baselines/reference/classStaticBlock16.types b/tests/baselines/reference/classStaticBlock16.types index b5e9626a940..7f8f5103754 100644 --- a/tests/baselines/reference/classStaticBlock16.types +++ b/tests/baselines/reference/classStaticBlock16.types @@ -16,7 +16,7 @@ class C { this.#x = x; >this.#x = x : number >this.#x : number ->this : this +>this : C >x : number } diff --git a/tests/baselines/reference/classStaticBlock17.types b/tests/baselines/reference/classStaticBlock17.types index ae27524b4bc..b5cedf57dc4 100644 --- a/tests/baselines/reference/classStaticBlock17.types +++ b/tests/baselines/reference/classStaticBlock17.types @@ -19,7 +19,7 @@ class A { this.#x = v; >this.#x = v : number >this.#x : number ->this : this +>this : A >v : number } @@ -28,7 +28,7 @@ class A { return this.#x; >this.#x : number ->this : this +>this : A } static { diff --git a/tests/baselines/reference/classUpdateTests.errors.txt b/tests/baselines/reference/classUpdateTests.errors.txt index 4a100229828..a5726b9937a 100644 --- a/tests/baselines/reference/classUpdateTests.errors.txt +++ b/tests/baselines/reference/classUpdateTests.errors.txt @@ -1,11 +1,15 @@ tests/cases/compiler/classUpdateTests.ts(34,2): error TS2377: Constructors for derived classes must contain a 'super' call. tests/cases/compiler/classUpdateTests.ts(43,18): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/compiler/classUpdateTests.ts(52,3): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'G'. 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, parameter properties, or private identifiers. +tests/cases/compiler/classUpdateTests.ts(59,3): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type '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(65,3): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type '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, parameter properties, or private identifiers. +tests/cases/compiler/classUpdateTests.ts(72,3): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'G'. tests/cases/compiler/classUpdateTests.ts(93,3): error TS1128: Declaration or statement expected. tests/cases/compiler/classUpdateTests.ts(95,1): error TS1128: Declaration or statement expected. tests/cases/compiler/classUpdateTests.ts(99,3): error TS1128: Declaration or statement expected. @@ -20,7 +24,7 @@ tests/cases/compiler/classUpdateTests.ts(111,15): error TS1068: Unexpected token tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or statement expected. -==== tests/cases/compiler/classUpdateTests.ts (18 errors) ==== +==== tests/cases/compiler/classUpdateTests.ts (22 errors) ==== // // test codegen for instance properties // @@ -77,6 +81,8 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st class J extends G { constructor(public p1:number) { super(); // NO ERROR + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'G'. } } @@ -87,6 +93,8 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st ~~~~~~~~~~~~ super(); ~~~~~~~~~~ + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'G'. } ~~ !!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers. @@ -98,6 +106,8 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st !!! error TS2415: Property 'p1' is private in type 'L' but not in type 'G'. constructor(private p1:number) { super(); // NO ERROR + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'G'. } } @@ -111,6 +121,8 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st ~~~~~~~~~~~~ super(); ~~~~~~~~~~ + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'G'. } ~~ !!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers. diff --git a/tests/baselines/reference/classUpdateTests.types b/tests/baselines/reference/classUpdateTests.types index 9c940720367..41baff173f2 100644 --- a/tests/baselines/reference/classUpdateTests.types +++ b/tests/baselines/reference/classUpdateTests.types @@ -180,7 +180,7 @@ class N { this.p2 = 0; >this.p2 = 0 : 0 >this.p2 : number ->this : this +>this : N >p2 : number >0 : 0 } diff --git a/tests/baselines/reference/collectionPatternNoError.errors.txt b/tests/baselines/reference/collectionPatternNoError.errors.txt new file mode 100644 index 00000000000..b15ecde396d --- /dev/null +++ b/tests/baselines/reference/collectionPatternNoError.errors.txt @@ -0,0 +1,45 @@ +tests/cases/compiler/collectionPatternNoError.ts(6,5): error TS2322: Type 'Message' is not assignable to type 'this'. + 'Message' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Message'. + + +==== tests/cases/compiler/collectionPatternNoError.ts (1 errors) ==== + interface MsgConstructor { + new(data: Array<{}>): T; + } + class Message { + clone(): this { + return this; + ~~~~~~~~~~~~ +!!! error TS2322: Type 'Message' is not assignable to type 'this'. +!!! error TS2322: 'Message' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Message'. + } + } + interface MessageList extends Message { + methodOnMessageList(): T[]; + } + + function fetchMsg(protoCtor: MsgConstructor): V { + return null!; + } + + class DataProvider> { + constructor( + private readonly message: MsgConstructor, + private readonly messageList: MsgConstructor, + ) { } + + fetch() { + const messageList = fetchMsg(this.messageList); + messageList.methodOnMessageList(); + } + } + + // The same bug as the above but using indexed accesses + // (won't surface directly unless unsound indexed access assignments are forbidden) + function f< + U extends {TType: MessageList}, + T extends Message + >(message: MsgConstructor, messageList: MsgConstructor) { + fetchMsg(messageList).methodOnMessageList(); + } + \ No newline at end of file diff --git a/tests/baselines/reference/collectionPatternNoError.types b/tests/baselines/reference/collectionPatternNoError.types index de8e960f095..b4035db350d 100644 --- a/tests/baselines/reference/collectionPatternNoError.types +++ b/tests/baselines/reference/collectionPatternNoError.types @@ -10,7 +10,7 @@ class Message { >clone : () => this return this; ->this : this +>this : Message } } interface MessageList extends Message { @@ -47,7 +47,7 @@ class DataProvider> { >fetchMsg(this.messageList) : U >fetchMsg : (protoCtor: MsgConstructor) => V >this.messageList : MsgConstructor ->this : this +>this : DataProvider >messageList : MsgConstructor messageList.methodOnMessageList(); diff --git a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.types b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.types index 121c9bda818..746b559f0e9 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.types +++ b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.types @@ -19,7 +19,7 @@ module M { this.y = x; >this.y = x : number >this.y : any ->this : this +>this : c >y : any >x : number } @@ -46,7 +46,7 @@ module M { this.y = x; >this.y = x : number >this.y : any ->this : this +>this : d >y : any >x : number } @@ -69,7 +69,7 @@ module M { // Shouldnt be _M this.y = x; >this.y = x : number >this.y : any ->this : this +>this : e >y : any >x : number } diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt new file mode 100644 index 00000000000..7198cdddc36 --- /dev/null +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt @@ -0,0 +1,33 @@ +tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(11,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. +tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(18,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. + + +==== tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts (2 errors) ==== + function _super() { // No error + } + class Foo { + constructor() { + function _super() { // No error + } + } + } + class b extends Foo { + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. + function _super() { // Should be error + } + } + } + class c extends Foo { + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. + var x = () => { + function _super() { // Should be error + } + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt new file mode 100644 index 00000000000..e715077d41f --- /dev/null +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/collisionSuperAndLocalVarInConstructor.ts(9,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. +tests/cases/compiler/collisionSuperAndLocalVarInConstructor.ts(15,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. + + +==== tests/cases/compiler/collisionSuperAndLocalVarInConstructor.ts (2 errors) ==== + var _super = 10; // No Error + class Foo { + constructor() { + var _super = 10; // No error + } + } + class b extends Foo { + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. + var _super = 10; // Should be error + } + } + class c extends Foo { + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. + var x = () => { + var _super = 10; // Should be error + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndParameter.types b/tests/baselines/reference/collisionSuperAndParameter.types index 0d41d6b66ee..b4a8607b5ad 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.types +++ b/tests/baselines/reference/collisionSuperAndParameter.types @@ -6,14 +6,14 @@ class Foo { >a : () => void var lamda = (_super: number) => { // No Error ->lamda : (_super: number) => (x: any) => this ->(_super: number) => { // No Error return x => this; // New scope. So should inject new _this capture } : (_super: number) => (x: any) => this +>lamda : (_super: number) => (x: any) => Foo +>(_super: number) => { // No Error return x => this; // New scope. So should inject new _this capture } : (_super: number) => (x: any) => Foo >_super : number return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo >x : any ->this : this +>this : Foo } } b(_super: number) { // No Error @@ -21,13 +21,13 @@ class Foo { >_super : number var lambda = () => { ->lambda : () => (x: any) => this ->() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this +>lambda : () => (x: any) => Foo +>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => Foo return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo >x : any ->this : this +>this : Foo } } set c(_super: number) { // No error @@ -43,14 +43,14 @@ class Foo2 extends Foo { >x : () => void var lamda = (_super: number) => { // Error ->lamda : (_super: number) => (x: any) => this ->(_super: number) => { // Error return x => this; // New scope. So should inject new _this capture } : (_super: number) => (x: any) => this +>lamda : (_super: number) => (x: any) => Foo2 +>(_super: number) => { // Error return x => this; // New scope. So should inject new _this capture } : (_super: number) => (x: any) => Foo2 >_super : number return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo2 >x : any ->this : this +>this : Foo2 } } y(_super: number) { // Error @@ -58,13 +58,13 @@ class Foo2 extends Foo { >_super : number var lambda = () => { ->lambda : () => (x: any) => this ->() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this +>lambda : () => (x: any) => Foo2 +>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => Foo2 return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo2 >x : any ->this : this +>this : Foo2 } } set z(_super: number) { // Error @@ -152,13 +152,13 @@ class Foo4 extends Foo { >_super : any var lambda = () => { ->lambda : () => (x: any) => this ->() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this +>lambda : () => (x: any) => Foo4 +>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => Foo4 return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo4 >x : any ->this : this +>this : Foo4 } } } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.types b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.types index 4ba8b5ba24c..21d9cef8488 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.types +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.types @@ -22,7 +22,7 @@ class class1 { return callback(this); >callback(this) : any >callback : any ->this : this +>this : class1 } } @@ -50,7 +50,7 @@ class class1 { return callback(this); >callback(this) : any >callback : any ->this : this +>this : class1 } } @@ -80,7 +80,7 @@ class class2 { return callback(this); >callback(this) : any >callback : any ->this : this +>this : class2 } } @@ -108,7 +108,7 @@ class class2 { return callback(this); >callback(this) : any >callback : any ->this : this +>this : class2 } } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.types b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.types index 02fd2ab0ce8..3a2bc641aa8 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.types +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.types @@ -20,7 +20,7 @@ class class1 { return callback(this); >callback(this) : any >callback : any ->this : this +>this : class1 } } } @@ -47,7 +47,7 @@ class class2 { return callback(this); >callback(this) : any >callback : any ->this : this +>this : class2 } } } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.types b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.types index f3a5ba66325..96edda37c74 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.types +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.types @@ -21,7 +21,7 @@ class a { return callback(this); >callback(this) : any >callback : any ->this : this +>this : a } } } @@ -44,7 +44,7 @@ class a { return callback(this); >callback(this) : any >callback : any ->this : this +>this : a } } } diff --git a/tests/baselines/reference/collisionThisExpressionAndParameter.types b/tests/baselines/reference/collisionThisExpressionAndParameter.types index 5d8c15ecafd..6c4457d31fd 100644 --- a/tests/baselines/reference/collisionThisExpressionAndParameter.types +++ b/tests/baselines/reference/collisionThisExpressionAndParameter.types @@ -23,14 +23,14 @@ class Foo { >y : () => void var lamda = (_this: number) => { // Error ->lamda : (_this: number) => (x: any) => this ->(_this: number) => { // Error return x => this; // New scope. So should inject new _this capture } : (_this: number) => (x: any) => this +>lamda : (_this: number) => (x: any) => Foo +>(_this: number) => { // Error return x => this; // New scope. So should inject new _this capture } : (_this: number) => (x: any) => Foo >_this : number return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo >x : any ->this : this +>this : Foo } } z(_this: number) { // Error @@ -38,13 +38,13 @@ class Foo { >_this : number var lambda = () => { ->lambda : () => (x: any) => this ->() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this +>lambda : () => (x: any) => Foo +>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => Foo return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo >x : any ->this : this +>this : Foo } } @@ -98,7 +98,7 @@ class Foo1 { return callback(this); >callback(this) : any >callback : any ->this : this +>this : Foo1 } } } @@ -166,7 +166,7 @@ class Foo3 { return callback(this); >callback(this) : any >callback : any ->this : this +>this : Foo3 } } } @@ -184,13 +184,13 @@ class Foo3 { >_this : any var lambda = () => { ->lambda : () => (x: any) => this ->() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this +>lambda : () => (x: any) => Foo3 +>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => Foo3 return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo3 >x : any ->this : this +>this : Foo3 } } } diff --git a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.types b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.types index 5e19d7dc9d2..2501f89ccf8 100644 --- a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.types +++ b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.types @@ -6,13 +6,13 @@ class Foo2 { >_this : number var lambda = () => { ->lambda : () => (x: any) => this ->() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this +>lambda : () => (x: any) => Foo2 +>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => Foo2 return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo2 >x : any ->this : this +>this : Foo2 } } } @@ -24,13 +24,13 @@ class Foo3 { >_this : number var lambda = () => { ->lambda : () => (x: any) => this ->() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this +>lambda : () => (x: any) => Foo3 +>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => Foo3 return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo3 >x : any ->this : this +>this : Foo3 } } } @@ -48,13 +48,13 @@ class Foo4 { >_this : any var lambda = () => { ->lambda : () => (x: any) => this ->() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this +>lambda : () => (x: any) => Foo4 +>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => Foo4 return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo4 >x : any ->this : this +>this : Foo4 } } } @@ -72,13 +72,13 @@ class Foo5 { >_this : any var lambda = () => { ->lambda : () => (x: any) => this ->() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this +>lambda : () => (x: any) => Foo5 +>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => Foo5 return x => this; // New scope. So should inject new _this capture ->x => this : (x: any) => this +>x => this : (x: any) => Foo5 >x : any ->this : this +>this : Foo5 } } } diff --git a/tests/baselines/reference/commentsClassMembers.types b/tests/baselines/reference/commentsClassMembers.types index cd1bfbdd6f0..129dd6dee09 100644 --- a/tests/baselines/reference/commentsClassMembers.types +++ b/tests/baselines/reference/commentsClassMembers.types @@ -15,7 +15,7 @@ class c1 { return this.p1 + b; >this.p1 + b : number >this.p1 : number ->this : this +>this : c1 >p1 : number >b : number @@ -27,10 +27,10 @@ class c1 { return this.p2(this.p1); >this.p2(this.p1) : number >this.p2 : (b: number) => number ->this : this +>this : c1 >p2 : (b: number) => number >this.p1 : number ->this : this +>this : c1 >p1 : number }// trailing comment Getter @@ -42,11 +42,11 @@ class c1 { this.p1 = this.p2(value); >this.p1 = this.p2(value) : number >this.p1 : number ->this : this +>this : c1 >p1 : number >this.p2(value) : number >this.p2 : (b: number) => number ->this : this +>this : c1 >p2 : (b: number) => number >value : number @@ -63,7 +63,7 @@ class c1 { return this.p1 + b; >this.p1 + b : number >this.p1 : number ->this : this +>this : c1 >p1 : number >b : number @@ -75,10 +75,10 @@ class c1 { return this.pp2(this.pp1); >this.pp2(this.pp1) : number >this.pp2 : (b: number) => number ->this : this +>this : c1 >pp2 : (b: number) => number >this.pp1 : number ->this : this +>this : c1 >pp1 : number } /** setter property*/ @@ -89,11 +89,11 @@ class c1 { this.pp1 = this.pp2(value); >this.pp1 = this.pp2(value) : number >this.pp1 : number ->this : this +>this : c1 >pp1 : number >this.pp2(value) : number >this.pp2 : (b: number) => number ->this : this +>this : c1 >pp2 : (b: number) => number >value : number } @@ -157,7 +157,7 @@ class c1 { return this.nc_p1 + b; >this.nc_p1 + b : number >this.nc_p1 : number ->this : this +>this : c1 >nc_p1 : number >b : number } @@ -167,10 +167,10 @@ class c1 { return this.nc_p2(this.nc_p1); >this.nc_p2(this.nc_p1) : number >this.nc_p2 : (b: number) => number ->this : this +>this : c1 >nc_p2 : (b: number) => number >this.nc_p1 : number ->this : this +>this : c1 >nc_p1 : number } public set nc_p3(value: number) { @@ -180,11 +180,11 @@ class c1 { this.nc_p1 = this.nc_p2(value); >this.nc_p1 = this.nc_p2(value) : number >this.nc_p1 : number ->this : this +>this : c1 >nc_p1 : number >this.nc_p2(value) : number >this.nc_p2 : (b: number) => number ->this : this +>this : c1 >nc_p2 : (b: number) => number >value : number } @@ -198,7 +198,7 @@ class c1 { return this.nc_pp1 + b; >this.nc_pp1 + b : number >this.nc_pp1 : number ->this : this +>this : c1 >nc_pp1 : number >b : number } @@ -208,10 +208,10 @@ class c1 { return this.nc_pp2(this.nc_pp1); >this.nc_pp2(this.nc_pp1) : number >this.nc_pp2 : (b: number) => number ->this : this +>this : c1 >nc_pp2 : (b: number) => number >this.nc_pp1 : number ->this : this +>this : c1 >nc_pp1 : number } private set nc_pp3(value: number) { @@ -221,11 +221,11 @@ class c1 { this.nc_pp1 = this.nc_pp2(value); >this.nc_pp1 = this.nc_pp2(value) : number >this.nc_pp1 : number ->this : this +>this : c1 >nc_pp1 : number >this.nc_pp2(value) : number >this.nc_pp2 : (b: number) => number ->this : this +>this : c1 >nc_pp2 : (b: number) => number >value : number } @@ -283,7 +283,7 @@ class c1 { return this.a_p1 + b; >this.a_p1 + b : number >this.a_p1 : number ->this : this +>this : c1 >a_p1 : number >b : number } @@ -294,10 +294,10 @@ class c1 { return this.a_p2(this.a_p1); >this.a_p2(this.a_p1) : number >this.a_p2 : (b: number) => number ->this : this +>this : c1 >a_p2 : (b: number) => number >this.a_p1 : number ->this : this +>this : c1 >a_p1 : number } // setter property @@ -308,11 +308,11 @@ class c1 { this.a_p1 = this.a_p2(value); >this.a_p1 = this.a_p2(value) : number >this.a_p1 : number ->this : this +>this : c1 >a_p1 : number >this.a_p2(value) : number >this.a_p2 : (b: number) => number ->this : this +>this : c1 >a_p2 : (b: number) => number >value : number } @@ -328,7 +328,7 @@ class c1 { return this.a_p1 + b; >this.a_p1 + b : number >this.a_p1 : number ->this : this +>this : c1 >a_p1 : number >b : number } @@ -339,10 +339,10 @@ class c1 { return this.a_pp2(this.a_pp1); >this.a_pp2(this.a_pp1) : number >this.a_pp2 : (b: number) => number ->this : this +>this : c1 >a_pp2 : (b: number) => number >this.a_pp1 : number ->this : this +>this : c1 >a_pp1 : number } // setter property @@ -353,11 +353,11 @@ class c1 { this.a_pp1 = this.a_pp2(value); >this.a_pp1 = this.a_pp2(value) : number >this.a_pp1 : number ->this : this +>this : c1 >a_pp1 : number >this.a_pp2(value) : number >this.a_pp2 : (b: number) => number ->this : this +>this : c1 >a_pp2 : (b: number) => number >value : number } @@ -421,7 +421,7 @@ class c1 { return this.b_p1 + b; >this.b_p1 + b : number >this.b_p1 : number ->this : this +>this : c1 >b_p1 : number >b : number } @@ -432,10 +432,10 @@ class c1 { return this.b_p2(this.b_p1); >this.b_p2(this.b_p1) : number >this.b_p2 : (b: number) => number ->this : this +>this : c1 >b_p2 : (b: number) => number >this.b_p1 : number ->this : this +>this : c1 >b_p1 : number } /** setter property */ @@ -446,11 +446,11 @@ class c1 { this.b_p1 = this.b_p2(value); >this.b_p1 = this.b_p2(value) : number >this.b_p1 : number ->this : this +>this : c1 >b_p1 : number >this.b_p2(value) : number >this.b_p2 : (b: number) => number ->this : this +>this : c1 >b_p2 : (b: number) => number >value : number } @@ -466,7 +466,7 @@ class c1 { return this.b_p1 + b; >this.b_p1 + b : number >this.b_p1 : number ->this : this +>this : c1 >b_p1 : number >b : number } @@ -477,10 +477,10 @@ class c1 { return this.b_pp2(this.b_pp1); >this.b_pp2(this.b_pp1) : number >this.b_pp2 : (b: number) => number ->this : this +>this : c1 >b_pp2 : (b: number) => number >this.b_pp1 : number ->this : this +>this : c1 >b_pp1 : number } /** setter property */ @@ -491,11 +491,11 @@ class c1 { this.b_pp1 = this.b_pp2(value); >this.b_pp1 = this.b_pp2(value) : number >this.b_pp1 : number ->this : this +>this : c1 >b_pp1 : number >this.b_pp2(value) : number >this.b_pp2 : (b: number) => number ->this : this +>this : c1 >b_pp2 : (b: number) => number >value : number } @@ -703,7 +703,7 @@ class cProperties { return this.val; >this.val : number ->this : this +>this : cProperties >val : number } // trailing comment of only getter @@ -712,7 +712,7 @@ class cProperties { return this.val; >this.val : number ->this : this +>this : cProperties >val : number } /**setter only property*/ @@ -723,7 +723,7 @@ class cProperties { this.val = value; >this.val = value : number >this.val : number ->this : this +>this : cProperties >val : number >value : number } @@ -734,7 +734,7 @@ class cProperties { this.val = value; >this.val = value : number >this.val : number ->this : this +>this : cProperties >val : number >value : number diff --git a/tests/baselines/reference/commentsInheritance.errors.txt b/tests/baselines/reference/commentsInheritance.errors.txt new file mode 100644 index 00000000000..b724d7778c9 --- /dev/null +++ b/tests/baselines/reference/commentsInheritance.errors.txt @@ -0,0 +1,156 @@ +tests/cases/compiler/commentsInheritance.ts(87,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'c2'. + + +==== tests/cases/compiler/commentsInheritance.ts (1 errors) ==== + /** i1 is interface with properties*/ + interface i1 { + /** i1_p1*/ + i1_p1: number; + /** i1_f1*/ + i1_f1(): void; + /** i1_l1*/ + i1_l1: () => void; + // il_nc_p1 + i1_nc_p1: number; + i1_nc_f1(): void; + i1_nc_l1: () => void; + p1: number; + f1(): void; + l1: () => void; + nc_p1: number; + nc_f1(): void; + nc_l1: () => void; + } + class c1 implements i1 { + public i1_p1: number; + // i1_f1 + public i1_f1() { + } + public i1_l1: () => void; + public i1_nc_p1: number; + public i1_nc_f1() { + } + public i1_nc_l1: () => void; + /** c1_p1*/ + public p1: number; + /** c1_f1*/ + public f1() { + } + /** c1_l1*/ + public l1: () => void; + /** c1_nc_p1*/ + public nc_p1: number; + /** c1_nc_f1*/ + public nc_f1() { + } + /** c1_nc_l1*/ + public nc_l1: () => void; + } + var i1_i: i1; + var c1_i = new c1(); + // assign to interface + i1_i = c1_i; + class c2 { + /** c2 c2_p1*/ + public c2_p1: number; + /** c2 c2_f1*/ + public c2_f1() { + } + /** c2 c2_prop*/ + public get c2_prop() { + return 10; + } + public c2_nc_p1: number; + public c2_nc_f1() { + } + public get c2_nc_prop() { + return 10; + } + /** c2 p1*/ + public p1: number; + /** c2 f1*/ + public f1() { + } + /** c2 prop*/ + public get prop() { + return 10; + } + public nc_p1: number; + public nc_f1() { + } + public get nc_prop() { + return 10; + } + /** c2 constructor*/ + constructor(a: number) { + this.c2_p1 = a; + } + } + class c3 extends c2 { + constructor() { + super(10); + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'c2'. + } + /** c3 p1*/ + public p1: number; + /** c3 f1*/ + public f1() { + } + /** c3 prop*/ + public get prop() { + return 10; + } + public nc_p1: number; + public nc_f1() { + } + public get nc_prop() { + return 10; + } + } + var c2_i = new c2(10); + var c3_i = new c3(); + // assign + c2_i = c3_i; + class c4 extends c2 { + } + var c4_i = new c4(10); + interface i2 { + /** i2_p1*/ + i2_p1: number; + /** i2_f1*/ + i2_f1(): void; + /** i2_l1*/ + i2_l1: () => void; + // i2_nc_p1 + i2_nc_p1: number; + i2_nc_f1(): void; + i2_nc_l1: () => void; + /** i2 p1*/ + p1: number; + /** i2 f1*/ + f1(): void; + /** i2 l1*/ + l1: () => void; + nc_p1: number; + nc_f1(): void; + nc_l1: () => void; + } + interface i3 extends i2 { + /** i3 p1 */ + p1: number; + /** + * i3 f1 + */ + f1(): void; + /** i3 l1*/ + l1: () => void; + nc_p1: number; + nc_f1(): void; + nc_l1: () => void; + } + var i2_i: i2; + var i3_i: i3; + // assign to interface + i2_i = i3_i; + \ No newline at end of file diff --git a/tests/baselines/reference/commentsInheritance.types b/tests/baselines/reference/commentsInheritance.types index e99a84a22e1..a5ee5704bc8 100644 --- a/tests/baselines/reference/commentsInheritance.types +++ b/tests/baselines/reference/commentsInheritance.types @@ -165,7 +165,7 @@ class c2 { this.c2_p1 = a; >this.c2_p1 = a : number >this.c2_p1 : number ->this : this +>this : c2 >c2_p1 : number >a : number } diff --git a/tests/baselines/reference/commentsdoNotEmitComments.types b/tests/baselines/reference/commentsdoNotEmitComments.types index 65599228e51..3c323b87ec8 100644 --- a/tests/baselines/reference/commentsdoNotEmitComments.types +++ b/tests/baselines/reference/commentsdoNotEmitComments.types @@ -42,7 +42,7 @@ class c { return this.b; >this.b : number ->this : this +>this : c >b : number } @@ -52,7 +52,7 @@ class c { return this.b; >this.b : number ->this : this +>this : c >b : number } @@ -64,7 +64,7 @@ class c { this.b = val; >this.b = val : number >this.b : number ->this : this +>this : c >b : number >val : number } diff --git a/tests/baselines/reference/commentsemitComments.types b/tests/baselines/reference/commentsemitComments.types index 9c839ddc2d5..7fa388815bf 100644 --- a/tests/baselines/reference/commentsemitComments.types +++ b/tests/baselines/reference/commentsemitComments.types @@ -42,7 +42,7 @@ class c { return this.b; >this.b : number ->this : this +>this : c >b : number } @@ -52,7 +52,7 @@ class c { return this.b; >this.b : number ->this : this +>this : c >b : number } @@ -64,7 +64,7 @@ class c { this.b = val; >this.b = val : number >this.b : number ->this : this +>this : c >b : number >val : number } diff --git a/tests/baselines/reference/complexClassRelationships.types b/tests/baselines/reference/complexClassRelationships.types index 2512e3402ea..2b12bf913ea 100644 --- a/tests/baselines/reference/complexClassRelationships.types +++ b/tests/baselines/reference/complexClassRelationships.types @@ -69,14 +69,14 @@ class Foo { return new GenericType(this); >new GenericType(this) : GenericType >GenericType : typeof GenericType ->this : this +>this : Foo } public populate() { >populate : () => void this.prop2; >this.prop2 : BaseCollection ->this : this +>this : Foo >prop2 : BaseCollection } public get prop2(): BaseCollection { diff --git a/tests/baselines/reference/complexNarrowingWithAny.types b/tests/baselines/reference/complexNarrowingWithAny.types index 1fb3d9bd6f8..503da26369d 100644 --- a/tests/baselines/reference/complexNarrowingWithAny.types +++ b/tests/baselines/reference/complexNarrowingWithAny.types @@ -1206,7 +1206,7 @@ class _View_AppComponent0 { >3 : 3 >requestNodeIndex : number >this._DefaultValueAccessor_3_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_3_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (3 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_3_4; } @@ -1223,7 +1223,7 @@ class _View_AppComponent0 { >3 : 3 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_3_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_3_4 : any[] if (((token === import47.FormControlName) && (3 === requestNodeIndex))) { return this._FormControlName_3_5; } @@ -1240,7 +1240,7 @@ class _View_AppComponent0 { >3 : 3 >requestNodeIndex : number >this._FormControlName_3_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_3_5 : import47.FormControlName if (((token === import50.NgControl) && (3 === requestNodeIndex))) { return this._NgControl_3_6; } @@ -1257,7 +1257,7 @@ class _View_AppComponent0 { >3 : 3 >requestNodeIndex : number >this._NgControl_3_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_3_6 : any if (((token === import45.NgControlStatus) && (3 === requestNodeIndex))) { return this._NgControlStatus_3_7; } @@ -1274,7 +1274,7 @@ class _View_AppComponent0 { >3 : 3 >requestNodeIndex : number >this._NgControlStatus_3_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_3_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (6 === requestNodeIndex))) { return this._DefaultValueAccessor_6_3; } @@ -1291,7 +1291,7 @@ class _View_AppComponent0 { >6 : 6 >requestNodeIndex : number >this._DefaultValueAccessor_6_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_6_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (6 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_6_4; } @@ -1308,7 +1308,7 @@ class _View_AppComponent0 { >6 : 6 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_6_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_6_4 : any[] if (((token === import47.FormControlName) && (6 === requestNodeIndex))) { return this._FormControlName_6_5; } @@ -1325,7 +1325,7 @@ class _View_AppComponent0 { >6 : 6 >requestNodeIndex : number >this._FormControlName_6_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_6_5 : import47.FormControlName if (((token === import50.NgControl) && (6 === requestNodeIndex))) { return this._NgControl_6_6; } @@ -1342,7 +1342,7 @@ class _View_AppComponent0 { >6 : 6 >requestNodeIndex : number >this._NgControl_6_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_6_6 : any if (((token === import45.NgControlStatus) && (6 === requestNodeIndex))) { return this._NgControlStatus_6_7; } @@ -1359,7 +1359,7 @@ class _View_AppComponent0 { >6 : 6 >requestNodeIndex : number >this._NgControlStatus_6_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_6_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (9 === requestNodeIndex))) { return this._DefaultValueAccessor_9_3; } @@ -1376,7 +1376,7 @@ class _View_AppComponent0 { >9 : 9 >requestNodeIndex : number >this._DefaultValueAccessor_9_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_9_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (9 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_9_4; } @@ -1393,7 +1393,7 @@ class _View_AppComponent0 { >9 : 9 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_9_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_9_4 : any[] if (((token === import47.FormControlName) && (9 === requestNodeIndex))) { return this._FormControlName_9_5; } @@ -1410,7 +1410,7 @@ class _View_AppComponent0 { >9 : 9 >requestNodeIndex : number >this._FormControlName_9_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_9_5 : import47.FormControlName if (((token === import50.NgControl) && (9 === requestNodeIndex))) { return this._NgControl_9_6; } @@ -1427,7 +1427,7 @@ class _View_AppComponent0 { >9 : 9 >requestNodeIndex : number >this._NgControl_9_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_9_6 : any if (((token === import45.NgControlStatus) && (9 === requestNodeIndex))) { return this._NgControlStatus_9_7; } @@ -1444,7 +1444,7 @@ class _View_AppComponent0 { >9 : 9 >requestNodeIndex : number >this._NgControlStatus_9_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_9_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (12 === requestNodeIndex))) { return this._DefaultValueAccessor_12_3; } @@ -1461,7 +1461,7 @@ class _View_AppComponent0 { >12 : 12 >requestNodeIndex : number >this._DefaultValueAccessor_12_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_12_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (12 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_12_4; } @@ -1478,7 +1478,7 @@ class _View_AppComponent0 { >12 : 12 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_12_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_12_4 : any[] if (((token === import47.FormControlName) && (12 === requestNodeIndex))) { return this._FormControlName_12_5; } @@ -1495,7 +1495,7 @@ class _View_AppComponent0 { >12 : 12 >requestNodeIndex : number >this._FormControlName_12_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_12_5 : import47.FormControlName if (((token === import50.NgControl) && (12 === requestNodeIndex))) { return this._NgControl_12_6; } @@ -1512,7 +1512,7 @@ class _View_AppComponent0 { >12 : 12 >requestNodeIndex : number >this._NgControl_12_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_12_6 : any if (((token === import45.NgControlStatus) && (12 === requestNodeIndex))) { return this._NgControlStatus_12_7; } @@ -1529,7 +1529,7 @@ class _View_AppComponent0 { >12 : 12 >requestNodeIndex : number >this._NgControlStatus_12_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_12_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (15 === requestNodeIndex))) { return this._DefaultValueAccessor_15_3; } @@ -1546,7 +1546,7 @@ class _View_AppComponent0 { >15 : 15 >requestNodeIndex : number >this._DefaultValueAccessor_15_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_15_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (15 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_15_4; } @@ -1563,7 +1563,7 @@ class _View_AppComponent0 { >15 : 15 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_15_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_15_4 : any[] if (((token === import47.FormControlName) && (15 === requestNodeIndex))) { return this._FormControlName_15_5; } @@ -1580,7 +1580,7 @@ class _View_AppComponent0 { >15 : 15 >requestNodeIndex : number >this._FormControlName_15_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_15_5 : import47.FormControlName if (((token === import50.NgControl) && (15 === requestNodeIndex))) { return this._NgControl_15_6; } @@ -1597,7 +1597,7 @@ class _View_AppComponent0 { >15 : 15 >requestNodeIndex : number >this._NgControl_15_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_15_6 : any if (((token === import45.NgControlStatus) && (15 === requestNodeIndex))) { return this._NgControlStatus_15_7; } @@ -1614,7 +1614,7 @@ class _View_AppComponent0 { >15 : 15 >requestNodeIndex : number >this._NgControlStatus_15_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_15_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (18 === requestNodeIndex))) { return this._DefaultValueAccessor_18_3; } @@ -1631,7 +1631,7 @@ class _View_AppComponent0 { >18 : 18 >requestNodeIndex : number >this._DefaultValueAccessor_18_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_18_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (18 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_18_4; } @@ -1648,7 +1648,7 @@ class _View_AppComponent0 { >18 : 18 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_18_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_18_4 : any[] if (((token === import47.FormControlName) && (18 === requestNodeIndex))) { return this._FormControlName_18_5; } @@ -1665,7 +1665,7 @@ class _View_AppComponent0 { >18 : 18 >requestNodeIndex : number >this._FormControlName_18_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_18_5 : import47.FormControlName if (((token === import50.NgControl) && (18 === requestNodeIndex))) { return this._NgControl_18_6; } @@ -1682,7 +1682,7 @@ class _View_AppComponent0 { >18 : 18 >requestNodeIndex : number >this._NgControl_18_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_18_6 : any if (((token === import45.NgControlStatus) && (18 === requestNodeIndex))) { return this._NgControlStatus_18_7; } @@ -1699,7 +1699,7 @@ class _View_AppComponent0 { >18 : 18 >requestNodeIndex : number >this._NgControlStatus_18_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_18_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (21 === requestNodeIndex))) { return this._DefaultValueAccessor_21_3; } @@ -1716,7 +1716,7 @@ class _View_AppComponent0 { >21 : 21 >requestNodeIndex : number >this._DefaultValueAccessor_21_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_21_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (21 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_21_4; } @@ -1733,7 +1733,7 @@ class _View_AppComponent0 { >21 : 21 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_21_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_21_4 : any[] if (((token === import47.FormControlName) && (21 === requestNodeIndex))) { return this._FormControlName_21_5; } @@ -1750,7 +1750,7 @@ class _View_AppComponent0 { >21 : 21 >requestNodeIndex : number >this._FormControlName_21_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_21_5 : import47.FormControlName if (((token === import50.NgControl) && (21 === requestNodeIndex))) { return this._NgControl_21_6; } @@ -1767,7 +1767,7 @@ class _View_AppComponent0 { >21 : 21 >requestNodeIndex : number >this._NgControl_21_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_21_6 : any if (((token === import45.NgControlStatus) && (21 === requestNodeIndex))) { return this._NgControlStatus_21_7; } @@ -1784,7 +1784,7 @@ class _View_AppComponent0 { >21 : 21 >requestNodeIndex : number >this._NgControlStatus_21_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_21_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (24 === requestNodeIndex))) { return this._DefaultValueAccessor_24_3; } @@ -1801,7 +1801,7 @@ class _View_AppComponent0 { >24 : 24 >requestNodeIndex : number >this._DefaultValueAccessor_24_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_24_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (24 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_24_4; } @@ -1818,7 +1818,7 @@ class _View_AppComponent0 { >24 : 24 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_24_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_24_4 : any[] if (((token === import47.FormControlName) && (24 === requestNodeIndex))) { return this._FormControlName_24_5; } @@ -1835,7 +1835,7 @@ class _View_AppComponent0 { >24 : 24 >requestNodeIndex : number >this._FormControlName_24_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_24_5 : import47.FormControlName if (((token === import50.NgControl) && (24 === requestNodeIndex))) { return this._NgControl_24_6; } @@ -1852,7 +1852,7 @@ class _View_AppComponent0 { >24 : 24 >requestNodeIndex : number >this._NgControl_24_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_24_6 : any if (((token === import45.NgControlStatus) && (24 === requestNodeIndex))) { return this._NgControlStatus_24_7; } @@ -1869,7 +1869,7 @@ class _View_AppComponent0 { >24 : 24 >requestNodeIndex : number >this._NgControlStatus_24_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_24_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (27 === requestNodeIndex))) { return this._DefaultValueAccessor_27_3; } @@ -1886,7 +1886,7 @@ class _View_AppComponent0 { >27 : 27 >requestNodeIndex : number >this._DefaultValueAccessor_27_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_27_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (27 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_27_4; } @@ -1903,7 +1903,7 @@ class _View_AppComponent0 { >27 : 27 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_27_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_27_4 : any[] if (((token === import47.FormControlName) && (27 === requestNodeIndex))) { return this._FormControlName_27_5; } @@ -1920,7 +1920,7 @@ class _View_AppComponent0 { >27 : 27 >requestNodeIndex : number >this._FormControlName_27_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_27_5 : import47.FormControlName if (((token === import50.NgControl) && (27 === requestNodeIndex))) { return this._NgControl_27_6; } @@ -1937,7 +1937,7 @@ class _View_AppComponent0 { >27 : 27 >requestNodeIndex : number >this._NgControl_27_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_27_6 : any if (((token === import45.NgControlStatus) && (27 === requestNodeIndex))) { return this._NgControlStatus_27_7; } @@ -1954,7 +1954,7 @@ class _View_AppComponent0 { >27 : 27 >requestNodeIndex : number >this._NgControlStatus_27_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_27_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (30 === requestNodeIndex))) { return this._DefaultValueAccessor_30_3; } @@ -1971,7 +1971,7 @@ class _View_AppComponent0 { >30 : 30 >requestNodeIndex : number >this._DefaultValueAccessor_30_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_30_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (30 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_30_4; } @@ -1988,7 +1988,7 @@ class _View_AppComponent0 { >30 : 30 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_30_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_30_4 : any[] if (((token === import47.FormControlName) && (30 === requestNodeIndex))) { return this._FormControlName_30_5; } @@ -2005,7 +2005,7 @@ class _View_AppComponent0 { >30 : 30 >requestNodeIndex : number >this._FormControlName_30_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_30_5 : import47.FormControlName if (((token === import50.NgControl) && (30 === requestNodeIndex))) { return this._NgControl_30_6; } @@ -2022,7 +2022,7 @@ class _View_AppComponent0 { >30 : 30 >requestNodeIndex : number >this._NgControl_30_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_30_6 : any if (((token === import45.NgControlStatus) && (30 === requestNodeIndex))) { return this._NgControlStatus_30_7; } @@ -2039,7 +2039,7 @@ class _View_AppComponent0 { >30 : 30 >requestNodeIndex : number >this._NgControlStatus_30_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_30_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (33 === requestNodeIndex))) { return this._DefaultValueAccessor_33_3; } @@ -2056,7 +2056,7 @@ class _View_AppComponent0 { >33 : 33 >requestNodeIndex : number >this._DefaultValueAccessor_33_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_33_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (33 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_33_4; } @@ -2073,7 +2073,7 @@ class _View_AppComponent0 { >33 : 33 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_33_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_33_4 : any[] if (((token === import47.FormControlName) && (33 === requestNodeIndex))) { return this._FormControlName_33_5; } @@ -2090,7 +2090,7 @@ class _View_AppComponent0 { >33 : 33 >requestNodeIndex : number >this._FormControlName_33_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_33_5 : import47.FormControlName if (((token === import50.NgControl) && (33 === requestNodeIndex))) { return this._NgControl_33_6; } @@ -2107,7 +2107,7 @@ class _View_AppComponent0 { >33 : 33 >requestNodeIndex : number >this._NgControl_33_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_33_6 : any if (((token === import45.NgControlStatus) && (33 === requestNodeIndex))) { return this._NgControlStatus_33_7; } @@ -2124,7 +2124,7 @@ class _View_AppComponent0 { >33 : 33 >requestNodeIndex : number >this._NgControlStatus_33_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_33_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (36 === requestNodeIndex))) { return this._DefaultValueAccessor_36_3; } @@ -2141,7 +2141,7 @@ class _View_AppComponent0 { >36 : 36 >requestNodeIndex : number >this._DefaultValueAccessor_36_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_36_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (36 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_36_4; } @@ -2158,7 +2158,7 @@ class _View_AppComponent0 { >36 : 36 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_36_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_36_4 : any[] if (((token === import47.FormControlName) && (36 === requestNodeIndex))) { return this._FormControlName_36_5; } @@ -2175,7 +2175,7 @@ class _View_AppComponent0 { >36 : 36 >requestNodeIndex : number >this._FormControlName_36_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_36_5 : import47.FormControlName if (((token === import50.NgControl) && (36 === requestNodeIndex))) { return this._NgControl_36_6; } @@ -2192,7 +2192,7 @@ class _View_AppComponent0 { >36 : 36 >requestNodeIndex : number >this._NgControl_36_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_36_6 : any if (((token === import45.NgControlStatus) && (36 === requestNodeIndex))) { return this._NgControlStatus_36_7; } @@ -2209,7 +2209,7 @@ class _View_AppComponent0 { >36 : 36 >requestNodeIndex : number >this._NgControlStatus_36_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_36_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (39 === requestNodeIndex))) { return this._DefaultValueAccessor_39_3; } @@ -2226,7 +2226,7 @@ class _View_AppComponent0 { >39 : 39 >requestNodeIndex : number >this._DefaultValueAccessor_39_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_39_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (39 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_39_4; } @@ -2243,7 +2243,7 @@ class _View_AppComponent0 { >39 : 39 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_39_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_39_4 : any[] if (((token === import47.FormControlName) && (39 === requestNodeIndex))) { return this._FormControlName_39_5; } @@ -2260,7 +2260,7 @@ class _View_AppComponent0 { >39 : 39 >requestNodeIndex : number >this._FormControlName_39_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_39_5 : import47.FormControlName if (((token === import50.NgControl) && (39 === requestNodeIndex))) { return this._NgControl_39_6; } @@ -2277,7 +2277,7 @@ class _View_AppComponent0 { >39 : 39 >requestNodeIndex : number >this._NgControl_39_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_39_6 : any if (((token === import45.NgControlStatus) && (39 === requestNodeIndex))) { return this._NgControlStatus_39_7; } @@ -2294,7 +2294,7 @@ class _View_AppComponent0 { >39 : 39 >requestNodeIndex : number >this._NgControlStatus_39_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_39_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (42 === requestNodeIndex))) { return this._DefaultValueAccessor_42_3; } @@ -2311,7 +2311,7 @@ class _View_AppComponent0 { >42 : 42 >requestNodeIndex : number >this._DefaultValueAccessor_42_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_42_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (42 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_42_4; } @@ -2328,7 +2328,7 @@ class _View_AppComponent0 { >42 : 42 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_42_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_42_4 : any[] if (((token === import47.FormControlName) && (42 === requestNodeIndex))) { return this._FormControlName_42_5; } @@ -2345,7 +2345,7 @@ class _View_AppComponent0 { >42 : 42 >requestNodeIndex : number >this._FormControlName_42_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_42_5 : import47.FormControlName if (((token === import50.NgControl) && (42 === requestNodeIndex))) { return this._NgControl_42_6; } @@ -2362,7 +2362,7 @@ class _View_AppComponent0 { >42 : 42 >requestNodeIndex : number >this._NgControl_42_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_42_6 : any if (((token === import45.NgControlStatus) && (42 === requestNodeIndex))) { return this._NgControlStatus_42_7; } @@ -2379,7 +2379,7 @@ class _View_AppComponent0 { >42 : 42 >requestNodeIndex : number >this._NgControlStatus_42_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_42_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (45 === requestNodeIndex))) { return this._DefaultValueAccessor_45_3; } @@ -2396,7 +2396,7 @@ class _View_AppComponent0 { >45 : 45 >requestNodeIndex : number >this._DefaultValueAccessor_45_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_45_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (45 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_45_4; } @@ -2413,7 +2413,7 @@ class _View_AppComponent0 { >45 : 45 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_45_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_45_4 : any[] if (((token === import47.FormControlName) && (45 === requestNodeIndex))) { return this._FormControlName_45_5; } @@ -2430,7 +2430,7 @@ class _View_AppComponent0 { >45 : 45 >requestNodeIndex : number >this._FormControlName_45_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_45_5 : import47.FormControlName if (((token === import50.NgControl) && (45 === requestNodeIndex))) { return this._NgControl_45_6; } @@ -2447,7 +2447,7 @@ class _View_AppComponent0 { >45 : 45 >requestNodeIndex : number >this._NgControl_45_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_45_6 : any if (((token === import45.NgControlStatus) && (45 === requestNodeIndex))) { return this._NgControlStatus_45_7; } @@ -2464,7 +2464,7 @@ class _View_AppComponent0 { >45 : 45 >requestNodeIndex : number >this._NgControlStatus_45_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_45_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (48 === requestNodeIndex))) { return this._DefaultValueAccessor_48_3; } @@ -2481,7 +2481,7 @@ class _View_AppComponent0 { >48 : 48 >requestNodeIndex : number >this._DefaultValueAccessor_48_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_48_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (48 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_48_4; } @@ -2498,7 +2498,7 @@ class _View_AppComponent0 { >48 : 48 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_48_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_48_4 : any[] if (((token === import47.FormControlName) && (48 === requestNodeIndex))) { return this._FormControlName_48_5; } @@ -2515,7 +2515,7 @@ class _View_AppComponent0 { >48 : 48 >requestNodeIndex : number >this._FormControlName_48_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_48_5 : import47.FormControlName if (((token === import50.NgControl) && (48 === requestNodeIndex))) { return this._NgControl_48_6; } @@ -2532,7 +2532,7 @@ class _View_AppComponent0 { >48 : 48 >requestNodeIndex : number >this._NgControl_48_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_48_6 : any if (((token === import45.NgControlStatus) && (48 === requestNodeIndex))) { return this._NgControlStatus_48_7; } @@ -2549,7 +2549,7 @@ class _View_AppComponent0 { >48 : 48 >requestNodeIndex : number >this._NgControlStatus_48_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_48_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (51 === requestNodeIndex))) { return this._DefaultValueAccessor_51_3; } @@ -2566,7 +2566,7 @@ class _View_AppComponent0 { >51 : 51 >requestNodeIndex : number >this._DefaultValueAccessor_51_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_51_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (51 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_51_4; } @@ -2583,7 +2583,7 @@ class _View_AppComponent0 { >51 : 51 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_51_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_51_4 : any[] if (((token === import47.FormControlName) && (51 === requestNodeIndex))) { return this._FormControlName_51_5; } @@ -2600,7 +2600,7 @@ class _View_AppComponent0 { >51 : 51 >requestNodeIndex : number >this._FormControlName_51_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_51_5 : import47.FormControlName if (((token === import50.NgControl) && (51 === requestNodeIndex))) { return this._NgControl_51_6; } @@ -2617,7 +2617,7 @@ class _View_AppComponent0 { >51 : 51 >requestNodeIndex : number >this._NgControl_51_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_51_6 : any if (((token === import45.NgControlStatus) && (51 === requestNodeIndex))) { return this._NgControlStatus_51_7; } @@ -2634,7 +2634,7 @@ class _View_AppComponent0 { >51 : 51 >requestNodeIndex : number >this._NgControlStatus_51_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_51_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (54 === requestNodeIndex))) { return this._DefaultValueAccessor_54_3; } @@ -2651,7 +2651,7 @@ class _View_AppComponent0 { >54 : 54 >requestNodeIndex : number >this._DefaultValueAccessor_54_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_54_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (54 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_54_4; } @@ -2668,7 +2668,7 @@ class _View_AppComponent0 { >54 : 54 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_54_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_54_4 : any[] if (((token === import47.FormControlName) && (54 === requestNodeIndex))) { return this._FormControlName_54_5; } @@ -2685,7 +2685,7 @@ class _View_AppComponent0 { >54 : 54 >requestNodeIndex : number >this._FormControlName_54_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_54_5 : import47.FormControlName if (((token === import50.NgControl) && (54 === requestNodeIndex))) { return this._NgControl_54_6; } @@ -2702,7 +2702,7 @@ class _View_AppComponent0 { >54 : 54 >requestNodeIndex : number >this._NgControl_54_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_54_6 : any if (((token === import45.NgControlStatus) && (54 === requestNodeIndex))) { return this._NgControlStatus_54_7; } @@ -2719,7 +2719,7 @@ class _View_AppComponent0 { >54 : 54 >requestNodeIndex : number >this._NgControlStatus_54_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_54_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (57 === requestNodeIndex))) { return this._DefaultValueAccessor_57_3; } @@ -2736,7 +2736,7 @@ class _View_AppComponent0 { >57 : 57 >requestNodeIndex : number >this._DefaultValueAccessor_57_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_57_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (57 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_57_4; } @@ -2753,7 +2753,7 @@ class _View_AppComponent0 { >57 : 57 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_57_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_57_4 : any[] if (((token === import47.FormControlName) && (57 === requestNodeIndex))) { return this._FormControlName_57_5; } @@ -2770,7 +2770,7 @@ class _View_AppComponent0 { >57 : 57 >requestNodeIndex : number >this._FormControlName_57_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_57_5 : import47.FormControlName if (((token === import50.NgControl) && (57 === requestNodeIndex))) { return this._NgControl_57_6; } @@ -2787,7 +2787,7 @@ class _View_AppComponent0 { >57 : 57 >requestNodeIndex : number >this._NgControl_57_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_57_6 : any if (((token === import45.NgControlStatus) && (57 === requestNodeIndex))) { return this._NgControlStatus_57_7; } @@ -2804,7 +2804,7 @@ class _View_AppComponent0 { >57 : 57 >requestNodeIndex : number >this._NgControlStatus_57_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_57_7 : import45.NgControlStatus if (((token === import46.DefaultValueAccessor) && (60 === requestNodeIndex))) { return this._DefaultValueAccessor_60_3; } @@ -2821,7 +2821,7 @@ class _View_AppComponent0 { >60 : 60 >requestNodeIndex : number >this._DefaultValueAccessor_60_3 : import46.DefaultValueAccessor ->this : this +>this : _View_AppComponent0 >_DefaultValueAccessor_60_3 : import46.DefaultValueAccessor if (((token === import49.NG_VALUE_ACCESSOR) && (60 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_60_4; } @@ -2838,7 +2838,7 @@ class _View_AppComponent0 { >60 : 60 >requestNodeIndex : number >this._NG_VALUE_ACCESSOR_60_4 : any[] ->this : this +>this : _View_AppComponent0 >_NG_VALUE_ACCESSOR_60_4 : any[] if (((token === import47.FormControlName) && (60 === requestNodeIndex))) { return this._FormControlName_60_5; } @@ -2855,7 +2855,7 @@ class _View_AppComponent0 { >60 : 60 >requestNodeIndex : number >this._FormControlName_60_5 : import47.FormControlName ->this : this +>this : _View_AppComponent0 >_FormControlName_60_5 : import47.FormControlName if (((token === import50.NgControl) && (60 === requestNodeIndex))) { return this._NgControl_60_6; } @@ -2872,7 +2872,7 @@ class _View_AppComponent0 { >60 : 60 >requestNodeIndex : number >this._NgControl_60_6 : any ->this : this +>this : _View_AppComponent0 >_NgControl_60_6 : any if (((token === import45.NgControlStatus) && (60 === requestNodeIndex))) { return this._NgControlStatus_60_7; } @@ -2889,7 +2889,7 @@ class _View_AppComponent0 { >60 : 60 >requestNodeIndex : number >this._NgControlStatus_60_7 : import45.NgControlStatus ->this : this +>this : _View_AppComponent0 >_NgControlStatus_60_7 : import45.NgControlStatus if (((token === import44.FormGroupDirective) && ((1 <= requestNodeIndex) && (requestNodeIndex <= 62)))) { return this._FormGroupDirective_1_3; } @@ -2912,7 +2912,7 @@ class _View_AppComponent0 { >requestNodeIndex : number >62 : 62 >this._FormGroupDirective_1_3 : import44.FormGroupDirective ->this : this +>this : _View_AppComponent0 >_FormGroupDirective_1_3 : import44.FormGroupDirective if (((token === import51.ControlContainer) && ((1 <= requestNodeIndex) && (requestNodeIndex <= 62)))) { return this._ControlContainer_1_4; } @@ -2935,7 +2935,7 @@ class _View_AppComponent0 { >requestNodeIndex : number >62 : 62 >this._ControlContainer_1_4 : any ->this : this +>this : _View_AppComponent0 >_ControlContainer_1_4 : any if (((token === import45.NgControlStatusGroup) && ((1 <= requestNodeIndex) && (requestNodeIndex <= 62)))) { return this._NgControlStatusGroup_1_5; } @@ -2958,7 +2958,7 @@ class _View_AppComponent0 { >requestNodeIndex : number >62 : 62 >this._NgControlStatusGroup_1_5 : import45.NgControlStatusGroup ->this : this +>this : _View_AppComponent0 >_NgControlStatusGroup_1_5 : import45.NgControlStatusGroup return notFoundResult; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt b/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt index 4ccb502f851..171ce4c7004 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt @@ -33,6 +33,7 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(59,9): error TS1128: Declaration or statement expected. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(62,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(63,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(68,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(69,15): error TS1034: 'super' must be followed by an argument list or member access. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(70,15): error TS1034: 'super' must be followed by an argument list or member access. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(74,15): error TS1034: 'super' must be followed by an argument list or member access. @@ -76,7 +77,7 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(122,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -==== tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts (76 errors) ==== +==== tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts (77 errors) ==== // expected error for all the LHS of compound assignments (arithmetic and addition) var value: any; @@ -215,6 +216,8 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa class Derived extends C { constructor() { super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. super *= value; ~~ !!! error TS1034: 'super' must be followed by an argument list or member access. diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.types b/tests/baselines/reference/compoundAssignmentLHSIsValue.types index 1b29281e03e..8503be1dba4 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.types +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.types @@ -10,12 +10,12 @@ class C { constructor() { this *= value; >this *= value : number ->this : this +>this : C >value : any this += value; >this += value : any ->this : this +>this : C >value : any } foo() { @@ -23,12 +23,12 @@ class C { this *= value; >this *= value : number ->this : this +>this : C >value : any this += value; >this += value : any ->this : this +>this : C >value : any } static sfoo() { diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt index 395b39a201f..9bccffb8890 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt @@ -16,6 +16,7 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(40,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(43,10): error TS1128: Declaration or statement expected. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(46,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(51,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(52,15): error TS1034: 'super' must be followed by an argument list or member access. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(56,15): error TS1034: 'super' must be followed by an argument list or member access. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(60,15): error TS1034: 'super' must be followed by an argument list or member access. @@ -39,7 +40,7 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(85,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -==== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts (39 errors) ==== +==== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts (40 errors) ==== // expected error for all the LHS of compound assignments (arithmetic and addition) var value: any; @@ -127,6 +128,8 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm class Derived extends C { constructor() { super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. super **= value; ~~~ !!! error TS1034: 'super' must be followed by an argument list or member access. diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.types b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.types index bcabf2c7616..e783261aa78 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.types +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.types @@ -10,7 +10,7 @@ class C { constructor() { this **= value; >this **= value : number ->this : this +>this : C >value : any } foo() { @@ -18,7 +18,7 @@ class C { this **= value; >this **= value : number ->this : this +>this : C >value : any } static sfoo() { diff --git a/tests/baselines/reference/computedPropertyNames22_ES5.types b/tests/baselines/reference/computedPropertyNames22_ES5.types index 64b9f6adcac..b0f3fec064f 100644 --- a/tests/baselines/reference/computedPropertyNames22_ES5.types +++ b/tests/baselines/reference/computedPropertyNames22_ES5.types @@ -13,7 +13,7 @@ class C { >[this.bar()] : () => void >this.bar() : number >this.bar : () => number ->this : this +>this : C >bar : () => number }; diff --git a/tests/baselines/reference/computedPropertyNames22_ES6.types b/tests/baselines/reference/computedPropertyNames22_ES6.types index 5265ea17cd1..4862dc79436 100644 --- a/tests/baselines/reference/computedPropertyNames22_ES6.types +++ b/tests/baselines/reference/computedPropertyNames22_ES6.types @@ -13,7 +13,7 @@ class C { >[this.bar()] : () => void >this.bar() : number >this.bar : () => number ->this : this +>this : C >bar : () => number }; diff --git a/tests/baselines/reference/computedPropertyNames29_ES5.types b/tests/baselines/reference/computedPropertyNames29_ES5.types index 5d08d3c6ee7..14fc3918da5 100644 --- a/tests/baselines/reference/computedPropertyNames29_ES5.types +++ b/tests/baselines/reference/computedPropertyNames29_ES5.types @@ -16,7 +16,7 @@ class C { >[this.bar()] : () => void >this.bar() : number >this.bar : () => number ->this : this +>this : C >bar : () => number }; diff --git a/tests/baselines/reference/computedPropertyNames29_ES6.types b/tests/baselines/reference/computedPropertyNames29_ES6.types index 093c844bb10..f6faff48cf8 100644 --- a/tests/baselines/reference/computedPropertyNames29_ES6.types +++ b/tests/baselines/reference/computedPropertyNames29_ES6.types @@ -16,7 +16,7 @@ class C { >[this.bar()] : () => void >this.bar() : number >this.bar : () => number ->this : this +>this : C >bar : () => number }; diff --git a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.errors.txt b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.errors.txt index acb5354e1f0..16f3a7f9b4a 100644 --- a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.errors.txt +++ b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.errors.txt @@ -3,14 +3,13 @@ tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(29,21): error T tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(39,3): error TS2322: Type '{ x: T; y: T; }' is not assignable to type 'T extends T ? { x: T; y: T; } : never'. tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(46,3): error TS2322: Type 'string' is not assignable to type 'Foo'. tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(63,9): error TS2322: Type '{ a: number; b: number; }' is not assignable to type '[T] extends [[infer U]] ? U : { b: number; }'. -tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(95,23): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Unwrap'. tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(106,3): error TS2322: Type 'Q' is not assignable to type 'InferBecauseWhyNot'. Type '(arg: any) => any' is not assignable to type 'InferBecauseWhyNot'. tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(116,3): error TS2322: Type 'Q' is not assignable to type 'InferBecauseWhyNotDistributive'. Type '(arg: any) => any' is not assignable to type 'InferBecauseWhyNotDistributive'. -==== tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts (8 errors) ==== +==== tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts (7 errors) ==== export type FilterPropsByType = { [K in keyof T]: T[K] extends TT ? K : never }[keyof T]; @@ -116,8 +115,6 @@ tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(116,3): error T method() { set(this, "prop", "hi"); // <-- type error - ~~~~ -!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'Unwrap'. } } diff --git a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types index 154a5472037..8d6b66e95ed 100644 --- a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types +++ b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types @@ -260,9 +260,9 @@ class Foo2 { >method : () => void set(this, "prop", "hi"); // <-- type error ->set(this, "prop", "hi") : Unwrap +>set(this, "prop", "hi") : string >set : (obj: T, key: K, value: Unwrap) => Unwrap ->this : this +>this : Foo2 >"prop" : "prop" >"hi" : "hi" } diff --git a/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.types b/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.types index bd23fdcfdcc..f0de29789b9 100644 --- a/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.types +++ b/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.types @@ -19,7 +19,7 @@ class Rule { this.name = name; >this.name = name : string >this.name : string ->this : this +>this : Rule >name : string >name : string } diff --git a/tests/baselines/reference/constructorArgs.errors.txt b/tests/baselines/reference/constructorArgs.errors.txt new file mode 100644 index 00000000000..c5f74c9917d --- /dev/null +++ b/tests/baselines/reference/constructorArgs.errors.txt @@ -0,0 +1,21 @@ +tests/cases/compiler/constructorArgs.ts(12,3): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Super'. + + +==== tests/cases/compiler/constructorArgs.ts (1 errors) ==== + interface Options { + value: number; + } + + class Super { + constructor(value:number) { + } + } + + class Sub extends Super { + constructor(public options:Options) { + super(options.value); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Super'. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.errors.txt b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.errors.txt new file mode 100644 index 00000000000..6cf46801970 --- /dev/null +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.errors.txt @@ -0,0 +1,41 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/constructorFunctionTypeIsAssignableToBaseType2.ts(18,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/constructorFunctionTypeIsAssignableToBaseType2.ts(29,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + + +==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/constructorFunctionTypeIsAssignableToBaseType2.ts (2 errors) ==== + // the constructor function itself does not need to be a subtype of the base type constructor function + + class Base { + static foo: { + bar: Object; + } + constructor(x: Object) { + } + } + + class Derived extends Base { + // ok + static foo: { + bar: number; + } + + constructor(x: number) { + super(x); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + } + } + + class Derived2 extends Base { + static foo: { + bar: number; + } + + // ok, not enforcing assignability relation on this + constructor(x: any) { + super(x); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + return 1; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/constructorOverloads2.errors.txt b/tests/baselines/reference/constructorOverloads2.errors.txt new file mode 100644 index 00000000000..ea3d66cbcc4 --- /dev/null +++ b/tests/baselines/reference/constructorOverloads2.errors.txt @@ -0,0 +1,39 @@ +tests/cases/compiler/constructorOverloads2.ts(14,9): error TS2769: No overload matches this call. + Overload 1 of 2, '(s: string): FooBase', gave the following error. + The 'this' context of type 'void' is not assignable to method's 'this' of type 'FooBase'. + Overload 2 of 2, '(n: number): FooBase', gave the following error. + The 'this' context of type 'void' is not assignable to method's 'this' of type 'FooBase'. + + +==== tests/cases/compiler/constructorOverloads2.ts (1 errors) ==== + class FooBase { + constructor(s: string); + constructor(n: number); + constructor(x: any) { + } + bar1() { /*WScript.Echo("base bar1");*/ } + } + + class Foo extends FooBase { + constructor(s: string); + constructor(n: number); + constructor(a:any); + constructor(x: any, y?: any) { + super(x); + ~~~~~~~~ +!!! error TS2769: No overload matches this call. +!!! error TS2769: Overload 1 of 2, '(s: string): FooBase', gave the following error. +!!! error TS2769: The 'this' context of type 'void' is not assignable to method's 'this' of type 'FooBase'. +!!! error TS2769: Overload 2 of 2, '(n: number): FooBase', gave the following error. +!!! error TS2769: The 'this' context of type 'void' is not assignable to method's 'this' of type 'FooBase'. + } + bar1() { /*WScript.Echo("bar1");*/ } + } + + var f1 = new Foo("hey"); + var f2 = new Foo(0); + var f3 = new Foo(f1); + var f4 = new Foo([f1,f2,f3]); + + f1.bar1(); + \ No newline at end of file diff --git a/tests/baselines/reference/constructorWithCapturedSuper.errors.txt b/tests/baselines/reference/constructorWithCapturedSuper.errors.txt new file mode 100644 index 00000000000..28fb937de73 --- /dev/null +++ b/tests/baselines/reference/constructorWithCapturedSuper.errors.txt @@ -0,0 +1,64 @@ +tests/cases/compiler/constructorWithCapturedSuper.ts(11,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. +tests/cases/compiler/constructorWithCapturedSuper.ts(32,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. +tests/cases/compiler/constructorWithCapturedSuper.ts(44,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/compiler/constructorWithCapturedSuper.ts (3 errors) ==== + let oneA: A; + + class A { + constructor() { + return oneA; + } + } + + class B extends A { + constructor(x: number) { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + if (x === 1) { + return; + } + while (x < 2) { + return; + } + try { + return + } + catch (e) { + return; + } + finally { + return; + } + } + } + + class C extends A { + constructor(x: number) { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + for (let i = 0; i < 10; ++i) { + () => i + x; + if (x === 1) { + return; + } + } + } + } + + class D extends A { + constructor(x: number) { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + () => { + return; + } + function foo() { + return; + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.types b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.types index b9c4cf94904..7cf6969dd21 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.types +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.types @@ -885,7 +885,7 @@ module TypeScriptAllInOne { return this.method1(2); >this.method1(2) : any >this.method1 : any ->this : this +>this : B >method1 : any >2 : 2 } diff --git a/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack.types b/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack.types index 549783e0d36..86a241fc47c 100644 --- a/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack.types +++ b/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack.types @@ -32,7 +32,7 @@ export default class Operation { >(this as any).getParameter : any >(this as any) : any >this as any : any ->this : this +>this : Operation >getParameter : any const values = (this as any).getValues(); @@ -41,7 +41,7 @@ export default class Operation { >(this as any).getValues : any >(this as any) : any >this as any : any ->this : this +>this : Operation >getValues : any const innerResult = parameter.validate(values[parameter.oaParameter.name]); diff --git a/tests/baselines/reference/contextualTypeAppliedToVarArgs.types b/tests/baselines/reference/contextualTypeAppliedToVarArgs.types index df6ead16095..cbd16aea35f 100644 --- a/tests/baselines/reference/contextualTypeAppliedToVarArgs.types +++ b/tests/baselines/reference/contextualTypeAppliedToVarArgs.types @@ -21,7 +21,7 @@ class Foo{ delegate(this, function (source, args2) >delegate(this, function (source, args2) { var a = source.node; var b = args2.node; } ) : (...args: any[]) => any >delegate : (instance: any, method: (...args: any[]) => any, data?: any) => (...args: any[]) => any ->this : this +>this : Foo >function (source, args2) { var a = source.node; var b = args2.node; } : (source: any, args2: any) => void >source : any >args2 : any diff --git a/tests/baselines/reference/contextualTypedSpecialAssignment.types b/tests/baselines/reference/contextualTypedSpecialAssignment.types index 494532a5eae..dc6f9dbfcd8 100644 --- a/tests/baselines/reference/contextualTypedSpecialAssignment.types +++ b/tests/baselines/reference/contextualTypedSpecialAssignment.types @@ -56,7 +56,7 @@ class Thing { this.s = { >this.s = { status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } >this.s : DoneStatus ->this : this +>this : Thing >s : DoneStatus >{ status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } @@ -76,7 +76,7 @@ class Thing { this.s = { >this.s = { status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } >this.s : DoneStatus ->this : this +>this : Thing >s : DoneStatus >{ status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } diff --git a/tests/baselines/reference/contextualTyping.types b/tests/baselines/reference/contextualTyping.types index 9d0bc119879..6817af0ab3a 100644 --- a/tests/baselines/reference/contextualTyping.types +++ b/tests/baselines/reference/contextualTyping.types @@ -201,7 +201,7 @@ class C4T5 { this.foo = function(i, s) { >this.foo = function(i, s) { return s; } : (i: number, s: string) => string >this.foo : (i: number, s: string) => string ->this : this +>this : C4T5 >foo : (i: number, s: string) => string >function(i, s) { return s; } : (i: number, s: string) => string >i : number diff --git a/tests/baselines/reference/contravariantInferenceAndTypeGuard.errors.txt b/tests/baselines/reference/contravariantInferenceAndTypeGuard.errors.txt new file mode 100644 index 00000000000..515aa78fb07 --- /dev/null +++ b/tests/baselines/reference/contravariantInferenceAndTypeGuard.errors.txt @@ -0,0 +1,52 @@ +tests/cases/compiler/contravariantInferenceAndTypeGuard.ts(19,17): error TS2769: No overload matches this call. + Overload 1 of 4, '(fn: FilterFn, context: { b: string; }): List', gave the following error. + The 'this' context of type 'List' is not assignable to method's 'this' of type 'List'. + Type 'Test | null' is not assignable to type 'TData'. + 'TData' could be instantiated with an arbitrary type which could be unrelated to 'Test | null'. + Overload 2 of 4, '(fn: IteratorFn, context: { b: string; }): List', gave the following error. + The 'this' context of type 'List' is not assignable to method's 'this' of type 'List'. +tests/cases/compiler/contravariantInferenceAndTypeGuard.ts(26,7): error TS2322: Type 'List' is not assignable to type 'List'. + Type 'Test | null' is not assignable to type 'Test'. + Type 'null' is not assignable to type 'Test'. + + +==== tests/cases/compiler/contravariantInferenceAndTypeGuard.ts (2 errors) ==== + interface ListItem { + prev: ListItem | null; + next: ListItem | null; + data: TData; + } + type IteratorFn> = (this: TContext, item: TData, node: ListItem, list: List) => TResult; + type FilterFn> = (this: TContext, item: TData, node: ListItem, list: List) => item is TResult; + + declare class List { + filter(fn: FilterFn, context: TContext): List; + filter(fn: FilterFn): List; + filter(fn: IteratorFn, context: TContext): List; + filter(fn: IteratorFn): List; + } + interface Test { + a: string; + } + const list2 = new List(); + const filter1 = list2.filter(function(item, node, list): item is Test { + ~~~~~ +!!! error TS2769: No overload matches this call. +!!! error TS2769: Overload 1 of 4, '(fn: FilterFn, context: { b: string; }): List', gave the following error. +!!! error TS2769: The 'this' context of type 'List' is not assignable to method's 'this' of type 'List'. +!!! error TS2769: Type 'Test | null' is not assignable to type 'TData'. +!!! error TS2769: 'TData' could be instantiated with an arbitrary type which could be unrelated to 'Test | null'. +!!! error TS2769: Overload 2 of 4, '(fn: IteratorFn, context: { b: string; }): List', gave the following error. +!!! error TS2769: The 'this' context of type 'List' is not assignable to method's 'this' of type 'List'. + this.b; // $ExpectType string + item; // $ExpectType Test | null + node; // $ExpectType ListItem + list; // $ExpectType List + return !!item; + }, {b: 'c'}); + const x: List = filter1; // $ExpectType List + ~ +!!! error TS2322: Type 'List' is not assignable to type 'List'. +!!! error TS2322: Type 'Test | null' is not assignable to type 'Test'. +!!! error TS2322: Type 'null' is not assignable to type 'Test'. + \ No newline at end of file diff --git a/tests/baselines/reference/contravariantInferenceAndTypeGuard.types b/tests/baselines/reference/contravariantInferenceAndTypeGuard.types index 5ee843a798a..04be76772bf 100644 --- a/tests/baselines/reference/contravariantInferenceAndTypeGuard.types +++ b/tests/baselines/reference/contravariantInferenceAndTypeGuard.types @@ -57,8 +57,8 @@ const list2 = new List(); >null : null const filter1 = list2.filter(function(item, node, list): item is Test { ->filter1 : List ->list2.filter(function(item, node, list): item is Test { this.b; // $ExpectType string item; // $ExpectType Test | null node; // $ExpectType ListItem list; // $ExpectType List return !!item;}, {b: 'c'}) : List +>filter1 : List +>list2.filter(function(item, node, list): item is Test { this.b; // $ExpectType string item; // $ExpectType Test | null node; // $ExpectType ListItem list; // $ExpectType List return !!item;}, {b: 'c'}) : List >list2.filter : { (fn: FilterFn, context: TContext): List; (fn: FilterFn>): List; (fn: IteratorFn, context: TContext): List; (fn: IteratorFn>): List; } >list2 : List >filter : { (fn: FilterFn, context: TContext): List; (fn: FilterFn>): List; (fn: IteratorFn, context: TContext): List; (fn: IteratorFn>): List; } @@ -93,5 +93,5 @@ const filter1 = list2.filter(function(item, node, list): item is Test { const x: List = filter1; // $ExpectType List >x : List ->filter1 : List +>filter1 : List diff --git a/tests/baselines/reference/controlFlowAliasing.types b/tests/baselines/reference/controlFlowAliasing.types index bbca40eb168..a741699dfea 100644 --- a/tests/baselines/reference/controlFlowAliasing.types +++ b/tests/baselines/reference/controlFlowAliasing.types @@ -713,7 +713,7 @@ class C10 { >typeof this.x === 'string' : boolean >typeof this.x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >this.x : string | number ->this : this +>this : C10 >x : string | number >'string' : "string" @@ -736,7 +736,7 @@ class C10 { >s = this.x : string | number >s : string >this.x : string | number ->this : this +>this : C10 >x : string | number s = x; @@ -758,7 +758,7 @@ class C11 { >typeof this.x === 'string' : boolean >typeof this.x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >this.x : string | number ->this : this +>this : C11 >x : string | number >'string' : "string" @@ -782,7 +782,7 @@ class C11 { >s = this.x : string | number >s : string >this.x : string | number ->this : this +>this : C11 >x : string | number s = x; @@ -794,7 +794,7 @@ class C11 { this.x = 10; >this.x = 10 : 10 >this.x : string | number ->this : this +>this : C11 >x : string | number >10 : 10 diff --git a/tests/baselines/reference/controlFlowForCatchAndFinally.types b/tests/baselines/reference/controlFlowForCatchAndFinally.types index c159655a0a8..5777b7f4a01 100644 --- a/tests/baselines/reference/controlFlowForCatchAndFinally.types +++ b/tests/baselines/reference/controlFlowForCatchAndFinally.types @@ -91,7 +91,7 @@ class Foo { if (this.abortController !== undefined) { >this.abortController !== undefined : boolean >this.abortController : Aborter | undefined ->this : this +>this : Foo >abortController : Aborter | undefined >undefined : undefined @@ -99,14 +99,14 @@ class Foo { >this.abortController.abort() : void >this.abortController.abort : () => void >this.abortController : Aborter ->this : this +>this : Foo >abortController : Aborter >abort : () => void this.abortController = undefined; >this.abortController = undefined : undefined >this.abortController : Aborter | undefined ->this : this +>this : Foo >abortController : Aborter | undefined >undefined : undefined } @@ -114,7 +114,7 @@ class Foo { this.abortController = new Aborter(); >this.abortController = new Aborter() : Aborter >this.abortController : Aborter | undefined ->this : this +>this : Foo >abortController : Aborter | undefined >new Aborter() : Aborter >Aborter : typeof Aborter @@ -125,7 +125,7 @@ class Foo { if (this.abortController !== undefined) { >this.abortController !== undefined : boolean >this.abortController : Aborter | undefined ->this : this +>this : Foo >abortController : Aborter | undefined >undefined : undefined @@ -133,7 +133,7 @@ class Foo { >this.abortController.abort() : void >this.abortController.abort : () => void >this.abortController : Aborter ->this : this +>this : Foo >abortController : Aborter >abort : () => void } diff --git a/tests/baselines/reference/controlFlowForCompoundAssignmentToThisMember.types b/tests/baselines/reference/controlFlowForCompoundAssignmentToThisMember.types index 7c289daa2e0..408aa5b2747 100644 --- a/tests/baselines/reference/controlFlowForCompoundAssignmentToThisMember.types +++ b/tests/baselines/reference/controlFlowForCompoundAssignmentToThisMember.types @@ -22,14 +22,14 @@ class DatasourceCommandWidgetElement { this._commandBased = true; >this._commandBased = true : true >this._commandBased : boolean ->this : this +>this : DatasourceCommandWidgetElement >_commandBased : boolean >true : true this._commandElement = target.commandElement; >this._commandElement = target.commandElement : unknown >this._commandElement : unknown ->this : this +>this : DatasourceCommandWidgetElement >_commandElement : unknown >target.commandElement : unknown >target : DatasourceCommandWidgetElement @@ -39,7 +39,7 @@ class DatasourceCommandWidgetElement { this._commandBased = false; >this._commandBased = false : false >this._commandBased : boolean ->this : this +>this : DatasourceCommandWidgetElement >_commandBased : boolean >false : false } @@ -47,7 +47,7 @@ class DatasourceCommandWidgetElement { if (this._commandBased = (target instanceof DatasourceCommandWidgetElement)) { >this._commandBased = (target instanceof DatasourceCommandWidgetElement) : boolean >this._commandBased : boolean ->this : this +>this : DatasourceCommandWidgetElement >_commandBased : boolean >(target instanceof DatasourceCommandWidgetElement) : boolean >target instanceof DatasourceCommandWidgetElement : boolean @@ -57,7 +57,7 @@ class DatasourceCommandWidgetElement { this._commandElement = target.commandElement; >this._commandElement = target.commandElement : unknown >this._commandElement : unknown ->this : this +>this : DatasourceCommandWidgetElement >_commandElement : unknown >target.commandElement : unknown >target : DatasourceCommandWidgetElement diff --git a/tests/baselines/reference/controlFlowGenericTypes.types b/tests/baselines/reference/controlFlowGenericTypes.types index 6ee07abf4d6..47d84ddbf6f 100644 --- a/tests/baselines/reference/controlFlowGenericTypes.types +++ b/tests/baselines/reference/controlFlowGenericTypes.types @@ -536,7 +536,7 @@ class SqlTable { this.validateRow(row); >this.validateRow(row) : void >this.validateRow : (_row: Partial>) => void ->this : this +>this : SqlTable >validateRow : (_row: Partial>) => void >row : SqlInsertSet } diff --git a/tests/baselines/reference/controlFlowPrivateClassField.types b/tests/baselines/reference/controlFlowPrivateClassField.types index cab3017d94f..86d4849b014 100644 --- a/tests/baselines/reference/controlFlowPrivateClassField.types +++ b/tests/baselines/reference/controlFlowPrivateClassField.types @@ -11,7 +11,7 @@ class Example { this.#test = test; >this.#test = test : number >this.#test : number ->this : this +>this : Example >test : number } @@ -20,7 +20,7 @@ class Example { return this.#test >this.#test : number ->this : this +>this : Example } } @@ -36,7 +36,7 @@ class Example2 { this.#test = test; >this.#test = test : number | undefined >this.#test : number | undefined ->this : this +>this : Example2 >test : number | undefined } @@ -45,11 +45,11 @@ class Example2 { if (this.#test) { >this.#test : number | undefined ->this : this +>this : Example2 return this.#test >this.#test : number ->this : this +>this : Example2 } return 0; >0 : 0 diff --git a/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.types b/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.types index 50f9631512f..f32286d1ba9 100644 --- a/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.types +++ b/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.types @@ -9,7 +9,7 @@ export class BuildWorkspaceService { this.injectBuildService(new X(service)); >this.injectBuildService(new X(service)) : void >this.injectBuildService : (service: P0) => void ->this : this +>this : BuildWorkspaceService >injectBuildService : (service: P0) => void >new X(service) : any >X : any diff --git a/tests/baselines/reference/crashRegressionTest.types b/tests/baselines/reference/crashRegressionTest.types index 2ff2a095258..ab28b1fe9a5 100644 --- a/tests/baselines/reference/crashRegressionTest.types +++ b/tests/baselines/reference/crashRegressionTest.types @@ -24,7 +24,7 @@ module MsPortal.Util.TemplateEngine { this._templateStorage = templateStorage; >this._templateStorage = templateStorage : TemplateStorage >this._templateStorage : TemplateStorage ->this : this +>this : StringTemplate >_templateStorage : TemplateStorage >templateStorage : TemplateStorage } @@ -38,11 +38,11 @@ module MsPortal.Util.TemplateEngine { >this._templateStorage.templateSources[this._name] : string >this._templateStorage.templateSources : TemplateKeyValue >this._templateStorage : TemplateStorage ->this : this +>this : StringTemplate >_templateStorage : TemplateStorage >templateSources : TemplateKeyValue >this._name : any ->this : this +>this : StringTemplate >_name : any >value : string } diff --git a/tests/baselines/reference/customAsyncIterator.types b/tests/baselines/reference/customAsyncIterator.types index dd33864f181..b534ef99efc 100644 --- a/tests/baselines/reference/customAsyncIterator.types +++ b/tests/baselines/reference/customAsyncIterator.types @@ -24,7 +24,7 @@ class ConstantIterator implements AsyncIterator >{ value: this.constant, done: false } : { value: T; done: false; } >value : T >this.constant : T ->this : this +>this : ConstantIterator >constant : T >done : false >false : false diff --git a/tests/baselines/reference/declFileEmitDeclarationOnly.types b/tests/baselines/reference/declFileEmitDeclarationOnly.types index 9a3cf8cfc70..7b33a8a0ea4 100644 --- a/tests/baselines/reference/declFileEmitDeclarationOnly.types +++ b/tests/baselines/reference/declFileEmitDeclarationOnly.types @@ -25,7 +25,7 @@ class HelloWorld { >info : (msg: string) => void >`Hello ${this.name}` : string >this.name : string ->this : this +>this : HelloWorld >name : string } } diff --git a/tests/baselines/reference/declFileForTypeParameters.types b/tests/baselines/reference/declFileForTypeParameters.types index e4791f764bf..7f3a5e7a9c6 100644 --- a/tests/baselines/reference/declFileForTypeParameters.types +++ b/tests/baselines/reference/declFileForTypeParameters.types @@ -11,7 +11,7 @@ class C { return this.x; >this.x : T ->this : this +>this : C >x : T } } diff --git a/tests/baselines/reference/declFileGenericType2.errors.txt b/tests/baselines/reference/declFileGenericType2.errors.txt new file mode 100644 index 00000000000..deae5240396 --- /dev/null +++ b/tests/baselines/reference/declFileGenericType2.errors.txt @@ -0,0 +1,47 @@ +tests/cases/compiler/declFileGenericType2.ts(36,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AbstractElementController'. + + +==== tests/cases/compiler/declFileGenericType2.ts (1 errors) ==== + declare module templa.mvc { + interface IModel { + } + } + declare module templa.mvc { + interface IController { + } + } + declare module templa.mvc { + class AbstractController implements mvc.IController { + } + } + declare module templa.mvc.composite { + interface ICompositeControllerModel extends mvc.IModel { + getControllers(): mvc.IController[]; + } + } + module templa.dom.mvc { + export interface IElementController extends templa.mvc.IController { + } + } + // Module + module templa.dom.mvc { + + export class AbstractElementController extends templa.mvc.AbstractController implements IElementController { + constructor() { + super(); + } + } + } + // Module + module templa.dom.mvc.composite { + export class AbstractCompositeElementController extends templa.dom.mvc.AbstractElementController { + public _controllers: templa.mvc.IController[]; + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AbstractElementController'. + this._controllers = []; + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/declFileGenericType2.types b/tests/baselines/reference/declFileGenericType2.types index e56824bb98f..80b154e0988 100644 --- a/tests/baselines/reference/declFileGenericType2.types +++ b/tests/baselines/reference/declFileGenericType2.types @@ -97,7 +97,7 @@ module templa.dom.mvc.composite { this._controllers = []; >this._controllers = [] : undefined[] >this._controllers : templa.mvc.IController[] ->this : this +>this : AbstractCompositeElementController >_controllers : templa.mvc.IController[] >[] : undefined[] } diff --git a/tests/baselines/reference/declarationEmitMixinPrivateProtected.types b/tests/baselines/reference/declarationEmitMixinPrivateProtected.types index 77dcaba30eb..d8136159bc6 100644 --- a/tests/baselines/reference/declarationEmitMixinPrivateProtected.types +++ b/tests/baselines/reference/declarationEmitMixinPrivateProtected.types @@ -13,7 +13,7 @@ const DisposableMixin = class { this._assertIsStripped() >this._assertIsStripped() : void >this._assertIsStripped : () => void ->this : this +>this : DisposableMixin >_assertIsStripped : () => void } private _assertIsStripped() { @@ -53,7 +53,7 @@ const DisposableMixin = class { this._assertIsStripped() >this._assertIsStripped() : void >this._assertIsStripped : () => void ->this : this +>this : DisposableMixin >_assertIsStripped : () => void } private _assertIsStripped() { diff --git a/tests/baselines/reference/declarationEmitProtectedMembers.types b/tests/baselines/reference/declarationEmitProtectedMembers.types index ea3dfdae8bb..e9ed788b758 100644 --- a/tests/baselines/reference/declarationEmitProtectedMembers.types +++ b/tests/baselines/reference/declarationEmitProtectedMembers.types @@ -11,7 +11,7 @@ class C1 { return this.x; >this.x : number ->this : this +>this : C1 >x : number } @@ -59,7 +59,7 @@ class C2 extends C1 { >super : C1 >f : () => number >this.x : number ->this : this +>this : C2 >x : number } protected static sf() { diff --git a/tests/baselines/reference/declarationEmitThisPredicates01.types b/tests/baselines/reference/declarationEmitThisPredicates01.types index bd2b957fb9c..349936f3d15 100644 --- a/tests/baselines/reference/declarationEmitThisPredicates01.types +++ b/tests/baselines/reference/declarationEmitThisPredicates01.types @@ -7,7 +7,7 @@ export class C { return this instanceof D; >this instanceof D : boolean ->this : this +>this : C >D : typeof D } } diff --git a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.types b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.types index adeb354ef87..8125e2463d2 100644 --- a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.types +++ b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.types @@ -7,7 +7,7 @@ export class C { return this instanceof D; >this instanceof D : boolean ->this : this +>this : C >D : typeof D } } diff --git a/tests/baselines/reference/declarationFiles.errors.txt b/tests/baselines/reference/declarationFiles.errors.txt index 67a3e91bfb0..c3543e4d2b8 100644 --- a/tests/baselines/reference/declarationFiles.errors.txt +++ b/tests/baselines/reference/declarationFiles.errors.txt @@ -1,11 +1,9 @@ tests/cases/conformance/types/thisType/declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. tests/cases/conformance/types/thisType/declarationFiles.ts(30,5): error TS2527: The inferred type of 'x1' references an inaccessible 'this' type. A type annotation is necessary. tests/cases/conformance/types/thisType/declarationFiles.ts(32,5): error TS2527: The inferred type of 'x3' references an inaccessible 'this' type. A type annotation is necessary. -tests/cases/conformance/types/thisType/declarationFiles.ts(34,5): error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. -tests/cases/conformance/types/thisType/declarationFiles.ts(40,5): error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. -==== tests/cases/conformance/types/thisType/declarationFiles.ts (5 errors) ==== +==== tests/cases/conformance/types/thisType/declarationFiles.ts (3 errors) ==== class C1 { x: this; f(x: this): this { return undefined; } @@ -46,16 +44,12 @@ tests/cases/conformance/types/thisType/declarationFiles.ts(40,5): error TS2527: !!! error TS2527: The inferred type of 'x3' references an inaccessible 'this' type. A type annotation is necessary. x4 = () => this; f1() { - ~~ -!!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. return { a: this }; } f2() { return [this]; } f3() { - ~~ -!!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. return [{ a: this }]; } f4() { diff --git a/tests/baselines/reference/declarationFiles.types b/tests/baselines/reference/declarationFiles.types index 9d326c87f22..062f8b04071 100644 --- a/tests/baselines/reference/declarationFiles.types +++ b/tests/baselines/reference/declarationFiles.types @@ -93,35 +93,35 @@ class C4 { >this : this f1() { ->f1 : () => { a: this; } +>f1 : () => { a: C4; } return { a: this }; ->{ a: this } : { a: this; } ->a : this ->this : this +>{ a: this } : { a: C4; } +>a : C4 +>this : C4 } f2() { ->f2 : () => this[] +>f2 : () => C4[] return [this]; ->[this] : this[] ->this : this +>[this] : C4[] +>this : C4 } f3() { ->f3 : () => { a: this; }[] +>f3 : () => { a: C4; }[] return [{ a: this }]; ->[{ a: this }] : { a: this; }[] ->{ a: this } : { a: this; } ->a : this ->this : this +>[{ a: this }] : { a: C4; }[] +>{ a: this } : { a: C4; } +>a : C4 +>this : C4 } f4() { ->f4 : () => () => this +>f4 : () => () => C4 return () => this; ->() => this : () => this ->this : this +>() => this : () => C4 +>this : C4 } } diff --git a/tests/baselines/reference/declarationImportTypeAliasInferredAndEmittable.types b/tests/baselines/reference/declarationImportTypeAliasInferredAndEmittable.types index c125e9b1c08..f2557dae605 100644 --- a/tests/baselines/reference/declarationImportTypeAliasInferredAndEmittable.types +++ b/tests/baselines/reference/declarationImportTypeAliasInferredAndEmittable.types @@ -34,7 +34,7 @@ export class Wrap { this.connItem = c.item; >this.connItem = c.item : number >this.connItem : number ->this : this +>this : Wrap >connItem : number >c.item : number >c : import("tests/cases/compiler/foo") diff --git a/tests/baselines/reference/declarationMerging1.types b/tests/baselines/reference/declarationMerging1.types index ede5727ec9a..f16fc226fe9 100644 --- a/tests/baselines/reference/declarationMerging1.types +++ b/tests/baselines/reference/declarationMerging1.types @@ -8,7 +8,7 @@ class A { getF() { return this._f; } >getF : () => number >this._f : number ->this : this +>this : A >_f : number } diff --git a/tests/baselines/reference/declarationMerging2.types b/tests/baselines/reference/declarationMerging2.types index 6a7019833fd..2990258f6a8 100644 --- a/tests/baselines/reference/declarationMerging2.types +++ b/tests/baselines/reference/declarationMerging2.types @@ -8,7 +8,7 @@ export class A { getF() { return this._f; } >getF : () => number >this._f : number ->this : this +>this : A >_f : number } diff --git a/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType.types b/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType.types index fc0f4db69a7..64848a25644 100644 --- a/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType.types +++ b/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType.types @@ -60,7 +60,7 @@ export class ClassA { this.array = init; >this.array = init : SomeClass[] >this.array : SomeClass[] ->this : this +>this : ClassA >array : SomeClass[] >init : SomeClass[] } diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.types index aa08d363fd8..f14a4c65223 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.types +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.types @@ -33,7 +33,7 @@ class MyClass { this.db = db; >this.db = db : db >this.db : db ->this : this +>this : MyClass >db : db >db : db @@ -41,7 +41,7 @@ class MyClass { >this.db.doSomething() : void >this.db.doSomething : () => void >this.db : db ->this : this +>this : MyClass >db : db >doSomething : () => void } diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.types index f9da79ab4eb..1aa805e1b33 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.types +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.types @@ -34,7 +34,7 @@ class MyClass { this.db = db; >this.db = db : Database >this.db : Database ->this : this +>this : MyClass >db : Database >db : Database @@ -42,7 +42,7 @@ class MyClass { >this.db.doSomething() : void >this.db.doSomething : () => void >this.db : Database ->this : this +>this : MyClass >db : Database >doSomething : () => void } diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.types index 0004d6cb45e..5503f9083c9 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.types +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.types @@ -26,7 +26,7 @@ class MyClass { this.db = db; >this.db = db : db.db >this.db : db.db ->this : this +>this : MyClass >db : db.db >db : db.db @@ -34,7 +34,7 @@ class MyClass { >this.db.doSomething() : void >this.db.doSomething : () => void >this.db : db.db ->this : this +>this : MyClass >db : db.db >doSomething : () => void } diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.types index 6b995aafaea..27643a4171a 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.types +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.types @@ -35,7 +35,7 @@ class MyClass { this.db = db; >this.db = db : db.db >this.db : db.db ->this : this +>this : MyClass >db : db.db >db : db.db @@ -43,7 +43,7 @@ class MyClass { >this.db.doSomething() : any >this.db.doSomething : any >this.db : db.db ->this : this +>this : MyClass >db : db.db >doSomething : any } diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.types index a7571b7e907..0593e0b0e74 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.types +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.types @@ -33,7 +33,7 @@ class MyClass { this.db = db; >this.db = db : db >this.db : db ->this : this +>this : MyClass >db : db >db : db @@ -41,7 +41,7 @@ class MyClass { >this.db.doSomething() : void >this.db.doSomething : () => void >this.db : db ->this : this +>this : MyClass >db : db >doSomething : () => void } diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.types index 992836bc1be..27003435a5c 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.types +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.types @@ -33,7 +33,7 @@ class MyClass { this.db = db; >this.db = db : database >this.db : database ->this : this +>this : MyClass >db : database >db : database @@ -41,7 +41,7 @@ class MyClass { >this.db.doSomething() : void >this.db.doSomething : () => void >this.db : database ->this : this +>this : MyClass >db : database >doSomething : () => void } diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.types index 1a531b9f011..f03e73e9c9c 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.types +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.types @@ -35,7 +35,7 @@ class MyClass { this.db = db; >this.db = db : db.db >this.db : db.db ->this : this +>this : MyClass >db : db.db >db : db.db @@ -43,7 +43,7 @@ class MyClass { >this.db.doSomething() : any >this.db.doSomething : any >this.db : db.db ->this : this +>this : MyClass >db : db.db >doSomething : any } diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.types index 5f91e473788..06205450764 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.types +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.types @@ -26,7 +26,7 @@ class MyClass { this.db = db; >this.db = db : database.db >this.db : database.db ->this : this +>this : MyClass >db : database.db >db : database.db @@ -34,7 +34,7 @@ class MyClass { >this.db.doSomething() : void >this.db.doSomething : () => void >this.db : database.db ->this : this +>this : MyClass >db : database.db >doSomething : () => void } diff --git a/tests/baselines/reference/defaultPropsEmptyCurlyBecomesAnyForJs.errors.txt b/tests/baselines/reference/defaultPropsEmptyCurlyBecomesAnyForJs.errors.txt new file mode 100644 index 00000000000..fbeb0c84204 --- /dev/null +++ b/tests/baselines/reference/defaultPropsEmptyCurlyBecomesAnyForJs.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/typed_component.ts(4,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. + + +==== tests/cases/compiler/library.d.ts (0 errors) ==== + export class Foo { + props: T; + state: U; + constructor(props: T, state: U); + } + +==== tests/cases/compiler/component.js (0 errors) ==== + import { Foo } from "./library"; + export class MyFoo extends Foo { + member; + } + +==== tests/cases/compiler/typed_component.ts (1 errors) ==== + import { MyFoo } from "./component"; + export class TypedFoo extends MyFoo { + constructor() { + super({x: "string", y: 42}, { value: undefined }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. + this.props.x; + this.props.y; + this.state.value; + this.member; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/defaultPropsEmptyCurlyBecomesAnyForJs.types b/tests/baselines/reference/defaultPropsEmptyCurlyBecomesAnyForJs.types index c838ae6af08..292f653be14 100644 --- a/tests/baselines/reference/defaultPropsEmptyCurlyBecomesAnyForJs.types +++ b/tests/baselines/reference/defaultPropsEmptyCurlyBecomesAnyForJs.types @@ -49,27 +49,27 @@ export class TypedFoo extends MyFoo { this.props.x; >this.props.x : any >this.props : any ->this : this +>this : TypedFoo >props : any >x : any this.props.y; >this.props.y : any >this.props : any ->this : this +>this : TypedFoo >props : any >y : any this.state.value; >this.state.value : any >this.state : any ->this : this +>this : TypedFoo >state : any >value : any this.member; >this.member : any ->this : this +>this : TypedFoo >member : any } } diff --git a/tests/baselines/reference/definiteAssignmentAssertions.types b/tests/baselines/reference/definiteAssignmentAssertions.types index ead57cfce5c..afc3f1df7fd 100644 --- a/tests/baselines/reference/definiteAssignmentAssertions.types +++ b/tests/baselines/reference/definiteAssignmentAssertions.types @@ -23,7 +23,7 @@ class C2 { let x = this.a; >x : number >this.a : number ->this : this +>this : C2 >a : number } } diff --git a/tests/baselines/reference/definiteAssignmentOfDestructuredVariable.types b/tests/baselines/reference/definiteAssignmentOfDestructuredVariable.types index 6ae08a4ae0c..31385c6f3dc 100644 --- a/tests/baselines/reference/definiteAssignmentOfDestructuredVariable.types +++ b/tests/baselines/reference/definiteAssignmentOfDestructuredVariable.types @@ -21,7 +21,7 @@ class C { >a : T["a"] | undefined >b : T["b"] >this.foo : { [P in keyof T]: T[P]; } ->this : this +>this : C >foo : { [P in keyof T]: T[P]; } !(a && b); diff --git a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.errors.txt b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.errors.txt new file mode 100644 index 00000000000..5f29efd13d7 --- /dev/null +++ b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.errors.txt @@ -0,0 +1,39 @@ +tests/cases/compiler/derivedClassConstructorWithExplicitReturns01.ts(20,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + + +==== tests/cases/compiler/derivedClassConstructorWithExplicitReturns01.ts (1 errors) ==== + class C { + cProp = 10; + + foo() { return "this never gets used."; } + + constructor(value: number) { + return { + cProp: value, + foo() { + return "well this looks kinda C-ish."; + } + } + } + } + + class D extends C { + dProp = () => this; + + constructor(a = 100) { + super(a); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + + if (Math.random() < 0.5) { + "You win!" + return { + cProp: 1, + dProp: () => this, + foo() { return "You win!!!!!" } + }; + } + else + return null; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types index dbcac43d5bd..c3fb1b44e44 100644 --- a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types +++ b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types @@ -60,16 +60,16 @@ class D extends C { >"You win!" : "You win!" return { ->{ cProp: 1, dProp: () => this, foo() { return "You win!!!!!" } } : { cProp: number; dProp: () => this; foo(): string; } +>{ cProp: 1, dProp: () => this, foo() { return "You win!!!!!" } } : { cProp: number; dProp: () => D; foo(): string; } cProp: 1, >cProp : number >1 : 1 dProp: () => this, ->dProp : () => this ->() => this : () => this ->this : this +>dProp : () => D +>() => this : () => D +>this : D foo() { return "You win!!!!!" } >foo : () => string diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt index dd5a75362d1..0b0e6ac8111 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt @@ -1,8 +1,12 @@ -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'. +tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts(10,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseClass'. +tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts(12,13): error TS2416: Property '_init' in type 'DerivedClass' is not assignable to the same property in base type 'BaseClass'. + Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'BaseClass' is not assignable to type 'DerivedClass'. + Types have separate declarations of a private property '_init'. -==== tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts (1 errors) ==== +==== tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts (2 errors) ==== class BaseClass { constructor() { this._init(); @@ -11,13 +15,18 @@ tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts(8,7): error TS2415 } } class DerivedClass extends BaseClass { - ~~~~~~~~~~~~ -!!! error TS2415: Class 'DerivedClass' incorrectly extends base class 'BaseClass'. -!!! error TS2415: Types have separate declarations of a private property '_init'. constructor() { super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseClass'. } private _init() { + ~~~~~ +!!! error TS2416: Property '_init' in type 'DerivedClass' is not assignable to the same property in base type 'BaseClass'. +!!! error TS2416: Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'BaseClass' is not assignable to type 'DerivedClass'. +!!! error TS2416: Types have separate declarations of a private property '_init'. } } new DerivedClass(); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.types b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.types index f342b8f7cb2..fa790299294 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.types +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.types @@ -6,7 +6,7 @@ class BaseClass { this._init(); >this._init() : void >this._init : () => void ->this : this +>this : BaseClass >_init : () => void } private _init() { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.errors.txt b/tests/baselines/reference/derivedClassOverridesProtectedMembers.errors.txt new file mode 100644 index 00000000000..3332c645582 --- /dev/null +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.errors.txt @@ -0,0 +1,41 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts(33,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + + +==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts (1 errors) ==== + var x: { foo: string; } + var y: { foo: string; bar: string; } + + class Base { + protected a: typeof x; + protected b(a: typeof x) { } + protected get c() { return x; } + protected set c(v: typeof x) { } + protected d: (a: typeof x) => void; + + protected static r: typeof x; + protected static s(a: typeof x) { } + protected static get t() { return x; } + protected static set t(v: typeof x) { } + protected static u: (a: typeof x) => void; + + constructor(a: typeof x) { } + } + + class Derived extends Base { + protected a: typeof y; + protected b(a: typeof y) { } + protected get c() { return y; } + protected set c(v: typeof y) { } + protected d: (a: typeof y) => void; + + protected static r: typeof y; + protected static s(a: typeof y) { } + protected static get t() { return y; } + protected static set t(a: typeof y) { } + protected static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(x) } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.errors.txt b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.errors.txt new file mode 100644 index 00000000000..ff22c047013 --- /dev/null +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.errors.txt @@ -0,0 +1,69 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts(34,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + + +==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts (1 errors) ==== + var x: { foo: string; } + var y: { foo: string; bar: string; } + + class Base { + protected a: typeof x; + protected b(a: typeof x) { } + protected get c() { return x; } + protected set c(v: typeof x) { } + protected d: (a: typeof x) => void ; + + protected static r: typeof x; + protected static s(a: typeof x) { } + protected static get t() { return x; } + protected static set t(v: typeof x) { } + protected static u: (a: typeof x) => void ; + + constructor(a: typeof x) { } + } + + // Increase visibility of all protected members to public + class Derived extends Base { + a: typeof y; + b(a: typeof y) { } + get c() { return y; } + set c(v: typeof y) { } + d: (a: typeof y) => void; + + static r: typeof y; + static s(a: typeof y) { } + static get t() { return y; } + static set t(a: typeof y) { } + static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(a); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + } + + var d: Derived = new Derived(y); + var r1 = d.a; + var r2 = d.b(y); + var r3 = d.c; + var r3a = d.d; + d.c = y; + var r4 = Derived.r; + var r5 = Derived.s(y); + var r6 = Derived.t; + var r6a = Derived.u; + Derived.t = y; + + class Base2 { + [i: string]: Object; + [i: number]: typeof x; + } + + class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; + } + + var d2: Derived2; + var r7 = d2['']; + var r8 = d2[1]; + + \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt index faf228e8d55..72c8cb8c930 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt @@ -1,26 +1,39 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(22,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(27,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(24,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(28,15): error TS2416: Property 'b' in type 'Derived2' is not assignable to the same property in base type 'Base'. + Type '(a: { foo: string; }) => void' is not assignable to type '(a: { foo: string; }) => void'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Base' is not assignable to type 'Derived2'. + Property 'b' is protected but type 'Base' is not a class derived from 'Derived2'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(29,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(32,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(34,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(37,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(39,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(42,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(44,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(47,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(49,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(52,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(54,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(57,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(59,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(62,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(64,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(67,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'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(69,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. -==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts (10 errors) ==== +==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts (20 errors) ==== var x: { foo: string; } var y: { foo: string; bar: string; } @@ -48,14 +61,21 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve !!! error TS2415: Property 'a' is protected in type 'Derived1' but public in type 'Base'. protected a: typeof x; constructor(a: typeof x) { super(a); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } class Derived2 extends 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) { } + ~ +!!! error TS2416: Property 'b' in type 'Derived2' is not assignable to the same property in base type 'Base'. +!!! error TS2416: Type '(a: { foo: string; }) => void' is not assignable to type '(a: { foo: string; }) => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Base' is not assignable to type 'Derived2'. +!!! error TS2416: Property 'b' is protected but type 'Base' is not a class derived from 'Derived2'. constructor(a: typeof x) { super(a); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } class Derived3 extends Base { @@ -64,6 +84,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve !!! 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); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } class Derived4 extends Base { @@ -72,6 +94,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve !!! 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); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } class Derived5 extends Base { @@ -80,6 +104,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve !!! 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); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } class Derived6 extends Base { @@ -88,6 +114,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve !!! 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); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } class Derived7 extends Base { @@ -96,6 +124,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve !!! 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); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } class Derived8 extends Base { @@ -104,6 +134,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve !!! 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); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } class Derived9 extends Base { @@ -112,6 +144,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve !!! 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); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } class Derived10 extends Base { @@ -120,4 +154,6 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve !!! 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); } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt b/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt index 9292ff64411..629911b0d82 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt @@ -6,9 +6,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(24,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(29,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(30,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(33,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. -==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts (8 errors) ==== +==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts (9 errors) ==== var x: { foo: string; } var y: { foo: string; bar: string; } @@ -58,6 +59,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve static u: (a: typeof y) => void; constructor(a: typeof y) { super(x) } + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } var d: Derived = new Derived(y); diff --git a/tests/baselines/reference/derivedClassParameterProperties.types b/tests/baselines/reference/derivedClassParameterProperties.types index ea4f5b94fa5..63dfa3316f6 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.types +++ b/tests/baselines/reference/derivedClassParameterProperties.types @@ -114,7 +114,7 @@ class Derived6 extends Base { this.a = 1; >this.a = 1 : 1 >this.a : number ->this : this +>this : Derived6 >a : number >1 : 1 @@ -145,14 +145,14 @@ class Derived7 extends Base { this.a = 3; >this.a = 3 : 3 >this.a : number ->this : this +>this : Derived7 >a : number >3 : 3 this.b = 3; >this.b = 3 : 3 >this.b : number ->this : this +>this : Derived7 >b : number >3 : 3 @@ -183,14 +183,14 @@ class Derived8 extends Base { this.a = 3; >this.a = 3 : 3 >this.a : number ->this : this +>this : Derived8 >a : number >3 : 3 this.b = 3; >this.b = 3 : 3 >this.b : number ->this : this +>this : Derived8 >b : number >3 : 3 } @@ -218,14 +218,14 @@ class Derived9 extends Base2 { this.a = 3; >this.a = 3 : 3 >this.a : number ->this : this +>this : Derived9 >a : number >3 : 3 this.b = 3; >this.b = 3 : 3 >this.b : number ->this : this +>this : Derived9 >b : number >3 : 3 @@ -256,14 +256,14 @@ class Derived10 extends Base2 { this.a = 3; >this.a = 3 : 3 >this.a : number ->this : this +>this : Derived10 >a : number >3 : 3 this.b = 3; >this.b = 3 : 3 >this.b : number ->this : this +>this : Derived10 >b : number >3 : 3 } diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt index d381eff17dc..d60024421a2 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt @@ -1,8 +1,12 @@ +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(20,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(26,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. -==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts (2 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts (6 errors) ==== class Base { x: string; constructor(a) { } @@ -11,6 +15,8 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS class Derived extends Base { constructor() { super(this); // ok + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } @@ -19,6 +25,8 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS class Derived2 extends Base { constructor(public a: string) { super(this); // error + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } @@ -27,11 +35,15 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS class Derived3 extends Base { constructor(public a: string) { super(() => this); // error + ~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } } class Derived4 extends Base { constructor(public a: string) { super(function () { return this; }); // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.types b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.types index f34a2538f3c..96e9ba8a8b6 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.types +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.types @@ -17,7 +17,7 @@ class Derived extends Base { super(this); // ok >super(this) : void >super : typeof Base ->this : this +>this : Derived } } @@ -31,7 +31,7 @@ class Derived2 extends Base { super(this); // error >super(this) : void >super : typeof Base ->this : this +>this : Derived2 } } @@ -45,8 +45,8 @@ class Derived3 extends Base { super(() => this); // error >super(() => this) : void >super : typeof Base ->() => this : () => this ->this : this +>() => this : () => Derived3 +>this : Derived3 } } diff --git a/tests/baselines/reference/derivedClassTransitivity.errors.txt b/tests/baselines/reference/derivedClassTransitivity.errors.txt index 5be930fa5da..2acf22ae56e 100644 --- a/tests/baselines/reference/derivedClassTransitivity.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity.errors.txt @@ -1,8 +1,12 @@ 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. - Type 'number' is not assignable to type 'string'. + The 'this' types of each signature are incompatible. + Type 'C' is not assignable to type 'E'. + Types of property 'foo' are incompatible. + Type '(x: number) => void' is not assignable to type '(x?: string) => void'. + Types of parameters 'x' and 'x' are incompatible. + Type 'string' is not assignable to type 'number'. ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity.ts (1 errors) ==== @@ -28,7 +32,11 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra !!! 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 'number' is not assignable to type 'string'. +!!! error TS2322: The 'this' types of each signature are incompatible. +!!! error TS2322: Type 'C' is not assignable to type 'E'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type '(x: number) => void' is not assignable to type '(x?: string) => void'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(1); var r2 = e.foo(''); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity2.errors.txt b/tests/baselines/reference/derivedClassTransitivity2.errors.txt index e5f09911f55..c53f63b7648 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity2.errors.txt @@ -1,8 +1,12 @@ 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. - Type 'number' is not assignable to type 'string'. + The 'this' types of each signature are incompatible. + Type 'C' is not assignable to type 'E'. + Types of property 'foo' are incompatible. + Type '(x: number, y: number) => void' is not assignable to type '(x: number, y?: string) => void'. + Types of parameters 'y' and 'y' are incompatible. + Type 'string' is not assignable to type 'number'. ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity2.ts (1 errors) ==== @@ -28,7 +32,11 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra !!! 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 'number' is not assignable to type 'string'. +!!! error TS2322: The 'this' types of each signature are incompatible. +!!! error TS2322: Type 'C' is not assignable to type 'E'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type '(x: number, y: number) => void' is not assignable to type '(x: number, y?: string) => void'. +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(1, 1); var r2 = e.foo(1, ''); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity3.errors.txt b/tests/baselines/reference/derivedClassTransitivity3.errors.txt index b3e59a0bf4c..df15688f32b 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity3.errors.txt @@ -1,11 +1,45 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts(8,5): error TS2416: Property 'foo' in type 'D' is not assignable to the same property in base type 'C'. + Type '(x: T) => void' is not assignable to type '(x: T, y: T) => void'. + The 'this' types of each signature are incompatible. + Type 'C' is not assignable to type 'D'. + Types of property 'foo' are incompatible. + Type '(x: T, y: T) => void' is not assignable to type '(x: T) => void'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts(12,5): error TS2416: Property 'foo' in type 'E' is not assignable to the same property in base type 'D'. + Type '(x: T, y?: number) => void' is not assignable to type '(x: T) => void'. + The 'this' types of each signature are incompatible. + Type 'D' is not assignable to type 'E'. + Types of property 'foo' are incompatible. + Type '(x: T) => void' is not assignable to type '(x: T, y?: number) => void'. + The 'this' types of each signature are incompatible. + Type 'E' is not assignable to type 'D'. + Types of property 'foo' are incompatible. + Type '(x: T, y?: number) => void' is not assignable to type '(x: T) => void'. + Types of parameters 'x' and 'x' are incompatible. + Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. 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. - Type 'string' is not assignable to type 'number'. + The 'this' types of each signature are incompatible. + Type 'C' is not assignable to type 'E'. + Types of property 'foo' are incompatible. + Type '(x: T, y: T) => void' is not assignable to type '(x: T, y?: number) => void'. + The 'this' types of each signature are incompatible. + Type 'E' is not assignable to type 'C'. + Types of property 'foo' are incompatible. + Type '(x: T, y?: number) => void' is not assignable to type '(x: T, y: T) => void'. + Types of parameters 'x' and 'x' are incompatible. + Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts(19,9): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'string' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts(20,10): error TS2684: The 'this' context of type 'E' is not assignable to method's 'this' of type 'E'. + Type 'string' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. -==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts (1 errors) ==== +==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts (5 errors) ==== // subclassing is not transitive when you can remove required parameters and add optional parameters class C { @@ -14,10 +48,31 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra class D extends C { foo(x: T) { } // ok to drop parameters + ~~~ +!!! error TS2416: Property 'foo' in type 'D' is not assignable to the same property in base type 'C'. +!!! error TS2416: Type '(x: T) => void' is not assignable to type '(x: T, y: T) => void'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'C' is not assignable to type 'D'. +!!! error TS2416: Types of property 'foo' are incompatible. +!!! error TS2416: Type '(x: T, y: T) => void' is not assignable to type '(x: T) => void'. } class E extends D { foo(x: T, y?: number) { } // ok to add optional parameters + ~~~ +!!! error TS2416: Property 'foo' in type 'E' is not assignable to the same property in base type 'D'. +!!! error TS2416: Type '(x: T, y?: number) => void' is not assignable to type '(x: T) => void'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'D' is not assignable to type 'E'. +!!! error TS2416: Types of property 'foo' are incompatible. +!!! error TS2416: Type '(x: T) => void' is not assignable to type '(x: T, y?: number) => void'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'E' is not assignable to type 'D'. +!!! error TS2416: Types of property 'foo' are incompatible. +!!! error TS2416: Type '(x: T, y?: number) => void' is not assignable to type '(x: T) => void'. +!!! error TS2416: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2416: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. } var c: C; @@ -28,7 +83,24 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra !!! 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 'string' is not assignable to type 'number'. +!!! error TS2322: The 'this' types of each signature are incompatible. +!!! error TS2322: Type 'C' is not assignable to type 'E'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type '(x: T, y: T) => void' is not assignable to type '(x: T, y?: number) => void'. +!!! error TS2322: The 'this' types of each signature are incompatible. +!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type '(x: T, y?: number) => void' is not assignable to type '(x: T, y: T) => void'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. var r = c.foo('', ''); - var r2 = e.foo('', 1); \ No newline at end of file + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'string' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. + var r2 = e.foo('', 1); + ~ +!!! error TS2684: The 'this' context of type 'E' is not assignable to method's 'this' of type 'E'. +!!! error TS2684: Type 'string' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity4.errors.txt b/tests/baselines/reference/derivedClassTransitivity4.errors.txt index 06319b16317..355db269f54 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity4.errors.txt @@ -1,8 +1,9 @@ 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. - Type 'number' is not assignable to type 'string'. + The 'this' types of each signature are incompatible. + Type 'C' is not assignable to type 'E'. + Property 'foo' is protected in type 'C' but public in type 'E'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity4.ts(19,11): error TS2445: Property 'foo' is protected and only accessible within class 'C' and its subclasses. @@ -29,8 +30,9 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra !!! 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 'number' is not assignable to type 'string'. +!!! error TS2322: The 'this' types of each signature are incompatible. +!!! error TS2322: Type 'C' is not assignable to type 'E'. +!!! error TS2322: Property 'foo' is protected in type 'C' but public in type 'E'. 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/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt index 06742e3e720..85b0dfd5479 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt @@ -1,5 +1,8 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingProtectedInstance.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/derivedClassWithPrivateInstanceShadowingProtectedInstance.ts(14,13): error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'. + Type '() => string' is not assignable to type '() => string'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Base' is not assignable to type 'Derived'. + Property 'x' is private in type 'Derived' but not in type 'Base'. ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingProtectedInstance.ts (1 errors) ==== @@ -15,11 +18,14 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit // error, not a subtype class Derived extends 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 { + ~~ +!!! error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'. +!!! error TS2416: Type '() => string' is not assignable to type '() => string'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2416: Property 'x' is private in type 'Derived' but not in type 'Base'. return ''; } diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt index 6aeb5a7ec23..c8a0964c4ea 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. 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(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(14,13): error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'. + Type '() => string' is not assignable to type '() => string'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Base' is not assignable to type 'Derived'. + Property 'x' is private in type 'Derived' but not in type 'Base'. 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(22,14): error TS2339: Property 'x' does not exist on type 'typeof Base'. @@ -31,11 +34,14 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit // error, not a subtype class Derived extends 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 { + ~~ +!!! error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'. +!!! error TS2416: Type '() => string' is not assignable to type '() => string'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2416: Property 'x' is private in type 'Derived' but not in type 'Base'. return ''; } diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.types b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.types index 04dd1ee3717..882af3c83fd 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.types +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.types @@ -10,7 +10,7 @@ class Base { >x : number >this.a = x : number >this.a : number ->this : this +>this : Base >a : number >x : number } @@ -49,7 +49,7 @@ class Base2 { >x : T >this.a = x : T >this.a : T ->this : this +>this : Base2 >a : T >x : T } diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.types b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.types index a7561b044e4..303dd86a8a4 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.types +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.types @@ -19,7 +19,7 @@ class Base { >x : number >this.a = x : number >this.a : number ->this : this +>this : Base >a : number >x : number } @@ -82,7 +82,7 @@ class Base2 { >x : T >this.a = x : T >this.a : T ->this : this +>this : Base2 >a : T >x : T } diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt index aa4cd142257..48672ed56b2 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt @@ -1,10 +1,12 @@ +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts(11,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts(21,9): error TS2554: Expected 2 arguments, but got 0. tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts(22,10): error TS2554: Expected 2 arguments, but got 1. +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts(33,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts(44,9): error TS2554: Expected 2 arguments, but got 0. tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts(45,10): error TS2554: Expected 2 arguments, but got 1. -==== tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts (4 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts (6 errors) ==== // automatic constructors with a class hieararchy of depth > 2 class Base { @@ -16,6 +18,8 @@ tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/de b = ''; constructor(y: string, z: string) { super(2); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. this.b = y; } } @@ -44,6 +48,8 @@ tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/de b: T = null; constructor(y: T, z: T) { super(2); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. this.b = y; } } diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.types b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.types index b674626ec00..8b3e70157d8 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.types +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.types @@ -12,7 +12,7 @@ class Base { >x : number >this.a = x : number >this.a : number ->this : this +>this : Base >a : number >x : number } @@ -37,7 +37,7 @@ class Derived extends Base { this.b = y; >this.b = y : string >this.b : string ->this : this +>this : Derived >b : string >y : string } @@ -84,7 +84,7 @@ class Base2 { >x : T >this.a = x : T >this.a : T ->this : this +>this : Base2 >a : T >x : T } @@ -109,7 +109,7 @@ class D extends Base { this.b = y; >this.b = y : T >this.b : T ->this : this +>this : D >b : T >y : T } diff --git a/tests/baselines/reference/derivedClasses.types b/tests/baselines/reference/derivedClasses.types index 559e5861f2f..606b86c7717 100644 --- a/tests/baselines/reference/derivedClasses.types +++ b/tests/baselines/reference/derivedClasses.types @@ -11,7 +11,7 @@ class Red extends Color { >() => { return this.hue(); } : () => string >this.hue() : string >this.hue : () => string ->this : this +>this : Red >hue : () => string return getHue() + " red"; @@ -46,7 +46,7 @@ class Blue extends Color { >() => { return this.hue(); } : () => string >this.hue() : string >this.hue : () => string ->this : this +>this : Blue >hue : () => string return getHue() + " blue"; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt index 3e717a6d59a..0f8b25d53ff 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt @@ -9,9 +9,12 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(41,1): error TS2322: Type 'E' is not assignable to type 'C'. Types of property 'x' are incompatible. Type 'string' is not assignable to type 'number'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(42,9): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'number' is not assignable to type 'T'. + 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'number'. -==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts (7 errors) ==== +==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts (8 errors) ==== class C { x: T; get X(): T { return null; } @@ -71,4 +74,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC !!! error TS2322: Type 'E' is not assignable to type 'C'. !!! error TS2322: Types of property 'x' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. - var r = c.foo(); // e.foo would return string \ No newline at end of file + var r = c.foo(); // e.foo would return string + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types index 28e916666f8..d3c726bd37b 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types @@ -58,7 +58,7 @@ class Derived extends Base { >r3 : { a: number; b: number; } >this.foo({ a: 1, b: 2 }) : { a: number; b: number; } >this.foo : (x: { a: number; b: number; }) => { a: number; b: number; } ->this : this +>this : Derived >foo : (x: { a: number; b: number; }) => { a: number; b: number; } >{ a: 1, b: 2 } : { a: number; b: number; } >a : number diff --git a/tests/baselines/reference/derivedUninitializedPropertyDeclaration.errors.txt b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.errors.txt index 6bd95538836..32babffe923 100644 --- a/tests/baselines/reference/derivedUninitializedPropertyDeclaration.errors.txt +++ b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.errors.txt @@ -4,9 +4,10 @@ tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedP tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts(17,24): error TS1039: Initializers are not allowed in ambient contexts. tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts(24,5): error TS2564: Property 'p' has no initializer and is not definitely assigned in the constructor. tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts(27,5): error TS2564: Property 'p' has no initializer and is not definitely assigned in the constructor. +tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts(78,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'L'. -==== tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts (6 errors) ==== +==== tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts (7 errors) ==== class A { property = 'x'; m() { return 1 } @@ -97,6 +98,8 @@ tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedP declare a: number; constructor(arg: number) { super(arg); + ~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'L'. console.log(this.a); // should be OK, M.a is ambient } } diff --git a/tests/baselines/reference/derivedUninitializedPropertyDeclaration.types b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.types index 17dab48969d..74161c5cd64 100644 --- a/tests/baselines/reference/derivedUninitializedPropertyDeclaration.types +++ b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.types @@ -110,7 +110,7 @@ class G extends E { this.p1 = 'z' >this.p1 = 'z' : "z" >this.p1 : "z" ->this : this +>this : G >p1 : "z" >'z' : "z" } @@ -163,7 +163,7 @@ class L { this.a = arg; >this.a = arg : any >this.a : any ->this : this +>this : L >a : any >arg : any } @@ -189,7 +189,7 @@ class M extends L { >console : Console >log : (...data: any[]) => void >this.a : number ->this : this +>this : M >a : number } } diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt index 5514e7efc64..5737bc29396 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt @@ -1,3 +1,5 @@ +tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(10,21): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Class'. +tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(21,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'D'. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(47,6): error TS2741: Property 'foo' is missing in type 'Class' but required in type 'D'. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(48,4): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ y: D; }'. Property 'y' is missing in type '{}' but required in type '{ y: D; }'. @@ -5,7 +7,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts( tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(50,6): error TS2322: Type 'string' is not assignable to type 'D'. -==== tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts (4 errors) ==== +==== tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts (6 errors) ==== // Parameter Declaration with generic interface F { } @@ -16,6 +18,8 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts( class SubClass extends Class { foo: boolean; constructor() { super(); } + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Class'. } class D implements F { @@ -27,6 +31,8 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts( bar: number constructor() { super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'D'. } } diff --git a/tests/baselines/reference/destructuringParameterProperties2.types b/tests/baselines/reference/destructuringParameterProperties2.types index 54b6959f8fb..3d240b98379 100644 --- a/tests/baselines/reference/destructuringParameterProperties2.types +++ b/tests/baselines/reference/destructuringParameterProperties2.types @@ -22,19 +22,19 @@ class C1 { >this.b === undefined && this.c === undefined : boolean >this.b === undefined : boolean >this.b : any ->this : this +>this : C1 >b : any >undefined : undefined >this.c === undefined : boolean >this.c : any ->this : this +>this : C1 >c : any >undefined : undefined this.a = a || k; >this.a = a || k : number >this.a : any ->this : this +>this : C1 >a : any >a || k : number >a : number @@ -47,7 +47,7 @@ class C1 { return this.a >this.a : any ->this : this +>this : C1 >a : any } @@ -56,7 +56,7 @@ class C1 { return this.b >this.b : any ->this : this +>this : C1 >b : any } @@ -65,7 +65,7 @@ class C1 { return this.c; >this.c : any ->this : this +>this : C1 >c : any } } diff --git a/tests/baselines/reference/destructuringParameterProperties3.errors.txt b/tests/baselines/reference/destructuringParameterProperties3.errors.txt index cbd2d089c71..f1f904c7831 100644 --- a/tests/baselines/reference/destructuringParameterProperties3.errors.txt +++ b/tests/baselines/reference/destructuringParameterProperties3.errors.txt @@ -5,9 +5,27 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(4 tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(22,24): error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(22,34): error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(22,44): error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(25,24): error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(25,34): error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(25,44): error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(28,24): error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(28,34): error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(28,44): error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(31,24): error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(31,34): error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(31,44): error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. -==== tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts (7 errors) ==== +==== tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts (19 errors) ==== class C1 { constructor(private k: T, private [a, b, c]: [T,U,V]) { ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -44,13 +62,43 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts(1 var x = new C1(undefined, [0, true, ""]); var [x_a, x_b, x_c] = [x.getA(), x.getB(), x.getC()]; + ~ +!!! error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + ~ +!!! error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. + ~ +!!! error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. var y = new C1(10, [0, true, true]); var [y_a, y_b, y_c] = [y.getA(), y.getB(), y.getC()]; + ~ +!!! error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + ~ +!!! error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. + ~ +!!! error TS2684: The 'this' context of type 'C1' is not assignable to method's 'this' of type 'C1'. var z = new C1(10, [undefined, "", ""]); var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; + ~ +!!! error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + ~ +!!! error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. + ~ +!!! error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. var w = new C1(10, [undefined, undefined, undefined]); var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; + ~ +!!! error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. + ~ +!!! error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. + ~ +!!! error TS2684: The 'this' context of type 'C1<10, string, string>' is not assignable to method's 'this' of type 'C1'. \ No newline at end of file diff --git a/tests/baselines/reference/destructuringParameterProperties3.types b/tests/baselines/reference/destructuringParameterProperties3.types index e4634bf44a4..4d17e003a56 100644 --- a/tests/baselines/reference/destructuringParameterProperties3.types +++ b/tests/baselines/reference/destructuringParameterProperties3.types @@ -22,19 +22,19 @@ class C1 { >this.b === undefined && this.c === undefined : boolean >this.b === undefined : boolean >this.b : any ->this : this +>this : C1 >b : any >undefined : undefined >this.c === undefined : boolean >this.c : any ->this : this +>this : C1 >c : any >undefined : undefined this.a = a || k; >this.a = a || k : T >this.a : any ->this : this +>this : C1 >a : any >a || k : T >a : T @@ -47,7 +47,7 @@ class C1 { return this.a >this.a : any ->this : this +>this : C1 >a : any } @@ -56,7 +56,7 @@ class C1 { return this.b >this.b : any ->this : this +>this : C1 >b : any } @@ -65,7 +65,7 @@ class C1 { return this.c; >this.c : any ->this : this +>this : C1 >c : any } } diff --git a/tests/baselines/reference/destructuringParameterProperties4.types b/tests/baselines/reference/destructuringParameterProperties4.types index 8f49dc9ba91..96830fa3552 100644 --- a/tests/baselines/reference/destructuringParameterProperties4.types +++ b/tests/baselines/reference/destructuringParameterProperties4.types @@ -22,19 +22,19 @@ class C1 { >this.b === undefined && this.c === undefined : boolean >this.b === undefined : boolean >this.b : any ->this : this +>this : C1 >b : any >undefined : undefined >this.c === undefined : boolean >this.c : any ->this : this +>this : C1 >c : any >undefined : undefined this.a = a || k; >this.a = a || k : T >this.a : any ->this : this +>this : C1 >a : any >a || k : T >a : T @@ -47,7 +47,7 @@ class C1 { return this.a >this.a : any ->this : this +>this : C1 >a : any } @@ -56,7 +56,7 @@ class C1 { return this.b >this.b : any ->this : this +>this : C1 >b : any } @@ -65,7 +65,7 @@ class C1 { return this.c; >this.c : any ->this : this +>this : C1 >c : any } } @@ -80,13 +80,13 @@ class C2 extends C1 { return `${this.a} ${this.b} ${this.c}`; >`${this.a} ${this.b} ${this.c}` : string >this.a : any ->this : this +>this : C2 >a : any >this.b : any ->this : this +>this : C2 >b : any >this.c : any ->this : this +>this : C2 >c : any } } diff --git a/tests/baselines/reference/destructuringParameterProperties5.types b/tests/baselines/reference/destructuringParameterProperties5.types index 58d3b6d005d..0fa5369d197 100644 --- a/tests/baselines/reference/destructuringParameterProperties5.types +++ b/tests/baselines/reference/destructuringParameterProperties5.types @@ -37,19 +37,19 @@ class C1 { >this.x1 || this.x2 || this.x3 : any >this.x1 || this.x2 : any >this.x1 : any ->this : this +>this : C1 >x1 : any >this.x2 : any ->this : this +>this : C1 >x2 : any >this.x3 : any ->this : this +>this : C1 >x3 : any >this.y : any ->this : this +>this : C1 >y : any >this.z : any ->this : this +>this : C1 >z : any } } diff --git a/tests/baselines/reference/detachedCommentAtStartOfConstructor1.types b/tests/baselines/reference/detachedCommentAtStartOfConstructor1.types index 7cbae62f83d..392821de751 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfConstructor1.types +++ b/tests/baselines/reference/detachedCommentAtStartOfConstructor1.types @@ -19,13 +19,13 @@ class TestFile { >message + this.name : string >message : string >this.name : any ->this : this +>this : TestFile >name : any this.message = getMessage(); >this.message = getMessage() : string >this.message : string ->this : this +>this : TestFile >message : string >getMessage() : string >getMessage : () => string diff --git a/tests/baselines/reference/detachedCommentAtStartOfConstructor2.types b/tests/baselines/reference/detachedCommentAtStartOfConstructor2.types index 830be456e9a..b413cd557a5 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfConstructor2.types +++ b/tests/baselines/reference/detachedCommentAtStartOfConstructor2.types @@ -20,13 +20,13 @@ class TestFile { >message + this.name : string >message : string >this.name : string ->this : this +>this : TestFile >name : string this.message = getMessage(); >this.message = getMessage() : string >this.message : string ->this : this +>this : TestFile >message : string >getMessage() : string >getMessage : () => string diff --git a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.types b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.types index 00307a50027..cf8e6c357a1 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.types +++ b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.types @@ -14,7 +14,7 @@ class TestFile { >message + this.name : string >message : string >this.name : any ->this : this +>this : TestFile >name : any } } diff --git a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.types b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.types index 3b10cc03257..6e2b96e333c 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.types +++ b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.types @@ -15,7 +15,7 @@ class TestFile { >message + this.name : string >message : string >this.name : any ->this : this +>this : TestFile >name : any } } diff --git a/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction1.types b/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction1.types index e05a4c083cb..016a123c5c1 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction1.types +++ b/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction1.types @@ -20,7 +20,7 @@ class TestFile { >message + this.name : string >message : string >this.name : string ->this : this +>this : TestFile >name : string } } diff --git a/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction2.types b/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction2.types index 8dde223dad0..2199a4490b5 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction2.types +++ b/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction2.types @@ -21,7 +21,7 @@ class TestFile { >message + this.name : string >message : string >this.name : string ->this : this +>this : TestFile >name : string } } diff --git a/tests/baselines/reference/divergentAccessorsVisibility1.types b/tests/baselines/reference/divergentAccessorsVisibility1.types index 3f3ad6c5bd9..be7726c08fd 100644 --- a/tests/baselines/reference/divergentAccessorsVisibility1.types +++ b/tests/baselines/reference/divergentAccessorsVisibility1.types @@ -80,180 +80,180 @@ class Base { this.PublicPublic = 0; >this.PublicPublic = 0 : 0 >this.PublicPublic : number ->this : this +>this : Base >PublicPublic : number >0 : 0 this.PublicProtected = 0; >this.PublicProtected = 0 : 0 >this.PublicProtected : number ->this : this +>this : Base >PublicProtected : number >0 : 0 this.PublicPrivate = 0; >this.PublicPrivate = 0 : 0 >this.PublicPrivate : number ->this : this +>this : Base >PublicPrivate : number >0 : 0 this.ProtectedPublic = 0; >this.ProtectedPublic = 0 : 0 >this.ProtectedPublic : number ->this : this +>this : Base >ProtectedPublic : number >0 : 0 this.ProtectedProtected = 0; >this.ProtectedProtected = 0 : 0 >this.ProtectedProtected : number ->this : this +>this : Base >ProtectedProtected : number >0 : 0 this.ProtectedPrivate = 0; >this.ProtectedPrivate = 0 : 0 >this.ProtectedPrivate : number ->this : this +>this : Base >ProtectedPrivate : number >0 : 0 this.PrivatePublic = 0; >this.PrivatePublic = 0 : 0 >this.PrivatePublic : number ->this : this +>this : Base >PrivatePublic : number >0 : 0 this.PrivateProtected = 0; >this.PrivateProtected = 0 : 0 >this.PrivateProtected : number ->this : this +>this : Base >PrivateProtected : number >0 : 0 this.PrivatePrivate = 0; >this.PrivatePrivate = 0 : 0 >this.PrivatePrivate : number ->this : this +>this : Base >PrivatePrivate : number >0 : 0 void this.PublicPublic; >void this.PublicPublic : undefined >this.PublicPublic : number ->this : this +>this : Base >PublicPublic : number void this.PublicProtected; >void this.PublicProtected : undefined >this.PublicProtected : number ->this : this +>this : Base >PublicProtected : number void this.PublicPrivate; >void this.PublicPrivate : undefined >this.PublicPrivate : number ->this : this +>this : Base >PublicPrivate : number void this.ProtectedPublic; >void this.ProtectedPublic : undefined >this.ProtectedPublic : number ->this : this +>this : Base >ProtectedPublic : number void this.ProtectedProtected; >void this.ProtectedProtected : undefined >this.ProtectedProtected : number ->this : this +>this : Base >ProtectedProtected : number void this.ProtectedPrivate; >void this.ProtectedPrivate : undefined >this.ProtectedPrivate : number ->this : this +>this : Base >ProtectedPrivate : number void this.PrivatePublic; >void this.PrivatePublic : undefined >this.PrivatePublic : number ->this : this +>this : Base >PrivatePublic : number void this.PrivateProtected; >void this.PrivateProtected : undefined >this.PrivateProtected : number ->this : this +>this : Base >PrivateProtected : number void this.PrivatePrivate; >void this.PrivatePrivate : undefined >this.PrivatePrivate : number ->this : this +>this : Base >PrivatePrivate : number this.PublicPublic += 0; >this.PublicPublic += 0 : number >this.PublicPublic : number ->this : this +>this : Base >PublicPublic : number >0 : 0 this.PublicProtected += 0; >this.PublicProtected += 0 : number >this.PublicProtected : number ->this : this +>this : Base >PublicProtected : number >0 : 0 this.PublicPrivate += 0; >this.PublicPrivate += 0 : number >this.PublicPrivate : number ->this : this +>this : Base >PublicPrivate : number >0 : 0 this.ProtectedPublic += 0; >this.ProtectedPublic += 0 : number >this.ProtectedPublic : number ->this : this +>this : Base >ProtectedPublic : number >0 : 0 this.ProtectedProtected += 0; >this.ProtectedProtected += 0 : number >this.ProtectedProtected : number ->this : this +>this : Base >ProtectedProtected : number >0 : 0 this.ProtectedPrivate += 0; >this.ProtectedPrivate += 0 : number >this.ProtectedPrivate : number ->this : this +>this : Base >ProtectedPrivate : number >0 : 0 this.PrivatePublic += 0; >this.PrivatePublic += 0 : number >this.PrivatePublic : number ->this : this +>this : Base >PrivatePublic : number >0 : 0 this.PrivateProtected += 0; >this.PrivateProtected += 0 : number >this.PrivateProtected : number ->this : this +>this : Base >PrivateProtected : number >0 : 0 this.PrivatePrivate += 0; >this.PrivatePrivate += 0 : number >this.PrivatePrivate : number ->this : this +>this : Base >PrivatePrivate : number >0 : 0 } @@ -269,180 +269,180 @@ class Derived extends Base { this.PublicPublic = 0; >this.PublicPublic = 0 : 0 >this.PublicPublic : number ->this : this +>this : Derived >PublicPublic : number >0 : 0 this.PublicProtected = 0; >this.PublicProtected = 0 : 0 >this.PublicProtected : number ->this : this +>this : Derived >PublicProtected : number >0 : 0 this.PublicPrivate = 0; >this.PublicPrivate = 0 : 0 >this.PublicPrivate : number ->this : this +>this : Derived >PublicPrivate : number >0 : 0 this.ProtectedPublic = 0; >this.ProtectedPublic = 0 : 0 >this.ProtectedPublic : number ->this : this +>this : Derived >ProtectedPublic : number >0 : 0 this.ProtectedProtected = 0; >this.ProtectedProtected = 0 : 0 >this.ProtectedProtected : number ->this : this +>this : Derived >ProtectedProtected : number >0 : 0 this.ProtectedPrivate = 0; >this.ProtectedPrivate = 0 : 0 >this.ProtectedPrivate : number ->this : this +>this : Derived >ProtectedPrivate : number >0 : 0 this.PrivatePublic = 0; >this.PrivatePublic = 0 : 0 >this.PrivatePublic : number ->this : this +>this : Derived >PrivatePublic : number >0 : 0 this.PrivateProtected = 0; >this.PrivateProtected = 0 : 0 >this.PrivateProtected : number ->this : this +>this : Derived >PrivateProtected : number >0 : 0 this.PrivatePrivate = 0; >this.PrivatePrivate = 0 : 0 >this.PrivatePrivate : number ->this : this +>this : Derived >PrivatePrivate : number >0 : 0 void this.PublicPublic; >void this.PublicPublic : undefined >this.PublicPublic : number ->this : this +>this : Derived >PublicPublic : number void this.PublicProtected; >void this.PublicProtected : undefined >this.PublicProtected : number ->this : this +>this : Derived >PublicProtected : number void this.PublicPrivate; >void this.PublicPrivate : undefined >this.PublicPrivate : number ->this : this +>this : Derived >PublicPrivate : number void this.ProtectedPublic; >void this.ProtectedPublic : undefined >this.ProtectedPublic : number ->this : this +>this : Derived >ProtectedPublic : number void this.ProtectedProtected; >void this.ProtectedProtected : undefined >this.ProtectedProtected : number ->this : this +>this : Derived >ProtectedProtected : number void this.ProtectedPrivate; >void this.ProtectedPrivate : undefined >this.ProtectedPrivate : number ->this : this +>this : Derived >ProtectedPrivate : number void this.PrivatePublic; >void this.PrivatePublic : undefined >this.PrivatePublic : number ->this : this +>this : Derived >PrivatePublic : number void this.PrivateProtected; >void this.PrivateProtected : undefined >this.PrivateProtected : number ->this : this +>this : Derived >PrivateProtected : number void this.PrivatePrivate; >void this.PrivatePrivate : undefined >this.PrivatePrivate : number ->this : this +>this : Derived >PrivatePrivate : number this.PublicPublic += 0; >this.PublicPublic += 0 : number >this.PublicPublic : number ->this : this +>this : Derived >PublicPublic : number >0 : 0 this.PublicProtected += 0; >this.PublicProtected += 0 : number >this.PublicProtected : number ->this : this +>this : Derived >PublicProtected : number >0 : 0 this.PublicPrivate += 0; >this.PublicPrivate += 0 : number >this.PublicPrivate : number ->this : this +>this : Derived >PublicPrivate : number >0 : 0 this.ProtectedPublic += 0; >this.ProtectedPublic += 0 : number >this.ProtectedPublic : number ->this : this +>this : Derived >ProtectedPublic : number >0 : 0 this.ProtectedProtected += 0; >this.ProtectedProtected += 0 : number >this.ProtectedProtected : number ->this : this +>this : Derived >ProtectedProtected : number >0 : 0 this.ProtectedPrivate += 0; >this.ProtectedPrivate += 0 : number >this.ProtectedPrivate : number ->this : this +>this : Derived >ProtectedPrivate : number >0 : 0 this.PrivatePublic += 0; >this.PrivatePublic += 0 : number >this.PrivatePublic : number ->this : this +>this : Derived >PrivatePublic : number >0 : 0 this.PrivateProtected += 0; >this.PrivateProtected += 0 : number >this.PrivateProtected : number ->this : this +>this : Derived >PrivateProtected : number >0 : 0 this.PrivatePrivate += 0; >this.PrivatePrivate += 0 : number >this.PrivatePrivate : number ->this : this +>this : Derived >PrivatePrivate : number >0 : 0 } diff --git a/tests/baselines/reference/doesNotNarrowUnionOfConstructorsWithInstanceof.types b/tests/baselines/reference/doesNotNarrowUnionOfConstructorsWithInstanceof.types index 4e86d514f87..bd896598ff2 100644 --- a/tests/baselines/reference/doesNotNarrowUnionOfConstructorsWithInstanceof.types +++ b/tests/baselines/reference/doesNotNarrowUnionOfConstructorsWithInstanceof.types @@ -9,7 +9,7 @@ class A { this.length = 1 >this.length = 1 : 1 >this.length : 1 ->this : this +>this : A >length : 1 >1 : 1 } @@ -25,7 +25,7 @@ class B { this.length = 2 >this.length = 2 : 2 >this.length : 2 ->this : this +>this : B >length : 2 >2 : 2 } diff --git a/tests/baselines/reference/duplicateLocalVariable1.types b/tests/baselines/reference/duplicateLocalVariable1.types index 8fe3534944f..45082531467 100644 --- a/tests/baselines/reference/duplicateLocalVariable1.types +++ b/tests/baselines/reference/duplicateLocalVariable1.types @@ -57,7 +57,7 @@ export class TestRunner { >this.tests.push(test) : number >this.tests.push : (...items: TestCase[]) => number >this.tests : TestCase[] ->this : this +>this : TestRunner >tests : TestCase[] >push : (...items: TestCase[]) => number >test : TestCase @@ -72,7 +72,7 @@ export class TestRunner { for (var test in this.tests) { >test : string >this.tests : TestCase[] ->this : this +>this : TestRunner >tests : TestCase[] var exception = false; @@ -84,7 +84,7 @@ export class TestRunner { >this.tests[test] : TestCase >this.tests[test] : TestCase >this.tests : TestCase[] ->this : this +>this : TestRunner >tests : TestCase[] >test : string diff --git a/tests/baselines/reference/dynamicImportWithNestedThis_es2015.types b/tests/baselines/reference/dynamicImportWithNestedThis_es2015.types index 165929a43cf..e4aa73afc82 100644 --- a/tests/baselines/reference/dynamicImportWithNestedThis_es2015.types +++ b/tests/baselines/reference/dynamicImportWithNestedThis_es2015.types @@ -13,7 +13,7 @@ class C { return import(this._path); >import(this._path) : Promise >this._path : string ->this : this +>this : C >_path : string } } diff --git a/tests/baselines/reference/dynamicImportWithNestedThis_es5.types b/tests/baselines/reference/dynamicImportWithNestedThis_es5.types index 78b0f472971..c7227093e5d 100644 --- a/tests/baselines/reference/dynamicImportWithNestedThis_es5.types +++ b/tests/baselines/reference/dynamicImportWithNestedThis_es5.types @@ -13,7 +13,7 @@ class C { return import(this._path); >import(this._path) : Promise >this._path : string ->this : this +>this : C >_path : string } } diff --git a/tests/baselines/reference/emitCapturingThisInTupleDestructuring2.types b/tests/baselines/reference/emitCapturingThisInTupleDestructuring2.types index b27c5ea05bd..0e77d70de70 100644 --- a/tests/baselines/reference/emitCapturingThisInTupleDestructuring2.types +++ b/tests/baselines/reference/emitCapturingThisInTupleDestructuring2.types @@ -25,13 +25,13 @@ class B { >[this.test, this.test1, this.test2] = array1 : [number, number] >[this.test, this.test1, this.test2] : [number, any, any] >this.test : number ->this : this +>this : B >test : number >this.test1 : any ->this : this +>this : B >test1 : any >this.test2 : any ->this : this +>this : B >test2 : any >array1 : [number, number] } diff --git a/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types b/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types index f244efc274d..e854145bf42 100644 --- a/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types @@ -38,7 +38,7 @@ class B { this.y = 10; >this.y = 10 : 10 >this.y : number ->this : this +>this : B >y : number >10 : 10 } @@ -53,7 +53,7 @@ class B { return this._bar; >this._bar : string ->this : this +>this : B >_bar : string } } diff --git a/tests/baselines/reference/emitClassDeclarationWithExtensionAndTypeArgumentInES6.errors.txt b/tests/baselines/reference/emitClassDeclarationWithExtensionAndTypeArgumentInES6.errors.txt new file mode 100644 index 00000000000..1ffe3e1cd2a --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithExtensionAndTypeArgumentInES6.errors.txt @@ -0,0 +1,16 @@ +tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionAndTypeArgumentInES6.ts(8,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. + + +==== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionAndTypeArgumentInES6.ts (1 errors) ==== + class B { + constructor(a: T) { } + } + class C extends B { } + class D extends B { + constructor(a: any) + constructor(b: number) { + super(b); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types index 90733489fc1..48fe3875e7d 100644 --- a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types @@ -10,7 +10,7 @@ class C { return this._name; >this._name : string ->this : this +>this : C >_name : string } static get name2(): string { diff --git a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types index 1f8b336782a..b7bb37e50cd 100644 --- a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types @@ -28,7 +28,7 @@ class D { return this._bar; >this._bar : string ->this : this +>this : D >_bar : string } baz(a: any, x: string): string { diff --git a/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.errors.txt b/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.errors.txt new file mode 100644 index 00000000000..630f6c01a2a --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.errors.txt @@ -0,0 +1,30 @@ +tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAssignmentInES6.ts(21,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'D'. + + +==== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAssignmentInES6.ts (1 errors) ==== + class C { + x: string = "Hello world"; + } + + class D { + x: string = "Hello world"; + y: number; + constructor() { + this.y = 10; + } + } + + class E extends D{ + z: boolean = true; + } + + class F extends D{ + z: boolean = true; + j: string; + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'D'. + this.j = "HI"; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.types b/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.types index 3455e3e5c5d..2c55e289d1a 100644 --- a/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.types @@ -21,7 +21,7 @@ class D { this.y = 10; >this.y = 10 : 10 >this.y : number ->this : this +>this : D >y : number >10 : 10 } @@ -55,7 +55,7 @@ class F extends D{ this.j = "HI"; >this.j = "HI" : "HI" >this.j : string ->this : this +>this : F >j : string >"HI" : "HI" } diff --git a/tests/baselines/reference/emitClassDeclarationWithThisKeywordInES6.types b/tests/baselines/reference/emitClassDeclarationWithThisKeywordInES6.types index bdf57efcb0f..8c0373a71ca 100644 --- a/tests/baselines/reference/emitClassDeclarationWithThisKeywordInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithThisKeywordInES6.types @@ -10,7 +10,7 @@ class B { this.x = 10; >this.x = 10 : 10 >this.x : number ->this : this +>this : B >x : number >10 : 10 } @@ -27,7 +27,7 @@ class B { >B : typeof B >log : (a: number) => void >this.x : number ->this : this +>this : B >x : number } @@ -36,7 +36,7 @@ class B { return this.x; >this.x : number ->this : this +>this : B >x : number } @@ -47,7 +47,7 @@ class B { this.x = y; >this.x = y : number >this.x : number ->this : this +>this : B >x : number >y : number } diff --git a/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.types b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.types index 847da58c96a..1176d7cf05c 100644 --- a/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.types @@ -19,7 +19,7 @@ class B { >a : T >this.B = a : T >this.B : T ->this : this +>this : B >B : T >a : T @@ -40,7 +40,7 @@ class B { return this.x; >this.x : T ->this : this +>this : B >x : T } @@ -49,7 +49,7 @@ class B { return this.B; >this.B : T ->this : this +>this : B >B : T } set BBWith(c: T) { @@ -59,7 +59,7 @@ class B { this.B = c; >this.B = c : T >this.B : T ->this : this +>this : B >B : T >c : T } diff --git a/tests/baselines/reference/emitClassDeclarationWithTypeArgumentInES6.types b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentInES6.types index e20e6f4abe8..74a13dcff38 100644 --- a/tests/baselines/reference/emitClassDeclarationWithTypeArgumentInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentInES6.types @@ -12,7 +12,7 @@ class B { >a : T >this.B = a : T >this.B : T ->this : this +>this : B >B : T >a : T @@ -21,7 +21,7 @@ class B { return this.x; >this.x : T ->this : this +>this : B >x : T } get BB(): T { @@ -29,7 +29,7 @@ class B { return this.B; >this.B : T ->this : this +>this : B >B : T } set BBWith(c: T) { @@ -39,7 +39,7 @@ class B { this.B = c; >this.B = c : T >this.B : T ->this : this +>this : B >B : T >c : T } diff --git a/tests/baselines/reference/emitClassExpressionInDeclarationFile.errors.txt b/tests/baselines/reference/emitClassExpressionInDeclarationFile.errors.txt new file mode 100644 index 00000000000..e17d31ae083 --- /dev/null +++ b/tests/baselines/reference/emitClassExpressionInDeclarationFile.errors.txt @@ -0,0 +1,40 @@ +tests/cases/compiler/emitClassExpressionInDeclarationFile.ts(28,1): error TS2684: The 'this' context of type 'typeof Test' is not assignable to method's 'this' of type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T'. + Type 'typeof Test' is not assignable to type 'T'. + 'typeof Test' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Constructor'. + + +==== tests/cases/compiler/emitClassExpressionInDeclarationFile.ts (1 errors) ==== + export var simpleExample = class { + static getTags() { } + tags() { } + } + export var circularReference = class C { + static getTags(c: C): C { return c } + tags(c: C): C { return c } + } + + // repro from #15066 + export class FooItem { + foo(): void { } + name?: string; + } + + export type Constructor = new(...args: any[]) => T; + export function WithTags>(Base: T) { + return class extends Base { + static getTags(): void { } + tags(): void { } + } + } + + export class Test extends WithTags(FooItem) {} + + const test = new Test(); + + Test.getTags() + ~~~~ +!!! error TS2684: The 'this' context of type 'typeof Test' is not assignable to method's 'this' of type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T'. +!!! error TS2684: Type 'typeof Test' is not assignable to type 'T'. +!!! error TS2684: 'typeof Test' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Constructor'. + test.tags(); + \ No newline at end of file diff --git a/tests/baselines/reference/emitClassExpressionInDeclarationFile2.errors.txt b/tests/baselines/reference/emitClassExpressionInDeclarationFile2.errors.txt index 25c0bc8c50b..a1924623012 100644 --- a/tests/baselines/reference/emitClassExpressionInDeclarationFile2.errors.txt +++ b/tests/baselines/reference/emitClassExpressionInDeclarationFile2.errors.txt @@ -2,9 +2,12 @@ tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts(1,12): error TS409 tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'ps' of exported class expression may not be private or protected. tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts(16,17): error TS4094: Property 'property' of exported class expression may not be private or protected. tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts(23,14): error TS4094: Property 'property' of exported class expression may not be private or protected. +tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts(27,1): error TS2684: The 'this' context of type 'typeof Test' is not assignable to method's 'this' of type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T'. + Type 'typeof Test' is not assignable to type 'T'. + 'typeof Test' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Constructor'. -==== tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts (4 errors) ==== +==== tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts (5 errors) ==== export var noPrivates = class { ~~~~~~~~~~ !!! error TS4094: Property 'p' of exported class expression may not be private or protected. @@ -40,5 +43,9 @@ tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts(23,14): error TS40 const test = new Test(); Test.getTags() + ~~~~ +!!! error TS2684: The 'this' context of type 'typeof Test' is not assignable to method's 'this' of type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T'. +!!! error TS2684: Type 'typeof Test' is not assignable to type 'T'. +!!! error TS2684: 'typeof Test' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Constructor'. test.tags(); \ No newline at end of file diff --git a/tests/baselines/reference/emitStatementsBeforeSuperCall.types b/tests/baselines/reference/emitStatementsBeforeSuperCall.types index b5d5de4317c..e71259a301c 100644 --- a/tests/baselines/reference/emitStatementsBeforeSuperCall.types +++ b/tests/baselines/reference/emitStatementsBeforeSuperCall.types @@ -47,7 +47,7 @@ class Test extends Base { this.prop = 1; >this.prop = 1 : 1 >this.prop : number ->this : this +>this : Test >prop : number >1 : 1 } diff --git a/tests/baselines/reference/emitStatementsBeforeSuperCallWithDefineFields.types b/tests/baselines/reference/emitStatementsBeforeSuperCallWithDefineFields.types index ecf1e5afe9a..feed13364f2 100644 --- a/tests/baselines/reference/emitStatementsBeforeSuperCallWithDefineFields.types +++ b/tests/baselines/reference/emitStatementsBeforeSuperCallWithDefineFields.types @@ -47,7 +47,7 @@ class Test extends Base { this.prop = 1; >this.prop = 1 : 1 >this.prop : number ->this : this +>this : Test >prop : number >1 : 1 } diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.types b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.types index 54013c11fce..f696b666470 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.types +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.types @@ -99,7 +99,7 @@ class C8 { this.g(); >this.g() : void >this.g : () => void ->this : this +>this : C8 >g : () => void } } diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.types b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.types index 7c439f49b7f..b8f9d6961a5 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.types +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.types @@ -99,7 +99,7 @@ class C8 { this.g(); >this.g() : void >this.g : () => void ->this : this +>this : C8 >g : () => void } } diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.types b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.types index bb62ad37038..5f00431a37b 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.types +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.types @@ -99,7 +99,7 @@ class C8 { this.g(); >this.g() : void >this.g : () => void ->this : this +>this : C8 >g : () => void } } diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.errors.txt b/tests/baselines/reference/es6ClassSuperCodegenBug.errors.txt new file mode 100644 index 00000000000..abebe6fec5a --- /dev/null +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.errors.txt @@ -0,0 +1,22 @@ +tests/cases/compiler/es6ClassSuperCodegenBug.ts(7,10): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. +tests/cases/compiler/es6ClassSuperCodegenBug.ts(9,10): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/compiler/es6ClassSuperCodegenBug.ts (2 errors) ==== + class A { + constructor(str1:string, str2:string) {} + } + class B extends A { + constructor() { + if (true) { + super('a1', 'b1'); + ~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + } else { + super('a2', 'b2'); + ~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/es6ClassTest.errors.txt b/tests/baselines/reference/es6ClassTest.errors.txt index 4478fbe8156..4301feb08a8 100644 --- a/tests/baselines/reference/es6ClassTest.errors.txt +++ b/tests/baselines/reference/es6ClassTest.errors.txt @@ -1,7 +1,8 @@ tests/cases/compiler/es6ClassTest.ts(25,44): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/es6ClassTest.ts(26,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Bar'. -==== tests/cases/compiler/es6ClassTest.ts (1 errors) ==== +==== tests/cases/compiler/es6ClassTest.ts (2 errors) ==== class Bar { public goo: number; public prop1(x) { @@ -30,6 +31,8 @@ tests/cases/compiler/es6ClassTest.ts(25,44): error TS1015: Parameter cannot have ~ !!! error TS1015: Parameter cannot have question mark and initializer. super(x); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Bar'. this.x = x; this.gar = 5; } diff --git a/tests/baselines/reference/es6ClassTest.types b/tests/baselines/reference/es6ClassTest.types index a69c9573d7e..585394997a0 100644 --- a/tests/baselines/reference/es6ClassTest.types +++ b/tests/baselines/reference/es6ClassTest.types @@ -67,14 +67,14 @@ class Foo extends Bar { this.x = x; >this.x = x : any >this.x : any ->this : this +>this : Foo >x : any >x : any this.gar = 5; >this.gar = 5 : 5 >this.gar : number ->this : this +>this : Foo >gar : number >5 : 5 } diff --git a/tests/baselines/reference/es6ClassTest2.errors.txt b/tests/baselines/reference/es6ClassTest2.errors.txt index 17d9d41ed03..6d290c9e3f2 100644 --- a/tests/baselines/reference/es6ClassTest2.errors.txt +++ b/tests/baselines/reference/es6ClassTest2.errors.txt @@ -1,8 +1,9 @@ tests/cases/compiler/es6ClassTest2.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/es6ClassTest2.ts(35,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/es6ClassTest2.ts(99,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'SuperParent'. -==== tests/cases/compiler/es6ClassTest2.ts (2 errors) ==== +==== tests/cases/compiler/es6ClassTest2.ts (3 errors) ==== class BasicMonster { constructor(public name: string, public health: number) { @@ -106,6 +107,8 @@ tests/cases/compiler/es6ClassTest2.ts(35,9): error TS1056: Accessors are only av class SuperChild extends SuperParent { constructor() { super(1); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'SuperParent'. } b() { diff --git a/tests/baselines/reference/es6ClassTest2.types b/tests/baselines/reference/es6ClassTest2.types index 8d2253b2a2d..33ee4b245c9 100644 --- a/tests/baselines/reference/es6ClassTest2.types +++ b/tests/baselines/reference/es6ClassTest2.types @@ -86,7 +86,7 @@ class GetSetMonster { return this._health > 0; >this._health > 0 : boolean >this._health : number ->this : this +>this : GetSetMonster >_health : number >0 : 0 } @@ -109,7 +109,7 @@ class GetSetMonster { this._health = value >this._health = value : number >this._health : number ->this : this +>this : GetSetMonster >_health : number >value : number } @@ -352,14 +352,14 @@ class ImplementsInterface implements IFoo { this.x = 1; >this.x = 1 : 1 >this.x : number ->this : this +>this : ImplementsInterface >x : number >1 : 1 this.z = "foo"; >this.z = "foo" : "foo" >this.z : string ->this : this +>this : ImplementsInterface >z : string >"foo" : "foo" } @@ -387,14 +387,14 @@ class Visibility { this.x = 1; >this.x = 1 : 1 >this.x : number ->this : this +>this : Visibility >x : number >1 : 1 this.y = 2; >this.y = 2 : 2 >this.y : number ->this : this +>this : Visibility >y : number >2 : 2 } diff --git a/tests/baselines/reference/es6ClassTest3.types b/tests/baselines/reference/es6ClassTest3.types index 328589d76d6..a29194f2a83 100644 --- a/tests/baselines/reference/es6ClassTest3.types +++ b/tests/baselines/reference/es6ClassTest3.types @@ -24,14 +24,14 @@ module M { this.x = 1; >this.x = 1 : 1 >this.x : number ->this : this +>this : Visibility >x : number >1 : 1 this.y = 2; >this.y = 2 : 2 >this.y : number ->this : this +>this : Visibility >y : number >2 : 2 } diff --git a/tests/baselines/reference/es6ClassTest8.types b/tests/baselines/reference/es6ClassTest8.types index aa846d48e4c..e2afede5405 100644 --- a/tests/baselines/reference/es6ClassTest8.types +++ b/tests/baselines/reference/es6ClassTest8.types @@ -100,7 +100,7 @@ class Camera { this.forward = Vector.norm(Vector.minus(lookAt,this.pos)); >this.forward = Vector.norm(Vector.minus(lookAt,this.pos)) : Vector >this.forward : Vector ->this : this +>this : Camera >forward : Vector >Vector.norm(Vector.minus(lookAt,this.pos)) : Vector >Vector.norm : (v: Vector) => Vector @@ -112,13 +112,13 @@ class Camera { >minus : (v1: Vector, v2: Vector) => Vector >lookAt : Vector >this.pos : Vector ->this : this +>this : Camera >pos : Vector this.right = Vector.times(down, Vector.norm(Vector.cross(this.forward, down))); >this.right = Vector.times(down, Vector.norm(Vector.cross(this.forward, down))) : Vector >this.right : Vector ->this : this +>this : Camera >right : Vector >Vector.times(down, Vector.norm(Vector.cross(this.forward, down))) : Vector >Vector.times : (v1: Vector, v2: Vector) => Vector @@ -134,14 +134,14 @@ class Camera { >Vector : typeof Vector >cross : (v1: Vector, v2: Vector) => Vector >this.forward : Vector ->this : this +>this : Camera >forward : Vector >down : Vector this.up = Vector.times(down, Vector.norm(Vector.cross(this.forward, this.right))); >this.up = Vector.times(down, Vector.norm(Vector.cross(this.forward, this.right))) : Vector >this.up : Vector ->this : this +>this : Camera >up : Vector >Vector.times(down, Vector.norm(Vector.cross(this.forward, this.right))) : Vector >Vector.times : (v1: Vector, v2: Vector) => Vector @@ -157,10 +157,10 @@ class Camera { >Vector : typeof Vector >cross : (v1: Vector, v2: Vector) => Vector >this.forward : Vector ->this : this +>this : Camera >forward : Vector >this.right : Vector ->this : this +>this : Camera >right : Vector } } diff --git a/tests/baselines/reference/es6DeclOrdering.types b/tests/baselines/reference/es6DeclOrdering.types index 5920e5b8546..67c6504bdb0 100644 --- a/tests/baselines/reference/es6DeclOrdering.types +++ b/tests/baselines/reference/es6DeclOrdering.types @@ -10,7 +10,7 @@ class Bar { return this._store.length; >this._store.length : any >this._store : any ->this : this +>this : Bar >_store : any >length : any @@ -22,7 +22,7 @@ class Bar { this._store = store; // this is an error for some reason? Unresolved symbol store >this._store = store : string >this._store : any ->this : this +>this : Bar >_store : any >store : string diff --git a/tests/baselines/reference/es6MemberScoping.types b/tests/baselines/reference/es6MemberScoping.types index c60ffe0506c..68edb5df0d1 100644 --- a/tests/baselines/reference/es6MemberScoping.types +++ b/tests/baselines/reference/es6MemberScoping.types @@ -11,7 +11,7 @@ class Foo { return this._store.length; >this._store.length : any >this._store : any ->this : this +>this : Foo >_store : any >length : any } diff --git a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.errors.txt b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.errors.txt new file mode 100644 index 00000000000..222765c2456 --- /dev/null +++ b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.errors.txt @@ -0,0 +1,111 @@ +tests/cases/compiler/esNextWeakRefs_IterableWeakMap.ts(39,9): error TS2322: Type 'IterableWeakMap' is not assignable to type 'this'. + 'IterableWeakMap' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'IterableWeakMap'. + + +==== tests/cases/compiler/esNextWeakRefs_IterableWeakMap.ts (1 errors) ==== + /** `static #cleanup` */ + const IterableWeakMap_cleanup = ({ ref, set }: { + readonly ref: WeakRef; + readonly set: Set>; + }) => { + set.delete(ref); + }; + + // Based on: https://github.com/tc39/proposal-weakrefs/blob/master/README.md#iterable-weakmaps + export class IterableWeakMap implements WeakMap { + declare readonly [Symbol.toStringTag]: "IterableWeakMap"; + + #weakMap = new WeakMap; value: V }>(); + #refSet = new Set>(); + #finalizationGroup = new FinalizationRegistry(IterableWeakMap_cleanup); + + constructor(iterable: Iterable<[key: K, value: V]> | null = null) { + if (iterable !== null) { + for (const { 0: key, 1: value } of iterable) { + this.set(key, value); + } + } + } + + set(key: K, value: V): this { + const entry = this.#weakMap.get(key); + if (entry !== undefined) { + entry.value = value; + } else { + const ref = new WeakRef(key); + + this.#weakMap.set(key, { ref, value }); + this.#refSet.add(ref); + this.#finalizationGroup.register(key, { + set: this.#refSet, + ref, + }, ref); + } + return this; + ~~~~~~~~~~~~ +!!! error TS2322: Type 'IterableWeakMap' is not assignable to type 'this'. +!!! error TS2322: 'IterableWeakMap' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'IterableWeakMap'. + } + + has(key: K): boolean { + return this.#weakMap.has(key); + } + + get(key: K): V | undefined { + return this.#weakMap.get(key)?.value; + } + + delete(key: K): boolean { + const entry = this.#weakMap.get(key); + if (entry === undefined) { + return false; + } + + const { ref } = entry; + this.#weakMap.delete(key); + this.#refSet.delete(ref); + this.#finalizationGroup.unregister(ref); + return true; + } + + declare [Symbol.iterator]: this["entries"]; + *entries(): Generator<[key: K, value: V], void> { + for (const ref of this.#refSet) { + const key = ref.deref(); + if (key === undefined) continue; + const { value } = this.#weakMap.get(key)!; + yield [key, value]; + } + } + + *keys() { + for (const { 0: key } of this) { + yield key; + } + } + + *values() { + for (const { 1: value } of this) { + yield value; + } + } + } + + Object.defineProperties(IterableWeakMap.prototype, { + [Symbol.iterator]: { + configurable: true, + enumerable: false, + writable: true, + value: Object.getOwnPropertyDescriptor( + IterableWeakMap.prototype, + "entries", + )!.value, + }, + [Symbol.toStringTag]: { + configurable: true, + enumerable: false, + writable: false, + value: "IterableWeakMap", + }, + }); + \ No newline at end of file diff --git a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types index 79e54575127..6789ab0b251 100644 --- a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types +++ b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types @@ -66,10 +66,10 @@ export class IterableWeakMap implements WeakMap { >iterable : Iterable<[key: K, value: V]> this.set(key, value); ->this.set(key, value) : this ->this.set : (key: K, value: V) => this ->this : this ->set : (key: K, value: V) => this +>this.set(key, value) : IterableWeakMap +>this.set : (key: K, value: V) => IterableWeakMap +>this : IterableWeakMap +>set : (key: K, value: V) => IterableWeakMap >key : K >value : V } @@ -86,7 +86,7 @@ export class IterableWeakMap implements WeakMap { >this.#weakMap.get(key) : { readonly ref: WeakRef; value: V; } | undefined >this.#weakMap.get : (key: K) => { readonly ref: WeakRef; value: V; } | undefined >this.#weakMap : WeakMap; value: V; }> ->this : this +>this : IterableWeakMap >get : (key: K) => { readonly ref: WeakRef; value: V; } | undefined >key : K @@ -113,7 +113,7 @@ export class IterableWeakMap implements WeakMap { >this.#weakMap.set(key, { ref, value }) : WeakMap; value: V; }> >this.#weakMap.set : (key: K, value: { readonly ref: WeakRef; value: V; }) => WeakMap; value: V; }> >this.#weakMap : WeakMap; value: V; }> ->this : this +>this : IterableWeakMap >set : (key: K, value: { readonly ref: WeakRef; value: V; }) => WeakMap; value: V; }> >key : K >{ ref, value } : { ref: WeakRef; value: V; } @@ -124,7 +124,7 @@ export class IterableWeakMap implements WeakMap { >this.#refSet.add(ref) : Set> >this.#refSet.add : (value: WeakRef) => Set> >this.#refSet : Set> ->this : this +>this : IterableWeakMap >add : (value: WeakRef) => Set> >ref : WeakRef @@ -132,7 +132,7 @@ export class IterableWeakMap implements WeakMap { >this.#finalizationGroup.register(key, { set: this.#refSet, ref, }, ref) : void >this.#finalizationGroup.register : (target: object, heldValue: { readonly ref: WeakRef; readonly set: Set>; }, unregisterToken?: object | undefined) => void >this.#finalizationGroup : FinalizationRegistry<{ readonly ref: WeakRef; readonly set: Set>; }> ->this : this +>this : IterableWeakMap >register : (target: object, heldValue: { readonly ref: WeakRef; readonly set: Set>; }, unregisterToken?: object | undefined) => void >key : K >{ set: this.#refSet, ref, } : { set: Set>; ref: WeakRef; } @@ -140,7 +140,7 @@ export class IterableWeakMap implements WeakMap { set: this.#refSet, >set : Set> >this.#refSet : Set> ->this : this +>this : IterableWeakMap ref, >ref : WeakRef @@ -149,7 +149,7 @@ export class IterableWeakMap implements WeakMap { >ref : WeakRef } return this; ->this : this +>this : IterableWeakMap } has(key: K): boolean { @@ -160,7 +160,7 @@ export class IterableWeakMap implements WeakMap { >this.#weakMap.has(key) : boolean >this.#weakMap.has : (key: K) => boolean >this.#weakMap : WeakMap; value: V; }> ->this : this +>this : IterableWeakMap >has : (key: K) => boolean >key : K } @@ -174,7 +174,7 @@ export class IterableWeakMap implements WeakMap { >this.#weakMap.get(key) : { readonly ref: WeakRef; value: V; } | undefined >this.#weakMap.get : (key: K) => { readonly ref: WeakRef; value: V; } | undefined >this.#weakMap : WeakMap; value: V; }> ->this : this +>this : IterableWeakMap >get : (key: K) => { readonly ref: WeakRef; value: V; } | undefined >key : K >value : V | undefined @@ -189,7 +189,7 @@ export class IterableWeakMap implements WeakMap { >this.#weakMap.get(key) : { readonly ref: WeakRef; value: V; } | undefined >this.#weakMap.get : (key: K) => { readonly ref: WeakRef; value: V; } | undefined >this.#weakMap : WeakMap; value: V; }> ->this : this +>this : IterableWeakMap >get : (key: K) => { readonly ref: WeakRef; value: V; } | undefined >key : K @@ -210,7 +210,7 @@ export class IterableWeakMap implements WeakMap { >this.#weakMap.delete(key) : boolean >this.#weakMap.delete : (key: K) => boolean >this.#weakMap : WeakMap; value: V; }> ->this : this +>this : IterableWeakMap >delete : (key: K) => boolean >key : K @@ -218,7 +218,7 @@ export class IterableWeakMap implements WeakMap { >this.#refSet.delete(ref) : boolean >this.#refSet.delete : (value: WeakRef) => boolean >this.#refSet : Set> ->this : this +>this : IterableWeakMap >delete : (value: WeakRef) => boolean >ref : WeakRef @@ -226,7 +226,7 @@ export class IterableWeakMap implements WeakMap { >this.#finalizationGroup.unregister(ref) : void >this.#finalizationGroup.unregister : (unregisterToken: object) => void >this.#finalizationGroup : FinalizationRegistry<{ readonly ref: WeakRef; readonly set: Set>; }> ->this : this +>this : IterableWeakMap >unregister : (unregisterToken: object) => void >ref : WeakRef @@ -246,7 +246,7 @@ export class IterableWeakMap implements WeakMap { for (const ref of this.#refSet) { >ref : WeakRef >this.#refSet : Set> ->this : this +>this : IterableWeakMap const key = ref.deref(); >key : K | undefined @@ -266,7 +266,7 @@ export class IterableWeakMap implements WeakMap { >this.#weakMap.get(key) : { readonly ref: WeakRef; value: V; } | undefined >this.#weakMap.get : (key: K) => { readonly ref: WeakRef; value: V; } | undefined >this.#weakMap : WeakMap; value: V; }> ->this : this +>this : IterableWeakMap >get : (key: K) => { readonly ref: WeakRef; value: V; } | undefined >key : K @@ -283,7 +283,7 @@ export class IterableWeakMap implements WeakMap { for (const { 0: key } of this) { >key : K ->this : this +>this : IterableWeakMap yield key; >yield key : any @@ -296,7 +296,7 @@ export class IterableWeakMap implements WeakMap { for (const { 1: value } of this) { >value : V ->this : this +>this : IterableWeakMap yield value; >yield value : any diff --git a/tests/baselines/reference/exportNestedNamespaces.types b/tests/baselines/reference/exportNestedNamespaces.types index a6a6467a637..9ccef86ebcb 100644 --- a/tests/baselines/reference/exportNestedNamespaces.types +++ b/tests/baselines/reference/exportNestedNamespaces.types @@ -33,7 +33,7 @@ exports.Classic = class { this.p = 1 >this.p = 1 : 1 >this.p : any ->this : this +>this : Classic >p : any >1 : 1 } diff --git a/tests/baselines/reference/expressionTypeNodeShouldError.types b/tests/baselines/reference/expressionTypeNodeShouldError.types index dacaae1f19e..d4b26a70ba5 100644 --- a/tests/baselines/reference/expressionTypeNodeShouldError.types +++ b/tests/baselines/reference/expressionTypeNodeShouldError.types @@ -23,7 +23,7 @@ class C { >typeof(this.foo) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(this.foo) : () => void >this.foo : () => void ->this : this +>this : C >foo : () => void } } @@ -64,7 +64,7 @@ class C2 { >typeof(this.foo) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(this.foo) : () => void >this.foo : () => void ->this : this +>this : C2 >foo : () => void } } @@ -106,7 +106,7 @@ class C3 { >typeof(this.foo) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(this.foo) : () => void >this.foo : () => void ->this : this +>this : C3 >foo : () => void } } diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt b/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt index e23d9ebd282..17dea124729 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt @@ -2,10 +2,15 @@ tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(7,7): error TS2720: C The types returned by 'bar()' are incompatible between these types. Type 'string' is not assignable to type 'number'. tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(12,5): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(15,18): error TS2684: The 'this' context of type 'D' is not assignable to method's 'this' of type 'C'. + The types returned by 'bar()' are incompatible between these types. + Type 'string' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(16,5): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(16,18): error TS2684: The 'this' context of type 'D' is not assignable to method's 'this' of type 'C'. -==== tests/cases/compiler/extendAndImplementTheSameBaseType2.ts (3 errors) ==== +==== tests/cases/compiler/extendAndImplementTheSameBaseType2.ts (5 errors) ==== class C { foo: number bar(): T { @@ -27,6 +32,13 @@ tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(16,5): error TS2322: var r2: number = d.foo; var r3: string = d.bar(); + ~ +!!! error TS2684: The 'this' context of type 'D' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: The types returned by 'bar()' are incompatible between these types. +!!! error TS2684: Type 'string' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. var r4: number = d.bar(); ~~ -!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number'. + ~ +!!! error TS2684: The 'this' context of type 'D' is not assignable to method's 'this' of type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/extendsTag2.errors.txt b/tests/baselines/reference/extendsTag2.errors.txt index 719bbdadc21..d97a2703417 100644 --- a/tests/baselines/reference/extendsTag2.errors.txt +++ b/tests/baselines/reference/extendsTag2.errors.txt @@ -1,8 +1,9 @@ error TS8022: JSDoc '@extends' is not attached to a class. +tests/cases/conformance/jsdoc/foo.js(17,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. !!! error TS8022: JSDoc '@extends' is not attached to a class. -==== tests/cases/conformance/jsdoc/foo.js (0 errors) ==== +==== tests/cases/conformance/jsdoc/foo.js (1 errors) ==== /** * @constructor */ @@ -20,6 +21,8 @@ error TS8022: JSDoc '@extends' is not attached to a class. class B extends A { constructor() { super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. } } \ No newline at end of file diff --git a/tests/baselines/reference/extendsTag3.errors.txt b/tests/baselines/reference/extendsTag3.errors.txt new file mode 100644 index 00000000000..15680e0feae --- /dev/null +++ b/tests/baselines/reference/extendsTag3.errors.txt @@ -0,0 +1,23 @@ +tests/cases/conformance/jsdoc/foo.js(14,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/conformance/jsdoc/foo.js (1 errors) ==== + /** + * @constructor + */ + class A { + constructor() {} + } + + /** + * @extends {A} + * @constructor + */ + class B extends A { + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/fatArrowSelf.types b/tests/baselines/reference/fatArrowSelf.types index a7d3f7a7b2b..565dac76ed8 100644 --- a/tests/baselines/reference/fatArrowSelf.types +++ b/tests/baselines/reference/fatArrowSelf.types @@ -34,7 +34,7 @@ module Consumer { >this.emitter.addListener('change', (e) => { this.changed(); }) : void >this.emitter.addListener : (type: string, listener: Events.ListenerCallback) => void >this.emitter : Events.EventEmitter ->this : this +>this : EventEmitterConsummer >emitter : Events.EventEmitter >addListener : (type: string, listener: Events.ListenerCallback) => void >'change' : "change" @@ -44,7 +44,7 @@ module Consumer { this.changed(); >this.changed() : void >this.changed : () => void ->this : this +>this : EventEmitterConsummer >changed : () => void }); diff --git a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt index f40ed6fa996..ac10f0fbe4e 100644 --- a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt +++ b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt @@ -5,6 +5,7 @@ tests/cases/compiler/BaseB.js(3,14): error TS8010: Type annotations can only be tests/cases/compiler/BaseB.js(4,25): error TS2304: Cannot find name 'Class'. tests/cases/compiler/BaseB.js(4,25): error TS8010: Type annotations can only be used in TypeScript files. tests/cases/compiler/SubB.js(3,41): error TS8011: Type arguments can only be used in TypeScript files. +tests/cases/compiler/SubB.js(5,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. ==== tests/cases/compiler/BaseA.js (0 errors) ==== @@ -35,7 +36,7 @@ tests/cases/compiler/SubB.js(3,41): error TS8011: Type arguments can only be use this._AClass = AClass; } } -==== tests/cases/compiler/SubB.js (1 errors) ==== +==== tests/cases/compiler/SubB.js (2 errors) ==== import SubA from './SubA'; import BaseB from './BaseB'; export default class SubB extends BaseB { @@ -43,6 +44,8 @@ tests/cases/compiler/SubB.js(3,41): error TS8011: Type arguments can only be use !!! error TS8011: Type arguments can only be used in TypeScript files. constructor() { super(SubA); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. } } \ No newline at end of file diff --git a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.types b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.types index 08990bb6cbe..292edc8f0d2 100644 --- a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.types +++ b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.types @@ -27,7 +27,7 @@ export default class B { this._AClass = AClass; >this._AClass = AClass : Class >this._AClass : Class ->this : this +>this : B >_AClass : Class >AClass : Class } diff --git a/tests/baselines/reference/fluentClasses.errors.txt b/tests/baselines/reference/fluentClasses.errors.txt new file mode 100644 index 00000000000..0333364112c --- /dev/null +++ b/tests/baselines/reference/fluentClasses.errors.txt @@ -0,0 +1,24 @@ +tests/cases/conformance/types/thisType/fluentClasses.ts(17,17): error TS2339: Property 'bar' does not exist on type 'A'. + + +==== tests/cases/conformance/types/thisType/fluentClasses.ts (1 errors) ==== + class A { + foo() { + return this; + } + } + class B extends A { + bar() { + return this; + } + } + class C extends B { + baz() { + return this; + } + } + var c: C; + var z = c.foo().bar().baz(); // Fluent pattern + ~~~ +!!! error TS2339: Property 'bar' does not exist on type 'A'. + \ No newline at end of file diff --git a/tests/baselines/reference/fluentClasses.symbols b/tests/baselines/reference/fluentClasses.symbols index d33bd8697ce..273df3546ac 100644 --- a/tests/baselines/reference/fluentClasses.symbols +++ b/tests/baselines/reference/fluentClasses.symbols @@ -37,11 +37,7 @@ var c: C; var z = c.foo().bar().baz(); // Fluent pattern >z : Symbol(z, Decl(fluentClasses.ts, 16, 3)) ->c.foo().bar().baz : Symbol(C.baz, Decl(fluentClasses.ts, 10, 19)) ->c.foo().bar : Symbol(B.bar, Decl(fluentClasses.ts, 5, 19)) >c.foo : Symbol(A.foo, Decl(fluentClasses.ts, 0, 9)) >c : Symbol(c, Decl(fluentClasses.ts, 15, 3)) >foo : Symbol(A.foo, Decl(fluentClasses.ts, 0, 9)) ->bar : Symbol(B.bar, Decl(fluentClasses.ts, 5, 19)) ->baz : Symbol(C.baz, Decl(fluentClasses.ts, 10, 19)) diff --git a/tests/baselines/reference/fluentClasses.types b/tests/baselines/reference/fluentClasses.types index 5e84ff73871..1e535ca472d 100644 --- a/tests/baselines/reference/fluentClasses.types +++ b/tests/baselines/reference/fluentClasses.types @@ -3,10 +3,10 @@ class A { >A : A foo() { ->foo : () => this +>foo : () => A return this; ->this : this +>this : A } } class B extends A { @@ -14,10 +14,10 @@ class B extends A { >A : A bar() { ->bar : () => this +>bar : () => B return this; ->this : this +>this : B } } class C extends B { @@ -25,25 +25,25 @@ class C extends B { >B : B baz() { ->baz : () => this +>baz : () => C return this; ->this : this +>this : C } } var c: C; >c : C var z = c.foo().bar().baz(); // Fluent pattern ->z : C ->c.foo().bar().baz() : C ->c.foo().bar().baz : () => C ->c.foo().bar() : C ->c.foo().bar : () => C ->c.foo() : C ->c.foo : () => C +>z : any +>c.foo().bar().baz() : any +>c.foo().bar().baz : any +>c.foo().bar() : any +>c.foo().bar : any +>c.foo() : A +>c.foo : () => A >c : C ->foo : () => C ->bar : () => C ->baz : () => C +>foo : () => A +>bar : any +>baz : any diff --git a/tests/baselines/reference/for-inStatements.errors.txt b/tests/baselines/reference/for-inStatements.errors.txt index 03e11ff1115..0bda98a3c42 100644 --- a/tests/baselines/reference/for-inStatements.errors.txt +++ b/tests/baselines/reference/for-inStatements.errors.txt @@ -1,9 +1,7 @@ -tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(33,18): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'Extract'. -tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(50,18): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'Extract'. tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(79,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'Color.Blue'. -==== tests/cases/conformance/statements/for-inStatements/for-inStatements.ts (3 errors) ==== +==== tests/cases/conformance/statements/for-inStatements/for-inStatements.ts (1 errors) ==== var aString: string; for (aString in {}) { } @@ -37,9 +35,6 @@ tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(79,15): for (var x in this.biz()) { } for (var x in this.biz) { } for (var x in this) { } - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'Extract'. -!!! related TS6203 tests/cases/conformance/statements/for-inStatements/for-inStatements.ts:31:18: 'x' was also declared here. return null; } @@ -57,9 +52,6 @@ tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(79,15): for (var x in this.biz()) { } for (var x in this.biz) { } for (var x in this) { } - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'Extract'. -!!! related TS6203 tests/cases/conformance/statements/for-inStatements/for-inStatements.ts:48:18: 'x' was also declared here. for (var x in super.biz) { } for (var x in super.biz()) { } diff --git a/tests/baselines/reference/for-inStatements.types b/tests/baselines/reference/for-inStatements.types index 5ff67188a22..6e28e88c783 100644 --- a/tests/baselines/reference/for-inStatements.types +++ b/tests/baselines/reference/for-inStatements.types @@ -122,18 +122,18 @@ class A { >x : string >this.biz() : any >this.biz : () => any ->this : this +>this : A >biz : () => any for (var x in this.biz) { } >x : string >this.biz : () => any ->this : this +>this : A >biz : () => any for (var x in this) { } >x : string ->this : this +>this : A return null; >null : null @@ -175,18 +175,18 @@ class B extends A { >x : string >this.biz() : any >this.biz : () => any ->this : this +>this : B >biz : () => any for (var x in this.biz) { } >x : string >this.biz : () => any ->this : this +>this : B >biz : () => any for (var x in this) { } >x : string ->this : this +>this : B for (var x in super.biz) { } >x : string diff --git a/tests/baselines/reference/for-inStatementsInvalid.errors.txt b/tests/baselines/reference/for-inStatementsInvalid.errors.txt index e8e29b37c4e..22c7d2aa490 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.errors.txt +++ b/tests/baselines/reference/for-inStatementsInvalid.errors.txt @@ -9,15 +9,13 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(1 tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(20,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'string'. tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(22,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'string'. tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(29,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'number'. -tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(31,18): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'Extract'. tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(38,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'number'. tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(46,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'number'. -tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(48,18): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'Extract'. tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(51,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'number'. tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(62,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'number'. -==== tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts (17 errors) ==== +==== tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts (15 errors) ==== var aNumber: number; for (aNumber in {}) { } ~~~~~~~ @@ -71,9 +69,6 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(6 !!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'number'. for (var x in this.biz) { } for (var x in this) { } - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'Extract'. -!!! related TS6203 tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts:29:18: 'x' was also declared here. return null; } @@ -95,9 +90,6 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(6 !!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'number'. for (var x in this.biz) { } for (var x in this) { } - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'Extract'. -!!! related TS6203 tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts:46:18: 'x' was also declared here. for (var x in super.biz) { } for (var x in super.biz()) { } diff --git a/tests/baselines/reference/for-inStatementsInvalid.types b/tests/baselines/reference/for-inStatementsInvalid.types index c58d6aada5b..99dc8c5e889 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.types +++ b/tests/baselines/reference/for-inStatementsInvalid.types @@ -107,18 +107,18 @@ class A { >x : string >this.biz() : number >this.biz : () => number ->this : this +>this : A >biz : () => number for (var x in this.biz) { } >x : string >this.biz : () => number ->this : this +>this : A >biz : () => number for (var x in this) { } >x : string ->this : this +>this : A return null; >null : null @@ -160,18 +160,18 @@ class B extends A { >x : string >this.biz() : number >this.biz : () => number ->this : this +>this : B >biz : () => number for (var x in this.biz) { } >x : string >this.biz : () => number ->this : this +>this : B >biz : () => number for (var x in this) { } >x : string ->this : this +>this : B for (var x in super.biz) { } >x : string diff --git a/tests/baselines/reference/for-of15.types b/tests/baselines/reference/for-of15.types index 130e2c21c72..c384248beaf 100644 --- a/tests/baselines/reference/for-of15.types +++ b/tests/baselines/reference/for-of15.types @@ -9,13 +9,13 @@ class StringIterator { >"" : "" } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : StringIterator } } diff --git a/tests/baselines/reference/for-of16.types b/tests/baselines/reference/for-of16.types index 2fb955fec59..cae08fd6e7b 100644 --- a/tests/baselines/reference/for-of16.types +++ b/tests/baselines/reference/for-of16.types @@ -3,13 +3,13 @@ class StringIterator { >StringIterator : StringIterator [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : StringIterator } } diff --git a/tests/baselines/reference/for-of17.types b/tests/baselines/reference/for-of17.types index be085861825..09cb33ae484 100644 --- a/tests/baselines/reference/for-of17.types +++ b/tests/baselines/reference/for-of17.types @@ -19,13 +19,13 @@ class NumberIterator { }; } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => NumberIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : NumberIterator } } diff --git a/tests/baselines/reference/for-of18.types b/tests/baselines/reference/for-of18.types index 643afccd737..9b292ff011d 100644 --- a/tests/baselines/reference/for-of18.types +++ b/tests/baselines/reference/for-of18.types @@ -19,13 +19,13 @@ class StringIterator { }; } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : StringIterator } } diff --git a/tests/baselines/reference/for-of19.types b/tests/baselines/reference/for-of19.types index 04a7180dfad..7694f7781bf 100644 --- a/tests/baselines/reference/for-of19.types +++ b/tests/baselines/reference/for-of19.types @@ -23,13 +23,13 @@ class FooIterator { }; } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/for-of20.types b/tests/baselines/reference/for-of20.types index 1261375e897..99ae4655050 100644 --- a/tests/baselines/reference/for-of20.types +++ b/tests/baselines/reference/for-of20.types @@ -23,13 +23,13 @@ class FooIterator { }; } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/for-of21.types b/tests/baselines/reference/for-of21.types index e499da66865..53b3cd389f5 100644 --- a/tests/baselines/reference/for-of21.types +++ b/tests/baselines/reference/for-of21.types @@ -23,13 +23,13 @@ class FooIterator { }; } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/for-of22.types b/tests/baselines/reference/for-of22.types index 524aafb6c6f..5bd0bf4d606 100644 --- a/tests/baselines/reference/for-of22.types +++ b/tests/baselines/reference/for-of22.types @@ -23,13 +23,13 @@ class FooIterator { }; } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/for-of23.types b/tests/baselines/reference/for-of23.types index ca817cb7625..834a6856d70 100644 --- a/tests/baselines/reference/for-of23.types +++ b/tests/baselines/reference/for-of23.types @@ -23,13 +23,13 @@ class FooIterator { }; } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/for-of26.types b/tests/baselines/reference/for-of26.types index bfe34a0488d..3872f6ca36d 100644 --- a/tests/baselines/reference/for-of26.types +++ b/tests/baselines/reference/for-of26.types @@ -9,13 +9,13 @@ class StringIterator { >x : any } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : StringIterator } } diff --git a/tests/baselines/reference/for-of28.types b/tests/baselines/reference/for-of28.types index d9e2099119f..d39e70e7167 100644 --- a/tests/baselines/reference/for-of28.types +++ b/tests/baselines/reference/for-of28.types @@ -6,13 +6,13 @@ class StringIterator { >next : any [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : StringIterator } } diff --git a/tests/baselines/reference/for-of30.types b/tests/baselines/reference/for-of30.types index 2fcf0af6474..6bb672ded8c 100644 --- a/tests/baselines/reference/for-of30.types +++ b/tests/baselines/reference/for-of30.types @@ -23,13 +23,13 @@ class StringIterator { >0 : 0 [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : StringIterator } } diff --git a/tests/baselines/reference/for-of31.types b/tests/baselines/reference/for-of31.types index 35d486a665a..ab7f5155bc7 100644 --- a/tests/baselines/reference/for-of31.types +++ b/tests/baselines/reference/for-of31.types @@ -16,13 +16,13 @@ class StringIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : StringIterator } } diff --git a/tests/baselines/reference/for-of34.types b/tests/baselines/reference/for-of34.types index 9fbb7a15391..9ccc563d1ed 100644 --- a/tests/baselines/reference/for-of34.types +++ b/tests/baselines/reference/for-of34.types @@ -10,13 +10,13 @@ class StringIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : StringIterator } } diff --git a/tests/baselines/reference/for-of35.types b/tests/baselines/reference/for-of35.types index b3e363a0c12..6649b650569 100644 --- a/tests/baselines/reference/for-of35.types +++ b/tests/baselines/reference/for-of35.types @@ -19,13 +19,13 @@ class StringIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : StringIterator } } diff --git a/tests/baselines/reference/functionOverloads7.types b/tests/baselines/reference/functionOverloads7.types index 5bbc25dd5e2..c55e938c225 100644 --- a/tests/baselines/reference/functionOverloads7.types +++ b/tests/baselines/reference/functionOverloads7.types @@ -21,7 +21,7 @@ class foo { >foo : any >this.bar() : any >this.bar : { (): any; (foo: string): any; } ->this : this +>this : foo >bar : { (): any; (foo: string): any; } foo = this.bar("test"); @@ -29,7 +29,7 @@ class foo { >foo : any >this.bar("test") : any >this.bar : { (): any; (foo: string): any; } ->this : this +>this : foo >bar : { (): any; (foo: string): any; } >"test" : "test" } diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.types b/tests/baselines/reference/functionSubtypingOfVarArgs.types index ec48ff26c66..ebd706e94cf 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.types +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.types @@ -15,7 +15,7 @@ class EventBase { >this._listeners.push(listener) : number >this._listeners.push : (...items: any[]) => number >this._listeners : any[] ->this : this +>this : EventBase >_listeners : any[] >push : (...items: any[]) => number >listener : (...args: any[]) => void diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.types b/tests/baselines/reference/functionSubtypingOfVarArgs2.types index 3aa5b7a7a00..5e2b14ffc7a 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.types +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.types @@ -16,7 +16,7 @@ class EventBase { >this._listeners.push(listener) : number >this._listeners.push : (...items: ((...args: any[]) => void)[]) => number >this._listeners : ((...args: any[]) => void)[] ->this : this +>this : EventBase >_listeners : ((...args: any[]) => void)[] >push : (...items: ((...args: any[]) => void)[]) => number >listener : (...args: any[]) => void diff --git a/tests/baselines/reference/functionWithSameNameAsField.types b/tests/baselines/reference/functionWithSameNameAsField.types index 00dbbfb49fb..983a1640a17 100644 --- a/tests/baselines/reference/functionWithSameNameAsField.types +++ b/tests/baselines/reference/functionWithSameNameAsField.types @@ -6,18 +6,18 @@ class TestProgressBar { >total : number public total(total: number) { ->total : (total: number) => this +>total : (total: number) => TestProgressBar >total : number this.total = total; >this.total = total : number >this.total : number ->this : this +>this : TestProgressBar >total : number >total : number return this; ->this : this +>this : TestProgressBar } } diff --git a/tests/baselines/reference/functionsInClassExpressions.types b/tests/baselines/reference/functionsInClassExpressions.types index 7352f6e6b12..5641ccbf691 100644 --- a/tests/baselines/reference/functionsInClassExpressions.types +++ b/tests/baselines/reference/functionsInClassExpressions.types @@ -7,7 +7,7 @@ let Foo = class { this.bar++; >this.bar++ : number >this.bar : number ->this : this +>this : Foo >bar : number } bar = 0; @@ -27,6 +27,6 @@ let Foo = class { m() { return this.bar; } >m : () => number >this.bar : number ->this : this +>this : Foo >bar : number } diff --git a/tests/baselines/reference/fuzzy.errors.txt b/tests/baselines/reference/fuzzy.errors.txt index b935293973e..3ac3331c38c 100644 --- a/tests/baselines/reference/fuzzy.errors.txt +++ b/tests/baselines/reference/fuzzy.errors.txt @@ -1,9 +1,8 @@ tests/cases/compiler/fuzzy.ts(13,18): error TS2420: Class 'C' incorrectly implements interface 'I'. Property 'alsoWorks' is missing in type 'C' but required in type 'I'. -tests/cases/compiler/fuzzy.ts(21,34): error TS2322: Type 'this' is not assignable to type 'I'. - Type 'C' is not assignable to type 'I'. -tests/cases/compiler/fuzzy.ts(25,20): error TS2352: Conversion of type '{ oneI: this; }' to type 'R' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Property 'anything' is missing in type '{ oneI: this; }' but required in type 'R'. +tests/cases/compiler/fuzzy.ts(21,34): error TS2741: Property 'alsoWorks' is missing in type 'C' but required in type 'I'. +tests/cases/compiler/fuzzy.ts(25,20): error TS2352: Conversion of type '{ oneI: C; }' to type 'R' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. + Property 'anything' is missing in type '{ oneI: C; }' but required in type 'R'. ==== tests/cases/compiler/fuzzy.ts (3 errors) ==== @@ -33,16 +32,16 @@ tests/cases/compiler/fuzzy.ts(25,20): error TS2352: Conversion of type '{ oneI: doesntWork():R { return { anything:1, oneI:this }; ~~~~ -!!! error TS2322: Type 'this' is not assignable to type 'I'. -!!! error TS2322: Type 'C' is not assignable to type 'I'. +!!! error TS2741: Property 'alsoWorks' is missing in type 'C' but required in type 'I'. +!!! related TS2728 tests/cases/compiler/fuzzy.ts:4:9: 'alsoWorks' is declared here. !!! related TS6500 tests/cases/compiler/fuzzy.ts:10:9: The expected type comes from property 'oneI' which is declared here on type 'R' } worksToo():R { return ({ oneI: this }); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type '{ oneI: this; }' to type 'R' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'anything' is missing in type '{ oneI: this; }' but required in type 'R'. +!!! error TS2352: Conversion of type '{ oneI: C; }' to type 'R' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'anything' is missing in type '{ oneI: C; }' but required in type 'R'. !!! related TS2728 tests/cases/compiler/fuzzy.ts:9:9: 'anything' is declared here. } } diff --git a/tests/baselines/reference/fuzzy.types b/tests/baselines/reference/fuzzy.types index 0cc18695bc5..0c8032315da 100644 --- a/tests/baselines/reference/fuzzy.types +++ b/tests/baselines/reference/fuzzy.types @@ -42,11 +42,11 @@ module M { >doesntWork : () => R return { anything:1, oneI:this }; ->{ anything:1, oneI:this } : { anything: number; oneI: this; } +>{ anything:1, oneI:this } : { anything: number; oneI: C; } >anything : number >1 : 1 ->oneI : this ->this : this +>oneI : C +>this : C } worksToo():R { @@ -54,10 +54,10 @@ module M { return ({ oneI: this }); >({ oneI: this }) : R ->({ oneI: this }) : { oneI: this; } ->{ oneI: this } : { oneI: this; } ->oneI : this ->this : this +>({ oneI: this }) : { oneI: C; } +>{ oneI: this } : { oneI: C; } +>oneI : C +>this : C } } } diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.types b/tests/baselines/reference/genericBaseClassLiteralProperty.types index f4141ff11c8..3357767a583 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.types +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.types @@ -20,14 +20,14 @@ class SubClass extends BaseClass { >x : number >this._getValue1() : number >this._getValue1 : () => number ->this : this +>this : SubClass >_getValue1 : () => number var y : number = this._getValue2(); >y : number >this._getValue2() : number >this._getValue2 : () => number ->this : this +>this : SubClass >_getValue2 : () => number } } diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.types b/tests/baselines/reference/genericBaseClassLiteralProperty2.types index e5a17962e8d..c69812dd41b 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.types +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.types @@ -13,7 +13,7 @@ class BaseCollection2 { this._itemsByKey = {}; >this._itemsByKey = {} : {} >this._itemsByKey : { [key: string]: TItem; } ->this : this +>this : BaseCollection2 >_itemsByKey : { [key: string]: TItem; } >{} : {} } @@ -31,7 +31,7 @@ class DataView2 extends BaseCollection2 { >this._itemsByKey['dummy'] = item : CollectionItem2 >this._itemsByKey['dummy'] : CollectionItem2 >this._itemsByKey : { [key: string]: CollectionItem2; } ->this : this +>this : DataView2 >_itemsByKey : { [key: string]: CollectionItem2; } >'dummy' : "dummy" >item : CollectionItem2 diff --git a/tests/baselines/reference/genericCallTypeArgumentInference.errors.txt b/tests/baselines/reference/genericCallTypeArgumentInference.errors.txt new file mode 100644 index 00000000000..149ed515f0c --- /dev/null +++ b/tests/baselines/reference/genericCallTypeArgumentInference.errors.txt @@ -0,0 +1,122 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(62,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'string' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(63,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(64,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(65,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(66,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(67,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(68,11): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(69,11): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + + +==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts (8 errors) ==== + // Basic type inference with generic calls, no errors expected + + function foo(t: T) { + return t; + } + + var r = foo(''); // string + + function foo2(t: T, u: U) { + return u; + } + + function foo2b(u: U) { + var x: T; + return x; + } + + var r2 = foo2('', 1); // number + var r3 = foo2b(1); // {} + + class C { + constructor(public t: T, public u: U) { + } + + foo(t: T, u: U) { + return t; + } + + foo2(t: T, u: U) { + return u; + } + + foo3(t: T, u: U) { + return t; + } + + foo4(t: T, u: U) { + return t; + } + + foo5(t: T, u: U) { + return t; + } + + foo6() { + var x: T; + return x; + } + + foo7(u: U) { + var x: T; + return x; + } + + foo8() { + var x: T; + return x; + } + } + + var c = new C('', 1); + var r4 = c.foo('', 1); // string + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'string' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. + var r5 = c.foo2('', 1); // number + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r6 = c.foo3(true, 1); // boolean + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r7 = c.foo4('', true); // string + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r8 = c.foo5(true, 1); // boolean + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r9 = c.foo6(); // {} + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r10 = c.foo7(''); // {} + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r11 = c.foo8(); // {} + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + + interface I { + new (t: T, u: U); + foo(t: T, u: U): T; + foo2(t: T, u: U): U; + foo3(t: T, u: U): T; + foo4(t: T, u: U): T; + foo5(t: T, u: U): T; + foo6(): T; + foo7(u: U): T; + foo8(): T; + } + + var i: I; + var r4 = i.foo('', 1); // string + var r5 = i.foo2('', 1); // number + var r6 = i.foo3(true, 1); // boolean + var r7 = i.foo4('', true); // string + var r8 = i.foo5(true, 1); // boolean + var r9 = i.foo6(); // {} + var r10 = i.foo7(''); // {} + var r11 = i.foo8(); // {} \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.errors.txt b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.errors.txt new file mode 100644 index 00000000000..6a21542e71a --- /dev/null +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.errors.txt @@ -0,0 +1,141 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts(75,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'Base' is not assignable to type 'T'. + 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts(76,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts(77,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts(78,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts(79,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts(80,11): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts(81,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts(82,11): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts(83,11): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + + +==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts (9 errors) ==== + // Basic type inference with generic calls and constraints, no errors expected + + class Base { foo: string; } + class Derived extends Base { bar: string; } + class Derived2 extends Derived { baz: string; } + var b: Base; + var d1: Derived; + var d2: Derived2; + + function foo(t: T) { + return t; + } + + var r = foo(b); // Base + var r2 = foo(d1); // Derived + + function foo2(t: T, u: U) { + return u; + } + + function foo2b(u: U) { + var x: T; + return x; + } + + function foo2c() { + var x: T; + return x; + } + + var r3 = foo2b(d1); // Base + var r3b = foo2c(); // Base + + class C { + constructor(public t: T, public u: U) { + } + + foo(t: T, u: U) { + return t; + } + + foo2(t: T, u: U) { + return u; + } + + foo3(t: T, u: U) { + return t; + } + + foo4(t: T, u: U) { + return t; + } + + foo5(t: T, u: U) { + return t; + } + + foo6() { + var x: T; + return x; + } + + foo7(u: U) { + var x: T; + return x; + } + + foo8() { + var x: T; + return x; + } + } + + var c = new C(b, d1); + var r4 = c.foo(d1, d2); // Base + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'Base' is not assignable to type 'T'. +!!! error TS2684: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. + var r5 = c.foo2(b, d2); // Derived + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r6 = c.foo3(d1, d1); // Derived + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r7 = c.foo4(d1, d2); // Base + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r8 = c.foo5(d1, d2); // Derived + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r8b = c.foo5(d2, d2); // Derived2 + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r9 = c.foo6(); // Derived + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r10 = c.foo7(d1); // Base + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + var r11 = c.foo8(); // Base + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + + interface I { + new (t: T, u: U); + foo(t: T, u: U): T; + foo2(t: T, u: U): U; + foo3(t: T, u: U): T; + foo4(t: T, u: U): T; + foo5(t: T, u: U): T; + foo6(): T; + foo7(u: U): T; + foo8(): T; + } + + var i: I; + var r4 = i.foo(d1, d2); // Base + var r5 = i.foo2(b, d2); // Derived + var r6 = i.foo3(d1, d1); // Derived + var r7 = i.foo4(d1, d2); // Base + var r8 = i.foo5(d1, d2); // Derived + var r8b = i.foo5(d2, d2); // Derived2 + var r9 = i.foo6(); // Derived + var r10 = i.foo7(d1); // Base + var r11 = i.foo8(); // Base + \ No newline at end of file diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.errors.txt b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.errors.txt new file mode 100644 index 00000000000..01a9dbca61c --- /dev/null +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.errors.txt @@ -0,0 +1,81 @@ +tests/cases/compiler/genericClassPropertyInheritanceSpecialization.ts(58,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Validator'. + + +==== tests/cases/compiler/genericClassPropertyInheritanceSpecialization.ts (1 errors) ==== + interface KnockoutObservableBase { + peek(): T; + (): T; + (value: T): void; + } + + interface KnockoutObservable extends KnockoutObservableBase { + equalityComparer(a: T, b: T): boolean; + valueHasMutated(): void; + valueWillMutate(): void; + } + + interface KnockoutObservableArray extends KnockoutObservable { + indexOf(searchElement: T, fromIndex?: number): number; + slice(start: number, end?: number): T[]; + splice(start: number, deleteCount?: number, ...items: T[]): T[]; + pop(): T; + push(...items: T[]): void; + shift(): T; + unshift(...items: T[]): number; + reverse(): T[]; + sort(compareFunction?: (a: T, b: T) => number): void; + replace(oldItem: T, newItem: T): void; + remove(item: T): T[]; + removeAll(items?: T[]): T[]; + destroy(item: T): void; + destroyAll(items?: T[]): void; + } + + interface KnockoutObservableArrayStatic { + fn: KnockoutObservableArray; + + (value?: T[]): KnockoutObservableArray; + } + + declare module ko { + export var observableArray: KnockoutObservableArrayStatic; + } + + module Portal.Controls.Validators { + + export class Validator { + private _subscription; + public message: KnockoutObservable; + public validationState: KnockoutObservable; + public validate: KnockoutObservable; + constructor(message?: string) { } + public destroy(): void { } + public _validate(value: TValue): number {return 0 } + } + } + + module PortalFx.ViewModels.Controls.Validators { + + export class Validator extends Portal.Controls.Validators.Validator { + + constructor(message?: string) { + super(message); + ~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Validator'. + } + } + + } + + interface Contract { + + validators: KnockoutObservableArray>; + } + + + class ViewModel implements Contract { + + public validators: KnockoutObservableArray> = ko.observableArray>(); + } + + \ No newline at end of file diff --git a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt index 440c8d113cb..39eabaa9c86 100644 --- a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt +++ b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(23,14): error TS2684: The 'this' context of type 'C2' is not assignable to method's 'this' of type 'C2'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(24,15): error TS2684: The 'this' context of type 'C2' is not assignable to method's 'this' of type 'C2'. +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(46,14): error TS2684: The 'this' context of type 'C2' is not assignable to method's 'this' of type 'C2'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(47,14): error TS2684: The 'this' context of type 'C2' is not assignable to method's 'this' of type 'C2'. tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(57,29): error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. Types of parameters 'x' and 'a' are incompatible. Type 'number' is not assignable to type 'T'. @@ -14,7 +22,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFu Type 'string' is not assignable to type '1'. -==== tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts (4 errors) ==== +==== tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts (8 errors) ==== // Generic functions used as arguments for function typed parameters are not used to make inferences from // Using function arguments, no errors expected @@ -38,7 +46,13 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFu var c2 = new C2(); var ra = c2.foo((x: U) => 1); // number + ~~ +!!! error TS2684: The 'this' context of type 'C2' is not assignable to method's 'this' of type 'C2'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. var r3a = c2.foo(x => 1); // number + ~~ +!!! error TS2684: The 'this' context of type 'C2' is not assignable to method's 'this' of type 'C2'. } module WithCandidates { @@ -61,7 +75,13 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFu var c2: C2; var r7 = c2.foo3(1, (a: Z) => '', ''); // string + ~~ +!!! error TS2684: The 'this' context of type 'C2' is not assignable to method's 'this' of type 'C2'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. var r8 = c2.foo3(1, function (a) { return '' }, ''); // string + ~~ +!!! error TS2684: The 'this' context of type 'C2' is not assignable to method's 'this' of type 'C2'. class C3 { foo3(x: T, cb: (a: T) => U, y: U) { diff --git a/tests/baselines/reference/genericClassWithStaticFactory.types b/tests/baselines/reference/genericClassWithStaticFactory.types index 357f65f13ec..94292039045 100644 --- a/tests/baselines/reference/genericClassWithStaticFactory.types +++ b/tests/baselines/reference/genericClassWithStaticFactory.types @@ -21,7 +21,7 @@ module Editor { this.listFactory = new ListFactory(); >this.listFactory = new ListFactory() : ListFactory >this.listFactory : ListFactory ->this : this +>this : List >listFactory : ListFactory >new ListFactory() : ListFactory >ListFactory : typeof ListFactory @@ -37,7 +37,7 @@ module Editor { >this.listFactory.MakeEntry(data) : List >this.listFactory.MakeEntry : (data: T) => List >this.listFactory : ListFactory ->this : this +>this : List >listFactory : ListFactory >MakeEntry : (data: T) => List >data : T @@ -46,17 +46,17 @@ module Editor { >this.prev.next = entry : List >this.prev.next : List >this.prev : List ->this : this +>this : List >prev : List >next : List >entry : List entry.next = this; ->entry.next = this : this +>entry.next = this : List >entry.next : List >entry : List >next : List ->this : this +>this : List entry.prev = this.prev; >entry.prev = this.prev : List @@ -64,13 +64,13 @@ module Editor { >entry : List >prev : List >this.prev : List ->this : this +>this : List >prev : List this.prev = entry; >this.prev = entry : List >this.prev : List ->this : this +>this : List >prev : List >entry : List @@ -91,7 +91,7 @@ module Editor { >entry = this.next : List >entry : List >this.next : List ->this : this +>this : List >next : List for (i = 0; !(entry.isHead); i++) { @@ -126,9 +126,9 @@ module Editor { >(this.next == this) : boolean >this.next == this : boolean >this.next : List ->this : this +>this : List >next : List ->this : this +>this : List } public first(): T { @@ -137,13 +137,13 @@ module Editor { if (this.isEmpty()) >this.isEmpty() : boolean >this.isEmpty : () => boolean ->this : this +>this : List >isEmpty : () => boolean { return this.next.data; >this.next.data : T >this.next : List ->this : this +>this : List >next : List >data : T } @@ -170,20 +170,20 @@ module Editor { >entry : List >next : List >this.next : List ->this : this +>this : List >next : List entry.prev = this; ->entry.prev = this : this +>entry.prev = this : List >entry.prev : List >entry : List >prev : List ->this : this +>this : List this.next = entry; >this.next = entry : List >this.next : List ->this : this +>this : List >next : List >entry : List @@ -206,7 +206,7 @@ module Editor { >this.listFactory.MakeEntry(data) : List >this.listFactory.MakeEntry : (data: T) => List >this.listFactory : ListFactory ->this : this +>this : List >listFactory : ListFactory >MakeEntry : (data: T) => List >data : T @@ -231,20 +231,20 @@ module Editor { >entry : List >next : List >this.next : List ->this : this +>this : List >next : List entry.prev = this; ->entry.prev = this : this +>entry.prev = this : List >entry.prev : List >entry : List >prev : List ->this : this +>this : List this.next = entry; >this.next = entry : List >this.next : List ->this : this +>this : List >next : List >entry : List @@ -265,7 +265,7 @@ module Editor { if (this.next.isHead) { >this.next.isHead : boolean >this.next : List ->this : this +>this : List >next : List >isHead : boolean @@ -277,11 +277,11 @@ module Editor { >this.listFactory.RemoveEntry(this.next) : List >this.listFactory.RemoveEntry : (entry: List) => List >this.listFactory : ListFactory ->this : this +>this : List >listFactory : ListFactory >RemoveEntry : (entry: List) => List >this.next : List ->this : this +>this : List >next : List } } @@ -301,17 +301,17 @@ module Editor { >this.prev.next = entry : List >this.prev.next : List >this.prev : List ->this : this +>this : List >prev : List >next : List >entry : List entry.next = this; ->entry.next = this : this +>entry.next = this : List >entry.next : List >entry : List >next : List ->this : this +>this : List entry.prev = this.prev; >entry.prev = this.prev : List @@ -319,13 +319,13 @@ module Editor { >entry : List >prev : List >this.prev : List ->this : this +>this : List >prev : List this.prev = entry; >this.prev = entry : List >this.prev : List ->this : this +>this : List >prev : List >entry : List @@ -342,7 +342,7 @@ module Editor { >this.listFactory.MakeEntry(data) : List >this.listFactory.MakeEntry : (data: T) => List >this.listFactory : ListFactory ->this : this +>this : List >listFactory : ListFactory >MakeEntry : (data: T) => List >data : T @@ -353,20 +353,20 @@ module Editor { >entry : List >next : List >this.next : List ->this : this +>this : List >next : List entry.prev = this; ->entry.prev = this : this +>entry.prev = this : List >entry.prev : List >entry : List >prev : List ->this : this +>this : List this.next = entry; >this.next = entry : List >this.next : List ->this : this +>this : List >next : List >entry : List @@ -391,17 +391,17 @@ module Editor { >this.prev.next = entry : List >this.prev.next : List >this.prev : List ->this : this +>this : List >prev : List >next : List >entry : List entry.next = this; ->entry.next = this : this +>entry.next = this : List >entry.next : List >entry : List >next : List ->this : this +>this : List entry.prev = this.prev; >entry.prev = this.prev : List @@ -409,13 +409,13 @@ module Editor { >entry : List >prev : List >this.prev : List ->this : this +>this : List >prev : List this.prev = entry; >this.prev = entry : List >this.prev : List ->this : this +>this : List >prev : List >entry : List @@ -432,7 +432,7 @@ module Editor { >this.listFactory.MakeEntry(data) : List >this.listFactory.MakeEntry : (data: T) => List >this.listFactory : ListFactory ->this : this +>this : List >listFactory : ListFactory >MakeEntry : (data: T) => List >data : T @@ -440,7 +440,7 @@ module Editor { return this.insertEntryBefore(entry); >this.insertEntryBefore(entry) : List >this.insertEntryBefore : (entry: List) => List ->this : this +>this : List >insertEntryBefore : (entry: List) => List >entry : List } diff --git a/tests/baselines/reference/genericClasses4.types b/tests/baselines/reference/genericClasses4.types index ec539093ab5..fc4a3ba8065 100644 --- a/tests/baselines/reference/genericClasses4.types +++ b/tests/baselines/reference/genericClasses4.types @@ -17,7 +17,7 @@ class Vec2_T >f(this.x) : B >f : (a: A) => B >this.x : A ->this : this +>this : Vec2_T >x : A var y:B = f(this.y); @@ -25,7 +25,7 @@ class Vec2_T >f(this.y) : B >f : (a: A) => B >this.y : A ->this : this +>this : Vec2_T >y : A var retval: Vec2_T = new Vec2_T(x, y); @@ -50,7 +50,7 @@ class Vec2_T >f : Vec2_T<(a: A) => B> >x : (a: A) => B >this.x : A ->this : this +>this : Vec2_T >x : A var y:B = f.y(this.y); @@ -60,7 +60,7 @@ class Vec2_T >f : Vec2_T<(a: A) => B> >y : (a: A) => B >this.y : A ->this : this +>this : Vec2_T >y : A var retval: Vec2_T = new Vec2_T(x, y); diff --git a/tests/baselines/reference/genericClassesInModule2.types b/tests/baselines/reference/genericClassesInModule2.types index 99b6b36d217..aa8e1da0d47 100644 --- a/tests/baselines/reference/genericClassesInModule2.types +++ b/tests/baselines/reference/genericClassesInModule2.types @@ -7,10 +7,10 @@ export class A{ >self : A var child = new B(this); ->child : B ->new B(this) : B +>child : B> +>new B(this) : B> >B : typeof B ->this : this +>this : A } AAA( callback: (self: A) => void) { >AAA : (callback: (self: A) => void) => void @@ -18,10 +18,10 @@ export class A{ >self : A var child = new B(this); ->child : B ->new B(this) : B +>child : B> +>new B(this) : B> >B : typeof B ->this : this +>this : A } } diff --git a/tests/baselines/reference/genericClassesRedeclaration.errors.txt b/tests/baselines/reference/genericClassesRedeclaration.errors.txt index 1908b46ab61..e99dfc0c30d 100644 --- a/tests/baselines/reference/genericClassesRedeclaration.errors.txt +++ b/tests/baselines/reference/genericClassesRedeclaration.errors.txt @@ -1,12 +1,86 @@ tests/cases/compiler/genericClassesRedeclaration.ts(3,9): error TS2374: Duplicate index signature for type 'string'. tests/cases/compiler/genericClassesRedeclaration.ts(16,11): error TS2300: Duplicate identifier 'StringHashTable'. tests/cases/compiler/genericClassesRedeclaration.ts(29,11): error TS2300: Duplicate identifier 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(30,16): error TS2416: Property 'getAllKeys' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '() => string[]' is not assignable to type '() => string[]'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. + Types of property 'getAllKeys' are incompatible. + Type '() => string[]' is not assignable to type '() => string[]'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'IdentifierNameHashTable' is not assignable to type 'StringHashTable'. + Types of property 'add' are incompatible. + Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. + Types of parameters 'data' and 'data' are incompatible. + Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. +tests/cases/compiler/genericClassesRedeclaration.ts(31,16): error TS2416: Property 'add' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(32,16): error TS2416: Property 'addOrUpdate' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(33,16): error TS2416: Property 'map' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(fn: (k: string, value: T, context: any) => void, context: any) => void' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => void'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(34,16): error TS2416: Property 'every' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(35,16): error TS2416: Property 'some' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(fn: (k: string, value: any, context: any) => void, context: any) => boolean' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean'. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(36,16): error TS2416: Property 'lookup' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(key: string) => T' is not assignable to type '(key: string) => T'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. tests/cases/compiler/genericClassesRedeclaration.ts(42,9): error TS2374: Duplicate index signature for type 'string'. tests/cases/compiler/genericClassesRedeclaration.ts(55,11): error TS2300: Duplicate identifier 'StringHashTable'. tests/cases/compiler/genericClassesRedeclaration.ts(68,11): error TS2300: Duplicate identifier 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(69,16): error TS2416: Property 'getAllKeys' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '() => string[]' is not assignable to type '() => string[]'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. + Types of property 'getAllKeys' are incompatible. + Type '() => string[]' is not assignable to type '() => string[]'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'IdentifierNameHashTable' is not assignable to type 'StringHashTable'. + Types of property 'add' are incompatible. + Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. + Types of parameters 'data' and 'data' are incompatible. + Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. +tests/cases/compiler/genericClassesRedeclaration.ts(70,16): error TS2416: Property 'add' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(71,16): error TS2416: Property 'addOrUpdate' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(72,16): error TS2416: Property 'map' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(fn: (k: string, value: T, context: any) => void, context: any) => void' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => void'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(73,16): error TS2416: Property 'every' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(74,16): error TS2416: Property 'some' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(fn: (k: string, value: any, context: any) => void, context: any) => boolean' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean'. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(75,16): error TS2416: Property 'lookup' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. + Type '(key: string) => T' is not assignable to type '(key: string) => T'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. -==== tests/cases/compiler/genericClassesRedeclaration.ts (6 errors) ==== +==== tests/cases/compiler/genericClassesRedeclaration.ts (20 errors) ==== declare module TypeScript { interface IIndexable { [s: string]: T; @@ -43,12 +117,56 @@ tests/cases/compiler/genericClassesRedeclaration.ts(68,11): error TS2300: Duplic ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'IdentifierNameHashTable'. public getAllKeys(): string[]; + ~~~~~~~~~~ +!!! error TS2416: Property 'getAllKeys' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '() => string[]' is not assignable to type '() => string[]'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +!!! error TS2416: Types of property 'getAllKeys' are incompatible. +!!! error TS2416: Type '() => string[]' is not assignable to type '() => string[]'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'IdentifierNameHashTable' is not assignable to type 'StringHashTable'. +!!! error TS2416: Types of property 'add' are incompatible. +!!! error TS2416: Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: Types of parameters 'data' and 'data' are incompatible. +!!! error TS2416: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. public add(key: string, data: T): boolean; + ~~~ +!!! error TS2416: Property 'add' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. public addOrUpdate(key: string, data: T): boolean; + ~~~~~~~~~~~ +!!! error TS2416: Property 'addOrUpdate' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. public map(fn: (k: string, value: T, context: any) => void, context: any): void; + ~~~ +!!! error TS2416: Property 'map' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(fn: (k: string, value: T, context: any) => void, context: any) => void' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. public every(fn: (k: string, value: T, context: any) => void, context: any): boolean; + ~~~~~ +!!! error TS2416: Property 'every' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. public some(fn: (k: string, value: any, context: any) => void, context: any): boolean; + ~~~~ +!!! error TS2416: Property 'some' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(fn: (k: string, value: any, context: any) => void, context: any) => boolean' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. public lookup(key: string): T; + ~~~~~~ +!!! error TS2416: Property 'lookup' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(key: string) => T' is not assignable to type '(key: string) => T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. } } @@ -88,11 +206,55 @@ tests/cases/compiler/genericClassesRedeclaration.ts(68,11): error TS2300: Duplic ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'IdentifierNameHashTable'. public getAllKeys(): string[]; + ~~~~~~~~~~ +!!! error TS2416: Property 'getAllKeys' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '() => string[]' is not assignable to type '() => string[]'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. +!!! error TS2416: Types of property 'getAllKeys' are incompatible. +!!! error TS2416: Type '() => string[]' is not assignable to type '() => string[]'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'IdentifierNameHashTable' is not assignable to type 'StringHashTable'. +!!! error TS2416: Types of property 'add' are incompatible. +!!! error TS2416: Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: Types of parameters 'data' and 'data' are incompatible. +!!! error TS2416: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. public add(key: string, data: T): boolean; + ~~~ +!!! error TS2416: Property 'add' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. public addOrUpdate(key: string, data: T): boolean; + ~~~~~~~~~~~ +!!! error TS2416: Property 'addOrUpdate' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(key: string, data: T) => boolean' is not assignable to type '(key: string, data: T) => boolean'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. public map(fn: (k: string, value: T, context: any) => void, context: any): void; + ~~~ +!!! error TS2416: Property 'map' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(fn: (k: string, value: T, context: any) => void, context: any) => void' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. public every(fn: (k: string, value: T, context: any) => void, context: any): boolean; + ~~~~~ +!!! error TS2416: Property 'every' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. public some(fn: (k: string, value: any, context: any) => void, context: any): boolean; + ~~~~ +!!! error TS2416: Property 'some' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(fn: (k: string, value: any, context: any) => void, context: any) => boolean' is not assignable to type '(fn: (k: string, value: T, context: any) => void, context: any) => boolean'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. public lookup(key: string): T; + ~~~~~~ +!!! error TS2416: Property 'lookup' in type 'IdentifierNameHashTable' is not assignable to the same property in base type 'StringHashTable'. +!!! error TS2416: Type '(key: string) => T' is not assignable to type '(key: string) => T'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'StringHashTable' is not assignable to type 'IdentifierNameHashTable'. } } \ No newline at end of file diff --git a/tests/baselines/reference/genericCloneReturnTypes.errors.txt b/tests/baselines/reference/genericCloneReturnTypes.errors.txt index 0e54ebc02cf..3968df72a2a 100644 --- a/tests/baselines/reference/genericCloneReturnTypes.errors.txt +++ b/tests/baselines/reference/genericCloneReturnTypes.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/genericCloneReturnTypes.ts(22,10): error TS2684: The 'this' context of type 'Bar' is not assignable to method's 'this' of type 'Bar'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. tests/cases/compiler/genericCloneReturnTypes.ts(25,1): error TS2322: Type 'Bar' is not assignable to type 'Bar'. Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/genericCloneReturnTypes.ts (1 errors) ==== +==== tests/cases/compiler/genericCloneReturnTypes.ts (2 errors) ==== class Bar { public size: number; @@ -25,6 +28,10 @@ tests/cases/compiler/genericCloneReturnTypes.ts(25,1): error TS2322: Type 'Bar; var b2 = b.clone(); + ~ +!!! error TS2684: The 'this' context of type 'Bar' is not assignable to method's 'this' of type 'Bar'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. var b3: Bar; b = b2; b = b3; diff --git a/tests/baselines/reference/genericCloneReturnTypes.types b/tests/baselines/reference/genericCloneReturnTypes.types index f15a6c7b830..5d200c9ba8f 100644 --- a/tests/baselines/reference/genericCloneReturnTypes.types +++ b/tests/baselines/reference/genericCloneReturnTypes.types @@ -14,7 +14,7 @@ class Bar { this.size = x; >this.size = x : number >this.size : number ->this : this +>this : Bar >size : number >x : number @@ -27,7 +27,7 @@ class Bar { >new Bar(this.size) : Bar >Bar : typeof Bar >this.size : number ->this : this +>this : Bar >size : number } diff --git a/tests/baselines/reference/genericCloneReturnTypes2.errors.txt b/tests/baselines/reference/genericCloneReturnTypes2.errors.txt index 1ac5a862075..8f0cabcd0d6 100644 --- a/tests/baselines/reference/genericCloneReturnTypes2.errors.txt +++ b/tests/baselines/reference/genericCloneReturnTypes2.errors.txt @@ -1,8 +1,13 @@ +tests/cases/compiler/genericCloneReturnTypes2.ts(13,22): error TS2684: The 'this' context of type 'MyList' is not assignable to method's 'this' of type 'MyList'. + Type 'string' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. +tests/cases/compiler/genericCloneReturnTypes2.ts(14,25): error TS2684: The 'this' context of type 'MyList' is not assignable to method's 'this' of type 'MyList'. tests/cases/compiler/genericCloneReturnTypes2.ts(15,5): error TS2322: Type 'MyList' is not assignable to type 'MyList'. Type 'string' is not assignable to type 'number'. +tests/cases/compiler/genericCloneReturnTypes2.ts(15,25): error TS2684: The 'this' context of type 'MyList' is not assignable to method's 'this' of type 'MyList'. -==== tests/cases/compiler/genericCloneReturnTypes2.ts (1 errors) ==== +==== tests/cases/compiler/genericCloneReturnTypes2.ts (4 errors) ==== class MyList { public size: number; public data: T[]; @@ -16,8 +21,16 @@ tests/cases/compiler/genericCloneReturnTypes2.ts(15,5): error TS2322: Type 'MyLi } var a: MyList; var b: MyList = a.clone(); // ok + ~ +!!! error TS2684: The 'this' context of type 'MyList' is not assignable to method's 'this' of type 'MyList'. +!!! error TS2684: Type 'string' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. var c: MyList = a.clone(); // bug was there was an error on this line + ~ +!!! error TS2684: The 'this' context of type 'MyList' is not assignable to method's 'this' of type 'MyList'. 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 TS2322: Type 'string' is not assignable to type 'number'. + ~ +!!! error TS2684: The 'this' context of type 'MyList' is not assignable to method's 'this' of type 'MyList'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCloneReturnTypes2.types b/tests/baselines/reference/genericCloneReturnTypes2.types index 9c38e950307..e1d1187ee34 100644 --- a/tests/baselines/reference/genericCloneReturnTypes2.types +++ b/tests/baselines/reference/genericCloneReturnTypes2.types @@ -14,19 +14,19 @@ class MyList { this.size = n; >this.size = n : number >this.size : number ->this : this +>this : MyList >size : number >n : number this.data = new Array(this.size); >this.data = new Array(this.size) : T[] >this.data : T[] ->this : this +>this : MyList >data : T[] >new Array(this.size) : T[] >Array : ArrayConstructor >this.size : number ->this : this +>this : MyList >size : number } public clone() { @@ -36,7 +36,7 @@ class MyList { >new MyList(this.size) : MyList >MyList : typeof MyList >this.size : number ->this : this +>this : MyList >size : number } } diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.errors.txt b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.errors.txt new file mode 100644 index 00000000000..5115b2b552d --- /dev/null +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.errors.txt @@ -0,0 +1,32 @@ +tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes.ts(23,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Tween'. + + +==== tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes.ts (1 errors) ==== + declare module EndGate { + export interface ICloneable { + Clone(): any; + } + } + + interface Number extends EndGate.ICloneable { } + + module EndGate.Tweening { + export class Tween{ + private _from: T; + + + constructor(from: T) { + this._from = from.Clone(); + } + } + } + + module EndGate.Tweening { + export class NumberTween extends Tween{ + constructor(from: number) { + super(from); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Tween'. + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.types b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.types index edaa415419f..6eb00e67edb 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.types +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.types @@ -26,7 +26,7 @@ module EndGate.Tweening { this._from = from.Clone(); >this._from = from.Clone() : any >this._from : T ->this : this +>this : Tween >_from : T >from.Clone() : any >from.Clone : () => any diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.errors.txt b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.errors.txt new file mode 100644 index 00000000000..09bafa31612 --- /dev/null +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.errors.txt @@ -0,0 +1,31 @@ +tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes2.ts(22,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Tween'. + + +==== tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes2.ts (1 errors) ==== + module EndGate { + export interface ICloneable { + Clone(): any; + } + } + + interface Number extends EndGate.ICloneable { } + + module EndGate.Tweening { + export class Tween{ + private _from: T; + + constructor(from: T) { + this._from = from.Clone(); + } + } + } + + module EndGate.Tweening { + export class NumberTween extends Tween{ + constructor(from: number) { + super(from); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Tween'. + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.types b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.types index 9ac6ac6e617..29f5e31eace 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.types +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.types @@ -25,7 +25,7 @@ module EndGate.Tweening { this._from = from.Clone(); >this._from = from.Clone() : any >this._from : T ->this : this +>this : Tween >_from : T >from.Clone() : any >from.Clone : () => any diff --git a/tests/baselines/reference/genericDefaultsJs.errors.txt b/tests/baselines/reference/genericDefaultsJs.errors.txt new file mode 100644 index 00000000000..40f9ee3ff65 --- /dev/null +++ b/tests/baselines/reference/genericDefaultsJs.errors.txt @@ -0,0 +1,92 @@ +tests/cases/compiler/main.js(22,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C0'. +tests/cases/compiler/main.js(27,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C0'. +tests/cases/compiler/main.js(46,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. +tests/cases/compiler/main.js(51,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. + + +==== tests/cases/compiler/decls.d.ts (0 errors) ==== + declare function f0(x?: T): T; + declare function f1(x?: T): [T, U]; + declare class C0 { + y: T; + constructor(x?: T); + } + declare class C1 { + y: [T, U]; + constructor(x?: T); + } +==== tests/cases/compiler/main.js (4 errors) ==== + const f0_v0 = f0(); + const f0_v1 = f0(1); + + const f1_c0 = f1(); + const f1_c1 = f1(1); + + const C0_v0 = new C0(); + const C0_v0_y = C0_v0.y; + + const C0_v1 = new C0(1); + const C0_v1_y = C0_v1.y; + + const C1_v0 = new C1(); + const C1_v0_y = C1_v0.y; + + const C1_v1 = new C1(1); + const C1_v1_y = C1_v1.y; + + class C0_B0 extends C0 {} + class C0_B1 extends C0 { + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C0'. + } + } + class C0_B2 extends C0 { + constructor() { + super(1); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C0'. + } + } + + const C0_B0_v0 = new C0_B0(); + const C0_B0_v0_y = C0_B0_v0.y; + + const C0_B0_v1 = new C0_B0(1); + const C0_B0_v1_y = C0_B0_v1.y; + + const C0_B1_v0 = new C0_B1(); + const C0_B1_v0_y = C0_B1_v0.y; + + const C0_B2_v0 = new C0_B2(); + const C0_B2_v0_y = C0_B2_v0.y; + + class C1_B0 extends C1 {} + class C1_B1 extends C1 { + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. + } + } + class C1_B2 extends C1 { + constructor() { + super(1); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. + } + } + + const C1_B0_v0 = new C1_B0(); + const C1_B0_v0_y = C1_B0_v0.y; + + const C1_B0_v1 = new C1_B0(1); + const C1_B0_v1_y = C1_B0_v1.y; + + const C1_B1_v0 = new C1_B1(); + const C1_B1_v0_y = C1_B1_v0.y; + + const C1_B2_v0 = new C1_B2(); + const C1_B2_v0_y = C1_B2_v0.y; + \ No newline at end of file diff --git a/tests/baselines/reference/genericGetter.types b/tests/baselines/reference/genericGetter.types index 87aa1d91206..247330c47a5 100644 --- a/tests/baselines/reference/genericGetter.types +++ b/tests/baselines/reference/genericGetter.types @@ -10,7 +10,7 @@ class C { return this.data; >this.data : T ->this : this +>this : C >data : T } } diff --git a/tests/baselines/reference/genericGetter2.types b/tests/baselines/reference/genericGetter2.types index 488c05b9224..9451cc25ccb 100644 --- a/tests/baselines/reference/genericGetter2.types +++ b/tests/baselines/reference/genericGetter2.types @@ -13,7 +13,7 @@ class C { return this.data; >this.data : A ->this : this +>this : C >data : A } } diff --git a/tests/baselines/reference/genericGetter3.types b/tests/baselines/reference/genericGetter3.types index dc351fc547b..0b555a6bbd5 100644 --- a/tests/baselines/reference/genericGetter3.types +++ b/tests/baselines/reference/genericGetter3.types @@ -13,7 +13,7 @@ class C { return this.data; >this.data : A ->this : this +>this : C >data : A } } diff --git a/tests/baselines/reference/genericInstanceOf.types b/tests/baselines/reference/genericInstanceOf.types index 0a083216608..d1ee5a88a0e 100644 --- a/tests/baselines/reference/genericInstanceOf.types +++ b/tests/baselines/reference/genericInstanceOf.types @@ -16,10 +16,10 @@ class C { if (this.a instanceof this.b) { >this.a instanceof this.b : boolean >this.a : T ->this : this +>this : C >a : T >this.b : F ->this : this +>this : C >b : F } } diff --git a/tests/baselines/reference/genericMemberFunction.types b/tests/baselines/reference/genericMemberFunction.types index 3f1c990040e..35f0cef5b94 100644 --- a/tests/baselines/reference/genericMemberFunction.types +++ b/tests/baselines/reference/genericMemberFunction.types @@ -60,7 +60,7 @@ export class BuildResult{ this.removeFile(each); >this.removeFile(each) : any >this.removeFile : any ->this : this +>this : BuildResult >removeFile : any >each : FileWithErrors diff --git a/tests/baselines/reference/genericObjectLitReturnType.errors.txt b/tests/baselines/reference/genericObjectLitReturnType.errors.txt new file mode 100644 index 00000000000..a75193f8fbe --- /dev/null +++ b/tests/baselines/reference/genericObjectLitReturnType.errors.txt @@ -0,0 +1,21 @@ +tests/cases/compiler/genericObjectLitReturnType.ts(8,10): error TS2684: The 'this' context of type 'X' is not assignable to method's 'this' of type 'X'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + + +==== tests/cases/compiler/genericObjectLitReturnType.ts (1 errors) ==== + class X + { + f(t: T) { return { a: t }; } + } + + + var x: X; + var t1 = x.f(5); + ~ +!!! error TS2684: The 'this' context of type 'X' is not assignable to method's 'this' of type 'X'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + t1.a = 5; // Should not error: t1 should have type {a: number}, instead has type {a: T} + + \ No newline at end of file diff --git a/tests/baselines/reference/genericOfACloduleType1.errors.txt b/tests/baselines/reference/genericOfACloduleType1.errors.txt new file mode 100644 index 00000000000..801392fc73a --- /dev/null +++ b/tests/baselines/reference/genericOfACloduleType1.errors.txt @@ -0,0 +1,22 @@ +tests/cases/compiler/genericOfACloduleType1.ts(10,5): error TS2684: The 'this' context of type 'G' is not assignable to method's 'this' of type 'G'. + Type 'C' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'C'. + + +==== tests/cases/compiler/genericOfACloduleType1.ts (1 errors) ==== + class G{ bar(x: T) { return x; } } + module M { + export class C { foo() { } } + export module C { + export class X { + } + } + + var g1 = new G(); + g1.bar(null).foo(); + ~~ +!!! error TS2684: The 'this' context of type 'G' is not assignable to method's 'this' of type 'G'. +!!! error TS2684: Type 'C' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'C'. + } + var g2 = new G() // was: error Type reference cannot refer to container 'M.C'. \ No newline at end of file diff --git a/tests/baselines/reference/genericOfACloduleType2.errors.txt b/tests/baselines/reference/genericOfACloduleType2.errors.txt new file mode 100644 index 00000000000..23cf2861339 --- /dev/null +++ b/tests/baselines/reference/genericOfACloduleType2.errors.txt @@ -0,0 +1,25 @@ +tests/cases/compiler/genericOfACloduleType2.ts(10,5): error TS2684: The 'this' context of type 'G' is not assignable to method's 'this' of type 'G'. + Type 'C' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'C'. + + +==== tests/cases/compiler/genericOfACloduleType2.ts (1 errors) ==== + class G{ bar(x: T) { return x; } } + module M { + export class C { foo() { } } + export module C { + export class X { + } + } + + var g1 = new G(); + g1.bar(null).foo(); // no error + ~~ +!!! error TS2684: The 'this' context of type 'G' is not assignable to method's 'this' of type 'G'. +!!! error TS2684: Type 'C' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'C'. + } + + module N { + var g2 = new G() + } \ No newline at end of file diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.types b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.types index fd60371a1ae..71e26b963c5 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.types +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.types @@ -43,7 +43,7 @@ module TypeScript { >this.getScopedNameEx(scopeSymbol, useConstraintInName).toString : any >this.getScopedNameEx(scopeSymbol, useConstraintInName) : any >this.getScopedNameEx : (scopeSymbol?: any, useConstraintInName?: boolean, getPrettyTypeName?: boolean, getTypeParamMarkerInfo?: boolean) => any ->this : this +>this : PullTypeSymbol >getScopedNameEx : (scopeSymbol?: any, useConstraintInName?: boolean, getPrettyTypeName?: boolean, getTypeParamMarkerInfo?: boolean) => any >scopeSymbol : any >useConstraintInName : boolean @@ -62,14 +62,14 @@ module TypeScript { if (this.isArray()) { >this.isArray() : any >this.isArray : any ->this : this +>this : PullTypeSymbol >isArray : any var elementMemberName = this._elementType ? >elementMemberName : any >this._elementType ? (this._elementType.isArray() || this._elementType.isNamedTypeSymbol() ? this._elementType.getScopedNameEx(scopeSymbol, false, getPrettyTypeName, getTypeParamMarkerInfo) : this._elementType.getMemberTypeNameEx(false, scopeSymbol, getPrettyTypeName)) : 1 : any >this._elementType : any ->this : this +>this : PullTypeSymbol >_elementType : any (this._elementType.isArray() || this._elementType.isNamedTypeSymbol() ? @@ -79,13 +79,13 @@ module TypeScript { >this._elementType.isArray() : any >this._elementType.isArray : any >this._elementType : any ->this : this +>this : PullTypeSymbol >_elementType : any >isArray : any >this._elementType.isNamedTypeSymbol() : any >this._elementType.isNamedTypeSymbol : any >this._elementType : any ->this : this +>this : PullTypeSymbol >_elementType : any >isNamedTypeSymbol : any @@ -93,7 +93,7 @@ module TypeScript { >this._elementType.getScopedNameEx(scopeSymbol, false, getPrettyTypeName, getTypeParamMarkerInfo) : any >this._elementType.getScopedNameEx : any >this._elementType : any ->this : this +>this : PullTypeSymbol >_elementType : any >getScopedNameEx : any >scopeSymbol : any @@ -105,7 +105,7 @@ module TypeScript { >this._elementType.getMemberTypeNameEx(false, scopeSymbol, getPrettyTypeName) : any >this._elementType.getMemberTypeNameEx : any >this._elementType : any ->this : this +>this : PullTypeSymbol >_elementType : any >getMemberTypeNameEx : any >false : false diff --git a/tests/baselines/reference/genericReturnTypeFromGetter1.types b/tests/baselines/reference/genericReturnTypeFromGetter1.types index 0410373d319..7889dc117f1 100644 --- a/tests/baselines/reference/genericReturnTypeFromGetter1.types +++ b/tests/baselines/reference/genericReturnTypeFromGetter1.types @@ -12,7 +12,7 @@ export class DbSet { get entityType() { return this._entityType; } // used to ICE without return type annotation >entityType : any >this._entityType : any ->this : this +>this : DbSet >_entityType : any } diff --git a/tests/baselines/reference/genericReversingTypeParameters.errors.txt b/tests/baselines/reference/genericReversingTypeParameters.errors.txt new file mode 100644 index 00000000000..97978f34c61 --- /dev/null +++ b/tests/baselines/reference/genericReversingTypeParameters.errors.txt @@ -0,0 +1,30 @@ +tests/cases/compiler/genericReversingTypeParameters.ts(8,10): error TS2684: The 'this' context of type 'BiMap' is not assignable to method's 'this' of type 'BiMap'. + Type 'string' is not assignable to type 'K'. + 'K' could be instantiated with an arbitrary type which could be unrelated to 'string'. +tests/cases/compiler/genericReversingTypeParameters.ts(9,9): error TS2684: The 'this' context of type 'BiMap' is not assignable to method's 'this' of type 'BiMap'. +tests/cases/compiler/genericReversingTypeParameters.ts(10,11): error TS2684: The 'this' context of type 'BiMap' is not assignable to method's 'this' of type 'BiMap'. + Type 'number' is not assignable to type 'K'. + 'K' could be instantiated with an arbitrary type which could be unrelated to 'number'. + + +==== tests/cases/compiler/genericReversingTypeParameters.ts (3 errors) ==== + class BiMap { + private inverseBiMap: BiMap; + public get(key: K): V { return null; } + public inverse(): BiMap { return null; } + } + + var b = new BiMap(); + var r1 = b.get(''); + ~ +!!! error TS2684: The 'this' context of type 'BiMap' is not assignable to method's 'this' of type 'BiMap'. +!!! error TS2684: Type 'string' is not assignable to type 'K'. +!!! error TS2684: 'K' could be instantiated with an arbitrary type which could be unrelated to 'string'. + var i = b.inverse(); // used to get the type wrong here. + ~ +!!! error TS2684: The 'this' context of type 'BiMap' is not assignable to method's 'this' of type 'BiMap'. + var r2b = i.get(1); + ~ +!!! error TS2684: The 'this' context of type 'BiMap' is not assignable to method's 'this' of type 'BiMap'. +!!! error TS2684: Type 'number' is not assignable to type 'K'. +!!! error TS2684: 'K' could be instantiated with an arbitrary type which could be unrelated to 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericReversingTypeParameters2.errors.txt b/tests/baselines/reference/genericReversingTypeParameters2.errors.txt new file mode 100644 index 00000000000..64c0f7a656e --- /dev/null +++ b/tests/baselines/reference/genericReversingTypeParameters2.errors.txt @@ -0,0 +1,26 @@ +tests/cases/compiler/genericReversingTypeParameters2.ts(8,9): error TS2684: The 'this' context of type 'BiMap' is not assignable to method's 'this' of type 'BiMap'. + Type 'string' is not assignable to type 'K'. + 'K' could be instantiated with an arbitrary type which could be unrelated to 'string'. +tests/cases/compiler/genericReversingTypeParameters2.ts(9,11): error TS2684: The 'this' context of type 'BiMap' is not assignable to method's 'this' of type 'BiMap'. + Type 'number' is not assignable to type 'K'. + 'K' could be instantiated with an arbitrary type which could be unrelated to 'number'. + + +==== tests/cases/compiler/genericReversingTypeParameters2.ts (2 errors) ==== + class BiMap { + private inverseBiMap: BiMap; + public get(key: K): V { return null; } + public inverse(): BiMap { return null; } + } + + var b = new BiMap(); + var i = b.inverse(); // used to get the type wrong here. + ~ +!!! error TS2684: The 'this' context of type 'BiMap' is not assignable to method's 'this' of type 'BiMap'. +!!! error TS2684: Type 'string' is not assignable to type 'K'. +!!! error TS2684: 'K' could be instantiated with an arbitrary type which could be unrelated to 'string'. + var r2b = i.get(1); + ~ +!!! error TS2684: The 'this' context of type 'BiMap' is not assignable to method's 'this' of type 'BiMap'. +!!! error TS2684: Type 'number' is not assignable to type 'K'. +!!! error TS2684: 'K' could be instantiated with an arbitrary type which could be unrelated to 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericSetterInClassType.types b/tests/baselines/reference/genericSetterInClassType.types index ef77d729046..b4b92b7026d 100644 --- a/tests/baselines/reference/genericSetterInClassType.types +++ b/tests/baselines/reference/genericSetterInClassType.types @@ -42,7 +42,7 @@ module Generic { return this.#value; >this.#value : T ->this : this +>this : Box } set value(value) { @@ -52,7 +52,7 @@ module Generic { this.#value = value; >this.#value = value : T >this.#value : T ->this : this +>this : Box >value : T } } diff --git a/tests/baselines/reference/genericSetterInClassTypeJsDoc.types b/tests/baselines/reference/genericSetterInClassTypeJsDoc.types index e61a5449c0e..9c5130eb872 100644 --- a/tests/baselines/reference/genericSetterInClassTypeJsDoc.types +++ b/tests/baselines/reference/genericSetterInClassTypeJsDoc.types @@ -15,7 +15,7 @@ this.#value = initialValue; >this.#value = initialValue : T >this.#value : T ->this : this +>this : Box >initialValue : T } @@ -25,7 +25,7 @@ return this.#value; >this.#value : T ->this : this +>this : Box } set value(value) { @@ -35,7 +35,7 @@ this.#value = value; >this.#value = value : T >this.#value : T ->this : this +>this : Box >value : T } } diff --git a/tests/baselines/reference/genericSpecializations3.errors.txt b/tests/baselines/reference/genericSpecializations3.errors.txt index eaa7f094bdb..b7828a7e2cc 100644 --- a/tests/baselines/reference/genericSpecializations3.errors.txt +++ b/tests/baselines/reference/genericSpecializations3.errors.txt @@ -5,13 +5,13 @@ tests/cases/compiler/genericSpecializations3.ts(9,5): error TS2416: Property 'fo tests/cases/compiler/genericSpecializations3.ts(28,1): error TS2322: Type 'StringFoo2' is not assignable to type 'IntFoo'. Types of property 'foo' are incompatible. Type '(x: string) => string' is not assignable to type '(x: number) => number'. - Types of parameters 'x' and 'x' are incompatible. - Type 'number' is not assignable to type 'string'. + The 'this' types of each signature are incompatible. + 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 '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. - Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/genericSpecializations3.ts (3 errors) ==== @@ -52,15 +52,15 @@ tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2322: Type 'IntFo !!! 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 'number' is not assignable to type 'string'. +!!! error TS2322: The 'this' types of each signature are incompatible. +!!! 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 '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 'string' is not assignable to type 'number'. class StringFoo3 implements IFoo { // error diff --git a/tests/baselines/reference/genericTypeWithCallableMembers.types b/tests/baselines/reference/genericTypeWithCallableMembers.types index 64909d6d5ef..bd808846f90 100644 --- a/tests/baselines/reference/genericTypeWithCallableMembers.types +++ b/tests/baselines/reference/genericTypeWithCallableMembers.types @@ -17,14 +17,14 @@ class C { >x : Constructable >new this.data() : Constructable >this.data : T ->this : this +>this : C >data : T var x2 = new this.data2(); // was error, shouldn't be >x2 : Constructable >new this.data2() : Constructable >this.data2 : Constructable ->this : this +>this : C >data2 : Constructable } } diff --git a/tests/baselines/reference/genericWithCallSignatures1.types b/tests/baselines/reference/genericWithCallSignatures1.types index 10f48ad6a32..9c697f247fa 100644 --- a/tests/baselines/reference/genericWithCallSignatures1.types +++ b/tests/baselines/reference/genericWithCallSignatures1.types @@ -14,7 +14,7 @@ class MyClass { > this.callableThing() : string >this.callableThing() : string >this.callableThing : CallableExtention ->this : this +>this : MyClass >callableThing : CallableExtention } } diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType1.errors.txt b/tests/baselines/reference/genericWithIndexerOfTypeParameterType1.errors.txt new file mode 100644 index 00000000000..b79c4188f7e --- /dev/null +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType1.errors.txt @@ -0,0 +1,18 @@ +tests/cases/compiler/genericWithIndexerOfTypeParameterType1.ts(8,21): error TS2684: The 'this' context of type 'LazyArray' is not assignable to method's 'this' of type 'LazyArray'. + Type 'string' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. + + +==== tests/cases/compiler/genericWithIndexerOfTypeParameterType1.ts (1 errors) ==== + class LazyArray { + private objects = <{ [objectId: string]: T; }>{}; + array() { + return this.objects; + } + } + var lazyArray = new LazyArray(); + var value: string = lazyArray.array()["test"]; // used to be an error + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'LazyArray' is not assignable to method's 'this' of type 'LazyArray'. +!!! error TS2684: Type 'string' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType1.types b/tests/baselines/reference/genericWithIndexerOfTypeParameterType1.types index 2f74c3e7c7d..9e2843704c7 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType1.types +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType1.types @@ -13,7 +13,7 @@ class LazyArray { return this.objects; >this.objects : { [objectId: string]: T; } ->this : this +>this : LazyArray >objects : { [objectId: string]: T; } } } diff --git a/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt b/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt index f348a0fb974..b7475350982 100644 --- a/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt +++ b/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt @@ -1,20 +1,30 @@ -tests/cases/compiler/genericWithOpenTypeParameters1.ts(7,40): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. +tests/cases/compiler/genericWithOpenTypeParameters1.ts(6,1): error TS2684: The 'this' context of type 'B' is not assignable to method's 'this' of type 'B'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. +tests/cases/compiler/genericWithOpenTypeParameters1.ts(7,34): error TS2684: The 'this' context of type 'B' is not assignable to method's 'this' of type 'B'. + Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. tests/cases/compiler/genericWithOpenTypeParameters1.ts(8,41): error TS2558: Expected 0 type arguments, but got 1. tests/cases/compiler/genericWithOpenTypeParameters1.ts(9,41): error TS2558: Expected 0 type arguments, but got 1. +tests/cases/compiler/genericWithOpenTypeParameters1.ts(10,37): error TS2684: The 'this' context of type 'B' is not assignable to method's 'this' of type 'B'. -==== tests/cases/compiler/genericWithOpenTypeParameters1.ts (3 errors) ==== +==== tests/cases/compiler/genericWithOpenTypeParameters1.ts (5 errors) ==== class B { foo(x: T): T { return null; } } var x: B; x.foo(1); // no error + ~ +!!! error TS2684: The 'this' context of type 'B' is not assignable to method's 'this' of type 'B'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. var f = (x: B) => { return x.foo(1); } // error - ~ -!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. -!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + ~ +!!! error TS2684: The 'this' context of type 'B' is not assignable to method's 'this' of type 'B'. +!!! error TS2684: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. var f2 = (x: B) => { return x.foo(1); } // error ~ !!! error TS2558: Expected 0 type arguments, but got 1. @@ -22,4 +32,6 @@ tests/cases/compiler/genericWithOpenTypeParameters1.ts(9,41): error TS2558: Expe ~~~~~~ !!! error TS2558: Expected 0 type arguments, but got 1. var f4 = (x: B) => { return x.foo(1); } // no error + ~ +!!! error TS2684: The 'this' context of type 'B' is not assignable to method's 'this' of type 'B'. \ No newline at end of file diff --git a/tests/baselines/reference/getAndSetNotIdenticalType2.types b/tests/baselines/reference/getAndSetNotIdenticalType2.types index d7d903cfe5f..aa0a90e855c 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType2.types +++ b/tests/baselines/reference/getAndSetNotIdenticalType2.types @@ -14,7 +14,7 @@ class C { return this.data; >this.data : A ->this : this +>this : C >data : A } set x(v: A) { @@ -24,7 +24,7 @@ class C { this.data = v; >this.data = v : A >this.data : A ->this : this +>this : C >data : A >v : A } diff --git a/tests/baselines/reference/getAndSetNotIdenticalType3.types b/tests/baselines/reference/getAndSetNotIdenticalType3.types index 45ecfa6a485..0e8b8b76ecf 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType3.types +++ b/tests/baselines/reference/getAndSetNotIdenticalType3.types @@ -14,7 +14,7 @@ class C { return this.data; >this.data : A ->this : this +>this : C >data : A } set x(v: A) { @@ -24,7 +24,7 @@ class C { this.data = v; >this.data = v : A >this.data : A ->this : this +>this : C >data : A >v : A } diff --git a/tests/baselines/reference/gettersAndSetters.types b/tests/baselines/reference/gettersAndSetters.types index 83de52982c6..7bd92ddc15f 100644 --- a/tests/baselines/reference/gettersAndSetters.types +++ b/tests/baselines/reference/gettersAndSetters.types @@ -18,7 +18,7 @@ class C { public get Foo() { return this.fooBack;} // ok >Foo : string >this.fooBack : string ->this : this +>this : C >fooBack : string public set Foo(foo:string) {this.fooBack = foo;} // ok @@ -26,7 +26,7 @@ class C { >foo : string >this.fooBack = foo : string >this.fooBack : string ->this : this +>this : C >fooBack : string >foo : string diff --git a/tests/baselines/reference/heterogeneousArrayAndOverloads.types b/tests/baselines/reference/heterogeneousArrayAndOverloads.types index beb59c9eab8..4a29246c56a 100644 --- a/tests/baselines/reference/heterogeneousArrayAndOverloads.types +++ b/tests/baselines/reference/heterogeneousArrayAndOverloads.types @@ -20,7 +20,7 @@ class arrTest { this.test([1, 2, 3, 5]); >this.test([1, 2, 3, 5]) : any >this.test : { (arg1: number[]): any; (arg1: string[]): any; } ->this : this +>this : arrTest >test : { (arg1: number[]): any; (arg1: string[]): any; } >[1, 2, 3, 5] : number[] >1 : 1 @@ -31,7 +31,7 @@ class arrTest { this.test(["hi"]); >this.test(["hi"]) : any >this.test : { (arg1: number[]): any; (arg1: string[]): any; } ->this : this +>this : arrTest >test : { (arg1: number[]): any; (arg1: string[]): any; } >["hi"] : string[] >"hi" : "hi" @@ -39,14 +39,14 @@ class arrTest { this.test([]); >this.test([]) : any >this.test : { (arg1: number[]): any; (arg1: string[]): any; } ->this : this +>this : arrTest >test : { (arg1: number[]): any; (arg1: string[]): any; } >[] : undefined[] this.test([1, 2, "hi", 5]); // Error >this.test([1, 2, "hi", 5]) : any >this.test : { (arg1: number[]): any; (arg1: string[]): any; } ->this : this +>this : arrTest >test : { (arg1: number[]): any; (arg1: string[]): any; } >[1, 2, "hi", 5] : (string | number)[] >1 : 1 diff --git a/tests/baselines/reference/implicitAnyCastedValue.types b/tests/baselines/reference/implicitAnyCastedValue.types index c87907cef2d..b1874fcbc25 100644 --- a/tests/baselines/reference/implicitAnyCastedValue.types +++ b/tests/baselines/reference/implicitAnyCastedValue.types @@ -41,7 +41,7 @@ class C { return this.bar; >this.bar : any >this.bar : any ->this : this +>this : C >bar : any } @@ -51,7 +51,7 @@ class C { return this.foo; // this should not be an error >this.foo : any >this.foo : any ->this : this +>this : C >foo : any } } @@ -69,7 +69,7 @@ class C1 { return this.getValue; // this should not be an error >this.getValue : any >this.getValue : any ->this : this +>this : C1 >getValue : any } @@ -78,7 +78,7 @@ class C1 { return this.getValue; // this should not be an error >this.getValue : any ->this : this +>this : C1 >getValue : any } } diff --git a/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt b/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt index 73665d0bfe5..38f021c9136 100644 --- a/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt +++ b/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt @@ -7,10 +7,11 @@ tests/cases/compiler/implicitAnyFromCircularInference.ts(17,5): error TS7023: 'f tests/cases/compiler/implicitAnyFromCircularInference.ts(22,5): error TS7023: 'f2' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. tests/cases/compiler/implicitAnyFromCircularInference.ts(25,10): error TS7023: 'h' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. tests/cases/compiler/implicitAnyFromCircularInference.ts(27,14): error TS7023: 'foo' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +tests/cases/compiler/implicitAnyFromCircularInference.ts(45,9): error TS7022: 'x' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. tests/cases/compiler/implicitAnyFromCircularInference.ts(45,9): error TS7023: 'x' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. -==== tests/cases/compiler/implicitAnyFromCircularInference.ts (10 errors) ==== +==== tests/cases/compiler/implicitAnyFromCircularInference.ts (11 errors) ==== // Error expected var a: typeof a; ~ @@ -75,6 +76,8 @@ tests/cases/compiler/implicitAnyFromCircularInference.ts(45,9): error TS7023: 'x // Error expected get x() { ~ +!!! error TS7022: 'x' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. + ~ !!! error TS7023: 'x' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. return this.x; } diff --git a/tests/baselines/reference/implicitAnyFromCircularInference.types b/tests/baselines/reference/implicitAnyFromCircularInference.types index c4ecb84141f..014254c1cd9 100644 --- a/tests/baselines/reference/implicitAnyFromCircularInference.types +++ b/tests/baselines/reference/implicitAnyFromCircularInference.types @@ -95,7 +95,7 @@ class D { return this.x; >this.x : any ->this : this +>this : D >x : any } } diff --git a/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.types b/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.types index dacd78418a3..2fb9d773252 100644 --- a/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.types +++ b/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.types @@ -12,7 +12,7 @@ class GetAndSet { return this.getAndSet; >this.getAndSet : any ->this : this +>this : GetAndSet >getAndSet : any } @@ -24,7 +24,7 @@ class GetAndSet { this.getAndSet = value; >this.getAndSet = value : any >this.getAndSet : any ->this : this +>this : GetAndSet >getAndSet : any >value : any } diff --git a/tests/baselines/reference/implicitAnyInCatch.types b/tests/baselines/reference/implicitAnyInCatch.types index 5619ec53622..42f93e26122 100644 --- a/tests/baselines/reference/implicitAnyInCatch.types +++ b/tests/baselines/reference/implicitAnyInCatch.types @@ -22,8 +22,8 @@ class C { >temp : () => void for (var x in this) { ->x : Extract ->this : this +>x : string +>this : C } } } diff --git a/tests/baselines/reference/importCallExpression4ES2020.types b/tests/baselines/reference/importCallExpression4ES2020.types index e7f75126c14..d41291d4c85 100644 --- a/tests/baselines/reference/importCallExpression4ES2020.types +++ b/tests/baselines/reference/importCallExpression4ES2020.types @@ -40,7 +40,7 @@ class C { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise >this.myModule.then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.myModule : Promise ->this : this +>this : C >myModule : Promise >then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void diff --git a/tests/baselines/reference/importCallExpressionInAMD4.types b/tests/baselines/reference/importCallExpressionInAMD4.types index afedd6f4b81..b51f6d0aece 100644 --- a/tests/baselines/reference/importCallExpressionInAMD4.types +++ b/tests/baselines/reference/importCallExpressionInAMD4.types @@ -40,7 +40,7 @@ class C { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise >this.myModule.then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.myModule : Promise ->this : this +>this : C >myModule : Promise >then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void @@ -107,7 +107,7 @@ export class D { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise >this.myModule.then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.myModule : Promise ->this : this +>this : D >myModule : Promise >then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void diff --git a/tests/baselines/reference/importCallExpressionInCJS5.types b/tests/baselines/reference/importCallExpressionInCJS5.types index aea65c14070..2c14317cf75 100644 --- a/tests/baselines/reference/importCallExpressionInCJS5.types +++ b/tests/baselines/reference/importCallExpressionInCJS5.types @@ -40,7 +40,7 @@ class C { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise >this.myModule.then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.myModule : Promise ->this : this +>this : C >myModule : Promise >then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void @@ -107,7 +107,7 @@ export class D { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise >this.myModule.then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.myModule : Promise ->this : this +>this : D >myModule : Promise >then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void diff --git a/tests/baselines/reference/importCallExpressionInSystem4.types b/tests/baselines/reference/importCallExpressionInSystem4.types index afedd6f4b81..b51f6d0aece 100644 --- a/tests/baselines/reference/importCallExpressionInSystem4.types +++ b/tests/baselines/reference/importCallExpressionInSystem4.types @@ -40,7 +40,7 @@ class C { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise >this.myModule.then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.myModule : Promise ->this : this +>this : C >myModule : Promise >then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void @@ -107,7 +107,7 @@ export class D { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise >this.myModule.then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.myModule : Promise ->this : this +>this : D >myModule : Promise >then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void diff --git a/tests/baselines/reference/importCallExpressionInUMD4.types b/tests/baselines/reference/importCallExpressionInUMD4.types index afedd6f4b81..b51f6d0aece 100644 --- a/tests/baselines/reference/importCallExpressionInUMD4.types +++ b/tests/baselines/reference/importCallExpressionInUMD4.types @@ -40,7 +40,7 @@ class C { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise >this.myModule.then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.myModule : Promise ->this : this +>this : C >myModule : Promise >then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void @@ -107,7 +107,7 @@ export class D { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise >this.myModule.then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.myModule : Promise ->this : this +>this : D >myModule : Promise >then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void diff --git a/tests/baselines/reference/importCallExpressionNoModuleKindSpecified.types b/tests/baselines/reference/importCallExpressionNoModuleKindSpecified.types index ef8cdaec2fa..a5d18d9b274 100644 --- a/tests/baselines/reference/importCallExpressionNoModuleKindSpecified.types +++ b/tests/baselines/reference/importCallExpressionNoModuleKindSpecified.types @@ -40,7 +40,7 @@ class C { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise >this.myModule.then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.myModule : Promise ->this : this +>this : C >myModule : Promise >then : (onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void diff --git a/tests/baselines/reference/importHelpersES6.types b/tests/baselines/reference/importHelpersES6.types index 70f8e09c9d9..9783b4bcd0b 100644 --- a/tests/baselines/reference/importHelpersES6.types +++ b/tests/baselines/reference/importHelpersES6.types @@ -14,10 +14,10 @@ declare var dec: any; >f : () => Promise >this.#x = await this.#x : number >this.#x : number ->this : this +>this : A >await this.#x : number >this.#x : number ->this : this +>this : A g(u) { return #x in u; } >g : (u: any) => boolean diff --git a/tests/baselines/reference/importHelpersNoHelpersForPrivateFields.types b/tests/baselines/reference/importHelpersNoHelpersForPrivateFields.types index fcb8f6214dd..7113c2b66bb 100644 --- a/tests/baselines/reference/importHelpersNoHelpersForPrivateFields.types +++ b/tests/baselines/reference/importHelpersNoHelpersForPrivateFields.types @@ -12,14 +12,14 @@ export class Foo { this.#field = this.#field; >this.#field = this.#field : boolean >this.#field : boolean ->this : this +>this : Foo >this.#field : boolean ->this : this +>this : Foo #field in this; >#field in this : boolean >#field : any ->this : this +>this : Foo } } diff --git a/tests/baselines/reference/importTypeGenericTypes.errors.txt b/tests/baselines/reference/importTypeGenericTypes.errors.txt new file mode 100644 index 00000000000..369a77c8604 --- /dev/null +++ b/tests/baselines/reference/importTypeGenericTypes.errors.txt @@ -0,0 +1,63 @@ +tests/cases/conformance/types/import/usage.ts(10,5): error TS2322: Type 'typeof Bar2' is not assignable to type 'typeof Bar'. + Types of construct signatures are incompatible. + Type 'new (input?: any) => Bar2' is not assignable to type 'new (input: J) => Bar'. + The 'this' types of each signature are incompatible. + Type 'Bar' is not assignable to type 'Bar2'. + Types of property 'item' are incompatible. + Property 'c' is missing in type 'I' but required in type '{ a: string; b: number; c: object; data: T; }'. + + +==== tests/cases/conformance/types/import/foo.ts (0 errors) ==== + interface Point { + x: number; + y: number; + data: T; + } + export = Point; + +==== tests/cases/conformance/types/import/foo2.ts (0 errors) ==== + namespace Bar { + export interface I { + a: string; + b: number; + data: T; + } + } + + export namespace Baz { + export interface J { + a: number; + b: string; + data: T; + } + } + + class Bar { + item: Bar.I; + constructor(input: Baz.J) {} + } + export { Bar } + +==== tests/cases/conformance/types/import/usage.ts (1 errors) ==== + export const x: import("./foo")<{x: number}> = { x: 0, y: 0, data: {x: 12} }; + export let y: import("./foo2").Bar.I<{x: number}> = { a: "", b: 0, data: {x: 12} }; + + export class Bar2 { + item: {a: string, b: number, c: object, data: T}; + constructor(input?: any) {} + } + + export let shim: typeof import("./foo2") = { + Bar: Bar2 + ~~~ +!!! error TS2322: Type 'typeof Bar2' is not assignable to type 'typeof Bar'. +!!! error TS2322: Types of construct signatures are incompatible. +!!! error TS2322: Type 'new (input?: any) => Bar2' is not assignable to type 'new (input: J) => Bar'. +!!! error TS2322: The 'this' types of each signature are incompatible. +!!! error TS2322: Type 'Bar' is not assignable to type 'Bar2'. +!!! error TS2322: Types of property 'item' are incompatible. +!!! error TS2322: Property 'c' is missing in type 'I' but required in type '{ a: string; b: number; c: object; data: T; }'. +!!! related TS2728 tests/cases/conformance/types/import/usage.ts:5:34: 'c' is declared here. +!!! related TS6500 tests/cases/conformance/types/import/foo2.ts:21:10: The expected type comes from property 'Bar' which is declared here on type 'typeof import("tests/cases/conformance/types/import/foo2")' + }; + \ No newline at end of file diff --git a/tests/baselines/reference/inKeywordTypeguard.errors.txt b/tests/baselines/reference/inKeywordTypeguard.errors.txt index cfb2b090a7a..859ddba8091 100644 --- a/tests/baselines/reference/inKeywordTypeguard.errors.txt +++ b/tests/baselines/reference/inKeywordTypeguard.errors.txt @@ -18,10 +18,9 @@ tests/cases/compiler/inKeywordTypeguard.ts(72,32): error TS2339: Property 'b' do tests/cases/compiler/inKeywordTypeguard.ts(74,32): error TS2339: Property 'a' does not exist on type 'B'. tests/cases/compiler/inKeywordTypeguard.ts(82,39): error TS2339: Property 'b' does not exist on type 'A'. tests/cases/compiler/inKeywordTypeguard.ts(84,39): error TS2339: Property 'a' does not exist on type 'B'. -tests/cases/compiler/inKeywordTypeguard.ts(94,26): error TS2339: Property 'a' does not exist on type 'never'. -==== tests/cases/compiler/inKeywordTypeguard.ts (17 errors) ==== +==== tests/cases/compiler/inKeywordTypeguard.ts (16 errors) ==== class A { a: string; } class B { b: string; } @@ -152,8 +151,6 @@ tests/cases/compiler/inKeywordTypeguard.ts(94,26): error TS2339: Property 'a' do if ("a" in this) { } else { let y = this.a; - ~ -!!! error TS2339: Property 'a' does not exist on type 'never'. } } } diff --git a/tests/baselines/reference/inKeywordTypeguard.symbols b/tests/baselines/reference/inKeywordTypeguard.symbols index 91d9c425977..939cc9a7eed 100644 --- a/tests/baselines/reference/inKeywordTypeguard.symbols +++ b/tests/baselines/reference/inKeywordTypeguard.symbols @@ -236,6 +236,9 @@ class UnreachableCodeDetection { } else { let y = this.a; >y : Symbol(y, Decl(inKeywordTypeguard.ts, 93, 15)) +>this.a : Symbol(UnreachableCodeDetection.a, Decl(inKeywordTypeguard.ts, 88, 32)) +>this : Symbol(UnreachableCodeDetection, Decl(inKeywordTypeguard.ts, 86, 1)) +>a : Symbol(UnreachableCodeDetection.a, Decl(inKeywordTypeguard.ts, 88, 32)) } } } diff --git a/tests/baselines/reference/inKeywordTypeguard.types b/tests/baselines/reference/inKeywordTypeguard.types index e0956d838e2..90b32da0ff0 100644 --- a/tests/baselines/reference/inKeywordTypeguard.types +++ b/tests/baselines/reference/inKeywordTypeguard.types @@ -251,14 +251,14 @@ class NegativeClassTest { >"a" in this.prop : boolean >"a" : "a" >this.prop : A | B ->this : this +>this : NegativeClassTest >prop : A | B let z: number = this.prop.b; >z : number >this.prop.b : any >this.prop : A ->this : this +>this : NegativeClassTest >prop : A >b : any @@ -267,7 +267,7 @@ class NegativeClassTest { >y : string >this.prop.a : any >this.prop : B ->this : this +>this : NegativeClassTest >prop : B >a : any } @@ -286,14 +286,14 @@ class UnreachableCodeDetection { if ("a" in this) { >"a" in this : boolean >"a" : "a" ->this : this +>this : UnreachableCodeDetection } else { let y = this.a; ->y : any ->this.a : any ->this : never ->a : any +>y : string +>this.a : string +>this : UnreachableCodeDetection +>a : string } } } diff --git a/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.types b/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.types index ab3129ef5ef..8b5cdf8bd27 100644 --- a/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.types +++ b/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.types @@ -15,7 +15,7 @@ class Foo { this.x = a; >this.x = a : globalThis.T >this.x : T ->this : this +>this : Foo >x : T >a : globalThis.T } diff --git a/tests/baselines/reference/incrementOnTypeParameter.types b/tests/baselines/reference/incrementOnTypeParameter.types index c6d80d7ddb7..44874bad737 100644 --- a/tests/baselines/reference/incrementOnTypeParameter.types +++ b/tests/baselines/reference/incrementOnTypeParameter.types @@ -11,7 +11,7 @@ class C { this.a++; >this.a++ : number >this.a : T ->this : this +>this : C >a : T for (var i: T, j = 0; j < 10; i++) { diff --git a/tests/baselines/reference/indexTypeCheck.types b/tests/baselines/reference/indexTypeCheck.types index ce344ad5e84..511e46bb89a 100644 --- a/tests/baselines/reference/indexTypeCheck.types +++ b/tests/baselines/reference/indexTypeCheck.types @@ -132,12 +132,12 @@ class Benchmark { >this.results[name] = this.results[name] : any >this.results[name] : any >this.results : { [x: string]: any; } ->this : this +>this : Benchmark >results : { [x: string]: any; } >name : string >this.results[name] : any >this.results : { [x: string]: any; } ->this : this +>this : Benchmark >results : { [x: string]: any; } >name : string } diff --git a/tests/baselines/reference/indexedAccessRelation.types b/tests/baselines/reference/indexedAccessRelation.types index 6d2ee19dda2..998233a71ce 100644 --- a/tests/baselines/reference/indexedAccessRelation.types +++ b/tests/baselines/reference/indexedAccessRelation.types @@ -28,7 +28,7 @@ class Comp extends Component> this.setState({ a: a }); >this.setState({ a: a }) : void >this.setState : (state: Pick, K>) => void ->this : this +>this : Comp >setState : (state: Pick, K>) => void >{ a: a } : { a: T; } >a : T diff --git a/tests/baselines/reference/indexedAccessTypeConstraints.errors.txt b/tests/baselines/reference/indexedAccessTypeConstraints.errors.txt new file mode 100644 index 00000000000..78b3fea9294 --- /dev/null +++ b/tests/baselines/reference/indexedAccessTypeConstraints.errors.txt @@ -0,0 +1,60 @@ +tests/cases/compiler/indexedAccessTypeConstraints.ts(20,16): error TS2684: The 'this' context of type 'Foo' is not assignable to method's 'this' of type 'Parent'. + Types of property 'data' are incompatible. + Type 'Data>' is not assignable to type 'Data'. + Type 'IData' is not assignable to type 'M'. + 'M' could be instantiated with an arbitrary type which could be unrelated to 'IData'. +tests/cases/compiler/indexedAccessTypeConstraints.ts(26,16): error TS2684: The 'this' context of type 'Bar' is not assignable to method's 'this' of type 'Parent'. + Types of property 'data' are incompatible. + Type 'Data' is not assignable to type 'Data'. + Type 'T' is not assignable to type 'M'. + 'M' could be instantiated with an arbitrary type which could be unrelated to 'T'. + + +==== tests/cases/compiler/indexedAccessTypeConstraints.ts (2 errors) ==== + // Repro from #14557 + + interface IData { + content: T; + } + + type Data = { + get: (prop: K) => T[K]; + }; + + class Parent { + constructor(private data: Data) {} + getData(): Data { + return this.data; + } + } + + export class Foo extends Parent> { + getContent(): C { + return this.getData().get('content'); + ~~~~ +!!! error TS2684: The 'this' context of type 'Foo' is not assignable to method's 'this' of type 'Parent'. +!!! error TS2684: Types of property 'data' are incompatible. +!!! error TS2684: Type 'Data>' is not assignable to type 'Data'. +!!! error TS2684: Type 'IData' is not assignable to type 'M'. +!!! error TS2684: 'M' could be instantiated with an arbitrary type which could be unrelated to 'IData'. + } + } + + export class Bar> extends Parent { + getContent(): C { + return this.getData().get('content'); + ~~~~ +!!! error TS2684: The 'this' context of type 'Bar' is not assignable to method's 'this' of type 'Parent'. +!!! error TS2684: Types of property 'data' are incompatible. +!!! error TS2684: Type 'Data' is not assignable to type 'Data'. +!!! error TS2684: Type 'T' is not assignable to type 'M'. +!!! error TS2684: 'M' could be instantiated with an arbitrary type which could be unrelated to 'T'. + } + } + + // Repro from #14557 + + function foo(x: C, y: T['content']) { + x = y; + } + \ No newline at end of file diff --git a/tests/baselines/reference/indexedAccessTypeConstraints.types b/tests/baselines/reference/indexedAccessTypeConstraints.types index 280b1a68fdc..48a16fdd883 100644 --- a/tests/baselines/reference/indexedAccessTypeConstraints.types +++ b/tests/baselines/reference/indexedAccessTypeConstraints.types @@ -26,7 +26,7 @@ class Parent { return this.data; >this.data : Data ->this : this +>this : Parent >data : Data } } @@ -43,7 +43,7 @@ export class Foo extends Parent> { >this.getData().get : (prop: K) => IData[K] >this.getData() : Data> >this.getData : () => Data> ->this : this +>this : Foo >getData : () => Data> >get : (prop: K) => IData[K] >'content' : "content" @@ -62,7 +62,7 @@ export class Bar> extends Parent { >this.getData().get : (prop: K) => T[K] >this.getData() : Data >this.getData : () => Data ->this : this +>this : Bar >getData : () => Data >get : (prop: K) => T[K] >'content' : "content" diff --git a/tests/baselines/reference/indexersInClassType.types b/tests/baselines/reference/indexersInClassType.types index 5ea9f22bf7a..7ae064b3e6e 100644 --- a/tests/baselines/reference/indexersInClassType.types +++ b/tests/baselines/reference/indexersInClassType.types @@ -15,10 +15,10 @@ class C { >'a' : {} fn() { ->fn : () => this +>fn : () => C return this; ->this : this +>this : C } } diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.errors.txt b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.errors.txt index 4ed8bdd81c6..6e3703f2017 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.errors.txt +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.errors.txt @@ -1,7 +1,20 @@ +tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(34,5): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + Type 'A' is not assignable to type 'A'. Two different types with this name exist, but they are unrelated. + 'A' could be instantiated with an arbitrary type which could be unrelated to 'A'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(34,20): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(42,5): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(43,25): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(50,1): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + Type 'number' is not assignable to type 'A'. + 'A' could be instantiated with an arbitrary type which could be unrelated to 'number'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(51,1): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(52,1): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(54,1): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(63,1): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(68,16): error TS2339: Property 'toUpperCase' does not exist on type 'number'. -==== tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts (1 errors) ==== +==== tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts (10 errors) ==== // Repro from #15680 // This is a contrived class. We could do the same thing with Observables, etc. @@ -36,6 +49,12 @@ tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(68,16): error TS233 return (a: SetOf) => { const b: SetOf = new SetOf(); a.forEach(x => b.add(fn(x))); + ~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +!!! error TS2684: Type 'A' is not assignable to type 'A'. Two different types with this name exist, but they are unrelated. +!!! error TS2684: 'A' could be instantiated with an arbitrary type which could be unrelated to 'A'. + ~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. return b; } } @@ -44,7 +63,11 @@ tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(68,16): error TS233 return (a: SetOf) => { const result = new SetOf(); a.forEach(x => { + ~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. if (predicate(x)) result.add(x); + ~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. }); return result; } @@ -52,10 +75,20 @@ tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(68,16): error TS233 const testSet = new SetOf(); testSet.add(1); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +!!! error TS2684: Type 'number' is not assignable to type 'A'. +!!! error TS2684: 'A' could be instantiated with an arbitrary type which could be unrelated to 'number'. testSet.add(2); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. testSet.add(3); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. testSet.transform( + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. compose( filter(x => x % 1 === 0), map(x => x + x), @@ -65,6 +98,8 @@ tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts(68,16): error TS233 ) testSet.transform( + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. compose( filter(x => x % 1 === 0), map(x => x + x), diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types index bc2d36c8d0f..14b4702d807 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types @@ -16,7 +16,7 @@ class SetOf { >this._store.push(a) : number >this._store.push : (...items: A[]) => number >this._store : A[] ->this : this +>this : SetOf >_store : A[] >push : (...items: A[]) => number >a : A @@ -30,7 +30,7 @@ class SetOf { return transformer(this); >transformer(this) : SetOf >transformer : (a: SetOf) => SetOf ->this : this +>this : SetOf } forEach(fn: (a: A, index: number) => void) { @@ -43,7 +43,7 @@ class SetOf { >this._store.forEach((a, i) => fn(a, i)) : void >this._store.forEach : (callbackfn: (value: A, index: number, array: A[]) => void, thisArg?: any) => void >this._store : A[] ->this : this +>this : SetOf >_store : A[] >forEach : (callbackfn: (value: A, index: number, array: A[]) => void, thisArg?: any) => void >(a, i) => fn(a, i) : (a: A, i: number) => void @@ -202,7 +202,7 @@ testSet.add(3); >3 : 3 testSet.transform( ->testSet.transform( compose( filter(x => x % 1 === 0), map(x => x + x), map(x => x + '!!!'), map(x => x.toUpperCase()) )) : SetOf +>testSet.transform( compose( filter(x => x % 1 === 0), map(x => x + x), map(x => x + '!!!'), map(x => x.toUpperCase()) )) : SetOf >testSet.transform : (transformer: (a: SetOf) => SetOf) => SetOf >testSet : SetOf >transform : (transformer: (a: SetOf) => SetOf) => SetOf @@ -254,7 +254,7 @@ testSet.transform( ) testSet.transform( ->testSet.transform( compose( filter(x => x % 1 === 0), map(x => x + x), map(x => 123), // Whoops a bug map(x => x.toUpperCase()) // causes an error! )) : SetOf +>testSet.transform( compose( filter(x => x % 1 === 0), map(x => x + x), map(x => 123), // Whoops a bug map(x => x.toUpperCase()) // causes an error! )) : SetOf >testSet.transform : (transformer: (a: SetOf) => SetOf) => SetOf >testSet : SetOf >transform : (transformer: (a: SetOf) => SetOf) => SetOf diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.errors.txt b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.errors.txt new file mode 100644 index 00000000000..176c945b90b --- /dev/null +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.errors.txt @@ -0,0 +1,133 @@ +tests/cases/compiler/inferFromGenericFunctionReturnTypes2.ts(56,5): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + Type 'A' is not assignable to type 'A'. Two different types with this name exist, but they are unrelated. + 'A' could be instantiated with an arbitrary type which could be unrelated to 'A'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes2.ts(56,20): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes2.ts(64,5): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes2.ts(65,25): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes2.ts(72,1): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + Type 'number' is not assignable to type 'A'. + 'A' could be instantiated with an arbitrary type which could be unrelated to 'number'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes2.ts(73,1): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes2.ts(74,1): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes2.ts(76,12): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +tests/cases/compiler/inferFromGenericFunctionReturnTypes2.ts(87,12): error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + + +==== tests/cases/compiler/inferFromGenericFunctionReturnTypes2.ts (9 errors) ==== + type Mapper = (x: T) => U; + + declare function wrap(cb: Mapper): Mapper; + + declare function arrayize(cb: Mapper): Mapper; + + declare function combine(f: (x: A) => B, g: (x: B) => C): (x: A) => C; + + declare function foo(f: Mapper): void; + + let f1: Mapper = s => s.length; + let f2: Mapper = wrap(s => s.length); + let f3: Mapper = arrayize(wrap(s => s.length)); + let f4: Mapper = combine(wrap(s => s.length), wrap(n => n >= 10)); + + foo(wrap(s => s.length)); + + let a1 = ["a", "b"].map(s => s.length); + let a2 = ["a", "b"].map(wrap(s => s.length)); + let a3 = ["a", "b"].map(wrap(arrayize(s => s.length))); + let a4 = ["a", "b"].map(combine(wrap(s => s.length), wrap(n => n > 10))); + let a5 = ["a", "b"].map(combine(identity, wrap(s => s.length))); + let a6 = ["a", "b"].map(combine(wrap(s => s.length), identity)); + + // This is a contrived class. We could do the same thing with Observables, etc. + class SetOf { + _store: A[]; + + add(a: A) { + this._store.push(a); + } + + transform(transformer: (a: SetOf) => SetOf): SetOf { + return transformer(this); + } + + forEach(fn: (a: A, index: number) => void) { + this._store.forEach((a, i) => fn(a, i)); + } + } + + function compose( + fnA: (a: SetOf) => SetOf, + fnB: (b: SetOf) => SetOf, + fnC: (c: SetOf) => SetOf, + fnD: (c: SetOf) => SetOf, + ):(x: SetOf) => SetOf; + /* ... etc ... */ + function compose(...fns: ((x: T) => T)[]): (x: T) => T { + return (x: T) => fns.reduce((prev, fn) => fn(prev), x); + } + + function map(fn: (a: A) => B): (s: SetOf) => SetOf { + return (a: SetOf) => { + const b: SetOf = new SetOf(); + a.forEach(x => b.add(fn(x))); + ~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +!!! error TS2684: Type 'A' is not assignable to type 'A'. Two different types with this name exist, but they are unrelated. +!!! error TS2684: 'A' could be instantiated with an arbitrary type which could be unrelated to 'A'. + ~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + return b; + } + } + + function filter(predicate: (a: A) => boolean): (s: SetOf) => SetOf { + return (a: SetOf) => { + const result = new SetOf(); + a.forEach(x => { + ~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + if (predicate(x)) result.add(x); + ~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + }); + return result; + } + } + + const testSet = new SetOf(); + testSet.add(1); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. +!!! error TS2684: Type 'number' is not assignable to type 'A'. +!!! error TS2684: 'A' could be instantiated with an arbitrary type which could be unrelated to 'number'. + testSet.add(2); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + testSet.add(3); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + + const t1 = testSet.transform( + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + compose( + filter(x => x % 1 === 0), + map(x => x + x), + map(x => x + '!!!'), + map(x => x.toUpperCase()) + ) + ) + + declare function identity(x: T): T; + + const t2 = testSet.transform( + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'SetOf' is not assignable to method's 'this' of type 'SetOf'. + compose( + filter(x => x % 1 === 0), + identity, + map(x => x + '!!!'), + map(x => x.toUpperCase()) + ) + ) + \ No newline at end of file diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types index 0c9cff3bf4a..801fff6d81a 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types @@ -209,7 +209,7 @@ class SetOf { >this._store.push(a) : number >this._store.push : (...items: A[]) => number >this._store : A[] ->this : this +>this : SetOf >_store : A[] >push : (...items: A[]) => number >a : A @@ -223,7 +223,7 @@ class SetOf { return transformer(this); >transformer(this) : SetOf >transformer : (a: SetOf) => SetOf ->this : this +>this : SetOf } forEach(fn: (a: A, index: number) => void) { @@ -236,7 +236,7 @@ class SetOf { >this._store.forEach((a, i) => fn(a, i)) : void >this._store.forEach : (callbackfn: (value: A, index: number, array: A[]) => void, thisArg?: any) => void >this._store : A[] ->this : this +>this : SetOf >_store : A[] >forEach : (callbackfn: (value: A, index: number, array: A[]) => void, thisArg?: any) => void >(a, i) => fn(a, i) : (a: A, i: number) => void @@ -395,8 +395,8 @@ testSet.add(3); >3 : 3 const t1 = testSet.transform( ->t1 : SetOf ->testSet.transform( compose( filter(x => x % 1 === 0), map(x => x + x), map(x => x + '!!!'), map(x => x.toUpperCase()) )) : SetOf +>t1 : SetOf +>testSet.transform( compose( filter(x => x % 1 === 0), map(x => x + x), map(x => x + '!!!'), map(x => x.toUpperCase()) )) : SetOf >testSet.transform : (transformer: (a: SetOf) => SetOf) => SetOf >testSet : SetOf >transform : (transformer: (a: SetOf) => SetOf) => SetOf @@ -452,8 +452,8 @@ declare function identity(x: T): T; >x : T const t2 = testSet.transform( ->t2 : SetOf ->testSet.transform( compose( filter(x => x % 1 === 0), identity, map(x => x + '!!!'), map(x => x.toUpperCase()) )) : SetOf +>t2 : SetOf +>testSet.transform( compose( filter(x => x % 1 === 0), identity, map(x => x + '!!!'), map(x => x.toUpperCase()) )) : SetOf >testSet.transform : (transformer: (a: SetOf) => SetOf) => SetOf >testSet : SetOf >transform : (transformer: (a: SetOf) => SetOf) => SetOf diff --git a/tests/baselines/reference/inferenceErasedSignatures.errors.txt b/tests/baselines/reference/inferenceErasedSignatures.errors.txt new file mode 100644 index 00000000000..a13954fb1ef --- /dev/null +++ b/tests/baselines/reference/inferenceErasedSignatures.errors.txt @@ -0,0 +1,85 @@ +tests/cases/compiler/inferenceErasedSignatures.ts(14,11): error TS2416: Property 'baz' in type 'SomeClass' is not assignable to the same property in base type 'SomeAbstractClass'. + Type '(context: number) => Promise' is not assignable to type '(c: number) => Promise'. + The 'this' types of each signature are incompatible. + Type 'SomeAbstractClass' is not assignable to type 'SomeClass'. + Types of property 'baz' are incompatible. + Type '(c: C) => Promise' is not assignable to type '(context: number) => Promise'. + The 'this' types of each signature are incompatible. + Type 'SomeClass' is not assignable to type 'SomeAbstractClass'. + Types of property 'foo' are incompatible. + Type '(r?: boolean | undefined) => void' is not assignable to type '(r?: R | undefined) => void'. + Types of parameters 'r' and 'r' are incompatible. + Type 'R | undefined' is not assignable to type 'boolean | undefined'. + Type 'R' is not assignable to type 'boolean | undefined'. + Type 'R' is not assignable to type 'true'. + + +==== tests/cases/compiler/inferenceErasedSignatures.ts (1 errors) ==== + // Repro from #37163 + + declare class SomeBaseClass { + set(key: K, value: this[K]): this[K]; + } + + abstract class SomeAbstractClass extends SomeBaseClass { + foo!: (r?: R) => void; + bar!: (r?: any) => void; + abstract baz(c: C): Promise; + } + + class SomeClass extends SomeAbstractClass { + async baz(context: number): Promise { + ~~~ +!!! error TS2416: Property 'baz' in type 'SomeClass' is not assignable to the same property in base type 'SomeAbstractClass'. +!!! error TS2416: Type '(context: number) => Promise' is not assignable to type '(c: number) => Promise'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'SomeAbstractClass' is not assignable to type 'SomeClass'. +!!! error TS2416: Types of property 'baz' are incompatible. +!!! error TS2416: Type '(c: C) => Promise' is not assignable to type '(context: number) => Promise'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'SomeClass' is not assignable to type 'SomeAbstractClass'. +!!! error TS2416: Types of property 'foo' are incompatible. +!!! error TS2416: Type '(r?: boolean | undefined) => void' is not assignable to type '(r?: R | undefined) => void'. +!!! error TS2416: Types of parameters 'r' and 'r' are incompatible. +!!! error TS2416: Type 'R | undefined' is not assignable to type 'boolean | undefined'. +!!! error TS2416: Type 'R' is not assignable to type 'boolean | undefined'. +!!! error TS2416: Type 'R' is not assignable to type 'true'. + return `${context}`; + } + } + + type CType = T extends SomeAbstractClass ? C : never; + type MType = T extends SomeAbstractClass ? M : never; + type RType = T extends SomeAbstractClass ? R : never; + + type SomeClassC = CType; // number + type SomeClassM = MType; // string + type SomeClassR = RType; // boolean + + // Repro from #37163 + + interface BaseType { + set(key: K, value: this[K]): this[K]; + useT1(c: T1): void; + useT2(r?: T2): void; + unrelatedButSomehowRelevant(r?: any): void; + } + + interface InheritedType extends BaseType { + // This declaration shouldn't do anything... + useT1(_: number): void + } + + // Structural expansion of InheritedType + interface StructuralVersion { + set(key: K, value: this[K]): this[K]; + useT1(c: number): void; + useT2(r?: boolean): void; + unrelatedButSomehowRelevant(r?: any): void; + } + + type GetT1 = T extends BaseType ? U : never; + + type T1 = GetT1; // number + type T2 = GetT1; // number + \ No newline at end of file diff --git a/tests/baselines/reference/inferenceErasedSignatures.types b/tests/baselines/reference/inferenceErasedSignatures.types index 84f64ffda56..bdea75737de 100644 --- a/tests/baselines/reference/inferenceErasedSignatures.types +++ b/tests/baselines/reference/inferenceErasedSignatures.types @@ -51,13 +51,13 @@ type RType = T extends SomeAbstractClass ? R : never; >RType : RType type SomeClassC = CType; // number ->SomeClassC : number +>SomeClassC : never type SomeClassM = MType; // string ->SomeClassM : string +>SomeClassM : never type SomeClassR = RType; // boolean ->SomeClassR : boolean +>SomeClassR : never // Repro from #37163 diff --git a/tests/baselines/reference/inferenceLimit.types b/tests/baselines/reference/inferenceLimit.types index aa49bdd73b7..88d371528bc 100644 --- a/tests/baselines/reference/inferenceLimit.types +++ b/tests/baselines/reference/inferenceLimit.types @@ -45,7 +45,7 @@ export class BrokenClass { >this.doStuff(order.id) .then : (onfulfilled?: (value: void) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.doStuff(order.id) : Promise >this.doStuff : (id: number) => Promise ->this : this +>this : BrokenClass >doStuff : (id: number) => Promise >order.id : any >order : any diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments.types b/tests/baselines/reference/inferringClassMembersFromAssignments.types index c962aa841d8..b22aeef182b 100644 --- a/tests/baselines/reference/inferringClassMembersFromAssignments.types +++ b/tests/baselines/reference/inferringClassMembersFromAssignments.types @@ -12,7 +12,7 @@ class C { this.inConstructor = 0; >this.inConstructor = 0 : 0 >this.inConstructor : any ->this : this +>this : C >inConstructor : any >0 : 0 } @@ -20,14 +20,14 @@ class C { this.inConstructor = "string" >this.inConstructor = "string" : "string" >this.inConstructor : any ->this : this +>this : C >inConstructor : any >"string" : "string" } this.inMultiple = 0; >this.inMultiple = 0 : 0 >this.inMultiple : any ->this : this +>this : C >inMultiple : any >0 : 0 } @@ -43,14 +43,14 @@ class C { this.inMethod = 0; >this.inMethod = 0 : 0 >this.inMethod : string | number | undefined ->this : this +>this : C >inMethod : string | number | undefined >0 : 0 this.inMethodNullable = null; >this.inMethodNullable = null : null >this.inMethodNullable : any ->this : this +>this : C >inMethodNullable : any >null : null } @@ -58,28 +58,28 @@ class C { this.inMethod = "string" >this.inMethod = "string" : "string" >this.inMethod : string | number | undefined ->this : this +>this : C >inMethod : string | number | undefined >"string" : "string" this.inMethodNullable = undefined; >this.inMethodNullable = undefined : undefined >this.inMethodNullable : any ->this : this +>this : C >inMethodNullable : any >undefined : undefined } this.inMultiple = "string"; >this.inMultiple = "string" : "string" >this.inMultiple : number ->this : this +>this : C >inMultiple : number >"string" : "string" this.inMultipleMethods = "string"; >this.inMultipleMethods = "string" : "string" >this.inMultipleMethods : string | boolean | undefined ->this : this +>this : C >inMultipleMethods : string | boolean | undefined >"string" : "string" @@ -96,7 +96,7 @@ class C { this.inNestedArrowFunction = 0; >this.inNestedArrowFunction = 0 : 0 >this.inNestedArrowFunction : string | number | undefined ->this : this +>this : C >inNestedArrowFunction : string | number | undefined >0 : 0 } @@ -104,7 +104,7 @@ class C { this.inNestedArrowFunction = "string" >this.inNestedArrowFunction = "string" : "string" >this.inNestedArrowFunction : string | number | undefined ->this : this +>this : C >inNestedArrowFunction : string | number | undefined >"string" : "string" } @@ -122,7 +122,7 @@ class C { this.inGetter = 0; >this.inGetter = 0 : 0 >this.inGetter : string | number | undefined ->this : this +>this : C >inGetter : string | number | undefined >0 : 0 } @@ -130,21 +130,21 @@ class C { this.inGetter = "string" >this.inGetter = "string" : "string" >this.inGetter : string | number | undefined ->this : this +>this : C >inGetter : string | number | undefined >"string" : "string" } this.inMultiple = false; >this.inMultiple = false : false >this.inMultiple : number ->this : this +>this : C >inMultiple : number >false : false this.inMultipleMethods = false; >this.inMultipleMethods = false : false >this.inMultipleMethods : string | boolean | undefined ->this : this +>this : C >inMultipleMethods : string | boolean | undefined >false : false } @@ -160,7 +160,7 @@ class C { this.inSetter = 0; >this.inSetter = 0 : 0 >this.inSetter : string | number | undefined ->this : this +>this : C >inSetter : string | number | undefined >0 : 0 } @@ -168,7 +168,7 @@ class C { this.inSetter = "string" >this.inSetter = "string" : "string" >this.inSetter : string | number | undefined ->this : this +>this : C >inSetter : string | number | undefined >"string" : "string" } diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments3.types b/tests/baselines/reference/inferringClassMembersFromAssignments3.types index 66394eb9ed1..135e147b240 100644 --- a/tests/baselines/reference/inferringClassMembersFromAssignments3.types +++ b/tests/baselines/reference/inferringClassMembersFromAssignments3.types @@ -6,7 +6,7 @@ class Base { this.p = 1 >this.p = 1 : 1 >this.p : any ->this : this +>this : Base >p : any >1 : 1 } @@ -21,7 +21,7 @@ class Derived extends Base { this.p = 1 >this.p = 1 : 1 >this.p : number ->this : this +>this : Derived >p : number >1 : 1 } diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments4.types b/tests/baselines/reference/inferringClassMembersFromAssignments4.types index f20602d188e..2aec0d9988c 100644 --- a/tests/baselines/reference/inferringClassMembersFromAssignments4.types +++ b/tests/baselines/reference/inferringClassMembersFromAssignments4.types @@ -8,7 +8,7 @@ class Base { this.p = 1 >this.p = 1 : 1 >this.p : number | undefined ->this : this +>this : Base >p : number | undefined >1 : 1 } @@ -24,7 +24,7 @@ class Derived extends Base { this.p = 1 >this.p = 1 : 1 >this.p : number | undefined ->this : this +>this : Derived >p : number | undefined >1 : 1 } diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments5.types b/tests/baselines/reference/inferringClassMembersFromAssignments5.types index 6bc1f2482d8..d0a36048943 100644 --- a/tests/baselines/reference/inferringClassMembersFromAssignments5.types +++ b/tests/baselines/reference/inferringClassMembersFromAssignments5.types @@ -8,7 +8,7 @@ class Base { this.p = 1 >this.p = 1 : 1 >this.p : number | undefined ->this : this +>this : Base >p : number | undefined >1 : 1 } @@ -26,7 +26,7 @@ class Derived extends Base { this.p = 1 >this.p = 1 : 1 >this.p : any ->this : this +>this : Derived >p : any >1 : 1 } @@ -35,7 +35,7 @@ class Derived extends Base { return this.p >this.p : number ->this : this +>this : Derived >p : number } } diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments7.types b/tests/baselines/reference/inferringClassMembersFromAssignments7.types index 51555b185ec..b11304e91b9 100644 --- a/tests/baselines/reference/inferringClassMembersFromAssignments7.types +++ b/tests/baselines/reference/inferringClassMembersFromAssignments7.types @@ -4,20 +4,20 @@ class C { constructor() { var self = this ->self : this ->this : this +>self : C +>this : C self.x = 1 >self.x = 1 : 1 >self.x : any ->self : this +>self : C >x : any >1 : 1 self.m = function() { >self.m = function() { console.log(self.x) } : () => void >self.m : any ->self : this +>self : C >m : any >function() { console.log(self.x) } : () => void @@ -27,7 +27,7 @@ class C { >console : Console >log : (...data: any[]) => void >self.x : number ->self : this +>self : C >x : number } } @@ -35,13 +35,13 @@ class C { >mreal : () => void var self = this ->self : this ->this : this +>self : C +>this : C self.y = 2 >self.y = 2 : 2 >self.y : number | undefined ->self : this +>self : C >y : number | undefined >2 : 2 } diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt index 84a04107008..19649cb7a3b 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt @@ -1,5 +1,8 @@ -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'. +tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts(8,13): error TS2416: Property 'myMethod' in type 'C' is not assignable to the same property in base type 'B'. + Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'A' is not assignable to type 'C'. + Types have separate declarations of a private property 'myMethod'. ==== tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts (1 errors) ==== @@ -10,9 +13,12 @@ tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts(7,7): error class B extends A { } class C extends B { - ~ -!!! error TS2415: Class 'C' incorrectly extends base class 'B'. -!!! error TS2415: Types have separate declarations of a private property 'myMethod'. private myMethod() { } + ~~~~~~~~ +!!! error TS2416: Property 'myMethod' in type 'C' is not assignable to the same property in base type 'B'. +!!! error TS2416: Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'A' is not assignable to type 'C'. +!!! error TS2416: Types have separate declarations of a private property 'myMethod'. } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt index f621ed4cfee..3ffb3eb7d7a 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt @@ -1,5 +1,8 @@ -tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.ts(7,7): error TS2415: Class 'C' incorrectly extends base class 'B'. - Property 'myMethod' is private in type 'A' but not in type 'C'. +tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.ts(8,12): error TS2416: Property 'myMethod' in type 'C' is not assignable to the same property in base type 'B'. + Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'A' is not assignable to type 'C'. + Property 'myMethod' is private in type 'A' but not in type 'C'. ==== tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.ts (1 errors) ==== @@ -10,9 +13,12 @@ tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMembe class B extends A { } class C extends B { - ~ -!!! error TS2415: Class 'C' incorrectly extends base class 'B'. -!!! error TS2415: Property 'myMethod' is private in type 'A' but not in type 'C'. public myMethod() { } + ~~~~~~~~ +!!! error TS2416: Property 'myMethod' in type 'C' is not assignable to the same property in base type 'B'. +!!! error TS2416: Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'A' is not assignable to type 'C'. +!!! error TS2416: Property 'myMethod' is private in type 'A' but not in type 'C'. } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt index 2218a73a334..9952e689e3d 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt @@ -1,5 +1,8 @@ -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 'A'. +tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.ts(8,13): error TS2416: Property 'myMethod' in type 'C' is not assignable to the same property in base type 'B'. + Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'A' is not assignable to type 'C'. + Property 'myMethod' is private in type 'C' but not in type 'A'. ==== tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.ts (1 errors) ==== @@ -10,9 +13,12 @@ tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMembe class B extends A { } class C extends B { - ~ -!!! error TS2415: Class 'C' incorrectly extends base class 'B'. -!!! error TS2415: Property 'myMethod' is private in type 'C' but not in type 'A'. private myMethod() { } + ~~~~~~~~ +!!! error TS2416: Property 'myMethod' in type 'C' is not assignable to the same property in base type 'B'. +!!! error TS2416: Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'A' is not assignable to type 'C'. +!!! error TS2416: Property 'myMethod' is private in type 'C' but not in type 'A'. } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.types b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.types index b843799a8cb..e192ffb09b1 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.types +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.types @@ -10,7 +10,7 @@ class a { return this.__x; >this.__x : () => string ->this : this +>this : a >__x : () => string } set x(aValue: () => string) { @@ -20,7 +20,7 @@ class a { this.__x = aValue; >this.__x = aValue : () => string >this.__x : () => string ->this : this +>this : a >__x : () => string >aValue : () => string } diff --git a/tests/baselines/reference/inheritedConstructorPropertyContextualType.types b/tests/baselines/reference/inheritedConstructorPropertyContextualType.types index bf707519fb6..0128fa9dd85 100644 --- a/tests/baselines/reference/inheritedConstructorPropertyContextualType.types +++ b/tests/baselines/reference/inheritedConstructorPropertyContextualType.types @@ -21,7 +21,7 @@ class Assignment extends Base { this.state = { version: 2 } >this.state = { version: 2 } : { version: 2; } >this.state : State ->this : this +>this : Assignment >state : State >{ version: 2 } : { version: 2; } >version : 2 diff --git a/tests/baselines/reference/initializerWithThisPropertyAccess.types b/tests/baselines/reference/initializerWithThisPropertyAccess.types index 1abfa0cfe02..b66be13707e 100644 --- a/tests/baselines/reference/initializerWithThisPropertyAccess.types +++ b/tests/baselines/reference/initializerWithThisPropertyAccess.types @@ -30,7 +30,7 @@ class A { this.a = 1; >this.a = 1 : 1 >this.a : number ->this : this +>this : A >a : number >1 : 1 } @@ -80,7 +80,7 @@ class Foo { this.bar = new Bar(); >this.bar = new Bar() : Bar >this.bar : Bar ->this : this +>this : Foo >bar : Bar >new Bar() : Bar >Bar : typeof Bar diff --git a/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.types b/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.types index 38bcc1898eb..c076793295e 100644 --- a/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.types +++ b/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.types @@ -131,30 +131,30 @@ export class MyClass implements predom.JSX.Element { {this.props.x} + {this.props.y} = {this.props.x + this.props.y} >this.props.x : number >this.props : { x: number; y: number; children?: predom.JSX.Element[]; } ->this : this +>this : MyClass >props : { x: number; y: number; children?: predom.JSX.Element[]; } >x : number >this.props.y : number >this.props : { x: number; y: number; children?: predom.JSX.Element[]; } ->this : this +>this : MyClass >props : { x: number; y: number; children?: predom.JSX.Element[]; } >y : number >this.props.x + this.props.y : number >this.props.x : number >this.props : { x: number; y: number; children?: predom.JSX.Element[]; } ->this : this +>this : MyClass >props : { x: number; y: number; children?: predom.JSX.Element[]; } >x : number >this.props.y : number >this.props : { x: number; y: number; children?: predom.JSX.Element[]; } ->this : this +>this : MyClass >props : { x: number; y: number; children?: predom.JSX.Element[]; } >y : number {...this.props.children} >this.props.children : predom.JSX.Element[] >this.props : { x: number; y: number; children?: predom.JSX.Element[]; } ->this : this +>this : MyClass >props : { x: number; y: number; children?: predom.JSX.Element[]; } >children : predom.JSX.Element[] @@ -265,28 +265,28 @@ class DOMClass implements dom.JSX.Element { >p : any >this.props.x : number >this.props : { x: number; y: number; children?: dom.JSX.Element[]; } ->this : this +>this : DOMClass >props : { x: number; y: number; children?: dom.JSX.Element[]; } >x : number >this.props.y : number >this.props : { x: number; y: number; children?: dom.JSX.Element[]; } ->this : this +>this : DOMClass >props : { x: number; y: number; children?: dom.JSX.Element[]; } >y : number >this.props.x + this.props.y : number >this.props.x : number >this.props : { x: number; y: number; children?: dom.JSX.Element[]; } ->this : this +>this : DOMClass >props : { x: number; y: number; children?: dom.JSX.Element[]; } >x : number >this.props.y : number >this.props : { x: number; y: number; children?: dom.JSX.Element[]; } ->this : this +>this : DOMClass >props : { x: number; y: number; children?: dom.JSX.Element[]; } >y : number >this.props.children : dom.JSX.Element[] >this.props : { x: number; y: number; children?: dom.JSX.Element[]; } ->this : this +>this : DOMClass >props : { x: number; y: number; children?: dom.JSX.Element[]; } >children : dom.JSX.Element[] >p : any diff --git a/tests/baselines/reference/instanceAndStaticDeclarations1.types b/tests/baselines/reference/instanceAndStaticDeclarations1.types index 907dacd8c5c..f908d6d1499 100644 --- a/tests/baselines/reference/instanceAndStaticDeclarations1.types +++ b/tests/baselines/reference/instanceAndStaticDeclarations1.types @@ -16,7 +16,7 @@ class Point { >dx : number >this.x - p.x : number >this.x : number ->this : this +>this : Point >x : number >p.x : number >p : Point @@ -26,7 +26,7 @@ class Point { >dy : number >this.y - p.y : number >this.y : number ->this : this +>this : Point >y : number >p.y : number >p : Point diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt index e7584c3d831..86c266c9ad0 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt @@ -4,11 +4,15 @@ tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIn Type 'Number' has no call signatures. tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(26,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(29,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(37,13): error TS2684: The 'this' context of type 'D' is not assignable to method's 'this' of type 'C'. + Types of property 'x' are incompatible. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(41,16): error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'? Type 'String' has no call signatures. -==== tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts (6 errors) ==== +==== tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts (7 errors) ==== module NonGeneric { class C { x: string; @@ -57,6 +61,11 @@ tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIn var d = new D(1, ''); var r = d.fn(); + ~ +!!! error TS2684: The 'this' context of type 'D' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Types of property 'x' are incompatible. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. var r2 = r.x; var r3 = r.y; r.y = ''; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.types b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.types index c39aa383034..92214cc2b3e 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.types +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.types @@ -19,8 +19,8 @@ module NonGeneric { >v : number fn() { return this; } ->fn : () => this ->this : this +>fn : () => C +>this : C constructor(public a: number, private b: number) { } >a : number @@ -40,28 +40,28 @@ module NonGeneric { >2 : 2 var r = d.fn(); ->r : D ->d.fn() : D ->d.fn : () => D +>r : C +>d.fn() : C +>d.fn : () => C >d : D ->fn : () => D +>fn : () => C var r2 = r.x; >r2 : string >r.x : string ->r : D +>r : C >x : string var r3 = r.y; >r3 : number >r.y : number ->r : D +>r : C >y : number r.y = 4; >r.y = 4 : 4 >r.y : number ->r : D +>r : C >y : number >4 : 4 @@ -94,8 +94,8 @@ module Generic { >v : U fn() { return this; } ->fn : () => this ->this : this +>fn : () => C +>this : C constructor(public a: T, private b: U) { } >a : T @@ -115,28 +115,28 @@ module Generic { >'' : "" var r = d.fn(); ->r : D ->d.fn() : D ->d.fn : () => D +>r : C +>d.fn() : C +>d.fn : () => C >d : D ->fn : () => D +>fn : () => C var r2 = r.x; >r2 : number >r.x : number ->r : D +>r : C >x : number var r3 = r.y; >r3 : string >r.y : string ->r : D +>r : C >y : string r.y = ''; >r.y = '' : "" >r.y : string ->r : D +>r : C >y : string >'' : "" diff --git a/tests/baselines/reference/instancePropertyInClassType.errors.txt b/tests/baselines/reference/instancePropertyInClassType.errors.txt index 224290a4c00..1670d49cdd6 100644 --- a/tests/baselines/reference/instancePropertyInClassType.errors.txt +++ b/tests/baselines/reference/instancePropertyInClassType.errors.txt @@ -4,11 +4,14 @@ tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.t Type 'Number' has no call signatures. tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(24,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(27,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(33,13): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(37,16): error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'? Type 'String' has no call signatures. -==== tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts (6 errors) ==== +==== tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts (7 errors) ==== module NonGeneric { class C { x: string; @@ -53,6 +56,10 @@ tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.t var c = new C(1, ''); var r = c.fn(); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. var r2 = r.x; var r3 = r.y; r.y = ''; diff --git a/tests/baselines/reference/instancePropertyInClassType.types b/tests/baselines/reference/instancePropertyInClassType.types index 36c04c5aa1a..70b7760c4d7 100644 --- a/tests/baselines/reference/instancePropertyInClassType.types +++ b/tests/baselines/reference/instancePropertyInClassType.types @@ -19,8 +19,8 @@ module NonGeneric { >v : number fn() { return this; } ->fn : () => this ->this : this +>fn : () => C +>this : C constructor(public a: number, private b: number) { } >a : number @@ -89,8 +89,8 @@ module Generic { >v : U fn() { return this; } ->fn : () => this ->this : this +>fn : () => C +>this : C constructor(public a: T, private b: U) { } >a : T diff --git a/tests/baselines/reference/interfaceClassMerging.types b/tests/baselines/reference/interfaceClassMerging.types index 54e832be925..fd5f5165db2 100644 --- a/tests/baselines/reference/interfaceClassMerging.types +++ b/tests/baselines/reference/interfaceClassMerging.types @@ -28,7 +28,7 @@ class Foo { return this.method(0); >this.method(0) : string >this.method : (a: number) => string ->this : this +>this : Foo >method : (a: number) => string >0 : 0 } @@ -44,7 +44,7 @@ class Bar extends Foo { return this.optionalProperty; >this.optionalProperty : string ->this : this +>this : Bar >optionalProperty : string } } diff --git a/tests/baselines/reference/interfaceClassMerging2.errors.txt b/tests/baselines/reference/interfaceClassMerging2.errors.txt new file mode 100644 index 00000000000..abd9dfd8d52 --- /dev/null +++ b/tests/baselines/reference/interfaceClassMerging2.errors.txt @@ -0,0 +1,49 @@ +tests/cases/compiler/interfaceClassMerging2.ts(10,9): error TS2322: Type 'Foo' is not assignable to type 'this'. + 'Foo' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Foo'. +tests/cases/compiler/interfaceClassMerging2.ts(24,9): error TS2322: Type 'Bar' is not assignable to type 'this'. + 'Bar' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Bar'. + + +==== tests/cases/compiler/interfaceClassMerging2.ts (2 errors) ==== + interface Foo { + interfaceFooMethod(): this; + interfaceFooProperty: this; + } + + class Foo { + classFooProperty: this; + + classFooMethod(): this { + return this; + ~~~~~~~~~~~~ +!!! error TS2322: Type 'Foo' is not assignable to type 'this'. +!!! error TS2322: 'Foo' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Foo'. + } + } + + + interface Bar { + interfaceBarMethod(): this; + interfaceBarProperty: this; + } + + class Bar extends Foo { + classBarProperty: this; + + classBarMethod(): this { + return this; + ~~~~~~~~~~~~ +!!! error TS2322: Type 'Bar' is not assignable to type 'this'. +!!! error TS2322: 'Bar' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Bar'. + } + } + + + var bar = new Bar(); + bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod(); + + + var foo = new Foo(); + + foo = bar; + \ No newline at end of file diff --git a/tests/baselines/reference/interfaceClassMerging2.types b/tests/baselines/reference/interfaceClassMerging2.types index 08af019255a..bcd625cf3b6 100644 --- a/tests/baselines/reference/interfaceClassMerging2.types +++ b/tests/baselines/reference/interfaceClassMerging2.types @@ -17,7 +17,7 @@ class Foo { >classFooMethod : () => this return this; ->this : this +>this : Foo } } @@ -41,7 +41,7 @@ class Bar extends Foo { >classBarMethod : () => this return this; ->this : this +>this : Bar } } diff --git a/tests/baselines/reference/interfaceContextualType.types b/tests/baselines/reference/interfaceContextualType.types index 4ed530740ad..6213e8b841e 100644 --- a/tests/baselines/reference/interfaceContextualType.types +++ b/tests/baselines/reference/interfaceContextualType.types @@ -23,7 +23,7 @@ class Bug { this.values = {}; >this.values = {} : {} >this.values : IMap ->this : this +>this : Bug >values : IMap >{} : {} @@ -31,7 +31,7 @@ class Bug { >this.values['comments'] = { italic: true } : { italic: true; } >this.values['comments'] : IOptions >this.values : IMap ->this : this +>this : Bug >values : IMap >'comments' : "comments" >{ italic: true } : { italic: true; } @@ -44,7 +44,7 @@ class Bug { this.values = { >this.values = { comments: { italic: true } } : { comments: { italic: true; }; } >this.values : IMap ->this : this +>this : Bug >values : IMap >{ comments: { italic: true } } : { comments: { italic: true; }; } diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt index d6af9ce44dd..280bfabbd5b 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt @@ -1,14 +1,22 @@ -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 TS2420: Class 'D' incorrectly implements interface 'I'. - Types have separate declarations of a private property 'x'. +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(11,12): error TS2416: Property 'foo' in type 'D' is not assignable to the same property in base type 'C'. + Type '(x: any) => any' is not assignable to type '(x: any) => any'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'C' is missing the following properties from type 'D': y, other, bar +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(11,12): error TS2416: Property 'foo' in type 'D' is not assignable to the same property in base type 'I'. + Type '(x: any) => any' is not assignable to type '(x: any) => any'. Two different types with this name exist, but they are unrelated. +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(19,12): error TS2416: Property 'foo' in type 'D2' is not assignable to the same property in base type 'C'. + Type '(x: any) => any' is not assignable to type '(x: any) => any'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'C' is missing the following properties from type 'D2': other, bar +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(19,12): error TS2416: Property 'foo' in type 'D2' is not assignable to the same property in base type 'I'. + Type '(x: any) => any' is not assignable to type '(x: any) => any'. Two different types with this name exist, but they are unrelated. tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(20,13): error TS2416: Property 'x' in type 'D2' is not assignable to the same property in base type 'C'. Type 'string' is not assignable to type 'number'. tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(20,13): error TS2416: Property 'x' in type 'D2' is not assignable to the same property in base type 'I'. Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts (4 errors) ==== +==== tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts (6 errors) ==== class C { public foo(x: any) { return x; } private x = 1; @@ -19,13 +27,15 @@ tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(20,13): error TS2416: } class D extends C implements I { // error - ~ -!!! error TS2415: Class 'D' incorrectly extends base class 'C'. -!!! error TS2415: 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; } + ~~~ +!!! error TS2416: Property 'foo' in type 'D' is not assignable to the same property in base type 'C'. +!!! error TS2416: Type '(x: any) => any' is not assignable to type '(x: any) => any'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'C' is missing the following properties from type 'D': y, other, bar + ~~~ +!!! error TS2416: Property 'foo' in type 'D' is not assignable to the same property in base type 'I'. +!!! error TS2416: Type '(x: any) => any' is not assignable to type '(x: any) => any'. Two different types with this name exist, but they are unrelated. private x = 2; private y = 3; other(x: any) { return x; } @@ -34,6 +44,14 @@ tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(20,13): error TS2416: class D2 extends C implements I { // error public foo(x: any) { return x; } + ~~~ +!!! error TS2416: Property 'foo' in type 'D2' is not assignable to the same property in base type 'C'. +!!! error TS2416: Type '(x: any) => any' is not assignable to type '(x: any) => any'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'C' is missing the following properties from type 'D2': other, bar + ~~~ +!!! error TS2416: Property 'foo' in type 'D2' is not assignable to the same property in base type 'I'. +!!! error TS2416: Type '(x: any) => any' is not assignable to type '(x: any) => any'. Two different types with this name exist, but they are unrelated. private x = ""; ~ !!! error TS2416: Property 'x' in type 'D2' is not assignable to the same property in base type 'C'. diff --git a/tests/baselines/reference/intersectionWithConflictingPrivates.types b/tests/baselines/reference/intersectionWithConflictingPrivates.types index 62861bb4ec5..54cf720b8c7 100644 --- a/tests/baselines/reference/intersectionWithConflictingPrivates.types +++ b/tests/baselines/reference/intersectionWithConflictingPrivates.types @@ -132,7 +132,7 @@ class Foo { >await this.bar(node) : undefined >this.bar(node) : Promise >this.bar : (node: CommitFileNode | ResultsFileNode | StashFileNode | StatusFileNode, options?: {} | undefined) => Promise ->this : this +>this : Foo >bar : (node: CommitFileNode | ResultsFileNode | StashFileNode | StatusFileNode, options?: {} | undefined) => Promise >node : CommitFileNode | ResultsFileNode } diff --git a/tests/baselines/reference/invokingNonGenericMethodWithTypeArguments1.types b/tests/baselines/reference/invokingNonGenericMethodWithTypeArguments1.types index 2c7ffebdef9..d7eb3061719 100644 --- a/tests/baselines/reference/invokingNonGenericMethodWithTypeArguments1.types +++ b/tests/baselines/reference/invokingNonGenericMethodWithTypeArguments1.types @@ -6,7 +6,7 @@ class Foo { this.foo(); >this.foo() : any >this.foo : any ->this : this +>this : Foo >foo : any } } diff --git a/tests/baselines/reference/invokingNonGenericMethodWithTypeArguments2.types b/tests/baselines/reference/invokingNonGenericMethodWithTypeArguments2.types index f3bc3abaa18..2642389daae 100644 --- a/tests/baselines/reference/invokingNonGenericMethodWithTypeArguments2.types +++ b/tests/baselines/reference/invokingNonGenericMethodWithTypeArguments2.types @@ -9,7 +9,7 @@ class Foo { this.foo(); >this.foo() : any >this.foo : any ->this : this +>this : Foo >foo : any } } diff --git a/tests/baselines/reference/iterableArrayPattern1.types b/tests/baselines/reference/iterableArrayPattern1.types index e9dde480d47..3f9219ef7b8 100644 --- a/tests/baselines/reference/iterableArrayPattern1.types +++ b/tests/baselines/reference/iterableArrayPattern1.types @@ -21,13 +21,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern10.types b/tests/baselines/reference/iterableArrayPattern10.types index 3f431ac7850..853148a7e80 100644 --- a/tests/baselines/reference/iterableArrayPattern10.types +++ b/tests/baselines/reference/iterableArrayPattern10.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern11.types b/tests/baselines/reference/iterableArrayPattern11.types index fe7cdd29304..cc0dccc27f2 100644 --- a/tests/baselines/reference/iterableArrayPattern11.types +++ b/tests/baselines/reference/iterableArrayPattern11.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern12.types b/tests/baselines/reference/iterableArrayPattern12.types index 0280487bbc5..d79ef483418 100644 --- a/tests/baselines/reference/iterableArrayPattern12.types +++ b/tests/baselines/reference/iterableArrayPattern12.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern13.types b/tests/baselines/reference/iterableArrayPattern13.types index f6e14c16392..05fc1cc66a0 100644 --- a/tests/baselines/reference/iterableArrayPattern13.types +++ b/tests/baselines/reference/iterableArrayPattern13.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern14.types b/tests/baselines/reference/iterableArrayPattern14.types index d364cf7dc8f..094babece46 100644 --- a/tests/baselines/reference/iterableArrayPattern14.types +++ b/tests/baselines/reference/iterableArrayPattern14.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern15.types b/tests/baselines/reference/iterableArrayPattern15.types index 5dcf6a0d560..e68ca191c0b 100644 --- a/tests/baselines/reference/iterableArrayPattern15.types +++ b/tests/baselines/reference/iterableArrayPattern15.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern16.types b/tests/baselines/reference/iterableArrayPattern16.types index e5da87323dd..6c3a6a5ecce 100644 --- a/tests/baselines/reference/iterableArrayPattern16.types +++ b/tests/baselines/reference/iterableArrayPattern16.types @@ -42,13 +42,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } @@ -74,12 +74,12 @@ class FooIteratorIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIteratorIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIteratorIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern17.types b/tests/baselines/reference/iterableArrayPattern17.types index fc9bd4477b3..113765a3cb0 100644 --- a/tests/baselines/reference/iterableArrayPattern17.types +++ b/tests/baselines/reference/iterableArrayPattern17.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern18.types b/tests/baselines/reference/iterableArrayPattern18.types index bc9ac65d66f..7d3037d4b62 100644 --- a/tests/baselines/reference/iterableArrayPattern18.types +++ b/tests/baselines/reference/iterableArrayPattern18.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern19.types b/tests/baselines/reference/iterableArrayPattern19.types index 8e22bda21e8..ffc6a776389 100644 --- a/tests/baselines/reference/iterableArrayPattern19.types +++ b/tests/baselines/reference/iterableArrayPattern19.types @@ -31,13 +31,13 @@ class FooArrayIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooArrayIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooArrayIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern2.types b/tests/baselines/reference/iterableArrayPattern2.types index e39bbdd7be7..0c66f2fa2d5 100644 --- a/tests/baselines/reference/iterableArrayPattern2.types +++ b/tests/baselines/reference/iterableArrayPattern2.types @@ -21,13 +21,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern20.types b/tests/baselines/reference/iterableArrayPattern20.types index c46423228a7..a9140adafb6 100644 --- a/tests/baselines/reference/iterableArrayPattern20.types +++ b/tests/baselines/reference/iterableArrayPattern20.types @@ -31,13 +31,13 @@ class FooArrayIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooArrayIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooArrayIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern3.types b/tests/baselines/reference/iterableArrayPattern3.types index 09125d68244..9ccce9ab337 100644 --- a/tests/baselines/reference/iterableArrayPattern3.types +++ b/tests/baselines/reference/iterableArrayPattern3.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern4.types b/tests/baselines/reference/iterableArrayPattern4.types index 1ecdf2092d2..149602b089c 100644 --- a/tests/baselines/reference/iterableArrayPattern4.types +++ b/tests/baselines/reference/iterableArrayPattern4.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern5.types b/tests/baselines/reference/iterableArrayPattern5.types index af485de99c2..50157bcdf4b 100644 --- a/tests/baselines/reference/iterableArrayPattern5.types +++ b/tests/baselines/reference/iterableArrayPattern5.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern6.types b/tests/baselines/reference/iterableArrayPattern6.types index dd4a8acd7e5..0694830a831 100644 --- a/tests/baselines/reference/iterableArrayPattern6.types +++ b/tests/baselines/reference/iterableArrayPattern6.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern7.types b/tests/baselines/reference/iterableArrayPattern7.types index e6f59bf19a6..0b0d6d2ac0e 100644 --- a/tests/baselines/reference/iterableArrayPattern7.types +++ b/tests/baselines/reference/iterableArrayPattern7.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern8.types b/tests/baselines/reference/iterableArrayPattern8.types index 93f89e344c0..b2381ab0fe6 100644 --- a/tests/baselines/reference/iterableArrayPattern8.types +++ b/tests/baselines/reference/iterableArrayPattern8.types @@ -30,13 +30,13 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iterableArrayPattern9.types b/tests/baselines/reference/iterableArrayPattern9.types index 94a4e33ea69..65b6d630302 100644 --- a/tests/baselines/reference/iterableArrayPattern9.types +++ b/tests/baselines/reference/iterableArrayPattern9.types @@ -37,12 +37,12 @@ class FooIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => FooIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : FooIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInArray.types b/tests/baselines/reference/iteratorSpreadInArray.types index c71ad753d1b..1434954a68b 100644 --- a/tests/baselines/reference/iteratorSpreadInArray.types +++ b/tests/baselines/reference/iteratorSpreadInArray.types @@ -21,13 +21,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInArray10.types b/tests/baselines/reference/iteratorSpreadInArray10.types index 364202ec3ec..e5df8a6361c 100644 --- a/tests/baselines/reference/iteratorSpreadInArray10.types +++ b/tests/baselines/reference/iteratorSpreadInArray10.types @@ -3,13 +3,13 @@ class SymbolIterator { >SymbolIterator : SymbolIterator [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInArray2.types b/tests/baselines/reference/iteratorSpreadInArray2.types index e05f8d4b0bc..871df295fe9 100644 --- a/tests/baselines/reference/iteratorSpreadInArray2.types +++ b/tests/baselines/reference/iteratorSpreadInArray2.types @@ -21,13 +21,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } @@ -52,13 +52,13 @@ class NumberIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => NumberIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : NumberIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInArray3.types b/tests/baselines/reference/iteratorSpreadInArray3.types index c13d41bd43c..207d27623dc 100644 --- a/tests/baselines/reference/iteratorSpreadInArray3.types +++ b/tests/baselines/reference/iteratorSpreadInArray3.types @@ -21,13 +21,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInArray4.types b/tests/baselines/reference/iteratorSpreadInArray4.types index 9c5ae996891..1aab6ae3c87 100644 --- a/tests/baselines/reference/iteratorSpreadInArray4.types +++ b/tests/baselines/reference/iteratorSpreadInArray4.types @@ -21,13 +21,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInArray5.types b/tests/baselines/reference/iteratorSpreadInArray5.types index 6163460fece..efea272fc87 100644 --- a/tests/baselines/reference/iteratorSpreadInArray5.types +++ b/tests/baselines/reference/iteratorSpreadInArray5.types @@ -21,13 +21,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInArray6.types b/tests/baselines/reference/iteratorSpreadInArray6.types index 94e78455826..e3db8047224 100644 --- a/tests/baselines/reference/iteratorSpreadInArray6.types +++ b/tests/baselines/reference/iteratorSpreadInArray6.types @@ -21,13 +21,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInArray7.types b/tests/baselines/reference/iteratorSpreadInArray7.types index 11dfaeb872c..e65992b74f0 100644 --- a/tests/baselines/reference/iteratorSpreadInArray7.types +++ b/tests/baselines/reference/iteratorSpreadInArray7.types @@ -21,13 +21,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInArray9.types b/tests/baselines/reference/iteratorSpreadInArray9.types index 1cac23527ea..dd4c23fdc30 100644 --- a/tests/baselines/reference/iteratorSpreadInArray9.types +++ b/tests/baselines/reference/iteratorSpreadInArray9.types @@ -17,13 +17,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall.types b/tests/baselines/reference/iteratorSpreadInCall.types index 9d369c853f8..3ca803fcf33 100644 --- a/tests/baselines/reference/iteratorSpreadInCall.types +++ b/tests/baselines/reference/iteratorSpreadInCall.types @@ -25,13 +25,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall10.types b/tests/baselines/reference/iteratorSpreadInCall10.types index ecd43ef5f50..b105dba534d 100644 --- a/tests/baselines/reference/iteratorSpreadInCall10.types +++ b/tests/baselines/reference/iteratorSpreadInCall10.types @@ -28,13 +28,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall11.types b/tests/baselines/reference/iteratorSpreadInCall11.types index 7396283989d..90f5422e321 100644 --- a/tests/baselines/reference/iteratorSpreadInCall11.types +++ b/tests/baselines/reference/iteratorSpreadInCall11.types @@ -28,13 +28,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall12.types b/tests/baselines/reference/iteratorSpreadInCall12.types index 74ca929a156..2a861c40c1b 100644 --- a/tests/baselines/reference/iteratorSpreadInCall12.types +++ b/tests/baselines/reference/iteratorSpreadInCall12.types @@ -28,13 +28,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } @@ -59,13 +59,13 @@ class _StringIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => _StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : _StringIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall2.types b/tests/baselines/reference/iteratorSpreadInCall2.types index 94ad7d780b6..228f77d89d3 100644 --- a/tests/baselines/reference/iteratorSpreadInCall2.types +++ b/tests/baselines/reference/iteratorSpreadInCall2.types @@ -25,13 +25,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall3.types b/tests/baselines/reference/iteratorSpreadInCall3.types index 570fbd6892a..0027f091ea6 100644 --- a/tests/baselines/reference/iteratorSpreadInCall3.types +++ b/tests/baselines/reference/iteratorSpreadInCall3.types @@ -25,13 +25,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall4.types b/tests/baselines/reference/iteratorSpreadInCall4.types index 2ac3d6b4553..2e67d17ae50 100644 --- a/tests/baselines/reference/iteratorSpreadInCall4.types +++ b/tests/baselines/reference/iteratorSpreadInCall4.types @@ -26,13 +26,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall5.types b/tests/baselines/reference/iteratorSpreadInCall5.types index f1060fa09a2..3411ccd3dda 100644 --- a/tests/baselines/reference/iteratorSpreadInCall5.types +++ b/tests/baselines/reference/iteratorSpreadInCall5.types @@ -25,13 +25,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } @@ -56,13 +56,13 @@ class _StringIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => _StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : _StringIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall6.types b/tests/baselines/reference/iteratorSpreadInCall6.types index bacd53f2e0e..fea63b9ed59 100644 --- a/tests/baselines/reference/iteratorSpreadInCall6.types +++ b/tests/baselines/reference/iteratorSpreadInCall6.types @@ -25,13 +25,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } @@ -56,13 +56,13 @@ class _StringIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => _StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : _StringIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall7.types b/tests/baselines/reference/iteratorSpreadInCall7.types index 6d4b8ae5635..da93eb633fd 100644 --- a/tests/baselines/reference/iteratorSpreadInCall7.types +++ b/tests/baselines/reference/iteratorSpreadInCall7.types @@ -28,13 +28,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } @@ -59,13 +59,13 @@ class _StringIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => _StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : _StringIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall8.types b/tests/baselines/reference/iteratorSpreadInCall8.types index 36834d94e19..86dc091f889 100644 --- a/tests/baselines/reference/iteratorSpreadInCall8.types +++ b/tests/baselines/reference/iteratorSpreadInCall8.types @@ -28,13 +28,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } @@ -59,13 +59,13 @@ class _StringIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => _StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : _StringIterator } } diff --git a/tests/baselines/reference/iteratorSpreadInCall9.types b/tests/baselines/reference/iteratorSpreadInCall9.types index 8f142f7571c..cfa03279065 100644 --- a/tests/baselines/reference/iteratorSpreadInCall9.types +++ b/tests/baselines/reference/iteratorSpreadInCall9.types @@ -28,13 +28,13 @@ class SymbolIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => SymbolIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : SymbolIterator } } @@ -59,13 +59,13 @@ class _StringIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : () => this +>[Symbol.iterator] : () => _StringIterator >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol return this; ->this : this +>this : _StringIterator } } diff --git a/tests/baselines/reference/jsCheckObjectDefineThisNoCrash.types b/tests/baselines/reference/jsCheckObjectDefineThisNoCrash.types index e175b052777..cbf030aad4f 100644 --- a/tests/baselines/reference/jsCheckObjectDefineThisNoCrash.types +++ b/tests/baselines/reference/jsCheckObjectDefineThisNoCrash.types @@ -5,11 +5,11 @@ class C { constructor() { // Neither of the following should be recognized as declarations yet Object.defineProperty(this, "_prop", { value: {} }); ->Object.defineProperty(this, "_prop", { value: {} }) : this +>Object.defineProperty(this, "_prop", { value: {} }) : C >Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor >defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T ->this : this +>this : C >"_prop" : "_prop" >{ value: {} } : { value: {}; } >value : {} @@ -21,7 +21,7 @@ class C { >Object : ObjectConstructor >defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >this._prop : any ->this : this +>this : C >_prop : any >"num" : "num" >{ value: 12 } : { value: number; } diff --git a/tests/baselines/reference/jsDeclarationsClasses.errors.txt b/tests/baselines/reference/jsDeclarationsClasses.errors.txt new file mode 100644 index 00000000000..9748ec83224 --- /dev/null +++ b/tests/baselines/reference/jsDeclarationsClasses.errors.txt @@ -0,0 +1,203 @@ +tests/cases/conformance/jsdoc/declarations/index.js(164,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'K'. +tests/cases/conformance/jsdoc/declarations/index.js(178,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'N'. + + +==== tests/cases/conformance/jsdoc/declarations/index.js (2 errors) ==== + export class A {} + + export class B { + static cat = "cat"; + } + + export class C { + static Cls = class {} + } + + export class D { + /** + * @param {number} a + * @param {number} b + */ + constructor(a, b) {} + } + + /** + * @template T,U + */ + export class E { + /** + * @type {T & U} + */ + field; + + // @readonly is currently unsupported, it seems - included here just in case that changes + /** + * @type {T & U} + * @readonly + */ + readonlyField; + + initializedField = 12; + + /** + * @return {U} + */ + get f1() { return /** @type {*} */(null); } + + /** + * @param {U} _p + */ + set f1(_p) {} + + /** + * @return {U} + */ + get f2() { return /** @type {*} */(null); } + + /** + * @param {U} _p + */ + set f3(_p) {} + + /** + * @param {T} a + * @param {U} b + */ + constructor(a, b) {} + + + /** + * @type {string} + */ + static staticField; + + // @readonly is currently unsupported, it seems - included here just in case that changes + /** + * @type {string} + * @readonly + */ + static staticReadonlyField; + + static staticInitializedField = 12; + + /** + * @return {string} + */ + static get s1() { return ""; } + + /** + * @param {string} _p + */ + static set s1(_p) {} + + /** + * @return {string} + */ + static get s2() { return ""; } + + /** + * @param {string} _p + */ + static set s3(_p) {} + } + + /** + * @template T,U + */ + export class F { + /** + * @type {T & U} + */ + field; + /** + * @param {T} a + * @param {U} b + */ + constructor(a, b) {} + + /** + * @template A,B + * @param {A} a + * @param {B} b + */ + static create(a, b) { return new F(a, b); } + } + + class G {} + + export { G }; + + class HH {} + + export { HH as H }; + + export class I {} + export { I as II }; + + export { J as JJ }; + export class J {} + + + export class K { + constructor() { + this.p1 = 12; + this.p2 = "ok"; + } + + method() { + return this.p1; + } + } + + export class L extends K {} + + export class M extends null { + constructor() { + this.prop = 12; + } + } + + + /** + * @template T + */ + export class N extends L { + /** + * @param {T} param + */ + constructor(param) { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'K'. + this.another = param; + } + } + + /** + * @template U + * @extends {N} + */ + export class O extends N { + /** + * @param {U} param + */ + constructor(param) { + super(param); + ~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'N'. + this.another2 = param; + } + } + + var x = /** @type {*} */(null); + + export class VariableBase extends x {} + + export class HasStatics { + static staticMethod() {} + } + + export class ExtendsStatics extends HasStatics { + static also() {} + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsDeclarationsClasses.js b/tests/baselines/reference/jsDeclarationsClasses.js index f1807e37f4c..770de04c734 100644 --- a/tests/baselines/reference/jsDeclarationsClasses.js +++ b/tests/baselines/reference/jsDeclarationsClasses.js @@ -579,6 +579,10 @@ export class N extends L { * @extends {N} */ export class O extends N { + /** + * @param {U} param + */ + constructor(param: U); another2: U; } declare const VariableBase_base: any; diff --git a/tests/baselines/reference/jsDeclarationsClasses.types b/tests/baselines/reference/jsDeclarationsClasses.types index 853bb6b8996..d5ee25e25f2 100644 --- a/tests/baselines/reference/jsDeclarationsClasses.types +++ b/tests/baselines/reference/jsDeclarationsClasses.types @@ -210,14 +210,14 @@ export class K { this.p1 = 12; >this.p1 = 12 : 12 >this.p1 : any ->this : this +>this : K >p1 : any >12 : 12 this.p2 = "ok"; >this.p2 = "ok" : "ok" >this.p2 : any ->this : this +>this : K >p2 : any >"ok" : "ok" } @@ -227,7 +227,7 @@ export class K { return this.p1; >this.p1 : number ->this : this +>this : K >p1 : number } } @@ -244,7 +244,7 @@ export class M extends null { this.prop = 12; >this.prop = 12 : 12 >this.prop : any ->this : this +>this : M >prop : any >12 : 12 } @@ -271,7 +271,7 @@ export class N extends L { this.another = param; >this.another = param : T >this.another : any ->this : this +>this : N >another : any >param : T } @@ -299,7 +299,7 @@ export class O extends N { this.another2 = param; >this.another2 = param : U >this.another2 : any ->this : this +>this : O >another2 : any >param : U } diff --git a/tests/baselines/reference/jsDeclarationsExportAssignedClassExpression.types b/tests/baselines/reference/jsDeclarationsExportAssignedClassExpression.types index 6eceea32fd2..55132dd2f56 100644 --- a/tests/baselines/reference/jsDeclarationsExportAssignedClassExpression.types +++ b/tests/baselines/reference/jsDeclarationsExportAssignedClassExpression.types @@ -16,7 +16,7 @@ module.exports = class Thing { this.t = 12 + p; >this.t = 12 + p : number >this.t : any ->this : this +>this : import("tests/cases/conformance/jsdoc/declarations/index") >t : any >12 + p : number >12 : 12 diff --git a/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionAnonymous.types b/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionAnonymous.types index 1712ef5170c..a1ea6cc4e07 100644 --- a/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionAnonymous.types +++ b/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionAnonymous.types @@ -15,7 +15,7 @@ module.exports = class { this.t = 12 + p; >this.t = 12 + p : number >this.t : any ->this : this +>this : import("tests/cases/conformance/jsdoc/declarations/index") >t : any >12 + p : number >12 : 12 diff --git a/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types b/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types index d5a96c5d90a..b6148d63e1c 100644 --- a/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types +++ b/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types @@ -15,7 +15,7 @@ module.exports = class { this.t = 12 + p; >this.t = 12 + p : number >this.t : any ->this : this +>this : import("tests/cases/conformance/jsdoc/declarations/index") >t : any >12 + p : number >12 : 12 @@ -35,7 +35,7 @@ module.exports.Sub = class { this.instance = new module.exports(10); >this.instance = new module.exports(10) : import("tests/cases/conformance/jsdoc/declarations/index") >this.instance : any ->this : this +>this : Sub >instance : any >new module.exports(10) : import("tests/cases/conformance/jsdoc/declarations/index") >module.exports : typeof import("tests/cases/conformance/jsdoc/declarations/index") diff --git a/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionShadowing.types b/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionShadowing.types index b2f0063ed4f..786d4053063 100644 --- a/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionShadowing.types +++ b/tests/baselines/reference/jsDeclarationsExportAssignedClassExpressionShadowing.types @@ -26,7 +26,7 @@ module.exports = class Q { this.x = new A(); >this.x = new A() : A >this.x : any ->this : this +>this : import("tests/cases/conformance/jsdoc/declarations/index") >x : any >new A() : A >A : typeof A diff --git a/tests/baselines/reference/jsDeclarationsExportAssignedVisibility.types b/tests/baselines/reference/jsDeclarationsExportAssignedVisibility.types index 82d2ea30b94..32f09300e6d 100644 --- a/tests/baselines/reference/jsDeclarationsExportAssignedVisibility.types +++ b/tests/baselines/reference/jsDeclarationsExportAssignedVisibility.types @@ -12,7 +12,7 @@ class Container { this.usage = new Obj(); >this.usage = new Obj() : Obj >this.usage : any ->this : this +>this : Container >usage : any >new Obj() : Obj >Obj : typeof Obj @@ -39,7 +39,7 @@ module.exports = class Obj { this.x = 12; >this.x = 12 : 12 >this.x : any ->this : this +>this : import("tests/cases/conformance/jsdoc/declarations/obj") >x : any >12 : 12 } diff --git a/tests/baselines/reference/jsDeclarationsFunctionJSDoc.types b/tests/baselines/reference/jsDeclarationsFunctionJSDoc.types index 05dfcb0f492..5c9bfb51d2c 100644 --- a/tests/baselines/reference/jsDeclarationsFunctionJSDoc.types +++ b/tests/baselines/reference/jsDeclarationsFunctionJSDoc.types @@ -30,7 +30,7 @@ export class Aleph { this.field = b; >this.field = b : null >this.field : any ->this : this +>this : Aleph >field : any >b : null } diff --git a/tests/baselines/reference/jsDeclarationsPrivateFields01.types b/tests/baselines/reference/jsDeclarationsPrivateFields01.types index 1219b66b9ee..39cb4b01c36 100644 --- a/tests/baselines/reference/jsDeclarationsPrivateFields01.types +++ b/tests/baselines/reference/jsDeclarationsPrivateFields01.types @@ -15,7 +15,7 @@ export class C { return this.#hello; >this.#hello : string ->this : this +>this : C } get #screamingHello() { @@ -25,7 +25,7 @@ export class C { >this.#hello.toUpperCase() : string >this.#hello.toUpperCase : () => string >this.#hello : string ->this : this +>this : C >toUpperCase : () => string } /** @param value {string} */ @@ -42,7 +42,7 @@ export class C { return this.#world; >this.#world : number ->this : this +>this : C } } diff --git a/tests/baselines/reference/jsDeclarationsReferenceToClassInstanceCrossFile.types b/tests/baselines/reference/jsDeclarationsReferenceToClassInstanceCrossFile.types index 5b90275da04..ba8c7a96b1e 100644 --- a/tests/baselines/reference/jsDeclarationsReferenceToClassInstanceCrossFile.types +++ b/tests/baselines/reference/jsDeclarationsReferenceToClassInstanceCrossFile.types @@ -66,7 +66,7 @@ class Render { this.objects = []; >this.objects = [] : undefined[] >this.objects : Rectangle[] ->this : this +>this : Render >objects : Rectangle[] >[] : undefined[] } @@ -87,7 +87,7 @@ class Render { >this.objects.push(obj) : number >this.objects.push : (...items: Rectangle[]) => number >this.objects : Rectangle[] ->this : this +>this : Render >objects : Rectangle[] >push : (...items: Rectangle[]) => number >obj : Rectangle diff --git a/tests/baselines/reference/jsDeclarationsReusesExistingTypeAnnotations.types b/tests/baselines/reference/jsDeclarationsReusesExistingTypeAnnotations.types index 63880613f1e..d79e8b26a2e 100644 --- a/tests/baselines/reference/jsDeclarationsReusesExistingTypeAnnotations.types +++ b/tests/baselines/reference/jsDeclarationsReusesExistingTypeAnnotations.types @@ -79,7 +79,7 @@ class С3 { this.p1 = value; >this.p1 = value : string | undefined >this.p1 : string | undefined ->this : this +>this : С3 >p1 : string | undefined >value : string | undefined } @@ -100,7 +100,7 @@ class С3 { this.p2 = value; >this.p2 = value : string | undefined >this.p2 : string | undefined ->this : this +>this : С3 >p2 : string | undefined >value : string | undefined } @@ -121,7 +121,7 @@ class С3 { this.p3 = value; >this.p3 = value : string | null >this.p3 : string | null ->this : this +>this : С3 >p3 : string | null >value : string | null } @@ -142,7 +142,7 @@ class С3 { this.p4 = value; >this.p4 = value : string | null >this.p4 : string | null ->this : this +>this : С3 >p4 : string | null >value : string | null } @@ -160,7 +160,7 @@ class С4 { this.p1 = value; >this.p1 = value : string | undefined >this.p1 : string | undefined ->this : this +>this : С4 >p1 : string | undefined >value : string | undefined } @@ -173,7 +173,7 @@ class С4 { this.p2 = value; >this.p2 = value : string | undefined >this.p2 : string | undefined ->this : this +>this : С4 >p2 : string | undefined >value : string | undefined } @@ -186,7 +186,7 @@ class С4 { this.p3 = value; >this.p3 = value : string | null >this.p3 : string | null ->this : this +>this : С4 >p3 : string | null >value : string | null } @@ -199,7 +199,7 @@ class С4 { this.p4 = value; >this.p4 = value : string | null >this.p4 : string | null ->this : this +>this : С4 >p4 : string | null >value : string | null } diff --git a/tests/baselines/reference/jsDeclarationsSubclassWithExplicitNoArgumentConstructor.errors.txt b/tests/baselines/reference/jsDeclarationsSubclassWithExplicitNoArgumentConstructor.errors.txt new file mode 100644 index 00000000000..349f3433912 --- /dev/null +++ b/tests/baselines/reference/jsDeclarationsSubclassWithExplicitNoArgumentConstructor.errors.txt @@ -0,0 +1,19 @@ +tests/cases/conformance/jsdoc/declarations/index.js(11,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Super'. + + +==== tests/cases/conformance/jsdoc/declarations/index.js (1 errors) ==== + export class Super { + /** + * @param {string} firstArg + * @param {string} secondArg + */ + constructor(firstArg, secondArg) { } + } + + export class Sub extends Super { + constructor() { + super('first', 'second'); + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Super'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/jsDeclarationsThisTypes.errors.txt b/tests/baselines/reference/jsDeclarationsThisTypes.errors.txt new file mode 100644 index 00000000000..586efe1c6bd --- /dev/null +++ b/tests/baselines/reference/jsDeclarationsThisTypes.errors.txt @@ -0,0 +1,18 @@ +tests/cases/conformance/jsdoc/declarations/index.js(4,9): error TS2322: Type 'A' is not assignable to type 'this'. + 'A' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'A'. + + +==== tests/cases/conformance/jsdoc/declarations/index.js (1 errors) ==== + export class A { + /** @returns {this} */ + method() { + return this; + ~~~~~~~~~~~~ +!!! error TS2322: Type 'A' is not assignable to type 'this'. +!!! error TS2322: 'A' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'A'. + } + } + export default class Base extends A { + // This method is required to reproduce #35932 + verify() { } + } \ No newline at end of file diff --git a/tests/baselines/reference/jsDeclarationsThisTypes.types b/tests/baselines/reference/jsDeclarationsThisTypes.types index 801f1792656..7c7d6478afb 100644 --- a/tests/baselines/reference/jsDeclarationsThisTypes.types +++ b/tests/baselines/reference/jsDeclarationsThisTypes.types @@ -7,7 +7,7 @@ export class A { >method : () => this return this; ->this : this +>this : A } } export default class Base extends A { diff --git a/tests/baselines/reference/jsDeclarationsTypedefAndImportTypes.types b/tests/baselines/reference/jsDeclarationsTypedefAndImportTypes.types index 39c4eec9d19..76ae2aaf82b 100644 --- a/tests/baselines/reference/jsDeclarationsTypedefAndImportTypes.types +++ b/tests/baselines/reference/jsDeclarationsTypedefAndImportTypes.types @@ -39,7 +39,7 @@ class Wrap { this.connItem = c.item; >this.connItem = c.item : number >this.connItem : any ->this : this +>this : Wrap >connItem : any >c.item : number >c : import("tests/cases/conformance/jsdoc/declarations/conn") @@ -49,7 +49,7 @@ class Wrap { this.another = ""; >this.another = "" : "" >this.another : import("tests/cases/conformance/jsdoc/declarations/conn").Whatever ->this : this +>this : Wrap >another : import("tests/cases/conformance/jsdoc/declarations/conn").Whatever >"" : "" } diff --git a/tests/baselines/reference/jsEnumCrossFileExport.types b/tests/baselines/reference/jsEnumCrossFileExport.types index a3118b4d4ee..8766d9b0f4b 100644 --- a/tests/baselines/reference/jsEnumCrossFileExport.types +++ b/tests/baselines/reference/jsEnumCrossFileExport.types @@ -81,7 +81,7 @@ Other.Cls = class { this.method(Host.UserMetrics.Action.WindowDocked); >this.method(Host.UserMetrics.Action.WindowDocked) : void >this.method : (p: number) => void ->this : this +>this : Cls >method : (p: number) => void >Host.UserMetrics.Action.WindowDocked : number >Host.UserMetrics.Action : { WindowDocked: number; WindowUndocked: number; ScriptsBreakpointSet: number; TimelineStarted: number; } diff --git a/tests/baselines/reference/jsFileClassPropertyType.types b/tests/baselines/reference/jsFileClassPropertyType.types index 686560e3605..23d82755827 100644 --- a/tests/baselines/reference/jsFileClassPropertyType.types +++ b/tests/baselines/reference/jsFileClassPropertyType.types @@ -6,7 +6,7 @@ class C { this.p = 0; >this.p = 0 : 0 >this.p : any ->this : this +>this : C >p : any >0 : 0 } diff --git a/tests/baselines/reference/jsFileClassPropertyType2.types b/tests/baselines/reference/jsFileClassPropertyType2.types index be996375741..db107d4555b 100644 --- a/tests/baselines/reference/jsFileClassPropertyType2.types +++ b/tests/baselines/reference/jsFileClassPropertyType2.types @@ -7,7 +7,7 @@ class C { this.p = []; >this.p = [] : undefined[] >this.p : number[] ->this : this +>this : C >p : number[] >[] : undefined[] } diff --git a/tests/baselines/reference/jsFileClassPropertyType3.types b/tests/baselines/reference/jsFileClassPropertyType3.types index aee74b9787e..97557cbad7d 100644 --- a/tests/baselines/reference/jsFileClassPropertyType3.types +++ b/tests/baselines/reference/jsFileClassPropertyType3.types @@ -9,7 +9,7 @@ class C { this.p = null; >this.p = null : null >this.p : any ->this : this +>this : C >p : any >null : null } @@ -17,7 +17,7 @@ class C { this.p = 0; >this.p = 0 : 0 >this.p : any ->this : this +>this : C >p : any >0 : 0 } diff --git a/tests/baselines/reference/jsFileClassSelfReferencedProperty.types b/tests/baselines/reference/jsFileClassSelfReferencedProperty.types index 9700c12ddd0..e0b5fd876d0 100644 --- a/tests/baselines/reference/jsFileClassSelfReferencedProperty.types +++ b/tests/baselines/reference/jsFileClassSelfReferencedProperty.types @@ -6,15 +6,15 @@ export class StackOverflowTest { this.testStackOverflow = this.testStackOverflow.bind(this) >this.testStackOverflow = this.testStackOverflow.bind(this) : error >this.testStackOverflow : any ->this : this +>this : StackOverflowTest >testStackOverflow : any >this.testStackOverflow.bind(this) : error >this.testStackOverflow.bind : error >this.testStackOverflow : undefined ->this : this +>this : StackOverflowTest >testStackOverflow : undefined >bind : any ->this : this +>this : StackOverflowTest } } diff --git a/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.types b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.types index 5ad6841b778..52ce2c0cc98 100644 --- a/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.types +++ b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.types @@ -12,7 +12,7 @@ class c { >a : any >this.method(a) : void >this.method : (a: any) => void ->this : this +>this : c >method : (a: any) => void >a : any } diff --git a/tests/baselines/reference/jsNoImplicitAnyNoCascadingReferenceErrors.types b/tests/baselines/reference/jsNoImplicitAnyNoCascadingReferenceErrors.types index 222d26f445e..b7981f59100 100644 --- a/tests/baselines/reference/jsNoImplicitAnyNoCascadingReferenceErrors.types +++ b/tests/baselines/reference/jsNoImplicitAnyNoCascadingReferenceErrors.types @@ -22,7 +22,7 @@ class MyFoo extends Foo { >this.prop.alpha = 12 : 12 >this.prop.alpha : any >this.prop : any ->this : this +>this : MyFoo >prop : any >alpha : any >12 : 12 diff --git a/tests/baselines/reference/jsObjectsMarkedAsOpenEnded.types b/tests/baselines/reference/jsObjectsMarkedAsOpenEnded.types index adb07b7bae7..0e0bac3cc86 100644 --- a/tests/baselines/reference/jsObjectsMarkedAsOpenEnded.types +++ b/tests/baselines/reference/jsObjectsMarkedAsOpenEnded.types @@ -21,7 +21,7 @@ class C { this.member = {}; >this.member = {} : {} >this.member : any ->this : this +>this : C >member : any >{} : {} @@ -29,7 +29,7 @@ class C { >this.member.a = 0 : 0 >this.member.a : error >this.member : {} ->this : this +>this : C >member : {} >a : any >0 : 0 diff --git a/tests/baselines/reference/jsdocAccessibilityTags.types b/tests/baselines/reference/jsdocAccessibilityTags.types index a16c3456f2e..78cf904c285 100644 --- a/tests/baselines/reference/jsdocAccessibilityTags.types +++ b/tests/baselines/reference/jsdocAccessibilityTags.types @@ -33,7 +33,7 @@ class A { get ack() { return this.priv } >ack : number >this.priv : number ->this : this +>this : A >priv : number /** @private */ @@ -53,7 +53,7 @@ class C { this.priv2 = 1; >this.priv2 = 1 : 1 >this.priv2 : any ->this : this +>this : C >priv2 : any >1 : 1 @@ -65,7 +65,7 @@ class C { this.prot2 = 2; >this.prot2 = 2 : 2 >this.prot2 : any ->this : this +>this : C >prot2 : any >2 : 2 @@ -77,14 +77,14 @@ class C { this.pub2 = 3; >this.pub2 = 3 : 3 >this.pub2 : any ->this : this +>this : C >pub2 : any >3 : 3 } h() { return this.priv2 } >h : () => number >this.priv2 : number ->this : this +>this : C >priv2 : number } class B extends A { @@ -98,13 +98,13 @@ class B extends A { >this.priv + this.prot + this.pub : number >this.priv + this.prot : number >this.priv : number ->this : this +>this : B >priv : number >this.prot : number ->this : this +>this : B >prot : number >this.pub : number ->this : this +>this : B >pub : number } } @@ -119,13 +119,13 @@ class D extends C { >this.priv2 + this.prot2 + this.pub2 : number >this.priv2 + this.prot2 : number >this.priv2 : number ->this : this +>this : D >priv2 : number >this.prot2 : number ->this : this +>this : D >prot2 : number >this.pub2 : number ->this : this +>this : D >pub2 : number } } diff --git a/tests/baselines/reference/jsdocAccessibilityTagsDeclarations.types b/tests/baselines/reference/jsdocAccessibilityTagsDeclarations.types index 3db28ea64d9..2e2fba5f67d 100644 --- a/tests/baselines/reference/jsdocAccessibilityTagsDeclarations.types +++ b/tests/baselines/reference/jsdocAccessibilityTagsDeclarations.types @@ -10,7 +10,7 @@ class Protected { this.c = c >this.c = c : any >this.c : any ->this : this +>this : Protected >c : any >c : any } @@ -20,14 +20,14 @@ class Protected { return this.c >this.c : any ->this : this +>this : Protected >c : any } /** @protected */ get p() { return this.c } >p : any >this.c : any ->this : this +>this : Protected >c : any /** @protected */ @@ -36,7 +36,7 @@ class Protected { >value : any >this.c = value : any >this.c : any ->this : this +>this : Protected >c : any >value : any } @@ -52,7 +52,7 @@ class Private { this.c = c >this.c = c : any >this.c : any ->this : this +>this : Private >c : any >c : any } @@ -62,14 +62,14 @@ class Private { return this.c >this.c : any ->this : this +>this : Private >c : any } /** @private */ get p() { return this.c } >p : any >this.c : any ->this : this +>this : Private >c : any /** @private */ @@ -78,7 +78,7 @@ class Private { >value : any >this.c = value : any >this.c : any ->this : this +>this : Private >c : any >value : any } diff --git a/tests/baselines/reference/jsdocAugmentsMissingType.types b/tests/baselines/reference/jsdocAugmentsMissingType.types index 430fae25480..0b5b47de72b 100644 --- a/tests/baselines/reference/jsdocAugmentsMissingType.types +++ b/tests/baselines/reference/jsdocAugmentsMissingType.types @@ -3,7 +3,7 @@ class A { constructor() { this.x = 0; } } >A : A >this.x = 0 : 0 >this.x : any ->this : this +>this : A >x : any >0 : 0 @@ -17,7 +17,7 @@ class B extends A { this.x >this.x : any ->this : this +>this : B >x : any } } diff --git a/tests/baselines/reference/jsdocAugments_noExtends.types b/tests/baselines/reference/jsdocAugments_noExtends.types index 31c79acc60a..c35d12536f1 100644 --- a/tests/baselines/reference/jsdocAugments_noExtends.types +++ b/tests/baselines/reference/jsdocAugments_noExtends.types @@ -3,7 +3,7 @@ class A { constructor() { this.x = 0; } } >A : A >this.x = 0 : 0 >this.x : any ->this : this +>this : A >x : any >0 : 0 @@ -16,7 +16,7 @@ class B { return this.x; >this.x : any ->this : this +>this : B >x : any } } diff --git a/tests/baselines/reference/jsdocAugments_withTypeParameter.types b/tests/baselines/reference/jsdocAugments_withTypeParameter.types index 6db296a6f3f..5bf4a1d0f6e 100644 --- a/tests/baselines/reference/jsdocAugments_withTypeParameter.types +++ b/tests/baselines/reference/jsdocAugments_withTypeParameter.types @@ -14,7 +14,7 @@ class B extends A { return this.x; >this.x : number ->this : this +>this : B >x : number } } diff --git a/tests/baselines/reference/jsdocFunctionType.types b/tests/baselines/reference/jsdocFunctionType.types index faa5e03072e..2b7d447ed8b 100644 --- a/tests/baselines/reference/jsdocFunctionType.types +++ b/tests/baselines/reference/jsdocFunctionType.types @@ -45,7 +45,7 @@ class C { this.length = n; >this.length = n : number >this.length : any ->this : this +>this : C >length : any >n : number } diff --git a/tests/baselines/reference/jsdocImplements_class.errors.txt b/tests/baselines/reference/jsdocImplements_class.errors.txt index 8581f9865ba..1abf4da09fc 100644 --- a/tests/baselines/reference/jsdocImplements_class.errors.txt +++ b/tests/baselines/reference/jsdocImplements_class.errors.txt @@ -1,6 +1,13 @@ /a.js(13,5): error TS2416: Property 'method' in type 'B2' is not assignable to the same property in base type 'A'. Type '() => string' is not assignable to type '() => number'. - Type 'string' is not assignable to type 'number'. + The 'this' types of each signature are incompatible. + Type 'A' is not assignable to type 'B2'. + Types of property 'method' are incompatible. + Type '() => number' is not assignable to type '() => string'. + The 'this' types of each signature are incompatible. + Type 'B2' is not assignable to type 'A'. + The types returned by 'method()' are incompatible between these types. + Type 'string' is not assignable to type 'number'. /a.js(17,7): error TS2720: Class 'B3' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? Property 'method' is missing in type 'B3' but required in type 'A'. @@ -22,7 +29,14 @@ ~~~~~~ !!! error TS2416: Property 'method' in type 'B2' is not assignable to the same property in base type 'A'. !!! error TS2416: Type '() => string' is not assignable to type '() => number'. -!!! error TS2416: Type 'string' is not assignable to type 'number'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'A' is not assignable to type 'B2'. +!!! error TS2416: Types of property 'method' are incompatible. +!!! error TS2416: Type '() => number' is not assignable to type '() => string'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'B2' is not assignable to type 'A'. +!!! error TS2416: The types returned by 'method()' are incompatible between these types. +!!! error TS2416: Type 'string' is not assignable to type 'number'. } /** @implements {A} */ diff --git a/tests/baselines/reference/jsdocImplements_missingType.types b/tests/baselines/reference/jsdocImplements_missingType.types index 370d360db0a..2280eba276c 100644 --- a/tests/baselines/reference/jsdocImplements_missingType.types +++ b/tests/baselines/reference/jsdocImplements_missingType.types @@ -3,7 +3,7 @@ class A { constructor() { this.x = 0; } } >A : A >this.x = 0 : 0 >this.x : any ->this : this +>this : A >x : any >0 : 0 diff --git a/tests/baselines/reference/jsdocImplements_properties.types b/tests/baselines/reference/jsdocImplements_properties.types index 79f7a3d5a0b..2251a906bb6 100644 --- a/tests/baselines/reference/jsdocImplements_properties.types +++ b/tests/baselines/reference/jsdocImplements_properties.types @@ -3,7 +3,7 @@ class A { constructor() { this.x = 0; } } >A : A >this.x = 0 : 0 >this.x : any ->this : this +>this : A >x : any >0 : 0 @@ -27,7 +27,7 @@ class B3 { constructor() { this.x = 10 } >this.x = 10 : 10 >this.x : any ->this : this +>this : B3 >x : any >10 : 10 } diff --git a/tests/baselines/reference/jsdocImportType.types b/tests/baselines/reference/jsdocImportType.types index 51387f6c09a..410028bc149 100644 --- a/tests/baselines/reference/jsdocImportType.types +++ b/tests/baselines/reference/jsdocImportType.types @@ -46,7 +46,7 @@ class Chunk { this.chunk = 1; >this.chunk = 1 : 1 >this.chunk : any ->this : this +>this : Chunk >chunk : any >1 : 1 } diff --git a/tests/baselines/reference/jsdocImportType2.types b/tests/baselines/reference/jsdocImportType2.types index 76fe7c688ff..6468f4d25ea 100644 --- a/tests/baselines/reference/jsdocImportType2.types +++ b/tests/baselines/reference/jsdocImportType2.types @@ -51,7 +51,7 @@ module.exports = class Chunk { this.chunk = 1; >this.chunk = 1 : 1 >this.chunk : any ->this : this +>this : import("tests/cases/conformance/jsdoc/mod1") >chunk : any >1 : 1 } diff --git a/tests/baselines/reference/jsdocReadonly.types b/tests/baselines/reference/jsdocReadonly.types index 806623749cd..74fffa57306 100644 --- a/tests/baselines/reference/jsdocReadonly.types +++ b/tests/baselines/reference/jsdocReadonly.types @@ -28,7 +28,7 @@ class LOL { this.y = 2 >this.y = 2 : 2 >this.y : 2 ->this : this +>this : LOL >y : 2 >2 : 2 @@ -36,7 +36,7 @@ class LOL { this.ka = 2 >this.ka = 2 : 2 >this.ka : any ->this : this +>this : LOL >ka : any >2 : 2 } diff --git a/tests/baselines/reference/jsdocReadonlyDeclarations.types b/tests/baselines/reference/jsdocReadonlyDeclarations.types index 33e157ae5ad..b695763bc7b 100644 --- a/tests/baselines/reference/jsdocReadonlyDeclarations.types +++ b/tests/baselines/reference/jsdocReadonlyDeclarations.types @@ -14,7 +14,7 @@ class C { this.x = n >this.x = n : any >this.x : 6 ->this : this +>this : C >x : 6 >n : any @@ -25,7 +25,7 @@ class C { this.y = n >this.y = n : any >this.y : number ->this : this +>this : C >y : number >n : any } diff --git a/tests/baselines/reference/jsdocTemplateClass.types b/tests/baselines/reference/jsdocTemplateClass.types index f837aa240bd..f32210b52cc 100644 --- a/tests/baselines/reference/jsdocTemplateClass.types +++ b/tests/baselines/reference/jsdocTemplateClass.types @@ -15,7 +15,7 @@ class Foo { this.a = x >this.a = x : T >this.a : any ->this : this +>this : Foo >a : any >x : T } diff --git a/tests/baselines/reference/jsdocTypeReferenceToImportOfClassExpression.types b/tests/baselines/reference/jsdocTypeReferenceToImportOfClassExpression.types index b42dcf9bc58..6ed971dbacd 100644 --- a/tests/baselines/reference/jsdocTypeReferenceToImportOfClassExpression.types +++ b/tests/baselines/reference/jsdocTypeReferenceToImportOfClassExpression.types @@ -21,7 +21,7 @@ module.exports = class MC { return new MW(this); >new MW(this) : MW >MW : typeof MW ->this : this +>this : import("tests/cases/conformance/jsdoc/MC") } }; @@ -40,7 +40,7 @@ class MW { this.compiler = compiler; >this.compiler = compiler : import("tests/cases/conformance/jsdoc/MC") >this.compiler : any ->this : this +>this : MW >compiler : any >compiler : import("tests/cases/conformance/jsdoc/MC") } diff --git a/tests/baselines/reference/jsdocTypeReferenceToImportOfFunctionExpression.types b/tests/baselines/reference/jsdocTypeReferenceToImportOfFunctionExpression.types index f28d7e5e87e..45f0ff45f92 100644 --- a/tests/baselines/reference/jsdocTypeReferenceToImportOfFunctionExpression.types +++ b/tests/baselines/reference/jsdocTypeReferenceToImportOfFunctionExpression.types @@ -43,7 +43,7 @@ class MW { this.compiler = compiler; >this.compiler = compiler : { (): MW; new (): MC; } >this.compiler : any ->this : this +>this : MW >compiler : any >compiler : { (): MW; new (): MC; } } diff --git a/tests/baselines/reference/jsdocTypeTagCast.errors.txt b/tests/baselines/reference/jsdocTypeTagCast.errors.txt index f85dd92939f..cfc48aca677 100644 --- a/tests/baselines/reference/jsdocTypeTagCast.errors.txt +++ b/tests/baselines/reference/jsdocTypeTagCast.errors.txt @@ -1,4 +1,5 @@ tests/cases/conformance/jsdoc/b.js(4,20): error TS2352: Conversion of type 'number' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +tests/cases/conformance/jsdoc/b.js(22,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'SomeBase'. tests/cases/conformance/jsdoc/b.js(45,23): error TS2352: Conversion of type 'SomeOther' to type 'SomeBase' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'. tests/cases/conformance/jsdoc/b.js(49,26): error TS2352: Conversion of type 'SomeOther' to type 'SomeDerived' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. @@ -21,7 +22,7 @@ tests/cases/conformance/jsdoc/b.js(67,8): error TS2454: Variable 'numOrStr' is u ==== tests/cases/conformance/jsdoc/a.ts (0 errors) ==== var W: string; -==== tests/cases/conformance/jsdoc/b.js (10 errors) ==== +==== tests/cases/conformance/jsdoc/b.js (11 errors) ==== // @ts-check var W = /** @type {string} */(/** @type {*} */ (4)); @@ -46,6 +47,8 @@ tests/cases/conformance/jsdoc/b.js(67,8): error TS2454: Variable 'numOrStr' is u class SomeDerived extends SomeBase { constructor() { super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'SomeBase'. this.x = 42; } } diff --git a/tests/baselines/reference/jsdocTypeTagCast.types b/tests/baselines/reference/jsdocTypeTagCast.types index 8ed961dcce5..6d4cf5a447f 100644 --- a/tests/baselines/reference/jsdocTypeTagCast.types +++ b/tests/baselines/reference/jsdocTypeTagCast.types @@ -44,7 +44,7 @@ class SomeBase { this.p = 42; >this.p = 42 : 42 >this.p : any ->this : this +>this : SomeBase >p : any >42 : 42 } @@ -61,7 +61,7 @@ class SomeDerived extends SomeBase { this.x = 42; >this.x = 42 : 42 >this.x : any ->this : this +>this : SomeDerived >x : any >42 : 42 } @@ -73,7 +73,7 @@ class SomeOther { this.q = 42; >this.q = 42 : 42 >this.q : any ->this : this +>this : SomeOther >q : any >42 : 42 } diff --git a/tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.errors.txt b/tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.errors.txt new file mode 100644 index 00000000000..b677d064099 --- /dev/null +++ b/tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.errors.txt @@ -0,0 +1,50 @@ +tests/cases/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.tsx(16,5): error TS2416: Property 'render' in type 'App' is not assignable to the same property in base type 'Component<{}, {}, any>'. + Type '() => Element' is not assignable to type '() => ReactNode'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'App'. + Types of property 'render' are incompatible. + Type '() => ReactNode' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'App' is not assignable to type 'Component'. + Types of property 'props' are incompatible. + Type 'Readonly<{ children?: ReactNode; }> & Readonly<{}>' is not assignable to type 'Readonly<{ children?: ReactNode; }> & Readonly

'. + Type 'Readonly<{ children?: ReactNode; }> & Readonly<{}>' is not assignable to type 'Readonly

'. + + +==== tests/cases/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.tsx (1 errors) ==== + /// + + import * as React from 'react' + + type Tab = [string, React.ReactNode] // [tabName, tabContent] + + interface Props { + children: Tab[] + } + + function TabLayout(props: Props) { + return

+ } + + export class App extends React.Component<{}> { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'App' is not assignable to the same property in base type 'Component<{}, {}, any>'. +!!! error TS2416: Type '() => Element' is not assignable to type '() => ReactNode'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'App'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => ReactNode' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'App' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'props' are incompatible. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly<{}>' is not assignable to type 'Readonly<{ children?: ReactNode; }> & Readonly

'. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly<{}>' is not assignable to type 'Readonly

'. + return + {[ + ['Users',

], + ['Products',
] + ]} + + } + } \ No newline at end of file diff --git a/tests/baselines/reference/keyofAndIndexedAccess.errors.txt b/tests/baselines/reference/keyofAndIndexedAccess.errors.txt new file mode 100644 index 00000000000..4529d943028 --- /dev/null +++ b/tests/baselines/reference/keyofAndIndexedAccess.errors.txt @@ -0,0 +1,705 @@ +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(124,16): error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. + Type 'Shape' is not assignable to type 'PropType'. + 'PropType' could be instantiated with an arbitrary type which could be unrelated to 'Shape'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(125,25): error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(126,25): error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(127,5): error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(128,5): error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(129,5): error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(280,16): error TS2536: Type 'K' cannot be used to index type 'C1'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(283,9): error TS2536: Type 'K' cannot be used to index type 'C1'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(332,16): error TS2536: Type 'K' cannot be used to index type 'Base'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(335,9): error TS2536: Type 'K' cannot be used to index type 'Base'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(420,1): error TS2684: The 'this' context of type 'Component1<{ hello: string; }, unknown>' is not assignable to method's 'this' of type 'Component1'. + Type '{ hello: string; }' is not assignable to type 'Data'. + 'Data' could be instantiated with an arbitrary type which could be unrelated to '{ hello: string; }'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(553,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'SampleClass

'. + + +==== tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts (12 errors) ==== + class Shape { + name: string; + width: number; + height: number; + visible: boolean; + } + + class TaggedShape extends Shape { + tag: string; + } + + class Item { + name: string; + price: number; + } + + class Options { + visible: "yes" | "no"; + } + + type Dictionary = { [x: string]: T }; + type NumericallyIndexed = { [x: number]: T }; + + const enum E { A, B, C } + + type K00 = keyof any; // string + type K01 = keyof string; // "toString" | "charAt" | ... + type K02 = keyof number; // "toString" | "toFixed" | "toExponential" | ... + type K03 = keyof boolean; // "valueOf" + type K04 = keyof void; // never + type K05 = keyof undefined; // never + type K06 = keyof null; // never + type K07 = keyof never; // string | number | symbol + type K08 = keyof unknown; // never + + type K10 = keyof Shape; // "name" | "width" | "height" | "visible" + type K11 = keyof Shape[]; // "length" | "toString" | ... + type K12 = keyof Dictionary; // string + type K13 = keyof {}; // never + type K14 = keyof Object; // "constructor" | "toString" | ... + type K15 = keyof E; // "toString" | "toFixed" | "toExponential" | ... + type K16 = keyof [string, number]; // "0" | "1" | "length" | "toString" | ... + type K17 = keyof (Shape | Item); // "name" + type K18 = keyof (Shape & Item); // "name" | "width" | "height" | "visible" | "price" + type K19 = keyof NumericallyIndexed // never + + type KeyOf = keyof T; + + type K20 = KeyOf; // "name" | "width" | "height" | "visible" + type K21 = KeyOf>; // string + + type NAME = "name"; + type WIDTH_OR_HEIGHT = "width" | "height"; + + type Q10 = Shape["name"]; // string + type Q11 = Shape["width" | "height"]; // number + type Q12 = Shape["name" | "visible"]; // string | boolean + + type Q20 = Shape[NAME]; // string + type Q21 = Shape[WIDTH_OR_HEIGHT]; // number + + type Q30 = [string, number][0]; // string + type Q31 = [string, number][1]; // number + type Q32 = [string, number][number]; // string | number + type Q33 = [string, number][E.A]; // string + type Q34 = [string, number][E.B]; // number + type Q35 = [string, number]["0"]; // string + type Q36 = [string, number]["1"]; // string + + type Q40 = (Shape | Options)["visible"]; // boolean | "yes" | "no" + type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false & "yes" | false & "no" + + type Q50 = Dictionary["howdy"]; // Shape + type Q51 = Dictionary[123]; // Shape + type Q52 = Dictionary[E.B]; // Shape + + declare let cond: boolean; + + function getProperty(obj: T, key: K) { + return obj[key]; + } + + function setProperty(obj: T, key: K, value: T[K]) { + obj[key] = value; + } + + function f10(shape: Shape) { + let name = getProperty(shape, "name"); // string + let widthOrHeight = getProperty(shape, cond ? "width" : "height"); // number + let nameOrVisible = getProperty(shape, cond ? "name" : "visible"); // string | boolean + setProperty(shape, "name", "rectangle"); + setProperty(shape, cond ? "width" : "height", 10); + setProperty(shape, cond ? "name" : "visible", true); // Technically not safe + } + + function f11(a: Shape[]) { + let len = getProperty(a, "length"); // number + setProperty(a, "length", len); + } + + function f12(t: [Shape, boolean]) { + let len = getProperty(t, "length"); + let s2 = getProperty(t, "0"); // Shape + let b2 = getProperty(t, "1"); // boolean + } + + function f13(foo: any, bar: any) { + let x = getProperty(foo, "x"); // any + let y = getProperty(foo, "100"); // any + let z = getProperty(foo, bar); // any + } + + class Component { + props: PropType; + getProperty(key: K) { + return this.props[key]; + } + setProperty(key: K, value: PropType[K]) { + this.props[key] = value; + } + } + + function f20(component: Component) { + let name = component.getProperty("name"); // string + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. +!!! error TS2684: Type 'Shape' is not assignable to type 'PropType'. +!!! error TS2684: 'PropType' could be instantiated with an arbitrary type which could be unrelated to 'Shape'. + let widthOrHeight = component.getProperty(cond ? "width" : "height"); // number + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. + let nameOrVisible = component.getProperty(cond ? "name" : "visible"); // string | boolean + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. + component.setProperty("name", "rectangle"); + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. + component.setProperty(cond ? "width" : "height", 10) + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. + component.setProperty(cond ? "name" : "visible", true); // Technically not safe + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Component' is not assignable to method's 'this' of type 'Component'. + } + + function pluck(array: T[], key: K) { + return array.map(x => x[key]); + } + + function f30(shapes: Shape[]) { + let names = pluck(shapes, "name"); // string[] + let widths = pluck(shapes, "width"); // number[] + let nameOrVisibles = pluck(shapes, cond ? "name" : "visible"); // (string | boolean)[] + } + + function f31(key: K) { + const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; + return shape[key]; // Shape[K] + } + + function f32(key: K) { + const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; + return shape[key]; // Shape[K] + } + + function f33(shape: S, key: K) { + let name = getProperty(shape, "name"); + let prop = getProperty(shape, key); + return prop; + } + + function f34(ts: TaggedShape) { + let tag1 = f33(ts, "tag"); + let tag2 = getProperty(ts, "tag"); + } + + class C { + public x: string; + protected y: string; + private z: string; + } + + // Indexed access expressions have always permitted access to private and protected members. + // For consistency we also permit such access in indexed access types. + function f40(c: C) { + type X = C["x"]; + type Y = C["y"]; + type Z = C["z"]; + let x: X = c["x"]; + let y: Y = c["y"]; + let z: Z = c["z"]; + } + + function f50(k: keyof T, s: string) { + const x1 = s as keyof T; + const x2 = k as string; + } + + function f51(k: K, s: string) { + const x1 = s as keyof T; + const x2 = k as string; + } + + function f52(obj: { [x: string]: boolean }, k: Exclude, s: string, n: number) { + const x1 = obj[s]; + const x2 = obj[n]; + const x3 = obj[k]; + } + + function f53>(obj: { [x: string]: boolean }, k: K, s: string, n: number) { + const x1 = obj[s]; + const x2 = obj[n]; + const x3 = obj[k]; + } + + function f54(obj: T, key: keyof T) { + for (let s in obj[key]) { + } + const b = "foo" in obj[key]; + } + + function f55(obj: T, key: K) { + for (let s in obj[key]) { + } + const b = "foo" in obj[key]; + } + + function f60(source: T, target: T) { + for (let k in source) { + target[k] = source[k]; + } + } + + function f70(func: (k1: keyof (T | U), k2: keyof (T & U)) => void) { + func<{ a: any, b: any }, { a: any, c: any }>('a', 'a'); + func<{ a: any, b: any }, { a: any, c: any }>('a', 'b'); + func<{ a: any, b: any }, { a: any, c: any }>('a', 'c'); + } + + function f71(func: (x: T, y: U) => Partial) { + let x = func({ a: 1, b: "hello" }, { c: true }); + x.a; // number | undefined + x.b; // string | undefined + x.c; // boolean | undefined + } + + function f72(func: (x: T, y: U, k: K) => (T & U)[K]) { + let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean + } + + function f73(func: (x: T, y: U, k: K) => (T & U)[K]) { + let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean + } + + function f74(func: (x: T, y: U, k: K) => (T | U)[K]) { + let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean + } + + function f80(obj: T) { + let a1 = obj.a; // { x: any } + let a2 = obj['a']; // { x: any } + let a3 = obj['a'] as T['a']; // T["a"] + let x1 = obj.a.x; // any + let x2 = obj['a']['x']; // any + let x3 = obj['a']['x'] as T['a']['x']; // T["a"]["x"] + } + + function f81(obj: T) { + return obj['a']['x'] as T['a']['x']; + } + + function f82() { + let x1 = f81({ a: { x: "hello" } }); // string + let x2 = f81({ a: { x: 42 } }); // number + } + + function f83(obj: T, key: K) { + return obj[key]['x'] as T[K]['x']; + } + + function f84() { + let x1 = f83({ foo: { x: "hello" } }, "foo"); // string + let x2 = f83({ bar: { x: 42 } }, "bar"); // number + } + + class C1 { + x: number; + get(key: K) { + return this[key]; + ~~~~~~~~~ +!!! error TS2536: Type 'K' cannot be used to index type 'C1'. + } + set(key: K, value: this[K]) { + this[key] = value; + ~~~~~~~~~ +!!! error TS2536: Type 'K' cannot be used to index type 'C1'. + } + foo() { + let x1 = this.x; // number + let x2 = this["x"]; // number + let x3 = this.get("x"); // this["x"] + let x4 = getProperty(this, "x"); // this["x"] + this.x = 42; + this["x"] = 42; + this.set("x", 42); + setProperty(this, "x", 42); + } + } + + type S2 = { + a: string; + b: string; + }; + + function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]) { + x1 = x2; + x1 = x3; + x2 = x1; + x2 = x3; + x3 = x1; + x3 = x2; + x1.length; + x2.length; + x3.length; + } + + function f91(x: T, y: T[keyof T], z: T[K]) { + let a: {}; + a = x; + a = y; + a = z; + } + + function f92(x: T, y: T[keyof T], z: T[K]) { + let a: {} | null | undefined; + a = x; + a = y; + a = z; + } + + // Repros from #12011 + + class Base { + get(prop: K) { + return this[prop]; + ~~~~~~~~~~ +!!! error TS2536: Type 'K' cannot be used to index type 'Base'. + } + set(prop: K, value: this[K]) { + this[prop] = value; + ~~~~~~~~~~ +!!! error TS2536: Type 'K' cannot be used to index type 'Base'. + } + } + + class Person extends Base { + parts: number; + constructor(parts: number) { + super(); + this.set("parts", parts); + } + getParts() { + return this.get("parts") + } + } + + class OtherPerson { + parts: number; + constructor(parts: number) { + setProperty(this, "parts", parts); + } + getParts() { + return getProperty(this, "parts") + } + } + + // Modified repro from #12544 + + function path(obj: T, key1: K1): T[K1]; + function path(obj: T, key1: K1, key2: K2): T[K1][K2]; + function path(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3]; + function path(obj: any, ...keys: (string | number)[]): any; + function path(obj: any, ...keys: (string | number)[]): any { + let result = obj; + for (let k of keys) { + result = result[k]; + } + return result; + } + + type Thing = { + a: { x: number, y: string }, + b: boolean + }; + + + function f1(thing: Thing) { + let x1 = path(thing, 'a'); // { x: number, y: string } + let x2 = path(thing, 'a', 'y'); // string + let x3 = path(thing, 'b'); // boolean + let x4 = path(thing, ...['a', 'x']); // any + } + + // Repro from comment in #12114 + + const assignTo2 = (object: T, key1: K1, key2: K2) => + (value: T[K1][K2]) => object[key1][key2] = value; + + // Modified repro from #12573 + + declare function one(handler: (t: T) => void): T + var empty = one(() => {}) // inferred as {}, expected + + type Handlers = { [K in keyof T]: (t: T[K]) => void } + declare function on(handlerHash: Handlers): T + var hashOfEmpty1 = on({ test: () => {} }); // {} + var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean } + + // Repro from #12624 + + interface Options1 { + data?: Data + computed?: Computed; + } + + declare class Component1 { + constructor(options: Options1); + get(key: K): (Data & Computed)[K]; + } + + let c1 = new Component1({ + data: { + hello: "" + } + }); + + c1.get("hello"); + ~~ +!!! error TS2684: The 'this' context of type 'Component1<{ hello: string; }, unknown>' is not assignable to method's 'this' of type 'Component1'. +!!! error TS2684: Type '{ hello: string; }' is not assignable to type 'Data'. +!!! error TS2684: 'Data' could be instantiated with an arbitrary type which could be unrelated to '{ hello: string; }'. + + // Repro from #12625 + + interface Options2 { + data?: Data + computed?: Computed; + } + + declare class Component2 { + constructor(options: Options2); + get(key: K): (Data & Computed)[K]; + } + + // Repro from #12641 + + interface R { + p: number; + } + + function f(p: K) { + let a: any; + a[p].add; // any + } + + // Repro from #12651 + + type MethodDescriptor = { + name: string; + args: any[]; + returnValue: any; + } + + declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; + + type SomeMethodDescriptor = { + name: "someMethod"; + args: [string, number]; + returnValue: string[]; + } + + let result = dispatchMethod("someMethod", ["hello", 35]); + + // Repro from #13073 + + type KeyTypes = "a" | "b" + let MyThingy: { [key in KeyTypes]: string[] }; + + function addToMyThingy(key: S) { + MyThingy[key].push("a"); + } + + // Repro from #13102 + + type Handler = { + onChange: (name: keyof T) => void; + }; + + function onChangeGenericFunction(handler: Handler) { + handler.onChange('preset') + } + + // Repro from #13285 + + function updateIds, K extends string>( + obj: T, + idFields: K[], + idMapping: Partial> + ): Record { + for (const idField of idFields) { + const newId: T[K] | undefined = idMapping[obj[idField]]; + if (newId) { + obj[idField] = newId; + } + } + return obj; + } + + // Repro from #13285 + + function updateIds2( + obj: T, + key: K, + stringMap: { [oldId: string]: string } + ) { + var x = obj[key]; + stringMap[x]; // Should be OK. + } + + // Repro from #13514 + + declare function head>(list: T): T[0]; + + // Repro from #13604 + + class A { + props: T & { foo: string }; + } + + class B extends A<{ x: number}> { + f(p: this["props"]) { + p.x; + } + } + + // Repro from #13749 + + class Form { + private childFormFactories: {[K in keyof T]: (v: T[K]) => Form} + + public set(prop: K, value: T[K]) { + this.childFormFactories[prop](value) + } + } + + // Repro from #13787 + + class SampleClass

{ + public props: Readonly

; + constructor(props: P) { + this.props = Object.freeze(props); + } + } + + interface Foo { + foo: string; + } + + declare function merge(obj1: T, obj2: U): T & U; + + class AnotherSampleClass extends SampleClass { + constructor(props: T) { + const foo: Foo = { foo: "bar" }; + super(merge(props, foo)); + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'SampleClass

'. + } + + public brokenMethod() { + this.props.foo.concat; + } + } + new AnotherSampleClass({}); + + // Positive repro from #17166 + function f3>(t: T, k: K, tk: T[K]): void { + for (let key in t) { + key = k // ok, K ==> keyof T + t[key] = tk; // ok, T[K] ==> T[keyof T] + } + } + + // # 21185 + type Predicates = { + [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T] + } + + // Repros from #23592 + + type Example = { [K in keyof T]: T[K]["prop"] }; + type Result = Example<{ a: { prop: string }; b: { prop: number } }>; + + type Helper2 = { [K in keyof T]: Extract }; + type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; + type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; + + // Repro from #23618 + + type DBBoolTable = { [k in K]: 0 | 1 } + enum Flag { + FLAG_1 = "flag_1", + FLAG_2 = "flag_2" + } + + type SimpleDBRecord = { staticField: number } & DBBoolTable + function getFlagsFromSimpleRecord(record: SimpleDBRecord, flags: Flag[]) { + return record[flags[0]]; + } + + type DynamicDBRecord = ({ dynamicField: number } | { dynamicField: string }) & DBBoolTable + function getFlagsFromDynamicRecord(record: DynamicDBRecord, flags: Flag[]) { + return record[flags[0]]; + } + + // Repro from #21368 + + interface I { + foo: string; + } + + declare function take(p: T): void; + + function fn(o: T, k: K) { + take<{} | null | undefined>(o[k]); + take(o[k]); + } + + // Repro from #23133 + + class Unbounded { + foo(x: T[keyof T]) { + let y: {} | undefined | null = x; + } + } + + // Repro from #23940 + + interface I7 { + x: any; + } + type Foo7 = T; + declare function f7(type: K): Foo7; + + // Repro from #21770 + + type Dict = { [key in T]: number }; + type DictDict = { [key in V]: Dict }; + + function ff1(dd: DictDict, k1: V, k2: T): number { + return dd[k1][k2]; + } + + function ff2(dd: DictDict, k1: V, k2: T): number { + const d: Dict = dd[k1]; + return d[k2]; + } + + // Repro from #26409 + + const cf1 = (t: T, k: K) => + { + const s: string = t[k]; + t.cool; + }; + + const cf2 = (t: T, k: K) => + { + const s: string = t[k]; + t.cool; + }; + \ No newline at end of file diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index d9445d47a2c..83d283d2ff8 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -1229,7 +1229,7 @@ declare function f83(key: K): this[K]; + get(key: K): any; set(key: K, value: this[K]): void; foo(): void; } @@ -1241,18 +1241,18 @@ declare function f90(x1: S2[keyof S2], x2: T[k declare function f91(x: T, y: T[keyof T], z: T[K]): void; declare function f92(x: T, y: T[keyof T], z: T[K]): void; declare class Base { - get(prop: K): this[K]; + get(prop: K): any; set(prop: K, value: this[K]): void; } declare class Person extends Base { parts: number; constructor(parts: number); - getParts(): this["parts"]; + getParts(): any; } declare class OtherPerson { parts: number; constructor(parts: number); - getParts(): this["parts"]; + getParts(): number; } declare function path(obj: T, key1: K1): T[K1]; declare function path(obj: T, key1: K1, key2: K2): T[K1][K2]; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index 47a7cbfdbd6..c7f1884ce48 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -353,7 +353,7 @@ class Component { return this.props[key]; >this.props[key] : PropType[K] >this.props : PropType ->this : this +>this : Component >props : PropType >key : K } @@ -366,7 +366,7 @@ class Component { >this.props[key] = value : PropType[K] >this.props[key] : PropType[K] >this.props : PropType ->this : this +>this : Component >props : PropType >key : K >value : PropType[K] @@ -1114,12 +1114,12 @@ class C1 { >x : number get(key: K) { ->get : (key: K) => this[K] +>get : (key: K) => any >key : K return this[key]; ->this[key] : this[K] ->this : this +>this[key] : any +>this : C1 >key : K } set(key: K, value: this[K]) { @@ -1129,8 +1129,8 @@ class C1 { this[key] = value; >this[key] = value : this[K] ->this[key] : this[K] ->this : this +>this[key] : any +>this : C1 >key : K >value : this[K] } @@ -1140,56 +1140,56 @@ class C1 { let x1 = this.x; // number >x1 : number >this.x : number ->this : this +>this : C1 >x : number let x2 = this["x"]; // number >x2 : number >this["x"] : number ->this : this +>this : C1 >"x" : "x" let x3 = this.get("x"); // this["x"] ->x3 : this["x"] ->this.get("x") : this["x"] ->this.get : (key: K) => this[K] ->this : this ->get : (key: K) => this[K] +>x3 : any +>this.get("x") : any +>this.get : (key: K) => any +>this : C1 +>get : (key: K) => any >"x" : "x" let x4 = getProperty(this, "x"); // this["x"] ->x4 : this["x"] ->getProperty(this, "x") : this["x"] +>x4 : number +>getProperty(this, "x") : number >getProperty : (obj: T, key: K) => T[K] ->this : this +>this : C1 >"x" : "x" this.x = 42; >this.x = 42 : 42 >this.x : number ->this : this +>this : C1 >x : number >42 : 42 this["x"] = 42; >this["x"] = 42 : 42 >this["x"] : number ->this : this +>this : C1 >"x" : "x" >42 : 42 this.set("x", 42); >this.set("x", 42) : void ->this.set : (key: K, value: this[K]) => void ->this : this ->set : (key: K, value: this[K]) => void +>this.set : (key: K, value: C1[K]) => void +>this : C1 +>set : (key: K, value: C1[K]) => void >"x" : "x" >42 : 42 setProperty(this, "x", 42); >setProperty(this, "x", 42) : void >setProperty : (obj: T, key: K, value: T[K]) => void ->this : this +>this : C1 >"x" : "x" >42 : 42 } @@ -1315,12 +1315,12 @@ class Base { >Base : Base get(prop: K) { ->get : (prop: K) => this[K] +>get : (prop: K) => any >prop : K return this[prop]; ->this[prop] : this[K] ->this : this +>this[prop] : any +>this : Base >prop : K } set(prop: K, value: this[K]) { @@ -1330,8 +1330,8 @@ class Base { this[prop] = value; >this[prop] = value : this[K] ->this[prop] : this[K] ->this : this +>this[prop] : any +>this : Base >prop : K >value : this[K] } @@ -1353,20 +1353,20 @@ class Person extends Base { this.set("parts", parts); >this.set("parts", parts) : void ->this.set : (prop: K, value: this[K]) => void ->this : this ->set : (prop: K, value: this[K]) => void +>this.set : (prop: K, value: Person[K]) => void +>this : Person +>set : (prop: K, value: Person[K]) => void >"parts" : "parts" >parts : number } getParts() { ->getParts : () => this["parts"] +>getParts : () => any return this.get("parts") ->this.get("parts") : this["parts"] ->this.get : (prop: K) => this[K] ->this : this ->get : (prop: K) => this[K] +>this.get("parts") : any +>this.get : (prop: K) => any +>this : Person +>get : (prop: K) => any >"parts" : "parts" } } @@ -1383,17 +1383,17 @@ class OtherPerson { setProperty(this, "parts", parts); >setProperty(this, "parts", parts) : void >setProperty : (obj: T, key: K, value: T[K]) => void ->this : this +>this : OtherPerson >"parts" : "parts" >parts : number } getParts() { ->getParts : () => this["parts"] +>getParts : () => number return getProperty(this, "parts") ->getProperty(this, "parts") : this["parts"] +>getProperty(this, "parts") : number >getProperty : (obj: T, key: K) => T[K] ->this : this +>this : OtherPerson >"parts" : "parts" } } @@ -1852,7 +1852,7 @@ class Form { >this.childFormFactories[prop](value) : Form >this.childFormFactories[prop] : { [K in keyof T]: (v: T[K]) => Form; }[K] >this.childFormFactories : { [K in keyof T]: (v: T[K]) => Form; } ->this : this +>this : Form >childFormFactories : { [K in keyof T]: (v: T[K]) => Form; } >prop : K >value : T[K] @@ -1873,7 +1873,7 @@ class SampleClass

{ this.props = Object.freeze(props); >this.props = Object.freeze(props) : Readonly

>this.props : Readonly

->this : this +>this : SampleClass

>props : Readonly

>Object.freeze(props) : Readonly

>Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; } @@ -1922,7 +1922,7 @@ class AnotherSampleClass extends SampleClass { >this.props.foo.concat : (...strings: string[]) => string >this.props.foo : (T & Foo)["foo"] >this.props : Readonly ->this : this +>this : AnotherSampleClass >props : Readonly >foo : (T & Foo)["foo"] >concat : (...strings: string[]) => string diff --git a/tests/baselines/reference/keyofAndIndexedAccess2.types b/tests/baselines/reference/keyofAndIndexedAccess2.types index 048e11cad67..89eff554527 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess2.types +++ b/tests/baselines/reference/keyofAndIndexedAccess2.types @@ -511,14 +511,14 @@ export class c { this.a = "b"; >this.a = "b" : "b" >this.a : string ->this : this +>this : c >a : string >"b" : "b" this["a"] = "b"; >this["a"] = "b" : "b" >this["a"] : string ->this : this +>this : c >"a" : "a" >"b" : "b" } diff --git a/tests/baselines/reference/lambdaArgCrash.types b/tests/baselines/reference/lambdaArgCrash.types index 534d2838a39..303b38984b5 100644 --- a/tests/baselines/reference/lambdaArgCrash.types +++ b/tests/baselines/reference/lambdaArgCrash.types @@ -13,7 +13,7 @@ class Event { this._listeners = []; >this._listeners = [] : undefined[] >this._listeners : any[] ->this : this +>this : Event >_listeners : any[] >[] : undefined[] @@ -31,7 +31,7 @@ class Event { >this._listeners.push(listener) : number >this._listeners.push : (...items: any[]) => number >this._listeners : any[] ->this : this +>this : Event >_listeners : any[] >push : (...items: any[]) => number >listener : () => any diff --git a/tests/baselines/reference/lambdaPropSelf.types b/tests/baselines/reference/lambdaPropSelf.types index 99cc82665bc..c7c7d02125a 100644 --- a/tests/baselines/reference/lambdaPropSelf.types +++ b/tests/baselines/reference/lambdaPropSelf.types @@ -15,7 +15,7 @@ class Person { this.children = ko.observableArray(children); >this.children = ko.observableArray(children) : any >this.children : string[] ->this : this +>this : Person >children : string[] >ko.observableArray(children) : any >ko.observableArray : any @@ -44,8 +44,8 @@ class T { >fo : () => void var x = this; ->x : this ->this : this +>x : T +>this : T } } diff --git a/tests/baselines/reference/lateBoundClassMemberAssignmentJS.types b/tests/baselines/reference/lateBoundClassMemberAssignmentJS.types index 553ff19ed7d..4b9bc2fc352 100644 --- a/tests/baselines/reference/lateBoundClassMemberAssignmentJS.types +++ b/tests/baselines/reference/lateBoundClassMemberAssignmentJS.types @@ -12,7 +12,7 @@ export class MyClass { this[_sym] = "ok"; >this[_sym] = "ok" : "ok" >this[_sym] : string ->this : this +>this : MyClass >_sym : unique symbol >"ok" : "ok" } @@ -23,14 +23,14 @@ export class MyClass { this[_sym] = "yep"; >this[_sym] = "yep" : "yep" >this[_sym] : string ->this : this +>this : MyClass >_sym : unique symbol >"yep" : "yep" const x = this[_sym]; >x : string >this[_sym] : string ->this : this +>this : MyClass >_sym : unique symbol } } diff --git a/tests/baselines/reference/lateBoundClassMemberAssignmentJS2.types b/tests/baselines/reference/lateBoundClassMemberAssignmentJS2.types index 55d1b8c0e34..5b4c1a8b608 100644 --- a/tests/baselines/reference/lateBoundClassMemberAssignmentJS2.types +++ b/tests/baselines/reference/lateBoundClassMemberAssignmentJS2.types @@ -10,7 +10,7 @@ export class MyClass { this[_sym] = "ok"; >this[_sym] = "ok" : "ok" >this[_sym] : string ->this : this +>this : MyClass >_sym : "my-fake-sym" >"ok" : "ok" } @@ -21,14 +21,14 @@ export class MyClass { this[_sym] = "yep"; >this[_sym] = "yep" : "yep" >this[_sym] : string ->this : this +>this : MyClass >_sym : "my-fake-sym" >"yep" : "yep" const x = this[_sym]; >x : string >this[_sym] : string ->this : this +>this : MyClass >_sym : "my-fake-sym" } } diff --git a/tests/baselines/reference/lateBoundClassMemberAssignmentJS3.types b/tests/baselines/reference/lateBoundClassMemberAssignmentJS3.types index a318ed1e054..621dd9ca423 100644 --- a/tests/baselines/reference/lateBoundClassMemberAssignmentJS3.types +++ b/tests/baselines/reference/lateBoundClassMemberAssignmentJS3.types @@ -10,13 +10,13 @@ export class MyClass { constructor() { var self = this ->self : this ->this : this +>self : MyClass +>this : MyClass self[_sym] = "ok"; >self[_sym] = "ok" : "ok" >self[_sym] : string ->self : this +>self : MyClass >_sym : unique symbol >"ok" : "ok" } @@ -25,20 +25,20 @@ export class MyClass { >method : () => void var self = this ->self : this ->this : this +>self : MyClass +>this : MyClass self[_sym] = "yep"; >self[_sym] = "yep" : "yep" >self[_sym] : string ->self : this +>self : MyClass >_sym : unique symbol >"yep" : "yep" const x = self[_sym]; >x : string >self[_sym] : string ->self : this +>self : MyClass >_sym : unique symbol } } diff --git a/tests/baselines/reference/lateBoundMethodNameAssigmentJS.types b/tests/baselines/reference/lateBoundMethodNameAssigmentJS.types index 8b0217b2783..e22ae1e64d8 100644 --- a/tests/baselines/reference/lateBoundMethodNameAssigmentJS.types +++ b/tests/baselines/reference/lateBoundMethodNameAssigmentJS.types @@ -12,15 +12,15 @@ export class MyClass { this[_symbol] = this[_symbol].bind(this); >this[_symbol] = this[_symbol].bind(this) : error >this[_symbol] : error ->this : this +>this : MyClass >_symbol : unique symbol >this[_symbol].bind(this) : error >this[_symbol].bind : error >this[_symbol] : any ->this : this +>this : MyClass >_symbol : unique symbol >bind : any ->this : this +>this : MyClass } async [_symbol]() { } diff --git a/tests/baselines/reference/lift.errors.txt b/tests/baselines/reference/lift.errors.txt index ef8bddbf787..ce23b4ff38e 100644 --- a/tests/baselines/reference/lift.errors.txt +++ b/tests/baselines/reference/lift.errors.txt @@ -1,10 +1,11 @@ +tests/cases/compiler/lift.ts(9,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. tests/cases/compiler/lift.ts(14,32): error TS2304: Cannot find name 'x'. tests/cases/compiler/lift.ts(14,34): error TS2304: Cannot find name 'z'. tests/cases/compiler/lift.ts(15,37): error TS2304: Cannot find name 'x'. tests/cases/compiler/lift.ts(15,39): error TS2304: Cannot find name 'z'. -==== tests/cases/compiler/lift.ts (4 errors) ==== +==== tests/cases/compiler/lift.ts (5 errors) ==== class B { constructor(public y:number) { } @@ -14,6 +15,8 @@ tests/cases/compiler/lift.ts(15,39): error TS2304: Cannot find name 'z'. class C extends B { constructor(y:number,z:number,w:number) { super(y) + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. var x=10+w; var ll=x*w; } diff --git a/tests/baselines/reference/lift.types b/tests/baselines/reference/lift.types index da513e09998..459ded54ebd 100644 --- a/tests/baselines/reference/lift.types +++ b/tests/baselines/reference/lift.types @@ -43,7 +43,7 @@ class C extends B { >x : any >z : any >this.y : number ->this : this +>this : C >y : number public liftxylocllz () { return x+z+this.y+this.ll; } @@ -54,10 +54,10 @@ class C extends B { >x : any >z : any >this.y : number ->this : this +>this : C >y : number >this.ll : number ->this : this +>this : C >ll : number } diff --git a/tests/baselines/reference/listFailure.types b/tests/baselines/reference/listFailure.types index b6fbc1c1103..0935318c9c0 100644 --- a/tests/baselines/reference/listFailure.types +++ b/tests/baselines/reference/listFailure.types @@ -24,7 +24,7 @@ module Editor { >this.lines.add(line) : List >this.lines.add : (data: Line) => List >this.lines : List ->this : this +>this : Buffer >lines : List >add : (data: Line) => List >line : Line @@ -70,7 +70,7 @@ module Editor { this.next = ListMakeEntry(data); >this.next = ListMakeEntry(data) : List >this.next : List ->this : this +>this : List >next : List >ListMakeEntry(data) : List >ListMakeEntry : (data: U) => List @@ -78,7 +78,7 @@ module Editor { return this.next; >this.next : List ->this : this +>this : List >next : List } @@ -91,7 +91,7 @@ module Editor { >ListRemoveEntry(this.next) : List >ListRemoveEntry : (entry: List) => List >this.next : List ->this : this +>this : List >next : List } } diff --git a/tests/baselines/reference/literalTypesWidenInParameterPosition.types b/tests/baselines/reference/literalTypesWidenInParameterPosition.types index 8b863ae106e..1f5de1073ce 100644 --- a/tests/baselines/reference/literalTypesWidenInParameterPosition.types +++ b/tests/baselines/reference/literalTypesWidenInParameterPosition.types @@ -13,14 +13,14 @@ class D { this.noWiden = 5; // error >this.noWiden = 5 : 5 >this.noWiden : 1 ->this : this +>this : D >noWiden : 1 >5 : 5 this.widen = 6; // ok >this.widen = 6 : 6 >this.widen : number ->this : this +>this : D >widen : number >6 : 6 } diff --git a/tests/baselines/reference/looseThisTypeInFunctions.errors.txt b/tests/baselines/reference/looseThisTypeInFunctions.errors.txt index 7e12a714406..7b896b7f9da 100644 --- a/tests/baselines/reference/looseThisTypeInFunctions.errors.txt +++ b/tests/baselines/reference/looseThisTypeInFunctions.errors.txt @@ -4,10 +4,13 @@ tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts(21,1): error tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts(25,27): error TS2339: Property 'length' does not exist on type 'number'. tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts(33,28): error TS2339: Property 'length' does not exist on type 'number'. tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts(37,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'I'. +tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts(41,1): error TS2322: Type '(m: number) => number' is not assignable to type '(this: void, m: number) => number'. + The 'this' types of each signature are incompatible. + Type 'void' is not assignable to type 'C'. tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts(46,20): error TS2339: Property 'length' does not exist on type 'number'. -==== tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts (5 errors) ==== +==== tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts (6 errors) ==== interface I { n: number; explicitThis(this: this, m: number): number; @@ -59,6 +62,10 @@ tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts(46,20): error let y = u.implicitNoThis; n = y(12); // ok, callee:void matches this:any c.explicitVoid = c.implicitThis // ok, implicitThis(this:any) + ~~~~~~~~~~~~~~ +!!! error TS2322: Type '(m: number) => number' is not assignable to type '(this: void, m: number) => number'. +!!! error TS2322: The 'this' types of each signature are incompatible. +!!! error TS2322: Type 'void' is not assignable to type 'C'. o.implicitThis = c.implicitThis; // ok, implicitThis(this:any) o.implicitThis = c.explicitThis; // ok, implicitThis(this:any) is assignable to explicitThis(this: this) o.implicitThis = i.explicitThis; diff --git a/tests/baselines/reference/looseThisTypeInFunctions.types b/tests/baselines/reference/looseThisTypeInFunctions.types index 39f0c442e1d..ae772bd37ab 100644 --- a/tests/baselines/reference/looseThisTypeInFunctions.types +++ b/tests/baselines/reference/looseThisTypeInFunctions.types @@ -38,7 +38,7 @@ class C implements I { return this.n + m; >this.n + m : number >this.n : number ->this : this +>this : C >n : number >m : number } diff --git a/tests/baselines/reference/mappedTypeErrors.errors.txt b/tests/baselines/reference/mappedTypeErrors.errors.txt index b2c59fce02c..3fc28bbea62 100644 --- a/tests/baselines/reference/mappedTypeErrors.errors.txt +++ b/tests/baselines/reference/mappedTypeErrors.errors.txt @@ -30,9 +30,15 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(83,58): error TS2345: A tests/cases/conformance/types/mapped/mappedTypeErrors.ts(105,17): error TS2322: Type 'undefined' is not assignable to type 'string'. tests/cases/conformance/types/mapped/mappedTypeErrors.ts(106,17): error TS2345: Argument of type '{ c: boolean; }' is not assignable to parameter of type 'Pick'. Object literal may only specify known properties, and 'c' does not exist in type 'Pick'. -tests/cases/conformance/types/mapped/mappedTypeErrors.ts(123,14): error TS2322: Type 'undefined' is not assignable to type 'string'. -tests/cases/conformance/types/mapped/mappedTypeErrors.ts(124,14): error TS2345: Argument of type '{ c: boolean; }' is not assignable to parameter of type 'Pick'. - Object literal may only specify known properties, and 'c' does not exist in type 'Pick'. +tests/cases/conformance/types/mapped/mappedTypeErrors.ts(118,1): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'Foo' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'Foo'. +tests/cases/conformance/types/mapped/mappedTypeErrors.ts(119,1): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/mapped/mappedTypeErrors.ts(120,1): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/mapped/mappedTypeErrors.ts(121,1): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/mapped/mappedTypeErrors.ts(122,1): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/mapped/mappedTypeErrors.ts(123,1): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +tests/cases/conformance/types/mapped/mappedTypeErrors.ts(124,1): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. tests/cases/conformance/types/mapped/mappedTypeErrors.ts(128,16): error TS2322: Type 'string' is not assignable to type 'number | undefined'. tests/cases/conformance/types/mapped/mappedTypeErrors.ts(129,25): error TS2322: Type 'string' is not assignable to type 'number | undefined'. tests/cases/conformance/types/mapped/mappedTypeErrors.ts(130,39): error TS2322: Type 'string' is not assignable to type 'number | undefined'. @@ -43,7 +49,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(148,17): error TS2339: tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339: Property 'foo' does not exist on type 'Record'. -==== tests/cases/conformance/types/mapped/mappedTypeErrors.ts (27 errors) ==== +==== tests/cases/conformance/types/mapped/mappedTypeErrors.ts (32 errors) ==== interface Shape { name: string; width: number; @@ -218,18 +224,28 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339: let c = new C(); c.setState({ a: "test", b: 43 }); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'Foo' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Foo'. c.setState({ a: "hi" }); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. c.setState({ b: undefined }); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. c.setState({ }); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. c.setState(foo); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. c.setState({ a: undefined }); // Error - ~ -!!! error TS2322: Type 'undefined' is not assignable to type 'string'. -!!! related TS6500 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:89:5: The expected type comes from property 'a' which is declared here on type 'Pick' + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. c.setState({ c: true }); // Error - ~~~~~~~ -!!! error TS2345: Argument of type '{ c: boolean; }' is not assignable to parameter of type 'Pick'. -!!! error TS2345: Object literal may only specify known properties, and 'c' does not exist in type 'Pick'. + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. type T2 = { a?: number, [key: string]: any }; diff --git a/tests/baselines/reference/mappedTypeErrors.types b/tests/baselines/reference/mappedTypeErrors.types index 3f25f247d2e..31ad1090499 100644 --- a/tests/baselines/reference/mappedTypeErrors.types +++ b/tests/baselines/reference/mappedTypeErrors.types @@ -357,7 +357,7 @@ class C { >this.state[k] = props[k] : Pick[Extract] >this.state[k] : T[Extract] >this.state : T ->this : this +>this : C >state : T >k : Extract >props[k] : Pick[Extract] diff --git a/tests/baselines/reference/matchReturnTypeInAllBranches.types b/tests/baselines/reference/matchReturnTypeInAllBranches.types index 898a27127d9..fd93cfe53d8 100644 --- a/tests/baselines/reference/matchReturnTypeInAllBranches.types +++ b/tests/baselines/reference/matchReturnTypeInAllBranches.types @@ -27,35 +27,35 @@ class IceCreamMonster { this.iceCreamFlavor = iceCreamFlavor; >this.iceCreamFlavor = iceCreamFlavor : string >this.iceCreamFlavor : string ->this : this +>this : IceCreamMonster >iceCreamFlavor : string >iceCreamFlavor : string this.iceCreamRemaining = 100; >this.iceCreamRemaining = 100 : 100 >this.iceCreamRemaining : number ->this : this +>this : IceCreamMonster >iceCreamRemaining : number >100 : 100 this.wantsSprinkles = wantsSprinkles; >this.wantsSprinkles = wantsSprinkles : boolean >this.wantsSprinkles : boolean ->this : this +>this : IceCreamMonster >wantsSprinkles : boolean >wantsSprinkles : boolean this.soundsWhenEating = soundsWhenEating; >this.soundsWhenEating = soundsWhenEating : string >this.soundsWhenEating : string ->this : this +>this : IceCreamMonster >soundsWhenEating : string >soundsWhenEating : string this.name = name; >this.name = name : string >this.name : string ->this : this +>this : IceCreamMonster >name : string >name : string } @@ -72,21 +72,21 @@ class IceCreamMonster { this.iceCreamRemaining -= amount; >this.iceCreamRemaining -= amount : number >this.iceCreamRemaining : number ->this : this +>this : IceCreamMonster >iceCreamRemaining : number >amount : number if (this.iceCreamRemaining <= 0) >this.iceCreamRemaining <= 0 : boolean >this.iceCreamRemaining : number ->this : this +>this : IceCreamMonster >iceCreamRemaining : number >0 : 0 { this.iceCreamRemaining = 0; >this.iceCreamRemaining = 0 : 0 >this.iceCreamRemaining : number ->this : this +>this : IceCreamMonster >iceCreamRemaining : number >0 : 0 diff --git a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt index 97ac52a293d..fbbf541aa2f 100644 --- a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt +++ b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt @@ -1,10 +1,13 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(43,11): error TS2341: Property 'foo' is private and only accessible within class 'C'. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(46,10): error TS2684: The 'this' context of type 'D' is not assignable to method's 'this' of type 'D'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(46,12): error TS2341: Property 'foo' is private and only accessible within class 'D'. tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(48,12): error TS2341: Property 'foo' is private and only accessible within class 'C'. tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(49,12): error TS2341: Property 'bar' is private and only accessible within class 'D'. -==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts (4 errors) ==== +==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts (5 errors) ==== class C { private foo(x: number); private foo(x: number, y: string); @@ -53,6 +56,10 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara var d: D; var r2 = d.foo(2); // error + ~ +!!! error TS2684: The 'this' context of type 'D' is not assignable to method's 'this' of type 'D'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. ~~~ !!! error TS2341: Property 'foo' is private and only accessible within class 'D'. diff --git a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt index 16825f02c22..2bf8feaa0dc 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt +++ b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt @@ -12,10 +12,13 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(49,19): error TS2385: Overload signatures must all be public, private or protected. tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(53,19): error TS2385: Overload signatures must all be public, private or protected. tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(59,11): error TS2341: Property 'foo' is private and only accessible within class 'C'. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(62,10): error TS2684: The 'this' context of type 'D' is not assignable to method's 'this' of type 'D'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(62,12): error TS2341: Property 'foo' is private and only accessible within class 'D'. -==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts (15 errors) ==== +==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts (16 errors) ==== class C { private foo(x: number); public foo(x: number, y: string); // error @@ -106,5 +109,9 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara var d: D; var r2 = d.foo(2); // error + ~ +!!! error TS2684: The 'this' context of type 'D' is not assignable to method's 'this' of type 'D'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. ~~~ !!! error TS2341: Property 'foo' is private and only accessible within class 'D'. \ No newline at end of file diff --git a/tests/baselines/reference/memberVariableDeclarations1.types b/tests/baselines/reference/memberVariableDeclarations1.types index 6d768f97055..88b91567e1b 100644 --- a/tests/baselines/reference/memberVariableDeclarations1.types +++ b/tests/baselines/reference/memberVariableDeclarations1.types @@ -45,21 +45,21 @@ class Employee2 { this.retired = false; >this.retired = false : false >this.retired : boolean ->this : this +>this : Employee2 >retired : boolean >false : false this.manager = null; >this.manager = null : null >this.manager : Employee ->this : this +>this : Employee2 >manager : Employee >null : null this.reports = []; >this.reports = [] : undefined[] >this.reports : Employee[] ->this : this +>this : Employee2 >reports : Employee[] >[] : undefined[] } diff --git a/tests/baselines/reference/mergedDeclarations6.types b/tests/baselines/reference/mergedDeclarations6.types index ac4b47f47e2..57e530a2bf2 100644 --- a/tests/baselines/reference/mergedDeclarations6.types +++ b/tests/baselines/reference/mergedDeclarations6.types @@ -12,7 +12,7 @@ export class A { this.protected = val; >this.protected = val : any >this.protected : any ->this : this +>this : A >protected : any >val : any } diff --git a/tests/baselines/reference/methodChainError.types b/tests/baselines/reference/methodChainError.types index de74e546f65..2478586564d 100644 --- a/tests/baselines/reference/methodChainError.types +++ b/tests/baselines/reference/methodChainError.types @@ -10,7 +10,7 @@ class Builder { >param : string return this; ->this : this +>this : Builder } } diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.types b/tests/baselines/reference/missingPropertiesOfClassExpression.types index 82a130ea25e..d78a33bf3c5 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.types +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.types @@ -4,7 +4,7 @@ class George extends class { reset() { return this.y; } } { >class { reset() { return this.y; } } : (Anonymous class) >reset : () => any >this.y : any ->this : this +>this : (Anonymous class) >y : any constructor() { diff --git a/tests/baselines/reference/missingSelf.types b/tests/baselines/reference/missingSelf.types index ea275e41a0c..5b46bf85db1 100644 --- a/tests/baselines/reference/missingSelf.types +++ b/tests/baselines/reference/missingSelf.types @@ -6,7 +6,7 @@ class CalcButton >a : () => void >this.onClick() : void >this.onClick : () => void ->this : this +>this : CalcButton >onClick : () => void public onClick() { } @@ -21,7 +21,7 @@ class CalcButton2 >() => this.onClick() : () => void >this.onClick() : void >this.onClick : () => void ->this : this +>this : CalcButton2 >onClick : () => void public onClick() { } diff --git a/tests/baselines/reference/mixinClassesAnnotated.errors.txt b/tests/baselines/reference/mixinClassesAnnotated.errors.txt new file mode 100644 index 00000000000..f0460a07268 --- /dev/null +++ b/tests/baselines/reference/mixinClassesAnnotated.errors.txt @@ -0,0 +1,75 @@ +tests/cases/conformance/classes/mixinClassesAnnotated.ts(9,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. +tests/cases/conformance/classes/mixinClassesAnnotated.ts(59,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Derived'. + + +==== tests/cases/conformance/classes/mixinClassesAnnotated.ts (2 errors) ==== + type Constructor = new(...args: any[]) => T; + + class Base { + constructor(public x: number, public y: number) {} + } + + class Derived extends Base { + constructor(x: number, y: number, public z: number) { + super(x, y); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + } + } + + interface Printable { + print(): void; + } + + const Printable = >(superClass: T): Constructor & { message: string } & T => + class extends superClass { + static message = "hello"; + print() { + const output = this.x + "," + this.y; + } + } + + interface Tagged { + _tag: string; + } + + function Tagged>(superClass: T): Constructor & T { + class C extends superClass { + _tag: string; + constructor(...args: any[]) { + super(...args); + this._tag = "hello"; + } + } + return C; + } + + const Thing1 = Tagged(Derived); + const Thing2 = Tagged(Printable(Derived)); + Thing2.message; + + function f1() { + const thing = new Thing1(1, 2, 3); + thing.x; + thing._tag; + } + + function f2() { + const thing = new Thing2(1, 2, 3); + thing.x; + thing._tag; + thing.print(); + } + + class Thing3 extends Thing2 { + constructor(tag: string) { + super(10, 20, 30); + ~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Derived'. + this._tag = tag; + } + test() { + this.print(); + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/mixinClassesAnnotated.types b/tests/baselines/reference/mixinClassesAnnotated.types index 12bb20b0318..b2361375f9a 100644 --- a/tests/baselines/reference/mixinClassesAnnotated.types +++ b/tests/baselines/reference/mixinClassesAnnotated.types @@ -55,11 +55,11 @@ const Printable = >(superClass: T): Constructorthis.x + "," + this.y : string >this.x + "," : string >this.x : number ->this : this +>this : (Anonymous class) >x : number >"," : "," >this.y : number ->this : this +>this : (Anonymous class) >y : number } } @@ -92,7 +92,7 @@ function Tagged>(superClass: T): Constructor & this._tag = "hello"; >this._tag = "hello" : "hello" >this._tag : string ->this : this +>this : C >_tag : string >"hello" : "hello" } @@ -187,7 +187,7 @@ class Thing3 extends Thing2 { this._tag = tag; >this._tag = tag : string >this._tag : string ->this : this +>this : Thing3 >_tag : string >tag : string } @@ -197,7 +197,7 @@ class Thing3 extends Thing2 { this.print(); >this.print() : void >this.print : () => void ->this : this +>this : Thing3 >print : () => void } } diff --git a/tests/baselines/reference/mixinClassesAnonymous.errors.txt b/tests/baselines/reference/mixinClassesAnonymous.errors.txt new file mode 100644 index 00000000000..a536523a666 --- /dev/null +++ b/tests/baselines/reference/mixinClassesAnonymous.errors.txt @@ -0,0 +1,74 @@ +tests/cases/conformance/classes/mixinClassesAnonymous.ts(9,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. +tests/cases/conformance/classes/mixinClassesAnonymous.ts(50,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Derived'. + + +==== tests/cases/conformance/classes/mixinClassesAnonymous.ts (2 errors) ==== + type Constructor = new(...args: any[]) => T; + + class Base { + constructor(public x: number, public y: number) {} + } + + class Derived extends Base { + constructor(x: number, y: number, public z: number) { + super(x, y); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + } + } + + const Printable = >(superClass: T) => class extends superClass { + static message = "hello"; + print() { + const output = this.x + "," + this.y; + } + } + + function Tagged>(superClass: T) { + class C extends superClass { + _tag: string; + constructor(...args: any[]) { + super(...args); + this._tag = "hello"; + } + } + return C; + } + + const Thing1 = Tagged(Derived); + const Thing2 = Tagged(Printable(Derived)); + Thing2.message; + + function f1() { + const thing = new Thing1(1, 2, 3); + thing.x; + thing._tag; + } + + function f2() { + const thing = new Thing2(1, 2, 3); + thing.x; + thing._tag; + thing.print(); + } + + class Thing3 extends Thing2 { + constructor(tag: string) { + super(10, 20, 30); + ~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Derived'. + this._tag = tag; + } + test() { + this.print(); + } + } + + // Repro from #13805 + + const Timestamped = >(Base: CT) => { + return class extends Base { + timestamp = new Date(); + }; + } + \ No newline at end of file diff --git a/tests/baselines/reference/mixinClassesAnonymous.types b/tests/baselines/reference/mixinClassesAnonymous.types index 2861f92e0b4..8d68282d4cd 100644 --- a/tests/baselines/reference/mixinClassesAnonymous.types +++ b/tests/baselines/reference/mixinClassesAnonymous.types @@ -47,11 +47,11 @@ const Printable = >(superClass: T) => class extends >this.x + "," + this.y : string >this.x + "," : string >this.x : number ->this : this +>this : (Anonymous class) >x : number >"," : "," >this.y : number ->this : this +>this : (Anonymous class) >y : number } } @@ -79,7 +79,7 @@ function Tagged>(superClass: T) { this._tag = "hello"; >this._tag = "hello" : "hello" >this._tag : string ->this : this +>this : C >_tag : string >"hello" : "hello" } @@ -174,7 +174,7 @@ class Thing3 extends Thing2 { this._tag = tag; >this._tag = tag : string >this._tag : string ->this : this +>this : Thing3 >_tag : string >tag : string } @@ -184,7 +184,7 @@ class Thing3 extends Thing2 { this.print(); >this.print() : void >this.print : () => void ->this : this +>this : Thing3 >print : () => void } } diff --git a/tests/baselines/reference/mixinClassesMembers.errors.txt b/tests/baselines/reference/mixinClassesMembers.errors.txt new file mode 100644 index 00000000000..6e5b70ba5af --- /dev/null +++ b/tests/baselines/reference/mixinClassesMembers.errors.txt @@ -0,0 +1,123 @@ +tests/cases/conformance/classes/mixinClassesMembers.ts(81,9): error TS2769: No overload matches this call. + Overload 1 of 2, '(s: string): M1 & C1', gave the following error. + The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. + Overload 2 of 2, '(n: number): M1 & C1', gave the following error. + The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. +tests/cases/conformance/classes/mixinClassesMembers.ts(90,9): error TS2769: No overload matches this call. + Overload 1 of 2, '(s: string): M2 & M1 & C1', gave the following error. + The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. + Overload 2 of 2, '(n: number): M2 & M1 & C1', gave the following error. + The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. + + +==== tests/cases/conformance/classes/mixinClassesMembers.ts (2 errors) ==== + declare class C1 { + public a: number; + protected b: number; + private c: number; + constructor(s: string); + constructor(n: number); + } + + declare class M1 { + constructor(...args: any[]); + p: number; + static p: number; + } + + declare class M2 { + constructor(...args: any[]); + f(): number; + static f(): number; + } + + declare const Mixed1: typeof M1 & typeof C1; + declare const Mixed2: typeof C1 & typeof M1; + declare const Mixed3: typeof M2 & typeof M1 & typeof C1; + declare const Mixed4: typeof C1 & typeof M1 & typeof M2; + declare const Mixed5: typeof M1 & typeof M2; + + function f1() { + let x1 = new Mixed1("hello"); + let x2 = new Mixed1(42); + let x3 = new Mixed2("hello"); + let x4 = new Mixed2(42); + let x5 = new Mixed3("hello"); + let x6 = new Mixed3(42); + let x7 = new Mixed4("hello"); + let x8 = new Mixed4(42); + let x9 = new Mixed5(); + } + + function f2() { + let x = new Mixed1("hello"); + x.a; + x.p; + Mixed1.p; + } + + function f3() { + let x = new Mixed2("hello"); + x.a; + x.p; + Mixed2.p; + } + + function f4() { + let x = new Mixed3("hello"); + x.a; + x.p; + x.f(); + Mixed3.p; + Mixed3.f(); + } + + function f5() { + let x = new Mixed4("hello"); + x.a; + x.p; + x.f(); + Mixed4.p; + Mixed4.f(); + } + + function f6() { + let x = new Mixed5(); + x.p; + x.f(); + Mixed5.p; + Mixed5.f(); + } + + class C2 extends Mixed1 { + constructor() { + super("hello"); + ~~~~~~~~~~~~~~ +!!! error TS2769: No overload matches this call. +!!! error TS2769: Overload 1 of 2, '(s: string): M1 & C1', gave the following error. +!!! error TS2769: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. +!!! error TS2769: Overload 2 of 2, '(n: number): M1 & C1', gave the following error. +!!! error TS2769: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. + this.a; + this.b; + this.p; + } + } + + class C3 extends Mixed3 { + constructor() { + super(42); + ~~~~~~~~~ +!!! error TS2769: No overload matches this call. +!!! error TS2769: Overload 1 of 2, '(s: string): M2 & M1 & C1', gave the following error. +!!! error TS2769: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. +!!! error TS2769: Overload 2 of 2, '(n: number): M2 & M1 & C1', gave the following error. +!!! error TS2769: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. + this.a; + this.b; + this.p; + this.f(); + } + f() { return super.f(); } + } + \ No newline at end of file diff --git a/tests/baselines/reference/mixinClassesMembers.types b/tests/baselines/reference/mixinClassesMembers.types index d53d50d34cb..cfc14fe717b 100644 --- a/tests/baselines/reference/mixinClassesMembers.types +++ b/tests/baselines/reference/mixinClassesMembers.types @@ -295,17 +295,17 @@ class C2 extends Mixed1 { this.a; >this.a : number ->this : this +>this : C2 >a : number this.b; >this.b : number ->this : this +>this : C2 >b : number this.p; >this.p : number ->this : this +>this : C2 >p : number } } @@ -322,23 +322,23 @@ class C3 extends Mixed3 { this.a; >this.a : number ->this : this +>this : C3 >a : number this.b; >this.b : number ->this : this +>this : C3 >b : number this.p; >this.p : number ->this : this +>this : C3 >p : number this.f(); >this.f() : number >this.f : () => number ->this : this +>this : C3 >f : () => number } f() { return super.f(); } diff --git a/tests/baselines/reference/mixingApparentTypeOverrides.types b/tests/baselines/reference/mixingApparentTypeOverrides.types index 0fab15ea2a3..e81f712b5c8 100644 --- a/tests/baselines/reference/mixingApparentTypeOverrides.types +++ b/tests/baselines/reference/mixingApparentTypeOverrides.types @@ -26,7 +26,7 @@ function Tagged>(Base: T) { this._tag = ""; >this._tag = "" : "" >this._tag : string ->this : this +>this : (Anonymous class) >_tag : string >"" : "" } diff --git a/tests/baselines/reference/moduleExportAssignment6.types b/tests/baselines/reference/moduleExportAssignment6.types index ee4122873c0..e7c76523770 100644 --- a/tests/baselines/reference/moduleExportAssignment6.types +++ b/tests/baselines/reference/moduleExportAssignment6.types @@ -9,14 +9,14 @@ class C { this.x = x >this.x = x : number >this.x : any ->this : this +>this : C >x : any >x : number this.exports = [x] >this.exports = [x] : number[] >this.exports : any ->this : this +>this : C >exports : any >[x] : number[] >x : number @@ -29,7 +29,7 @@ class C { return this.x + y >this.x + y : number >this.x : number ->this : this +>this : C >x : number >y : number } diff --git a/tests/baselines/reference/moduleExportNestedNamespaces.types b/tests/baselines/reference/moduleExportNestedNamespaces.types index 7e402963154..88468ca005c 100644 --- a/tests/baselines/reference/moduleExportNestedNamespaces.types +++ b/tests/baselines/reference/moduleExportNestedNamespaces.types @@ -40,7 +40,7 @@ module.exports.Classic = class { this.p = 1 >this.p = 1 : 1 >this.p : any ->this : this +>this : Classic >p : any >1 : 1 } diff --git a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.types b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.types index 8410b777f2a..c5713e045d4 100644 --- a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.types +++ b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.types @@ -63,7 +63,7 @@ module TypeScript { >positionedToken : any >this.findTokenInternal(null, position, 0) : any >this.findTokenInternal : (x: any, y: any, z: any) => any ->this : this +>this : SyntaxNode >findTokenInternal : (x: any, y: any, z: any) => any >null : null >position : number @@ -104,7 +104,7 @@ module TypeScript.Syntax { >new PositionedToken(parent, this, fullStart) : PositionedToken >PositionedToken : typeof PositionedToken >parent : PositionedElement ->this : this +>this : VariableWidthTokenWithTrailingTrivia >fullStart : number } } diff --git a/tests/baselines/reference/moduleMergeConstructor.types b/tests/baselines/reference/moduleMergeConstructor.types index 5fb23e7fb9a..99f66398d03 100644 --- a/tests/baselines/reference/moduleMergeConstructor.types +++ b/tests/baselines/reference/moduleMergeConstructor.types @@ -36,7 +36,7 @@ class Test { this.bar = new foo.Foo(); >this.bar = new foo.Foo() : foo.Foo >this.bar : foo.Foo ->this : this +>this : Test >bar : foo.Foo >new foo.Foo() : foo.Foo >foo.Foo : typeof foo.Foo diff --git a/tests/baselines/reference/multipleDeclarations.types b/tests/baselines/reference/multipleDeclarations.types index 12aa74ecaf0..d74dde02a6f 100644 --- a/tests/baselines/reference/multipleDeclarations.types +++ b/tests/baselines/reference/multipleDeclarations.types @@ -31,20 +31,20 @@ class X { this.m = this.m.bind(this); >this.m = this.m.bind(this) : any >this.m : () => void ->this : this +>this : X >m : () => void >this.m.bind(this) : any >this.m.bind : (this: Function, thisArg: any, ...argArray: any[]) => any >this.m : () => void ->this : this +>this : X >m : () => void >bind : (this: Function, thisArg: any, ...argArray: any[]) => any ->this : this +>this : X this.mistake = 'frankly, complete nonsense'; >this.mistake = 'frankly, complete nonsense' : "frankly, complete nonsense" >this.mistake : () => void ->this : this +>this : X >mistake : () => void >'frankly, complete nonsense' : "frankly, complete nonsense" } @@ -93,20 +93,20 @@ class Y { this.m = this.m.bind(this); >this.m = this.m.bind(this) : any >this.m : () => void ->this : this +>this : Y >m : () => void >this.m.bind(this) : any >this.m.bind : (this: Function, thisArg: any, ...argArray: any[]) => any >this.m : () => void ->this : this +>this : Y >m : () => void >bind : (this: Function, thisArg: any, ...argArray: any[]) => any ->this : this +>this : Y this.mistake = 'even more nonsense'; >this.mistake = 'even more nonsense' : "even more nonsense" >this.mistake : () => void ->this : this +>this : Y >mistake : () => void >'even more nonsense' : "even more nonsense" } diff --git a/tests/baselines/reference/mutuallyRecursiveInference.types b/tests/baselines/reference/mutuallyRecursiveInference.types index 2432e0053a2..4a60149c80c 100644 --- a/tests/baselines/reference/mutuallyRecursiveInference.types +++ b/tests/baselines/reference/mutuallyRecursiveInference.types @@ -17,7 +17,7 @@ class L extends T { m() { this.a } >m : () => void >this.a : RT[RT["a"]] ->this : this +>this : L >a : RT[RT["a"]] } class X extends L { @@ -35,7 +35,7 @@ class X extends L { this.a >this.a : "a" | "b" ->this : this +>this : X >a : "a" | "b" } } diff --git a/tests/baselines/reference/narrowingOfDottedNames.types b/tests/baselines/reference/narrowingOfDottedNames.types index 644aea6ba14..ce08639809f 100644 --- a/tests/baselines/reference/narrowingOfDottedNames.types +++ b/tests/baselines/reference/narrowingOfDottedNames.types @@ -116,7 +116,7 @@ class Foo1 constructor() { if (this instanceof Boolean) { >this instanceof Boolean : boolean ->this : this +>this : Foo1 >Boolean : BooleanConstructor } } diff --git a/tests/baselines/reference/nestedLoops.types b/tests/baselines/reference/nestedLoops.types index c39e52e6fce..2aef77486c3 100644 --- a/tests/baselines/reference/nestedLoops.types +++ b/tests/baselines/reference/nestedLoops.types @@ -29,7 +29,7 @@ export class Test { this.aFunction((newValue, oldValue) => { >this.aFunction((newValue, oldValue) => { let x = outer + inner + newValue; }) : void >this.aFunction : (func: (newValue: any, oldValue: any) => void) => void ->this : this +>this : Test >aFunction : (func: (newValue: any, oldValue: any) => void) => void >(newValue, oldValue) => { let x = outer + inner + newValue; } : (newValue: any, oldValue: any) => void >newValue : any diff --git a/tests/baselines/reference/nestedSelf.types b/tests/baselines/reference/nestedSelf.types index 9fb4b0bd65d..145f4be46c3 100644 --- a/tests/baselines/reference/nestedSelf.types +++ b/tests/baselines/reference/nestedSelf.types @@ -22,7 +22,7 @@ module M { >x : number >this.n * x : number >this.n : number ->this : this +>this : C >n : number >x : number } diff --git a/tests/baselines/reference/neverReturningFunctions1.types b/tests/baselines/reference/neverReturningFunctions1.types index c832fa660dd..2164383d666 100644 --- a/tests/baselines/reference/neverReturningFunctions1.types +++ b/tests/baselines/reference/neverReturningFunctions1.types @@ -226,7 +226,7 @@ class Test { >undefined : undefined >this.fail("undefined argument") : never >this.fail : (message?: string | undefined) => never ->this : this +>this : Test >fail : (message?: string | undefined) => never >"undefined argument" : "undefined argument" @@ -248,7 +248,7 @@ class Test { this.fail("negative number"); >this.fail("negative number") : never >this.fail : (message?: string | undefined) => never ->this : this +>this : Test >fail : (message?: string | undefined) => never >"negative number" : "negative number" @@ -265,7 +265,7 @@ class Test { this.fail(); >this.fail() : never >this.fail : (message?: string | undefined) => never ->this : this +>this : Test >fail : (message?: string | undefined) => never x; // Unreachable @@ -701,7 +701,7 @@ class SuperThrowable extends MyThrowable { this.throw() >this.throw() : never >this.throw : () => never ->this : this +>this : SuperThrowable >throw : () => never } } diff --git a/tests/baselines/reference/newArrays.types b/tests/baselines/reference/newArrays.types index 5c26b926d41..5db75a0254b 100644 --- a/tests/baselines/reference/newArrays.types +++ b/tests/baselines/reference/newArrays.types @@ -25,16 +25,16 @@ module M { this.fa = new Array(this.x * this.y); >this.fa = new Array(this.x * this.y) : Foo[] >this.fa : Foo[] ->this : this +>this : Gar >fa : Foo[] >new Array(this.x * this.y) : Foo[] >Array : ArrayConstructor >this.x * this.y : number >this.x : number ->this : this +>this : Gar >x : number >this.y : number ->this : this +>this : Gar >y : number } } diff --git a/tests/baselines/reference/newTarget.es5.errors.txt b/tests/baselines/reference/newTarget.es5.errors.txt new file mode 100644 index 00000000000..a8f3c3f8004 --- /dev/null +++ b/tests/baselines/reference/newTarget.es5.errors.txt @@ -0,0 +1,38 @@ +tests/cases/conformance/es6/newTarget/newTarget.es5.ts(12,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/conformance/es6/newTarget/newTarget.es5.ts (1 errors) ==== + class A { + constructor() { + const a = new.target; + const b = () => new.target; + } + static c = function () { return new.target; } + d = function () { return new.target; } + } + + class B extends A { + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + const e = new.target; + const f = () => new.target; + } + } + + function f1() { + const g = new.target; + const h = () => new.target; + } + + const f2 = function () { + const i = new.target; + const j = () => new.target; + } + + const O = { + k: function () { return new.target; } + }; + + \ No newline at end of file diff --git a/tests/baselines/reference/newTarget.es6.errors.txt b/tests/baselines/reference/newTarget.es6.errors.txt new file mode 100644 index 00000000000..e34aa24fc82 --- /dev/null +++ b/tests/baselines/reference/newTarget.es6.errors.txt @@ -0,0 +1,38 @@ +tests/cases/conformance/es6/newTarget/newTarget.es6.ts(12,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/conformance/es6/newTarget/newTarget.es6.ts (1 errors) ==== + class A { + constructor() { + const a = new.target; + const b = () => new.target; + } + static c = function () { return new.target; } + d = function () { return new.target; } + } + + class B extends A { + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + const e = new.target; + const f = () => new.target; + } + } + + function f1() { + const g = new.target; + const h = () => new.target; + } + + const f2 = function () { + const i = new.target; + const j = () => new.target; + } + + const O = { + k: function () { return new.target; } + }; + + \ No newline at end of file diff --git a/tests/baselines/reference/noAsConstNameLookup.types b/tests/baselines/reference/noAsConstNameLookup.types index 42a06c8530f..3fbfb1e5dc8 100644 --- a/tests/baselines/reference/noAsConstNameLookup.types +++ b/tests/baselines/reference/noAsConstNameLookup.types @@ -48,14 +48,14 @@ export class FeatureRunner { >this.cleaners.forEach(c => c(this)) : void >this.cleaners.forEach : (callbackfn: (value: Cleaner, index: number, array: Cleaner[]) => void, thisArg?: any) => void >this.cleaners : Cleaner[] ->this : this +>this : FeatureRunner >cleaners : Cleaner[] >forEach : (callbackfn: (value: Cleaner, index: number, array: Cleaner[]) => void, thisArg?: any) => void >c => c(this) : (c: Cleaner) => Promise >c : Cleaner >c(this) : Promise >c : Cleaner ->this : this +>this : FeatureRunner return result >result : {} diff --git a/tests/baselines/reference/noCrashOnThisTypeUsage.types b/tests/baselines/reference/noCrashOnThisTypeUsage.types index d0d3048cabf..bf3c5a23a65 100644 --- a/tests/baselines/reference/noCrashOnThisTypeUsage.types +++ b/tests/baselines/reference/noCrashOnThisTypeUsage.types @@ -37,16 +37,16 @@ export class ObservableValue { notifyListeners(this, { >notifyListeners(this, { type: "update", object: this, newValue, oldValue }) : void >notifyListeners : (listenable: IListenable, change: T) => void ->this : this ->{ type: "update", object: this, newValue, oldValue } : { type: string; object: this; newValue: T; oldValue: any; } +>this : ObservableValue +>{ type: "update", object: this, newValue, oldValue } : { type: string; object: ObservableValue; newValue: T; oldValue: any; } type: "update", >type : string >"update" : "update" object: this, ->object : this ->this : this +>object : ObservableValue +>this : ObservableValue newValue, >newValue : T diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.types b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.types index c00ab484ca3..9ee11644718 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.types +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.types @@ -21,7 +21,7 @@ class Child extends Parent { this._x = str; >this._x = str : any >this._x : any ->this : this +>this : Child >_x : any >str : any } diff --git a/tests/baselines/reference/noUnusedLocals_destructuringAssignment.errors.txt b/tests/baselines/reference/noUnusedLocals_destructuringAssignment.errors.txt deleted file mode 100644 index 634a36ad030..00000000000 --- a/tests/baselines/reference/noUnusedLocals_destructuringAssignment.errors.txt +++ /dev/null @@ -1,22 +0,0 @@ -tests/cases/compiler/noUnusedLocals_destructuringAssignment.ts(10,13): error TS6133: 'f' is declared but its value is never read. - - -==== tests/cases/compiler/noUnusedLocals_destructuringAssignment.ts (1 errors) ==== - class C { - private x = 0; - - m(): number { - let x: number; - ({ x } = this); - return x; - } - - private f(): Function { - ~ -!!! error TS6133: 'f' is declared but its value is never read. - let f: Function; - ({ f } = this); - return f; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/noUnusedLocals_destructuringAssignment.types b/tests/baselines/reference/noUnusedLocals_destructuringAssignment.types index 7c5d54c8169..93b539f5f42 100644 --- a/tests/baselines/reference/noUnusedLocals_destructuringAssignment.types +++ b/tests/baselines/reference/noUnusedLocals_destructuringAssignment.types @@ -13,11 +13,11 @@ class C { >x : number ({ x } = this); ->({ x } = this) : this ->{ x } = this : this +>({ x } = this) : C +>{ x } = this : C >{ x } : { x: number; } >x : number ->this : this +>this : C return x; >x : number @@ -30,11 +30,11 @@ class C { >f : Function ({ f } = this); ->({ f } = this) : this ->{ f } = this : this +>({ f } = this) : C +>{ f } = this : C >{ f } : { f: Function; } >f : Function ->this : this +>this : C return f; >f : Function diff --git a/tests/baselines/reference/noUnusedLocals_selfReference.errors.txt b/tests/baselines/reference/noUnusedLocals_selfReference.errors.txt index edb5049bbbf..c60696e637b 100644 --- a/tests/baselines/reference/noUnusedLocals_selfReference.errors.txt +++ b/tests/baselines/reference/noUnusedLocals_selfReference.errors.txt @@ -5,10 +5,9 @@ tests/cases/compiler/noUnusedLocals_selfReference.ts(12,6): error TS6196: 'E' is tests/cases/compiler/noUnusedLocals_selfReference.ts(13,11): error TS6196: 'I' is declared but never used. tests/cases/compiler/noUnusedLocals_selfReference.ts(14,6): error TS6196: 'T' is declared but never used. tests/cases/compiler/noUnusedLocals_selfReference.ts(15,11): error TS6133: 'N' is declared but its value is never read. -tests/cases/compiler/noUnusedLocals_selfReference.ts(22,19): error TS6133: 'm' is declared but its value is never read. -==== tests/cases/compiler/noUnusedLocals_selfReference.ts (8 errors) ==== +==== tests/cases/compiler/noUnusedLocals_selfReference.ts (7 errors) ==== export {}; // Make this a module scope, so these are local variables. function f() { @@ -45,8 +44,6 @@ tests/cases/compiler/noUnusedLocals_selfReference.ts(22,19): error TS6133: 'm' i export interface A { T: T } class P { private m() { this.m; } } - ~ -!!! error TS6133: 'm' is declared but its value is never read. P; // Does not detect mutual recursion. diff --git a/tests/baselines/reference/noUnusedLocals_selfReference.types b/tests/baselines/reference/noUnusedLocals_selfReference.types index 6ef7930b4f0..0b3c0d2b8a3 100644 --- a/tests/baselines/reference/noUnusedLocals_selfReference.types +++ b/tests/baselines/reference/noUnusedLocals_selfReference.types @@ -51,7 +51,7 @@ class P { private m() { this.m; } } >P : P >m : () => void >this.m : () => void ->this : this +>this : P >m : () => void P; diff --git a/tests/baselines/reference/noUnusedLocals_writeOnlyProperty.types b/tests/baselines/reference/noUnusedLocals_writeOnlyProperty.types index e76318861a6..9e34854bde7 100644 --- a/tests/baselines/reference/noUnusedLocals_writeOnlyProperty.types +++ b/tests/baselines/reference/noUnusedLocals_writeOnlyProperty.types @@ -11,7 +11,7 @@ class C { this.x = 0; >this.x = 0 : 0 >this.x : any ->this : this +>this : C >x : any >0 : 0 } diff --git a/tests/baselines/reference/noUnusedLocals_writeOnlyProperty_dynamicNames.types b/tests/baselines/reference/noUnusedLocals_writeOnlyProperty_dynamicNames.types index cc3bcd8a80d..6097834005d 100644 --- a/tests/baselines/reference/noUnusedLocals_writeOnlyProperty_dynamicNames.types +++ b/tests/baselines/reference/noUnusedLocals_writeOnlyProperty_dynamicNames.types @@ -28,13 +28,13 @@ class C { this[x] = 0; // write-only >this[x] = 0 : 0 >this[x] : number ->this : this +>this : C >x : unique symbol >0 : 0 this[y]; >this[y] : number ->this : this +>this : C >y : unique symbol } } diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt b/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt index fecbee27b58..5533996ec36 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt @@ -1,10 +1,16 @@ +tests/cases/compiler/objectCreationOfElementAccessExpression.ts(19,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Food'. +tests/cases/compiler/objectCreationOfElementAccessExpression.ts(25,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'MonsterFood'. +tests/cases/compiler/objectCreationOfElementAccessExpression.ts(30,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'MonsterFood'. +tests/cases/compiler/objectCreationOfElementAccessExpression.ts(35,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Food'. +tests/cases/compiler/objectCreationOfElementAccessExpression.ts(40,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'PetFood'. +tests/cases/compiler/objectCreationOfElementAccessExpression.ts(45,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'PetFood'. tests/cases/compiler/objectCreationOfElementAccessExpression.ts(53,25): error TS2538: Type 'Cookie' cannot be used as an index type. tests/cases/compiler/objectCreationOfElementAccessExpression.ts(53,63): error TS2348: Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? tests/cases/compiler/objectCreationOfElementAccessExpression.ts(54,41): error TS2538: Type 'Cookie' cannot be used as an index type. tests/cases/compiler/objectCreationOfElementAccessExpression.ts(54,79): error TS2348: Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? -==== tests/cases/compiler/objectCreationOfElementAccessExpression.ts (4 errors) ==== +==== tests/cases/compiler/objectCreationOfElementAccessExpression.ts (10 errors) ==== class Food { private amount: number; constructor(public name: string) { @@ -24,32 +30,44 @@ tests/cases/compiler/objectCreationOfElementAccessExpression.ts(54,79): error TS class MonsterFood extends Food { constructor(name: string, public flavor: string) { super(name); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Food'. } } class IceCream extends MonsterFood { private isDairyFree: boolean; constructor(public flavor: string) { super("Ice Cream", flavor); + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'MonsterFood'. } } class Cookie extends MonsterFood { constructor(public flavor: string, public isGlutenFree: boolean) { super("Cookie", flavor); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'MonsterFood'. } } class PetFood extends Food { constructor(name: string, public whereToBuy: number) { super(name); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Food'. } } class ExpensiveOrganicDogFood extends PetFood { constructor(public whereToBuy: number) { super("Origen", whereToBuy); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'PetFood'. } } class ExpensiveOrganicCatFood extends PetFood { constructor(public whereToBuy: number, public containsFish: boolean) { super("Nature's Logic", whereToBuy); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'PetFood'. } } class Slug { diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.types b/tests/baselines/reference/objectCreationOfElementAccessExpression.types index 86daab3f926..d1a7bb9865f 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.types +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.types @@ -11,7 +11,7 @@ class Food { this.amount = 100; >this.amount = 100 : 100 >this.amount : number ->this : this +>this : Food >amount : number >100 : 100 } @@ -22,21 +22,21 @@ class Food { this.amount -= amountToEat; >this.amount -= amountToEat : number >this.amount : number ->this : this +>this : Food >amount : number >amountToEat : number if (this.amount <= 0) { >this.amount <= 0 : boolean >this.amount : number ->this : this +>this : Food >amount : number >0 : 0 this.amount = 0; >this.amount = 0 : 0 >this.amount : number ->this : this +>this : Food >amount : number >0 : 0 diff --git a/tests/baselines/reference/objectIndexer.types b/tests/baselines/reference/objectIndexer.types index 321551b69a2..41132570a31 100644 --- a/tests/baselines/reference/objectIndexer.types +++ b/tests/baselines/reference/objectIndexer.types @@ -19,7 +19,7 @@ class Emitter { this.listeners = {}; >this.listeners = {} : {} >this.listeners : IMap ->this : this +>this : Emitter >listeners : IMap >{} : {} } diff --git a/tests/baselines/reference/optionalParamArgsTest.errors.txt b/tests/baselines/reference/optionalParamArgsTest.errors.txt index 1617e5c125f..1d57684d4ce 100644 --- a/tests/baselines/reference/optionalParamArgsTest.errors.txt +++ b/tests/baselines/reference/optionalParamArgsTest.errors.txt @@ -1,5 +1,6 @@ tests/cases/compiler/optionalParamArgsTest.ts(31,12): error TS2393: Duplicate function implementation. tests/cases/compiler/optionalParamArgsTest.ts(34,12): error TS2393: Duplicate function implementation. +tests/cases/compiler/optionalParamArgsTest.ts(39,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. tests/cases/compiler/optionalParamArgsTest.ts(98,11): error TS2554: Expected 0 arguments, but got 1. tests/cases/compiler/optionalParamArgsTest.ts(99,11): error TS2554: Expected 0 arguments, but got 1. tests/cases/compiler/optionalParamArgsTest.ts(100,4): error TS2554: Expected 0 arguments, but got 1. @@ -22,7 +23,7 @@ tests/cases/compiler/optionalParamArgsTest.ts(116,1): error TS2554: Expected 1-2 tests/cases/compiler/optionalParamArgsTest.ts(117,1): error TS2554: Expected 1-2 arguments, but got 0. -==== tests/cases/compiler/optionalParamArgsTest.ts (22 errors) ==== +==== tests/cases/compiler/optionalParamArgsTest.ts (23 errors) ==== // Optional parameter and default argument tests // Key: @@ -66,6 +67,8 @@ tests/cases/compiler/optionalParamArgsTest.ts(117,1): error TS2554: Expected 1-2 class C2 extends C1 { constructor(v2: number = 6) { super(v2); + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C1'. } } diff --git a/tests/baselines/reference/override6.errors.txt b/tests/baselines/reference/override6.errors.txt index 4a1fb1a0db1..7f9cd0e4d03 100644 --- a/tests/baselines/reference/override6.errors.txt +++ b/tests/baselines/reference/override6.errors.txt @@ -1,9 +1,10 @@ tests/cases/conformance/override/override6.ts(9,12): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'B'. tests/cases/conformance/override/override6.ts(10,17): error TS4115: This parameter property must have an 'override' modifier because it overrides a member in base class 'B'. tests/cases/conformance/override/override6.ts(10,37): error TS4115: This parameter property must have an 'override' modifier because it overrides a member in base class 'B'. +tests/cases/conformance/override/override6.ts(11,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. -==== tests/cases/conformance/override/override6.ts (3 errors) ==== +==== tests/cases/conformance/override/override6.ts (4 errors) ==== class B { public baz: number = 1; constructor(public foo: string, public bar: number) { @@ -21,6 +22,8 @@ tests/cases/conformance/override/override6.ts(10,37): error TS4115: This paramet ~~~~~~~~~~~~~~~~~~ !!! error TS4115: This parameter property must have an 'override' modifier because it overrides a member in base class 'B'. super(foo, 42) + ~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. } } \ No newline at end of file diff --git a/tests/baselines/reference/override8.errors.txt b/tests/baselines/reference/override8.errors.txt index 629cad4be6a..313ab24545e 100644 --- a/tests/baselines/reference/override8.errors.txt +++ b/tests/baselines/reference/override8.errors.txt @@ -1,9 +1,11 @@ tests/cases/conformance/override/override8.ts(6,17): error TS4115: This parameter property must have an 'override' modifier because it overrides a member in base class 'B'. tests/cases/conformance/override/override8.ts(18,17): error TS4115: This parameter property must have an 'override' modifier because it overrides a member in base class 'BB'. +tests/cases/conformance/override/override8.ts(19,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BB'. tests/cases/conformance/override/override8.ts(24,12): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'BB'. +tests/cases/conformance/override/override8.ts(27,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BB'. -==== tests/cases/conformance/override/override8.ts (3 errors) ==== +==== tests/cases/conformance/override/override8.ts (5 errors) ==== class B { a: string } @@ -27,6 +29,8 @@ tests/cases/conformance/override/override8.ts(24,12): error TS4114: This member ~~~~~~~~~~~~~~~~ !!! error TS4115: This parameter property must have an 'override' modifier because it overrides a member in base class 'BB'. super(a) + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BB'. } } @@ -37,6 +41,8 @@ tests/cases/conformance/override/override8.ts(24,12): error TS4114: This member constructor(a: string) { super(a) + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BB'. this.a = a } } \ No newline at end of file diff --git a/tests/baselines/reference/override8.types b/tests/baselines/reference/override8.types index 564ab8fbd76..7fbc477ee1c 100644 --- a/tests/baselines/reference/override8.types +++ b/tests/baselines/reference/override8.types @@ -61,7 +61,7 @@ class DDD extends BB { this.a = a >this.a = a : string >this.a : string ->this : this +>this : DDD >a : string >a : string } diff --git a/tests/baselines/reference/overrideBaseIntersectionMethod.types b/tests/baselines/reference/overrideBaseIntersectionMethod.types index 3ca80a06a1a..a3598d1a8b0 100644 --- a/tests/baselines/reference/overrideBaseIntersectionMethod.types +++ b/tests/baselines/reference/overrideBaseIntersectionMethod.types @@ -27,12 +27,12 @@ const WithLocation = >(Base: T) => class extends Ba >[this.x | x, this.y | y] : [number, number] >this.x | x : number >this.x : number ->this : this +>this : (Anonymous class) >x : number >x : number >this.y | y : number >this.y : number ->this : this +>this : (Anonymous class) >y : number >y : number } @@ -67,10 +67,10 @@ class Foo extends WithLocation(Point) { return this.x + this.y; >this.x + this.y : number >this.x : number ->this : this +>this : Foo >x : number >this.y : number ->this : this +>this : Foo >y : number } getLocation() { @@ -88,7 +88,7 @@ class Foo extends WithLocation(Point) { return this.getLocation(); >this.getLocation() : [number, number] >this.getLocation : () => [number, number] ->this : this +>this : Foo >getLocation : () => [number, number] } } diff --git a/tests/baselines/reference/overrideParameterProperty.types b/tests/baselines/reference/overrideParameterProperty.types index 8ff0f11cc80..60d86138a0f 100644 --- a/tests/baselines/reference/overrideParameterProperty.types +++ b/tests/baselines/reference/overrideParameterProperty.types @@ -19,7 +19,7 @@ class C1 extends Base { this.p1; >this.p1 : "hello" ->this : this +>this : C1 >p1 : "hello" } } @@ -37,7 +37,7 @@ class C2 extends Base { this.p1; >this.p1 : "hello" ->this : this +>this : C2 >p1 : "hello" } } @@ -55,7 +55,7 @@ class C3 extends Base { this.p1; >this.p1 : "hello" ->this : this +>this : C3 >p1 : "hello" } diff --git a/tests/baselines/reference/parser509667.types b/tests/baselines/reference/parser509667.types index fd13ed40244..01595db111d 100644 --- a/tests/baselines/reference/parser509667.types +++ b/tests/baselines/reference/parser509667.types @@ -7,7 +7,7 @@ class Foo { if (this. >this. : any ->this : this +>this : Foo } > : any > : any diff --git a/tests/baselines/reference/parserAstSpans1.errors.txt b/tests/baselines/reference/parserAstSpans1.errors.txt index 648929e974e..c592850da9f 100644 --- a/tests/baselines/reference/parserAstSpans1.errors.txt +++ b/tests/baselines/reference/parserAstSpans1.errors.txt @@ -2,13 +2,14 @@ tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(79,16): error TS10 tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(85,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(94,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(100,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(110,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'c2'. tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(111,25): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(119,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(125,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(217,24): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -==== tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts (8 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts (9 errors) ==== /** i1 is interface with properties*/ interface i1 { /** i1_p1*/ @@ -127,6 +128,8 @@ tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(217,24): error TS2 class c3 extends c2 { constructor() { super(10); + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'c2'. this.p1 = super.c2_p1; ~~~~~ !!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. diff --git a/tests/baselines/reference/parserAstSpans1.types b/tests/baselines/reference/parserAstSpans1.types index 3c4b346d19a..247b9e0b5f8 100644 --- a/tests/baselines/reference/parserAstSpans1.types +++ b/tests/baselines/reference/parserAstSpans1.types @@ -307,7 +307,7 @@ class c2 { this.c2_p1 = a; >this.c2_p1 = a : number >this.c2_p1 : number ->this : this +>this : c2 >c2_p1 : number >a : number } @@ -325,7 +325,7 @@ class c3 extends c2 { this.p1 = super.c2_p1; >this.p1 = super.c2_p1 : number >this.p1 : number ->this : this +>this : c3 >p1 : number >super.c2_p1 : number >super : c2 @@ -701,7 +701,7 @@ class c6 extends c5 { this.d = super.b; >this.d = super.b : number >this.d : any ->this : this +>this : c6 >d : any >super.b : number >super : c5 diff --git a/tests/baselines/reference/parserClass2.types b/tests/baselines/reference/parserClass2.types index 69d90bdfc5e..f5e1c5d55a3 100644 --- a/tests/baselines/reference/parserClass2.types +++ b/tests/baselines/reference/parserClass2.types @@ -8,12 +8,12 @@ this._information = this.logger.information(); >this._information = this.logger.information() : any >this._information : any ->this : this +>this : LoggerAdapter >_information : any >this.logger.information() : any >this.logger.information : any >this.logger : ILogger ->this : this +>this : LoggerAdapter >logger : ILogger >information : any } diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.types b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.types index 0940b9a46cf..664f8bbec1a 100644 --- a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.types +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.types @@ -31,17 +31,17 @@ module Shapes { >this.x * this.x + this.y * this.y : number >this.x * this.x : number >this.x : number ->this : this +>this : Point >x : number >this.x : number ->this : this +>this : Point >x : number >this.y * this.y : number >this.y : number ->this : this +>this : Point >y : number >this.y : number ->this : this +>this : Point >y : number // Static member diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.types b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.types index e15eb63d520..5016ff9e33a 100644 --- a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.types +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.types @@ -32,17 +32,17 @@ module Shapes { >this.x * this.x + this.y * this.y : number >this.x * this.x : number >this.x : number ->this : this +>this : Point >x : number >this.x : number ->this : this +>this : Point >x : number >this.y * this.y : number >this.y : number ->this : this +>this : Point >y : number >this.y : number ->this : this +>this : Point >y : number // Static member diff --git a/tests/baselines/reference/parserMissingLambdaOpenBrace1.types b/tests/baselines/reference/parserMissingLambdaOpenBrace1.types index 7a6d13565fd..71afbcaa3f2 100644 --- a/tests/baselines/reference/parserMissingLambdaOpenBrace1.types +++ b/tests/baselines/reference/parserMissingLambdaOpenBrace1.types @@ -19,7 +19,7 @@ class C { return this.doWhile((item, i) => filter(item, i) ? test(item, index++) : true); >this.doWhile((item, i) => filter(item, i) ? test(item, index++) : true) : any >this.doWhile : any ->this : this +>this : C >doWhile : any >(item, i) => filter(item, i) ? test(item, index++) : true : (item: any, i: any) => any >item : any diff --git a/tests/baselines/reference/parserRealSource1.types b/tests/baselines/reference/parserRealSource1.types index 8f10573eb51..e21cffdcb00 100644 --- a/tests/baselines/reference/parserRealSource1.types +++ b/tests/baselines/reference/parserRealSource1.types @@ -154,60 +154,60 @@ module TypeScript { this._information = this.logger.information(); >this._information = this.logger.information() : boolean >this._information : boolean ->this : this +>this : LoggerAdapter >_information : boolean >this.logger.information() : boolean >this.logger.information : () => boolean >this.logger : ILogger ->this : this +>this : LoggerAdapter >logger : ILogger >information : () => boolean this._debug = this.logger.debug(); >this._debug = this.logger.debug() : boolean >this._debug : boolean ->this : this +>this : LoggerAdapter >_debug : boolean >this.logger.debug() : boolean >this.logger.debug : () => boolean >this.logger : ILogger ->this : this +>this : LoggerAdapter >logger : ILogger >debug : () => boolean this._warning = this.logger.warning(); >this._warning = this.logger.warning() : boolean >this._warning : boolean ->this : this +>this : LoggerAdapter >_warning : boolean >this.logger.warning() : boolean >this.logger.warning : () => boolean >this.logger : ILogger ->this : this +>this : LoggerAdapter >logger : ILogger >warning : () => boolean this._error = this.logger.error(); >this._error = this.logger.error() : boolean >this._error : boolean ->this : this +>this : LoggerAdapter >_error : boolean >this.logger.error() : boolean >this.logger.error : () => boolean >this.logger : ILogger ->this : this +>this : LoggerAdapter >logger : ILogger >error : () => boolean this._fatal = this.logger.fatal(); >this._fatal = this.logger.fatal() : boolean >this._fatal : boolean ->this : this +>this : LoggerAdapter >_fatal : boolean >this.logger.fatal() : boolean >this.logger.fatal : () => boolean >this.logger : ILogger ->this : this +>this : LoggerAdapter >logger : ILogger >fatal : () => boolean } @@ -216,31 +216,31 @@ module TypeScript { public information(): boolean { return this._information; } >information : () => boolean >this._information : boolean ->this : this +>this : LoggerAdapter >_information : boolean public debug(): boolean { return this._debug; } >debug : () => boolean >this._debug : boolean ->this : this +>this : LoggerAdapter >_debug : boolean public warning(): boolean { return this._warning; } >warning : () => boolean >this._warning : boolean ->this : this +>this : LoggerAdapter >_warning : boolean public error(): boolean { return this._error; } >error : () => boolean >this._error : boolean ->this : this +>this : LoggerAdapter >_error : boolean public fatal(): boolean { return this._fatal; } >fatal : () => boolean >this._fatal : boolean ->this : this +>this : LoggerAdapter >_fatal : boolean public log(s: string): void { @@ -251,7 +251,7 @@ module TypeScript { >this.logger.log(s) : void >this.logger.log : (s: string) => void >this.logger : ILogger ->this : this +>this : LoggerAdapter >logger : ILogger >log : (s: string) => void >s : string @@ -293,7 +293,7 @@ module TypeScript { >this.logContents.push(s) : number >this.logContents.push : (...items: any[]) => number >this.logContents : any[] ->this : this +>this : BufferedLogger >logContents : any[] >push : (...items: any[]) => number >s : string diff --git a/tests/baselines/reference/parserRealSource10.errors.txt b/tests/baselines/reference/parserRealSource10.errors.txt index a860467f1a7..0b4cad4938d 100644 --- a/tests/baselines/reference/parserRealSource10.errors.txt +++ b/tests/baselines/reference/parserRealSource10.errors.txt @@ -340,10 +340,16 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(312,128): error tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(312,149): error TS2304: Cannot find name 'ErrorRecoverySet'. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(355,52): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(356,53): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(368,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(382,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(396,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(408,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(422,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(436,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(449,41): error TS1011: An element access expression should take an argument. -==== tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts (343 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts (349 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. @@ -1397,6 +1403,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(449,41): error export class NumberLiteralToken extends Token { constructor (public value: number, public hasEmptyFraction?: boolean) { super(TokenID.NumberLiteral); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. } public getText(): string { @@ -1411,6 +1419,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(449,41): error export class StringLiteralToken extends Token { constructor (public value: string) { super(TokenID.StringLiteral); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. } public getText(): string { @@ -1425,6 +1435,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(449,41): error export class IdentifierToken extends Token { constructor (public value: string, public hasEscapeSequence : boolean) { super(TokenID.Identifier); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. } public getText(): string { return this.value; @@ -1437,6 +1449,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(449,41): error export class WhitespaceToken extends Token { constructor (tokenId: TokenID, public value: string) { super(tokenId); + ~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. } public getText(): string { @@ -1451,6 +1465,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(449,41): error export class CommentToken extends Token { constructor (tokenID: TokenID, public value: string, public isBlock: boolean, public startPos: number, public line: number, public endsLine: boolean) { super(tokenID); + ~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. } public getText(): string { @@ -1465,6 +1481,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(449,41): error export class RegularExpressionLiteralToken extends Token { constructor(public regex) { super(TokenID.RegularExpressionLiteral); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Token'. } public getText(): string { diff --git a/tests/baselines/reference/parserRealSource10.types b/tests/baselines/reference/parserRealSource10.types index fc77c484f07..8112ed016e7 100644 --- a/tests/baselines/reference/parserRealSource10.types +++ b/tests/baselines/reference/parserRealSource10.types @@ -3585,12 +3585,12 @@ module TypeScript { >"token: " + this.tokenId : string >"token: " : "token: " >this.tokenId : TokenID ->this : this +>this : Token >tokenId : TokenID >" " : " " >this.getText() : string >this.getText : () => string ->this : this +>this : Token >getText : () => string >" (" : " (" >(TokenID)._map[this.tokenId] : any @@ -3600,7 +3600,7 @@ module TypeScript { >TokenID : typeof TokenID >_map : any >this.tokenId : TokenID ->this : this +>this : Token >tokenId : TokenID >")" : ")" } @@ -3619,7 +3619,7 @@ module TypeScript { >this.toString() + ",on line" : string >this.toString() : string >this.toString : () => string ->this : this +>this : Token >toString : () => string >",on line" : ",on line" >line : number @@ -3633,7 +3633,7 @@ module TypeScript { >tokenTable[this.tokenId] : any >tokenTable : any >this.tokenId : TokenID ->this : this +>this : Token >tokenId : TokenID >text : any } @@ -3644,7 +3644,7 @@ module TypeScript { if (this.tokenId <= TokenID.LimKeyword) { >this.tokenId <= TokenID.LimKeyword : boolean >this.tokenId : TokenID ->this : this +>this : Token >tokenId : TokenID >TokenID.LimKeyword : TokenID.Yield >TokenID : typeof TokenID @@ -3661,7 +3661,7 @@ module TypeScript { >lookupToken(this.tokenId) : TokenInfo >lookupToken : (tokenId: TokenID) => TokenInfo >this.tokenId : TokenID ->this : this +>this : Token >tokenId : TokenID if (tokenInfo != undefined) { @@ -3727,20 +3727,20 @@ module TypeScript { return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); >this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString() : string >this.hasEmptyFraction : boolean ->this : this +>this : NumberLiteralToken >hasEmptyFraction : boolean >this.value.toString() + ".0" : string >this.value.toString() : string >this.value.toString : (radix?: number) => string >this.value : number ->this : this +>this : NumberLiteralToken >value : number >toString : (radix?: number) => string >".0" : ".0" >this.value.toString() : string >this.value.toString : (radix?: number) => string >this.value : number ->this : this +>this : NumberLiteralToken >value : number >toString : (radix?: number) => string } @@ -3775,7 +3775,7 @@ module TypeScript { return this.value; >this.value : string ->this : this +>this : StringLiteralToken >value : string } @@ -3809,7 +3809,7 @@ module TypeScript { return this.value; >this.value : string ->this : this +>this : IdentifierToken >value : string } public classification(): TokenClass { @@ -3841,7 +3841,7 @@ module TypeScript { return this.value; >this.value : string ->this : this +>this : WhitespaceToken >value : string } @@ -3878,7 +3878,7 @@ module TypeScript { return this.value; >this.value : string ->this : this +>this : CommentToken >value : string } @@ -3914,7 +3914,7 @@ module TypeScript { >this.regex.toString() : any >this.regex.toString : any >this.regex : any ->this : this +>this : RegularExpressionLiteralToken >regex : any >toString : any } diff --git a/tests/baselines/reference/parserRealSource11.errors.txt b/tests/baselines/reference/parserRealSource11.errors.txt index 2ac4b4edbae..b1d42d583e8 100644 --- a/tests/baselines/reference/parserRealSource11.errors.txt +++ b/tests/baselines/reference/parserRealSource11.errors.txt @@ -37,9 +37,11 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(141,30): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(145,42): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(151,57): error TS2304: Cannot find name 'StringHashTable'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(155,26): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(184,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(184,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(192,32): error TS2304: Cannot find name 'SymbolScope'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(193,41): error TS1011: An element access expression should take an argument. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(196,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(196,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(199,42): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(219,33): error TS2304: Cannot find name 'NodeType'. @@ -47,21 +49,26 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(231,30): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(231,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(233,52): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(237,36): error TS2304: Cannot find name 'TypeFlow'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(268,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(268,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(298,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(302,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(302,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(306,40): error TS2304: Cannot find name 'Token'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(307,54): error TS2304: Cannot find name 'IdentifierToken'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(313,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Identifier'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(320,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(320,48): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(327,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(327,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(332,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(337,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(337,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(350,32): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(351,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(360,28): error TS2304: Cannot find name 'Type'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(363,32): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(364,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(367,42): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(370,34): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(375,36): error TS2304: Cannot find name 'TypeFlow'. @@ -114,6 +121,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(506,22): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(507,58): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(518,32): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(520,29): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(521,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(525,27): error TS2304: Cannot find name 'Signature'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(527,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(528,34): error TS2304: Cannot find name 'NodeType'. @@ -121,6 +129,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(536,30): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(536,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(540,34): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(553,32): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(554,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(557,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(559,22): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(561,22): error TS2304: Cannot find name 'NodeType'. @@ -185,6 +194,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(686,26): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(687,63): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(694,63): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(696,26): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(711,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(711,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(714,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(718,30): error TS2304: Cannot find name 'Emitter'. @@ -192,20 +202,25 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(718,48): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(721,51): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(723,51): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(725,51): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(733,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(733,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(738,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(747,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(747,48): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(778,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(778,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(781,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(786,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(786,48): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(797,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(797,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(800,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(800,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(808,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(823,32): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(824,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(830,27): error TS2304: Cannot find name 'VarFlags'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(834,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'ModuleElement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(834,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(837,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(837,48): error TS2304: Cannot find name 'TokenID'. @@ -217,6 +232,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(868,38): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(877,40): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(891,27): error TS2304: Cannot find name 'VarFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(894,55): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(895,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(900,37): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(900,60): error TS2304: Cannot find name 'VarFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(901,36): error TS2304: Cannot find name 'hasFlag'. @@ -224,6 +240,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(901,59): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(902,38): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(902,61): error TS2304: Cannot find name 'VarFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(904,36): error TS2304: Cannot find name 'TypeFlow'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(915,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BoundDecl'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(915,23): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(918,37): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(918,60): error TS2304: Cannot find name 'VarFlags'. @@ -233,6 +250,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(920,36): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(920,59): error TS2304: Cannot find name 'VarFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(922,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(922,48): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(933,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BoundDecl'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(933,23): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(944,38): error TS2304: Cannot find name 'FieldSymbol'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(946,30): error TS2304: Cannot find name 'Emitter'. @@ -242,6 +260,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(961,25): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(963,27): error TS2304: Cannot find name 'Signature'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(981,27): error TS2304: Cannot find name 'Type'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(985,29): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(988,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1004,44): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1004,67): error TS2304: Cannot find name 'FncFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1005,57): error TS2304: Cannot find name 'FncFlags'. @@ -288,6 +307,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1095,29): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1098,56): error TS2304: Cannot find name 'FncFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1098,79): error TS2304: Cannot find name 'FncFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1111,33): error TS2304: Cannot find name 'IFileReference'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1127,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'FuncDecl'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1127,84): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1132,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1144,42): error TS2304: Cannot find name 'NodeType'. @@ -307,8 +327,10 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1172,30): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1172,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1176,60): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1187,32): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1190,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'ModuleElement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1195,27): error TS2304: Cannot find name 'ModuleFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1196,21): error TS2304: Cannot find name 'ModuleType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1206,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'NamedDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1206,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1213,38): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1213,61): error TS2304: Cannot find name 'ModuleFlags'. @@ -324,27 +346,33 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1226,18): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1226,41): error TS2304: Cannot find name 'ModuleFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1237,27): error TS2304: Cannot find name 'VarFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1239,32): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1244,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'NamedDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1248,20): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1248,43): error TS2304: Cannot find name 'VarFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1252,20): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1252,43): error TS2304: Cannot find name 'VarFlags'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1266,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'TypeDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1266,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1269,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1273,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1273,48): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1283,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'TypeDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1283,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1286,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1290,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1290,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1295,32): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1296,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'ModuleElement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1297,27): error TS2304: Cannot find name 'ASTFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1306,36): error TS2304: Cannot find name 'TypeFlow'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1314,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1314,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1317,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1317,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1331,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1337,42): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1339,26): error TS2304: Cannot find name 'BasicBlock'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1348,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1348,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1351,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1351,48): error TS2304: Cannot find name 'TokenID'. @@ -353,6 +381,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1374,42): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1375,37): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1388,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1405,32): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1406,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1409,42): error TS2304: Cannot find name 'Parser'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1414,35): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1419,39): error TS2304: Cannot find name 'NodeType'. @@ -361,6 +390,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1432,80): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1435,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1435,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1438,34): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1457,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1457,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1462,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1462,48): error TS2304: Cannot find name 'TokenID'. @@ -371,6 +401,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1481,33): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1482,33): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1488,29): error TS2304: Cannot find name 'ITargetInfo'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1490,39): error TS2304: Cannot find name 'BasicBlock'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1515,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1515,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1518,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1518,48): error TS2304: Cannot find name 'TokenID'. @@ -380,6 +411,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1539,42): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1541,33): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1542,33): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1545,29): error TS2304: Cannot find name 'ITargetInfo'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1572,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1572,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1577,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1577,48): error TS2304: Cannot find name 'TokenID'. @@ -389,13 +421,16 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1600,42): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1602,31): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1606,35): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1615,39): error TS2304: Cannot find name 'BasicBlock'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1651,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1651,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1654,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1654,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1660,63): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1670,42): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1675,36): error TS2304: Cannot find name 'TypeFlow'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1682,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1682,19): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1688,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1688,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1689,53): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1690,52): error TS2304: Cannot find name 'VarFlags'. @@ -416,6 +451,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1766,36): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1775,42): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1784,33): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1785,33): error TS2304: Cannot find name 'BasicBlock'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1811,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1811,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1816,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1816,48): error TS2304: Cannot find name 'TokenID'. @@ -434,11 +470,13 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1859,30): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1865,39): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1868,29): error TS2304: Cannot find name 'ITargetInfo'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1908,25): error TS2304: Cannot find name 'WithSymbol'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1911,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1911,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1914,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1914,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1919,51): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1928,36): error TS2304: Cannot find name 'TypeFlow'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1939,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1939,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1944,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1944,48): error TS2304: Cannot find name 'TokenID'. @@ -448,6 +486,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1969,36): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1981,42): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1984,33): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1985,35): error TS2304: Cannot find name 'BasicBlock'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2014,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2014,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2017,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2017,48): error TS2304: Cannot find name 'TokenID'. @@ -456,11 +495,13 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2033,36): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2042,42): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2043,33): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2047,37): error TS2304: Cannot find name 'BasicBlock'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2067,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2067,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2070,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2070,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2074,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2077,28): error TS2304: Cannot find name 'getTypeLink'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2100,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2100,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2105,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2105,48): error TS2304: Cannot find name 'TokenID'. @@ -470,6 +511,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2112,36): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2119,42): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2120,36): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2122,32): error TS2304: Cannot find name 'BasicBlock'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2145,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2145,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2150,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2150,48): error TS2304: Cannot find name 'TokenID'. @@ -480,12 +522,14 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2161,32): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2164,37): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2172,35): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2185,36): error TS2304: Cannot find name 'TypeFlow'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2195,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2195,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2198,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2198,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2202,47): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2207,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2212,42): error TS2304: Cannot find name 'ControlFlowContext'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2223,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2223,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2225,40): error TS2304: Cannot find name 'VarFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2229,32): error TS2304: Cannot find name 'SymbolScope'. @@ -499,19 +543,22 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2259,36): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2263,33): error TS2304: Cannot find name 'ValueLocation'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2264,30): error TS2304: Cannot find name 'VariableSymbol'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2269,38): error TS2304: Cannot find name 'TypeLink'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2300,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2300,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2303,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2303,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2307,47): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2312,42): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2320,36): error TS2304: Cannot find name 'TypeFlow'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2331,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2331,19): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2353,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2353,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error TS2304: Cannot find name 'TokenID'. -==== tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts (511 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts (558 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. @@ -774,6 +821,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class IncompleteAST extends AST { constructor (min: number, lim: number) { super(NodeType.Error); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. @@ -792,6 +841,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor () { super(NodeType.List); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -878,6 +929,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error // match 'text', always use setText. constructor (public actualText: string, public hasEscapeSequence?: boolean) { super(NodeType.Name); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. this.setText(actualText, hasEscapeSequence); @@ -935,6 +988,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class MissingIdentifier extends Identifier { constructor () { super("__missing"); + ~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Identifier'. } public isMissing() { @@ -953,6 +1008,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class Label extends AST { constructor (public id: Identifier) { super(NodeType.Label); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -987,6 +1044,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. super(nodeType); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. } public isExpression() { return true; } @@ -1004,6 +1063,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. super(nodeType); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. } public addToControlFlow(context: ControlFlowContext): void { @@ -1265,6 +1326,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error ~~~~~~~~~ !!! error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. super(nodeType); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. this.minChar = this.target.minChar; } @@ -1312,6 +1375,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. super(nodeType); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. } public typeCheck(typeFlow: TypeFlow) { @@ -1597,6 +1662,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error public operand2: AST, public operand3: AST) { super(NodeType.ConditionalExpression); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -1633,6 +1700,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class NumberLiteral extends Expression { constructor (public value: number, public hasEmptyFraction?: boolean) { super(NodeType.NumberLit); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -1686,6 +1755,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class RegexLiteral extends Expression { constructor (public regex) { super(NodeType.Regex); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -1713,6 +1784,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class StringLiteral extends Expression { constructor (public text: string) { super(NodeType.QString); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Expression'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -1750,6 +1823,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. super(nodeType); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. } } @@ -1762,6 +1837,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor (public id: Identifier, public alias: AST) { super(NodeType.ImportDeclaration); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'ModuleElement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -1845,6 +1922,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. super(nodeType); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. } public isStatementOrExpression() { return true; } @@ -1879,6 +1958,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class VarDecl extends BoundDecl { constructor (id: Identifier, nest: number) { super(id, NodeType.VarDecl, nest); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BoundDecl'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -1915,6 +1996,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class ArgDecl extends BoundDecl { constructor (id: Identifier) { super(id, NodeType.ArgDecl, 0); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BoundDecl'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -1988,6 +2071,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error nodeType: number) { super(nodeType); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. } public internalName(): string { @@ -2219,6 +2304,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor (vars: ASTList, scopes: ASTList) { super(new Identifier("script"), null, false, null, vars, scopes, null, NodeType.Script); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'FuncDecl'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. this.vars = vars; @@ -2320,6 +2407,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error public name: Identifier, public members: ASTList) { super(nodeType); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'ModuleElement'. } } @@ -2340,6 +2429,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor (name: Identifier, members: ASTList, vars: ASTList, scopes: ASTList, public endingToken: ASTSpan) { super(NodeType.ModuleDeclaration, name, members); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'NamedDeclaration'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. @@ -2408,6 +2499,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error public implementsList: ASTList, members: ASTList) { super(nodeType, name, members); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'NamedDeclaration'. } public isExported() { @@ -2438,6 +2531,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error extendsList: ASTList, implementsList: ASTList) { super(NodeType.ClassDeclaration, name, extendsList, implementsList, members); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'TypeDeclaration'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -2463,6 +2558,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error extendsList: ASTList, implementsList: ASTList) { super(NodeType.InterfaceDeclaration, name, extendsList, implementsList, members); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'TypeDeclaration'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -2486,6 +2583,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. super(nodeType); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'ModuleElement'. this.flags |= ASTFlags.IsStatement; ~~~~~~~~ !!! error TS2304: Cannot find name 'ASTFlags'. @@ -2508,6 +2607,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class LabeledStatement extends Statement { constructor (public labels: ASTList, public stmt: AST) { super(NodeType.LabeledStatement); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -2554,6 +2655,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor (public statements: ASTList, public isStatementBlock: boolean) { super(NodeType.Block); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -2628,6 +2731,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. super(nodeType); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. } public setResolvedTarget(parser: Parser, stmt: Statement): boolean { @@ -2695,6 +2800,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor (public cond: AST) { super(NodeType.While); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -2773,6 +2880,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor () { super(NodeType.DoWhile); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -2848,6 +2957,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor (public cond: AST) { super(NodeType.If); + ~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -2945,6 +3056,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor () { super(NodeType.Return); + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -2988,6 +3101,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class EndCode extends AST { constructor () { super(NodeType.EndCode); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -2996,6 +3111,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class ForInStatement extends Statement { constructor (public lval: AST, public obj: AST) { super(NodeType.ForIn); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. if (this.lval && (this.lval.nodeType == NodeType.VarDecl)) { @@ -3159,6 +3276,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor (public init: AST) { super(NodeType.For); + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -3295,6 +3414,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor (public expr: AST) { super(NodeType.With); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -3333,6 +3454,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor (public val: AST) { super(NodeType.Switch); + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -3426,6 +3549,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor () { super(NodeType.Case); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -3495,6 +3620,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class TypeReference extends AST { constructor (public term: AST, public arrayCount: number) { super(NodeType.TypeRef); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -3538,6 +3665,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class TryFinally extends Statement { constructor (public tryNode: AST, public finallyNode: Finally) { super(NodeType.TryFinally); + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -3601,6 +3730,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class TryCatch extends Statement { constructor (public tryNode: Try, public catchNode: Catch) { super(NodeType.TryCatch); + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -3671,6 +3802,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class Try extends Statement { constructor (public body: AST) { super(NodeType.Try); + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -3711,6 +3844,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class Catch extends Statement { constructor (public param: VarDecl, public body: AST) { super(NodeType.Catch); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. if (this.param) { @@ -3814,6 +3949,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class Finally extends Statement { constructor (public body: AST) { super(NodeType.Finally); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -3857,6 +3994,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error constructor (public content: string, public isBlockComment: boolean, public endsLine) { super(NodeType.Comment); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AST'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } @@ -3881,6 +4020,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error export class DebuggerStatement extends Statement { constructor () { super(NodeType.Debugger); + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Statement'. ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. } diff --git a/tests/baselines/reference/parserRealSource11.types b/tests/baselines/reference/parserRealSource11.types index be7f8b2f601..6bd40d66f9f 100644 --- a/tests/baselines/reference/parserRealSource11.types +++ b/tests/baselines/reference/parserRealSource11.types @@ -79,13 +79,13 @@ module TypeScript { >this.isStatementOrExpression() && (!this.isCompoundStatement()) : boolean >this.isStatementOrExpression() : boolean >this.isStatementOrExpression : () => boolean ->this : this +>this : AST >isStatementOrExpression : () => boolean >(!this.isCompoundStatement()) : boolean >!this.isCompoundStatement() : boolean >this.isCompoundStatement() : boolean >this.isCompoundStatement : () => boolean ->this : this +>this : AST >isCompoundStatement : () => boolean public typeCheck(typeFlow: TypeFlow) { @@ -94,7 +94,7 @@ module TypeScript { switch (this.nodeType) { >this.nodeType : NodeType ->this : this +>this : AST >nodeType : NodeType case NodeType.Error: @@ -110,7 +110,7 @@ module TypeScript { this.type = typeFlow.anyType; >this.type = typeFlow.anyType : any >this.type : Type ->this : this +>this : AST >type : Type >typeFlow.anyType : any >typeFlow : TypeFlow @@ -127,7 +127,7 @@ module TypeScript { >typeFlow.typeCheckThis : any >typeFlow : TypeFlow >typeCheckThis : any ->this : this +>this : AST case NodeType.Null: >NodeType.Null : any @@ -137,7 +137,7 @@ module TypeScript { this.type = typeFlow.nullType; >this.type = typeFlow.nullType : any >this.type : Type ->this : this +>this : AST >type : Type >typeFlow.nullType : any >typeFlow : TypeFlow @@ -157,7 +157,7 @@ module TypeScript { this.type = typeFlow.booleanType; >this.type = typeFlow.booleanType : any >this.type : Type ->this : this +>this : AST >type : Type >typeFlow.booleanType : any >typeFlow : TypeFlow @@ -174,7 +174,7 @@ module TypeScript { >typeFlow.typeCheckSuper : any >typeFlow : TypeFlow >typeCheckSuper : any ->this : this +>this : AST case NodeType.EndCode: >NodeType.EndCode : any @@ -194,7 +194,7 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any >this.type : Type ->this : this +>this : AST >type : Type >typeFlow.voidType : any >typeFlow : TypeFlow @@ -208,7 +208,7 @@ module TypeScript { >"please implement in derived class" : "please implement in derived class" } return this; ->this : this +>this : AST } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -222,12 +222,12 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : AST >true : true switch (this.nodeType) { >this.nodeType : NodeType ->this : this +>this : AST >nodeType : NodeType case NodeType.This: @@ -240,7 +240,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : AST if (emitter.thisFnc && (hasFlag(emitter.thisFnc.fncFlags, FncFlags.IsFatArrowFunction))) { >emitter.thisFnc && (hasFlag(emitter.thisFnc.fncFlags, FncFlags.IsFatArrowFunction)) : any @@ -279,7 +279,7 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : AST break; case NodeType.Null: @@ -292,7 +292,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : AST emitter.writeToOutput("null"); >emitter.writeToOutput("null") : any @@ -306,7 +306,7 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : AST break; case NodeType.False: @@ -319,7 +319,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : AST emitter.writeToOutput("false"); >emitter.writeToOutput("false") : any @@ -333,7 +333,7 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : AST break; case NodeType.True: @@ -346,7 +346,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : AST emitter.writeToOutput("true"); >emitter.writeToOutput("true") : any @@ -360,7 +360,7 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : AST break; case NodeType.Super: @@ -373,7 +373,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : AST emitter.emitSuperReference(); >emitter.emitSuperReference() : any @@ -386,7 +386,7 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : AST break; case NodeType.EndCode: @@ -417,7 +417,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : AST emitter.writeToOutput("; "); >emitter.writeToOutput("; ") : any @@ -431,7 +431,7 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : AST break; case NodeType.Void: @@ -444,7 +444,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : AST emitter.writeToOutput("void "); >emitter.writeToOutput("void ") : any @@ -458,7 +458,7 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : AST break; default: @@ -472,7 +472,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : AST >false : false } @@ -522,7 +522,7 @@ module TypeScript { >getSourceLineCol : any >lineCol : { line: number; col: number; } >this.minChar : number ->this : this +>this : AST >minChar : number context.parser.getSourceLineCol(limLineCol, this.limChar); @@ -534,7 +534,7 @@ module TypeScript { >getSourceLineCol : any >limLineCol : { line: number; col: number; } >this.limChar : number ->this : this +>this : AST >limChar : number context.write("(" + lineCol.line + "," + lineCol.col + ")--" + @@ -576,14 +576,14 @@ module TypeScript { >lab : any >this.printLabel() : any >this.printLabel : () => any ->this : this +>this : AST >printLabel : () => any if (hasFlag(this.flags, ASTFlags.Error)) { >hasFlag(this.flags, ASTFlags.Error) : any >hasFlag : any >this.flags : any ->this : this +>this : AST >flags : any >ASTFlags.Error : any >ASTFlags : any @@ -610,7 +610,7 @@ module TypeScript { >nodeTypeTable[this.nodeType] : any >nodeTypeTable : any >this.nodeType : NodeType ->this : this +>this : AST >nodeType : NodeType >undefined : undefined @@ -618,7 +618,7 @@ module TypeScript { >nodeTypeTable[this.nodeType] : any >nodeTypeTable : any >this.nodeType : NodeType ->this : this +>this : AST >nodeType : NodeType } else { @@ -630,7 +630,7 @@ module TypeScript { >NodeType : any >_map : any >this.nodeType : NodeType ->this : this +>this : AST >nodeType : NodeType } } @@ -656,7 +656,7 @@ module TypeScript { >context.addContent : any >context : ControlFlowContext >addContent : any ->this : this +>this : AST } public netFreeUses(container: Symbol, freeUses: StringHashTable) { @@ -676,7 +676,7 @@ module TypeScript { >NodeType : any >_map : any >this.nodeType : NodeType ->this : this +>this : AST >nodeType : NodeType } @@ -814,14 +814,14 @@ module TypeScript { this.minChar = min; >this.minChar = min : number >this.minChar : number ->this : this +>this : IncompleteAST >minChar : number >min : number this.limChar = lim; >this.limChar = lim : number >this.limChar : number ->this : this +>this : IncompleteAST >limChar : number >lim : number } @@ -859,7 +859,7 @@ module TypeScript { >len : number >this.members.length : number >this.members : AST[] ->this : this +>this : ASTList >members : AST[] >length : number @@ -884,7 +884,7 @@ module TypeScript { >addUnreachable : any >this.members[i] : AST >this.members : AST[] ->this : this +>this : ASTList >members : AST[] >i : number @@ -895,7 +895,7 @@ module TypeScript { >this.members[i] = context.walk(this.members[i], this) : any >this.members[i] : AST >this.members : AST[] ->this : this +>this : ASTList >members : AST[] >i : number >context.walk(this.members[i], this) : any @@ -904,10 +904,10 @@ module TypeScript { >walk : any >this.members[i] : AST >this.members : AST[] ->this : this +>this : ASTList >members : AST[] >i : number ->this : this +>this : ASTList } } context.walker.options.goChildren = false; @@ -923,28 +923,28 @@ module TypeScript { } public append(ast: AST) { ->append : (ast: AST) => this +>append : (ast: AST) => ASTList >ast : AST this.members[this.members.length] = ast; >this.members[this.members.length] = ast : AST >this.members[this.members.length] : AST >this.members : AST[] ->this : this +>this : ASTList >members : AST[] >this.members.length : number >this.members : AST[] ->this : this +>this : ASTList >members : AST[] >length : number >ast : AST return this; ->this : this +>this : ASTList } public appendAll(ast: AST) { ->appendAll : (ast: AST) => this +>appendAll : (ast: AST) => ASTList >ast : AST if (ast.nodeType == NodeType.List) { @@ -977,10 +977,10 @@ module TypeScript { >i : number this.append(list.members[i]); ->this.append(list.members[i]) : this ->this.append : (ast: AST) => this ->this : this ->append : (ast: AST) => this +>this.append(list.members[i]) : ASTList +>this.append : (ast: AST) => ASTList +>this : ASTList +>append : (ast: AST) => ASTList >list.members[i] : AST >list.members : AST[] >list : ASTList @@ -990,14 +990,14 @@ module TypeScript { } else { this.append(ast); ->this.append(ast) : this ->this.append : (ast: AST) => this ->this : this ->append : (ast: AST) => this +>this.append(ast) : ASTList +>this.append : (ast: AST) => ASTList +>this : ASTList +>append : (ast: AST) => ASTList >ast : AST } return this; ->this : this +>this : ASTList } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -1011,14 +1011,14 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : ASTList emitter.emitJavascriptList(this, null, TokenID.Semicolon, startLine, false, false); >emitter.emitJavascriptList(this, null, TokenID.Semicolon, startLine, false, false) : any >emitter.emitJavascriptList : any >emitter : Emitter >emitJavascriptList : any ->this : this +>this : ASTList >null : null >TokenID.Semicolon : any >TokenID : any @@ -1032,18 +1032,18 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : ASTList } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => ASTList >typeFlow : TypeFlow var len = this.members.length; >len : number >this.members.length : number >this.members : AST[] ->this : this +>this : ASTList >members : AST[] >length : number @@ -1065,7 +1065,7 @@ module TypeScript { if (this.members[i]) { >this.members[i] : AST >this.members : AST[] ->this : this +>this : ASTList >members : AST[] >i : number @@ -1073,14 +1073,14 @@ module TypeScript { >this.members[i] = this.members[i].typeCheck(typeFlow) : any >this.members[i] : AST >this.members : AST[] ->this : this +>this : ASTList >members : AST[] >i : number >this.members[i].typeCheck(typeFlow) : any >this.members[i].typeCheck : (typeFlow: TypeFlow) => any >this.members[i] : AST >this.members : AST[] ->this : this +>this : ASTList >members : AST[] >i : number >typeCheck : (typeFlow: TypeFlow) => any @@ -1094,7 +1094,7 @@ module TypeScript { >nestingLevel : any return this; ->this : this +>this : ASTList } } @@ -1140,7 +1140,7 @@ module TypeScript { this.setText(actualText, hasEscapeSequence); >this.setText(actualText, hasEscapeSequence) : void >this.setText : (actualText: string, hasEscapeSequence?: boolean) => void ->this : this +>this : Identifier >setText : (actualText: string, hasEscapeSequence?: boolean) => void >actualText : string >hasEscapeSequence : boolean @@ -1154,7 +1154,7 @@ module TypeScript { this.actualText = actualText; >this.actualText = actualText : string >this.actualText : string ->this : this +>this : Identifier >actualText : string >actualText : string @@ -1164,7 +1164,7 @@ module TypeScript { this.text = AST.getResolvedIdentifierName(actualText); >this.text = AST.getResolvedIdentifierName(actualText) : string >this.text : string ->this : this +>this : Identifier >text : string >AST.getResolvedIdentifierName(actualText) : string >AST.getResolvedIdentifierName : (name: string) => string @@ -1176,7 +1176,7 @@ module TypeScript { this.text = actualText; >this.text = actualText : string >this.text : string ->this : this +>this : Identifier >text : string >actualText : string } @@ -1197,7 +1197,7 @@ module TypeScript { >"id: " + this.actualText : string >"id: " : "id: " >this.actualText : string ->this : this +>this : Identifier >actualText : string } @@ -1206,14 +1206,14 @@ module TypeScript { if (this.actualText) { >this.actualText : string ->this : this +>this : Identifier >actualText : string return "id: " + this.actualText; >"id: " + this.actualText : string >"id: " : "id: " >this.actualText : string ->this : this +>this : Identifier >actualText : string } else { @@ -1231,7 +1231,7 @@ module TypeScript { >typeFlow.typeCheckName : any >typeFlow : TypeFlow >typeCheckName : any ->this : this +>this : Identifier } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -1245,7 +1245,7 @@ module TypeScript { >emitter.emitJavascriptName : any >emitter : Emitter >emitJavascriptName : any ->this : this +>this : Identifier >true : true } @@ -1316,26 +1316,26 @@ module TypeScript { >this.id.actualText + ":" : string >this.id.actualText : string >this.id : Identifier ->this : this +>this : Label >id : Identifier >actualText : string >":" : ":" public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => Label >typeFlow : TypeFlow this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any >this.type : Type ->this : this +>this : Label >type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any return this; ->this : this +>this : Label } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -1349,7 +1349,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Label >true : true emitter.recordSourceMappingStart(this); @@ -1357,7 +1357,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : Label emitter.recordSourceMappingStart(this.id); >emitter.recordSourceMappingStart(this.id) : any @@ -1365,7 +1365,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingStart : any >this.id : Identifier ->this : this +>this : Label >id : Identifier emitter.writeToOutput(this.id.actualText); @@ -1375,7 +1375,7 @@ module TypeScript { >writeToOutput : any >this.id.actualText : string >this.id : Identifier ->this : this +>this : Label >id : Identifier >actualText : string @@ -1385,7 +1385,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingEnd : any >this.id : Identifier ->this : this +>this : Label >id : Identifier emitter.writeLineToOutput(":"); @@ -1400,14 +1400,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : Label emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Label >false : false } } @@ -1471,7 +1471,7 @@ module TypeScript { if (this.nodeType == NodeType.Throw) { >this.nodeType == NodeType.Throw : boolean >this.nodeType : NodeType ->this : this +>this : UnaryExpression >nodeType : NodeType >NodeType.Throw : any >NodeType : any @@ -1491,7 +1491,7 @@ module TypeScript { switch (this.nodeType) { >this.nodeType : NodeType ->this : this +>this : UnaryExpression >nodeType : NodeType case NodeType.Not: @@ -1504,7 +1504,7 @@ module TypeScript { >typeFlow.typeCheckBitNot : any >typeFlow : TypeFlow >typeCheckBitNot : any ->this : this +>this : UnaryExpression case NodeType.LogNot: >NodeType.LogNot : any @@ -1516,7 +1516,7 @@ module TypeScript { >typeFlow.typeCheckLogNot : any >typeFlow : TypeFlow >typeCheckLogNot : any ->this : this +>this : UnaryExpression case NodeType.Pos: >NodeType.Pos : any @@ -1533,7 +1533,7 @@ module TypeScript { >typeFlow.typeCheckUnaryNumberOperator : any >typeFlow : TypeFlow >typeCheckUnaryNumberOperator : any ->this : this +>this : UnaryExpression case NodeType.IncPost: >NodeType.IncPost : any @@ -1560,7 +1560,7 @@ module TypeScript { >typeFlow.typeCheckIncOrDec : any >typeFlow : TypeFlow >typeCheckIncOrDec : any ->this : this +>this : UnaryExpression case NodeType.ArrayLit: >NodeType.ArrayLit : any @@ -1572,10 +1572,10 @@ module TypeScript { >typeFlow.typeCheckArrayLit : any >typeFlow : TypeFlow >typeCheckArrayLit : any ->this : this +>this : UnaryExpression return this; ->this : this +>this : UnaryExpression case NodeType.ObjectLit: >NodeType.ObjectLit : any @@ -1587,10 +1587,10 @@ module TypeScript { >typeFlow.typeCheckObjectLit : any >typeFlow : TypeFlow >typeCheckObjectLit : any ->this : this +>this : UnaryExpression return this; ->this : this +>this : UnaryExpression case NodeType.Throw: >NodeType.Throw : any @@ -1600,27 +1600,27 @@ module TypeScript { this.operand = typeFlow.typeCheck(this.operand); >this.operand = typeFlow.typeCheck(this.operand) : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >typeFlow.typeCheck(this.operand) : any >typeFlow.typeCheck : any >typeFlow : TypeFlow >typeCheck : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any >this.type : Type ->this : this +>this : UnaryExpression >type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any return this; ->this : this +>this : UnaryExpression case NodeType.Typeof: >NodeType.Typeof : any @@ -1630,27 +1630,27 @@ module TypeScript { this.operand = typeFlow.typeCheck(this.operand); >this.operand = typeFlow.typeCheck(this.operand) : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >typeFlow.typeCheck(this.operand) : any >typeFlow.typeCheck : any >typeFlow : TypeFlow >typeCheck : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST this.type = typeFlow.stringType; >this.type = typeFlow.stringType : any >this.type : Type ->this : this +>this : UnaryExpression >type : Type >typeFlow.stringType : any >typeFlow : TypeFlow >stringType : any return this; ->this : this +>this : UnaryExpression case NodeType.Delete: >NodeType.Delete : any @@ -1660,20 +1660,20 @@ module TypeScript { this.operand = typeFlow.typeCheck(this.operand); >this.operand = typeFlow.typeCheck(this.operand) : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >typeFlow.typeCheck(this.operand) : any >typeFlow.typeCheck : any >typeFlow : TypeFlow >typeCheck : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST this.type = typeFlow.booleanType; >this.type = typeFlow.booleanType : any >this.type : Type ->this : this +>this : UnaryExpression >type : Type >typeFlow.booleanType : any >typeFlow : TypeFlow @@ -1689,14 +1689,14 @@ module TypeScript { this.castTerm = typeFlow.typeCheck(this.castTerm); >this.castTerm = typeFlow.typeCheck(this.castTerm) : any >this.castTerm : AST ->this : this +>this : UnaryExpression >castTerm : AST >typeFlow.typeCheck(this.castTerm) : any >typeFlow.typeCheck : any >typeFlow : TypeFlow >typeCheck : any >this.castTerm : AST ->this : this +>this : UnaryExpression >castTerm : AST var applyTargetType = !this.operand.isParenthesized; @@ -1704,7 +1704,7 @@ module TypeScript { >!this.operand.isParenthesized : boolean >this.operand.isParenthesized : boolean >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >isParenthesized : boolean @@ -1714,7 +1714,7 @@ module TypeScript { >applyTargetType : boolean >this.castTerm.type : Type >this.castTerm : AST ->this : this +>this : UnaryExpression >castTerm : AST >type : Type >null : null @@ -1735,7 +1735,7 @@ module TypeScript { >inProvisionalTypecheckMode : any >true : true >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST typeFlow.castWithCoercion(this.operand, this.castTerm.type, false, true); @@ -1744,11 +1744,11 @@ module TypeScript { >typeFlow : TypeFlow >castWithCoercion : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >this.castTerm.type : Type >this.castTerm : AST ->this : this +>this : UnaryExpression >castTerm : AST >type : Type >false : false @@ -1757,16 +1757,16 @@ module TypeScript { this.type = this.castTerm.type; >this.type = this.castTerm.type : Type >this.type : Type ->this : this +>this : UnaryExpression >type : Type >this.castTerm.type : Type >this.castTerm : AST ->this : this +>this : UnaryExpression >castTerm : AST >type : Type return this; ->this : this +>this : UnaryExpression case NodeType.Void: >NodeType.Void : any @@ -1779,20 +1779,20 @@ module TypeScript { this.operand = typeFlow.typeCheck(this.operand); >this.operand = typeFlow.typeCheck(this.operand) : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >typeFlow.typeCheck(this.operand) : any >typeFlow.typeCheck : any >typeFlow : TypeFlow >typeCheck : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST this.type = typeFlow.checker.undefinedType; >this.type = typeFlow.checker.undefinedType : any >this.type : Type ->this : this +>this : UnaryExpression >type : Type >typeFlow.checker.undefinedType : any >typeFlow.checker : any @@ -1809,7 +1809,7 @@ module TypeScript { >"please implement in derived class" : "please implement in derived class" } return this; ->this : this +>this : UnaryExpression } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -1823,7 +1823,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : UnaryExpression >true : true emitter.recordSourceMappingStart(this); @@ -1831,11 +1831,11 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : UnaryExpression switch (this.nodeType) { >this.nodeType : NodeType ->this : this +>this : UnaryExpression >nodeType : NodeType case NodeType.IncPost: @@ -1849,7 +1849,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.PlusPlus : any >TokenID : any @@ -1882,7 +1882,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.Exclamation : any >TokenID : any @@ -1901,7 +1901,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.MinusMinus : any >TokenID : any @@ -1928,7 +1928,7 @@ module TypeScript { >emitObjectLiteral : any >this.operand : ASTList >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST break; @@ -1944,7 +1944,7 @@ module TypeScript { >emitArrayLiteral : any >this.operand : ASTList >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST break; @@ -1966,7 +1966,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.Tilde : any >TokenID : any @@ -1990,7 +1990,7 @@ module TypeScript { >this.operand.nodeType == NodeType.Neg : boolean >this.operand.nodeType : NodeType >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >nodeType : NodeType >NodeType.Neg : any @@ -2001,7 +2001,7 @@ module TypeScript { >this.operand.isParenthesized = true : true >this.operand.isParenthesized : boolean >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >isParenthesized : boolean >true : true @@ -2012,7 +2012,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.Minus : any >TokenID : any @@ -2036,7 +2036,7 @@ module TypeScript { >this.operand.nodeType == NodeType.Pos : boolean >this.operand.nodeType : NodeType >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >nodeType : NodeType >NodeType.Pos : any @@ -2047,7 +2047,7 @@ module TypeScript { >this.operand.isParenthesized = true : true >this.operand.isParenthesized : boolean >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >isParenthesized : boolean >true : true @@ -2058,7 +2058,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.Plus : any >TokenID : any @@ -2084,7 +2084,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.PlusPlus : any >TokenID : any @@ -2110,7 +2110,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.MinusMinus : any >TokenID : any @@ -2136,7 +2136,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.Tilde : any >TokenID : any @@ -2169,7 +2169,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.Tilde : any >TokenID : any @@ -2195,7 +2195,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.Tilde : any >TokenID : any @@ -2221,7 +2221,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.Tilde : any >TokenID : any @@ -2240,7 +2240,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand : AST ->this : this +>this : UnaryExpression >operand : AST >TokenID.Tilde : any >TokenID : any @@ -2259,14 +2259,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : UnaryExpression emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : UnaryExpression >false : false } } @@ -2292,11 +2292,11 @@ module TypeScript { this.minChar = this.target.minChar; >this.minChar = this.target.minChar : number >this.minChar : number ->this : this +>this : CallExpression >minChar : number >this.target.minChar : number >this.target : AST ->this : this +>this : CallExpression >target : AST >minChar : number } @@ -2312,7 +2312,7 @@ module TypeScript { if (this.nodeType == NodeType.New) { >this.nodeType == NodeType.New : boolean >this.nodeType : NodeType ->this : this +>this : CallExpression >nodeType : NodeType >NodeType.New : any >NodeType : any @@ -2323,7 +2323,7 @@ module TypeScript { >typeFlow.typeCheckNew : any >typeFlow : TypeFlow >typeCheckNew : any ->this : this +>this : CallExpression } else { return typeFlow.typeCheckCall(this); @@ -2331,7 +2331,7 @@ module TypeScript { >typeFlow.typeCheckCall : any >typeFlow : TypeFlow >typeCheckCall : any ->this : this +>this : CallExpression } } @@ -2346,7 +2346,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : CallExpression >true : true emitter.recordSourceMappingStart(this); @@ -2354,12 +2354,12 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : CallExpression if (this.nodeType == NodeType.New) { >this.nodeType == NodeType.New : boolean >this.nodeType : NodeType ->this : this +>this : CallExpression >nodeType : NodeType >NodeType.New : any >NodeType : any @@ -2371,10 +2371,10 @@ module TypeScript { >emitter : Emitter >emitNew : any >this.target : AST ->this : this +>this : CallExpression >target : AST >this.arguments : ASTList ->this : this +>this : CallExpression >arguments : ASTList } else { @@ -2383,12 +2383,12 @@ module TypeScript { >emitter.emitCall : any >emitter : Emitter >emitCall : any ->this : this +>this : CallExpression >this.target : AST ->this : this +>this : CallExpression >target : AST >this.arguments : ASTList ->this : this +>this : CallExpression >arguments : ASTList } @@ -2397,14 +2397,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : CallExpression emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : CallExpression >false : false } } @@ -2430,7 +2430,7 @@ module TypeScript { switch (this.nodeType) { >this.nodeType : NodeType ->this : this +>this : BinaryExpression >nodeType : NodeType case NodeType.Dot: @@ -2443,7 +2443,7 @@ module TypeScript { >typeFlow.typeCheckDotOperator : any >typeFlow : TypeFlow >typeCheckDotOperator : any ->this : this +>this : BinaryExpression case NodeType.Asg: >NodeType.Asg : any @@ -2455,7 +2455,7 @@ module TypeScript { >typeFlow.typeCheckAsgOperator : any >typeFlow : TypeFlow >typeCheckAsgOperator : any ->this : this +>this : BinaryExpression case NodeType.Add: >NodeType.Add : any @@ -2497,7 +2497,7 @@ module TypeScript { >typeFlow.typeCheckArithmeticOperator : any >typeFlow : TypeFlow >typeCheckArithmeticOperator : any ->this : this +>this : BinaryExpression >false : false case NodeType.Xor: @@ -2510,7 +2510,7 @@ module TypeScript { >typeFlow.typeCheckBitwiseOperator : any >typeFlow : TypeFlow >typeCheckBitwiseOperator : any ->this : this +>this : BinaryExpression >false : false case NodeType.Ne: @@ -2541,7 +2541,7 @@ module TypeScript { >nodeTypeTable[this.nodeType] : any >nodeTypeTable : any >this.nodeType : NodeType ->this : this +>this : BinaryExpression >nodeType : NodeType typeFlow.checker.errorReporter.styleError(this, "use of " + text); @@ -2553,7 +2553,7 @@ module TypeScript { >checker : any >errorReporter : any >styleError : any ->this : this +>this : BinaryExpression >"use of " + text : string >"use of " : "use of " >text : string @@ -2573,7 +2573,7 @@ module TypeScript { >nodeTypeTable[this.nodeType] : any >nodeTypeTable : any >this.nodeType : NodeType ->this : this +>this : BinaryExpression >nodeType : NodeType if ((this.operand2 !== null) && (this.operand2.nodeType == NodeType.Null)) { @@ -2581,14 +2581,14 @@ module TypeScript { >(this.operand2 !== null) : boolean >this.operand2 !== null : boolean >this.operand2 : AST ->this : this +>this : BinaryExpression >operand2 : AST >null : null >(this.operand2.nodeType == NodeType.Null) : boolean >this.operand2.nodeType == NodeType.Null : boolean >this.operand2.nodeType : NodeType >this.operand2 : AST ->this : this +>this : BinaryExpression >operand2 : AST >nodeType : NodeType >NodeType.Null : any @@ -2604,7 +2604,7 @@ module TypeScript { >checker : any >errorReporter : any >styleError : any ->this : this +>this : BinaryExpression >"use of " + text + " to compare with null" : string >"use of " + text : string >"use of " : "use of " @@ -2647,7 +2647,7 @@ module TypeScript { >typeFlow.typeCheckBooleanOperator : any >typeFlow : TypeFlow >typeCheckBooleanOperator : any ->this : this +>this : BinaryExpression case NodeType.Index: >NodeType.Index : any @@ -2659,7 +2659,7 @@ module TypeScript { >typeFlow.typeCheckIndex : any >typeFlow : TypeFlow >typeCheckIndex : any ->this : this +>this : BinaryExpression case NodeType.Member: >NodeType.Member : any @@ -2669,14 +2669,14 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any >this.type : Type ->this : this +>this : BinaryExpression >type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any return this; ->this : this +>this : BinaryExpression case NodeType.LogOr: >NodeType.LogOr : any @@ -2688,7 +2688,7 @@ module TypeScript { >typeFlow.typeCheckLogOr : any >typeFlow : TypeFlow >typeCheckLogOr : any ->this : this +>this : BinaryExpression case NodeType.LogAnd: >NodeType.LogAnd : any @@ -2700,7 +2700,7 @@ module TypeScript { >typeFlow.typeCheckLogAnd : any >typeFlow : TypeFlow >typeCheckLogAnd : any ->this : this +>this : BinaryExpression case NodeType.AsgAdd: >NodeType.AsgAdd : any @@ -2742,7 +2742,7 @@ module TypeScript { >typeFlow.typeCheckArithmeticOperator : any >typeFlow : TypeFlow >typeCheckArithmeticOperator : any ->this : this +>this : BinaryExpression >true : true case NodeType.AsgXor: @@ -2755,7 +2755,7 @@ module TypeScript { >typeFlow.typeCheckBitwiseOperator : any >typeFlow : TypeFlow >typeCheckBitwiseOperator : any ->this : this +>this : BinaryExpression >true : true case NodeType.Lsh: @@ -2778,7 +2778,7 @@ module TypeScript { >typeFlow.typeCheckShift : any >typeFlow : TypeFlow >typeCheckShift : any ->this : this +>this : BinaryExpression >false : false case NodeType.AsgLsh: @@ -2801,7 +2801,7 @@ module TypeScript { >typeFlow.typeCheckShift : any >typeFlow : TypeFlow >typeCheckShift : any ->this : this +>this : BinaryExpression >true : true case NodeType.Comma: @@ -2814,7 +2814,7 @@ module TypeScript { >typeFlow.typeCheckCommaOperator : any >typeFlow : TypeFlow >typeCheckCommaOperator : any ->this : this +>this : BinaryExpression case NodeType.InstOf: >NodeType.InstOf : any @@ -2826,7 +2826,7 @@ module TypeScript { >typeFlow.typeCheckInstOf : any >typeFlow : TypeFlow >typeCheckInstOf : any ->this : this +>this : BinaryExpression case NodeType.In: >NodeType.In : any @@ -2838,7 +2838,7 @@ module TypeScript { >typeFlow.typeCheckInOperator : any >typeFlow : TypeFlow >typeCheckInOperator : any ->this : this +>this : BinaryExpression case NodeType.From: >NodeType.From : any @@ -2854,7 +2854,7 @@ module TypeScript { >checker : any >errorReporter : any >simpleError : any ->this : this +>this : BinaryExpression >"Illegal use of 'from' keyword in binary expression" : "Illegal use of 'from' keyword in binary expression" break; @@ -2865,7 +2865,7 @@ module TypeScript { >"please implement in derived class" : "please implement in derived class" } return this; ->this : this +>this : BinaryExpression } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -2879,7 +2879,7 @@ module TypeScript { >nodeTypeToTokTable[this.nodeType] : any >nodeTypeToTokTable : any >this.nodeType : NodeType ->this : this +>this : BinaryExpression >nodeType : NodeType emitter.emitParensAndCommentsInPlace(this, true); @@ -2887,7 +2887,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : BinaryExpression >true : true emitter.recordSourceMappingStart(this); @@ -2895,7 +2895,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : BinaryExpression if (binTokenId != undefined) { >binTokenId != undefined : boolean @@ -2908,7 +2908,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand1 : AST ->this : this +>this : BinaryExpression >operand1 : AST >binTokenId : any >false : false @@ -2968,7 +2968,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand2 : AST ->this : this +>this : BinaryExpression >operand2 : AST >binTokenId : any >false : false @@ -2976,7 +2976,7 @@ module TypeScript { else { switch (this.nodeType) { >this.nodeType : NodeType ->this : this +>this : BinaryExpression >nodeType : NodeType case NodeType.Dot: @@ -2990,7 +2990,7 @@ module TypeScript { >emitter.tryEmitConstant : any >emitter : Emitter >tryEmitConstant : any ->this : this +>this : BinaryExpression emitter.emitJavascript(this.operand1, TokenID.Dot, false); >emitter.emitJavascript(this.operand1, TokenID.Dot, false) : any @@ -2998,7 +2998,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand1 : AST ->this : this +>this : BinaryExpression >operand1 : AST >TokenID.Dot : any >TokenID : any @@ -3019,7 +3019,7 @@ module TypeScript { >emitJavascriptName : any >this.operand2 : Identifier >this.operand2 : AST ->this : this +>this : BinaryExpression >operand2 : AST >false : false } @@ -3035,10 +3035,10 @@ module TypeScript { >emitter : Emitter >emitIndex : any >this.operand1 : AST ->this : this +>this : BinaryExpression >operand1 : AST >this.operand2 : AST ->this : this +>this : BinaryExpression >operand2 : AST break; @@ -3053,7 +3053,7 @@ module TypeScript { >this.operand2.nodeType == NodeType.FuncDecl : boolean >this.operand2.nodeType : NodeType >this.operand2 : AST ->this : this +>this : BinaryExpression >operand2 : AST >nodeType : NodeType >NodeType.FuncDecl : any @@ -3064,7 +3064,7 @@ module TypeScript { >(this.operand2) : FuncDecl >this.operand2 : FuncDecl >this.operand2 : AST ->this : this +>this : BinaryExpression >operand2 : AST >isAccessor : () => any @@ -3072,7 +3072,7 @@ module TypeScript { >funcDecl : FuncDecl >this.operand2 : FuncDecl >this.operand2 : AST ->this : this +>this : BinaryExpression >operand2 : AST if (hasFlag(funcDecl.fncFlags, FncFlags.GetAccessor)) { @@ -3106,7 +3106,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand1 : AST ->this : this +>this : BinaryExpression >operand1 : AST >TokenID.Colon : any >TokenID : any @@ -3120,7 +3120,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand1 : AST ->this : this +>this : BinaryExpression >operand1 : AST >TokenID.Colon : any >TokenID : any @@ -3140,7 +3140,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand2 : AST ->this : this +>this : BinaryExpression >operand2 : AST >TokenID.Comma : any >TokenID : any @@ -3159,7 +3159,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand1 : AST ->this : this +>this : BinaryExpression >operand1 : AST >TokenID.Comma : any >TokenID : any @@ -3194,7 +3194,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand2 : AST ->this : this +>this : BinaryExpression >operand2 : AST >TokenID.Comma : any >TokenID : any @@ -3224,14 +3224,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : BinaryExpression emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : BinaryExpression >false : false } } @@ -3266,7 +3266,7 @@ module TypeScript { >typeFlow.typeCheckQMark : any >typeFlow : TypeFlow >typeCheckQMark : any ->this : this +>this : ConditionalExpression } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -3280,7 +3280,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ConditionalExpression >true : true emitter.recordSourceMappingStart(this); @@ -3288,7 +3288,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : ConditionalExpression emitter.emitJavascript(this.operand1, TokenID.Question, false); >emitter.emitJavascript(this.operand1, TokenID.Question, false) : any @@ -3296,7 +3296,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand1 : AST ->this : this +>this : ConditionalExpression >operand1 : AST >TokenID.Question : any >TokenID : any @@ -3316,7 +3316,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand2 : AST ->this : this +>this : ConditionalExpression >operand2 : AST >TokenID.Question : any >TokenID : any @@ -3336,7 +3336,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.operand3 : AST ->this : this +>this : ConditionalExpression >operand3 : AST >TokenID.Question : any >TokenID : any @@ -3348,14 +3348,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : ConditionalExpression emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ConditionalExpression >false : false } } @@ -3381,20 +3381,20 @@ module TypeScript { >false : false public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => NumberLiteral >typeFlow : TypeFlow this.type = typeFlow.doubleType; >this.type = typeFlow.doubleType : any >this.type : Type ->this : this +>this : NumberLiteral >type : Type >typeFlow.doubleType : any >typeFlow : TypeFlow >doubleType : any return this; ->this : this +>this : NumberLiteral } public treeViewLabel() { @@ -3405,7 +3405,7 @@ module TypeScript { >"num: " : "num: " >this.printLabel() : string >this.printLabel : () => string ->this : this +>this : NumberLiteral >printLabel : () => string } @@ -3420,7 +3420,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : NumberLiteral >true : true emitter.recordSourceMappingStart(this); @@ -3428,11 +3428,11 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : NumberLiteral if (this.isNegativeZero) { >this.isNegativeZero : boolean ->this : this +>this : NumberLiteral >isNegativeZero : boolean emitter.writeToOutput("-"); @@ -3451,13 +3451,13 @@ module TypeScript { >this.value.toString() : string >this.value.toString : (radix?: number) => string >this.value : number ->this : this +>this : NumberLiteral >value : number >toString : (radix?: number) => string if (this.hasEmptyFraction) >this.hasEmptyFraction : boolean ->this : this +>this : NumberLiteral >hasEmptyFraction : boolean emitter.writeToOutput(".0"); @@ -3472,14 +3472,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : NumberLiteral emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : NumberLiteral >false : false } @@ -3493,10 +3493,10 @@ module TypeScript { >Math : Math >floor : (x: number) => number >this.value : number ->this : this +>this : NumberLiteral >value : number >this.value : number ->this : this +>this : NumberLiteral >value : number return this.value.toFixed(2).toString(); @@ -3505,7 +3505,7 @@ module TypeScript { >this.value.toFixed(2) : string >this.value.toFixed : (fractionDigits?: number) => string >this.value : number ->this : this +>this : NumberLiteral >value : number >toFixed : (fractionDigits?: number) => string >2 : 2 @@ -3513,7 +3513,7 @@ module TypeScript { } else if (this.hasEmptyFraction) { >this.hasEmptyFraction : boolean ->this : this +>this : NumberLiteral >hasEmptyFraction : boolean return this.value.toString() + ".0"; @@ -3521,7 +3521,7 @@ module TypeScript { >this.value.toString() : string >this.value.toString : (radix?: number) => string >this.value : number ->this : this +>this : NumberLiteral >value : number >toString : (radix?: number) => string >".0" : ".0" @@ -3531,7 +3531,7 @@ module TypeScript { >this.value.toString() : string >this.value.toString : (radix?: number) => string >this.value : number ->this : this +>this : NumberLiteral >value : number >toString : (radix?: number) => string } @@ -3554,20 +3554,20 @@ module TypeScript { } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => RegexLiteral >typeFlow : TypeFlow this.type = typeFlow.regexType; >this.type = typeFlow.regexType : any >this.type : Type ->this : this +>this : RegexLiteral >type : Type >typeFlow.regexType : any >typeFlow : TypeFlow >regexType : any return this; ->this : this +>this : RegexLiteral } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -3581,7 +3581,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : RegexLiteral >true : true emitter.recordSourceMappingStart(this); @@ -3589,7 +3589,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : RegexLiteral emitter.writeToOutput(this.regex.toString()); >emitter.writeToOutput(this.regex.toString()) : any @@ -3599,7 +3599,7 @@ module TypeScript { >this.regex.toString() : any >this.regex.toString : any >this.regex : any ->this : this +>this : RegexLiteral >regex : any >toString : any @@ -3608,14 +3608,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : RegexLiteral emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : RegexLiteral >false : false } } @@ -3646,7 +3646,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : StringLiteral >true : true emitter.recordSourceMappingStart(this); @@ -3654,7 +3654,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : StringLiteral emitter.emitStringLiteral(this.text); >emitter.emitStringLiteral(this.text) : any @@ -3662,7 +3662,7 @@ module TypeScript { >emitter : Emitter >emitStringLiteral : any >this.text : string ->this : this +>this : StringLiteral >text : string emitter.recordSourceMappingEnd(this); @@ -3670,32 +3670,32 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : StringLiteral emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : StringLiteral >false : false } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => StringLiteral >typeFlow : TypeFlow this.type = typeFlow.stringType; >this.type = typeFlow.stringType : any >this.type : Type ->this : this +>this : StringLiteral >type : Type >typeFlow.stringType : any >typeFlow : TypeFlow >stringType : any return this; ->this : this +>this : StringLiteral } public treeViewLabel() { @@ -3705,7 +3705,7 @@ module TypeScript { >"st: " + this.text : string >"st: " : "st: " >this.text : string ->this : this +>this : StringLiteral >text : string } @@ -3714,7 +3714,7 @@ module TypeScript { return this.text; >this.text : string ->this : this +>this : StringLiteral >text : string } } @@ -3774,7 +3774,7 @@ module TypeScript { >this.alias.type : ModuleType >this.alias.type : Type >this.alias : AST ->this : this +>this : ImportDeclaration >alias : AST >type : Type @@ -3784,13 +3784,13 @@ module TypeScript { >!this.isDynamicImport || (this.id.sym && !(this.id.sym).onlyReferencedAsTypeRef) : boolean >!this.isDynamicImport : boolean >this.isDynamicImport : boolean ->this : this +>this : ImportDeclaration >isDynamicImport : boolean >(this.id.sym && !(this.id.sym).onlyReferencedAsTypeRef) : boolean >this.id.sym && !(this.id.sym).onlyReferencedAsTypeRef : boolean >this.id.sym : Symbol >this.id : Identifier ->this : this +>this : ImportDeclaration >id : Identifier >sym : Symbol >!(this.id.sym).onlyReferencedAsTypeRef : boolean @@ -3799,7 +3799,7 @@ module TypeScript { >this.id.sym : TypeSymbol >this.id.sym : Symbol >this.id : Identifier ->this : this +>this : ImportDeclaration >id : Identifier >sym : Symbol >onlyReferencedAsTypeRef : any @@ -3821,14 +3821,14 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : ImportDeclaration emitter.emitParensAndCommentsInPlace(this, true); >emitter.emitParensAndCommentsInPlace(this, true) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ImportDeclaration >true : true emitter.writeToOutput("var " + this.id.actualText + " = "); @@ -3841,7 +3841,7 @@ module TypeScript { >"var " : "var " >this.id.actualText : string >this.id : Identifier ->this : this +>this : ImportDeclaration >id : Identifier >actualText : string >" = " : " = " @@ -3853,7 +3853,7 @@ module TypeScript { >modAliasId : any >this.id.actualText : string >this.id : Identifier ->this : this +>this : ImportDeclaration >id : Identifier >actualText : string @@ -3864,7 +3864,7 @@ module TypeScript { >firstModAlias : any >this.firstAliasedModToString() : string >this.firstAliasedModToString : () => string ->this : this +>this : ImportDeclaration >firstAliasedModToString : () => string emitter.emitJavascript(this.alias, TokenID.Tilde, false); @@ -3873,7 +3873,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.alias : AST ->this : this +>this : ImportDeclaration >alias : AST >TokenID.Tilde : any >TokenID : any @@ -3884,7 +3884,7 @@ module TypeScript { if (!this.isDynamicImport) { >!this.isDynamicImport : boolean >this.isDynamicImport : boolean ->this : this +>this : ImportDeclaration >isDynamicImport : boolean emitter.writeToOutput(";"); @@ -3899,7 +3899,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ImportDeclaration >false : false emitter.recordSourceMappingEnd(this); @@ -3907,7 +3907,7 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : ImportDeclaration emitter.modAliasId = prevModAliasId; >emitter.modAliasId = prevModAliasId : any @@ -3934,7 +3934,7 @@ module TypeScript { >typeFlow.typeCheckImportDecl : any >typeFlow : TypeFlow >typeCheckImportDecl : any ->this : this +>this : ImportDeclaration } public getAliasName(aliasAST?: AST = this.alias) : string { @@ -3971,7 +3971,7 @@ module TypeScript { >this.getAliasName(dotExpr.operand1) + "." : string >this.getAliasName(dotExpr.operand1) : string >this.getAliasName : (aliasAST?: AST) => string ->this : this +>this : ImportDeclaration >getAliasName : (aliasAST?: AST) => string >dotExpr.operand1 : AST >dotExpr : BinaryExpression @@ -3979,7 +3979,7 @@ module TypeScript { >"." : "." >this.getAliasName(dotExpr.operand2) : string >this.getAliasName : (aliasAST?: AST) => string ->this : this +>this : ImportDeclaration >getAliasName : (aliasAST?: AST) => string >dotExpr.operand2 : AST >dotExpr : BinaryExpression @@ -3994,7 +3994,7 @@ module TypeScript { >this.alias.nodeType == NodeType.Name : boolean >this.alias.nodeType : NodeType >this.alias : AST ->this : this +>this : ImportDeclaration >alias : AST >nodeType : NodeType >NodeType.Name : any @@ -4006,7 +4006,7 @@ module TypeScript { >(this.alias) : Identifier >this.alias : Identifier >this.alias : AST ->this : this +>this : ImportDeclaration >alias : AST >actualText : string } @@ -4015,7 +4015,7 @@ module TypeScript { >dotExpr : BinaryExpression >this.alias : BinaryExpression >this.alias : AST ->this : this +>this : ImportDeclaration >alias : AST var firstMod = dotExpr.operand1; @@ -4075,7 +4075,7 @@ module TypeScript { >hasFlag(this.varFlags, VarFlags.Private) : any >hasFlag : any >this.varFlags : any ->this : this +>this : BoundDecl >varFlags : any >VarFlags.Private : any >VarFlags : any @@ -4086,7 +4086,7 @@ module TypeScript { >hasFlag(this.varFlags, VarFlags.Public) : any >hasFlag : any >this.varFlags : any ->this : this +>this : BoundDecl >varFlags : any >VarFlags.Public : any >VarFlags : any @@ -4097,7 +4097,7 @@ module TypeScript { >hasFlag(this.varFlags, VarFlags.Property) : any >hasFlag : any >this.varFlags : any ->this : this +>this : BoundDecl >varFlags : any >VarFlags.Property : any >VarFlags : any @@ -4112,7 +4112,7 @@ module TypeScript { >typeFlow.typeCheckBoundDecl : any >typeFlow : TypeFlow >typeCheckBoundDecl : any ->this : this +>this : BoundDecl } public printLabel() { @@ -4121,7 +4121,7 @@ module TypeScript { return this.treeViewLabel(); >this.treeViewLabel() : any >this.treeViewLabel : () => any ->this : this +>this : BoundDecl >treeViewLabel : () => any } } @@ -4149,7 +4149,7 @@ module TypeScript { >hasFlag(this.varFlags, VarFlags.Ambient) : any >hasFlag : any >this.varFlags : any ->this : this +>this : VarDecl >varFlags : any >VarFlags.Ambient : any >VarFlags : any @@ -4160,7 +4160,7 @@ module TypeScript { >hasFlag(this.varFlags, VarFlags.Exported) : any >hasFlag : any >this.varFlags : any ->this : this +>this : VarDecl >varFlags : any >VarFlags.Exported : any >VarFlags : any @@ -4171,7 +4171,7 @@ module TypeScript { >hasFlag(this.varFlags, VarFlags.Static) : any >hasFlag : any >this.varFlags : any ->this : this +>this : VarDecl >varFlags : any >VarFlags.Static : any >VarFlags : any @@ -4188,7 +4188,7 @@ module TypeScript { >emitter.emitJavascriptVarDecl : any >emitter : Emitter >emitJavascriptVarDecl : any ->this : this +>this : VarDecl >tokenId : TokenID } @@ -4200,7 +4200,7 @@ module TypeScript { >"var " : "var " >this.id.actualText : string >this.id : Identifier ->this : this +>this : VarDecl >id : Identifier >actualText : string } @@ -4231,10 +4231,10 @@ module TypeScript { >isOptionalArg : () => true | AST >this.isOptional || this.init : true | AST >this.isOptional : boolean ->this : this +>this : ArgDecl >isOptional : boolean >this.init : AST ->this : this +>this : ArgDecl >init : AST public treeViewLabel() { @@ -4245,7 +4245,7 @@ module TypeScript { >"arg: " : "arg: " >this.id.actualText : string >this.id : Identifier ->this : this +>this : ArgDecl >id : Identifier >actualText : string } @@ -4265,7 +4265,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ArgDecl >true : true emitter.recordSourceMappingStart(this); @@ -4273,7 +4273,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : ArgDecl emitter.writeToOutput(this.id.actualText); >emitter.writeToOutput(this.id.actualText) : any @@ -4282,7 +4282,7 @@ module TypeScript { >writeToOutput : any >this.id.actualText : string >this.id : Identifier ->this : this +>this : ArgDecl >id : Identifier >actualText : string @@ -4291,14 +4291,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : ArgDecl emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ArgDecl >false : false } } @@ -4437,7 +4437,7 @@ module TypeScript { if (this.internalNameCache == null) { >this.internalNameCache == null : boolean >this.internalNameCache : string ->this : this +>this : FuncDecl >internalNameCache : string >null : null @@ -4445,7 +4445,7 @@ module TypeScript { >extName : string >this.getNameText() : string >this.getNameText : () => string ->this : this +>this : FuncDecl >getNameText : () => string if (extName) { @@ -4454,7 +4454,7 @@ module TypeScript { this.internalNameCache = "_internal_" + extName; >this.internalNameCache = "_internal_" + extName : string >this.internalNameCache : string ->this : this +>this : FuncDecl >internalNameCache : string >"_internal_" + extName : string >"_internal_" : "_internal_" @@ -4464,7 +4464,7 @@ module TypeScript { this.internalNameCache = "_internal_" + internalId++; >this.internalNameCache = "_internal_" + internalId++ : string >this.internalNameCache : string ->this : this +>this : FuncDecl >internalNameCache : string >"_internal_" + internalId++ : string >"_internal_" : "_internal_" @@ -4474,7 +4474,7 @@ module TypeScript { } return this.internalNameCache; >this.internalNameCache : string ->this : this +>this : FuncDecl >internalNameCache : string } @@ -4483,7 +4483,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.HasSelfReference) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.HasSelfReference : any >FncFlags : any @@ -4493,7 +4493,7 @@ module TypeScript { >setHasSelfReference : () => void >this.fncFlags |= FncFlags.HasSelfReference : number >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.HasSelfReference : any >FncFlags : any @@ -4507,14 +4507,14 @@ module TypeScript { if (this.envids == null) { >this.envids == null : boolean >this.envids : Identifier[] ->this : this +>this : FuncDecl >envids : Identifier[] >null : null this.envids = new Identifier[]; >this.envids = new Identifier[] : any >this.envids : Identifier[] ->this : this +>this : FuncDecl >envids : Identifier[] >new Identifier[] : any >Identifier[] : any @@ -4525,11 +4525,11 @@ module TypeScript { >this.envids[this.envids.length] = id : Identifier >this.envids[this.envids.length] : Identifier >this.envids : Identifier[] ->this : this +>this : FuncDecl >envids : Identifier[] >this.envids.length : number >this.envids : Identifier[] ->this : this +>this : FuncDecl >envids : Identifier[] >length : number >id : Identifier @@ -4537,7 +4537,7 @@ module TypeScript { var outerFnc = this.enclosingFnc; >outerFnc : FuncDecl >this.enclosingFnc : FuncDecl ->this : this +>this : FuncDecl >enclosingFnc : FuncDecl if (sym) { @@ -4576,7 +4576,7 @@ module TypeScript { >this.envids.length - 1 : number >this.envids.length : number >this.envids : Identifier[] ->this : this +>this : FuncDecl >envids : Identifier[] >length : number >1 : 1 @@ -4589,14 +4589,14 @@ module TypeScript { if (this.jumpRefs == null) { >this.jumpRefs == null : boolean >this.jumpRefs : Identifier[] ->this : this +>this : FuncDecl >jumpRefs : Identifier[] >null : null this.jumpRefs = new Identifier[]; >this.jumpRefs = new Identifier[] : any >this.jumpRefs : Identifier[] ->this : this +>this : FuncDecl >jumpRefs : Identifier[] >new Identifier[] : any >Identifier[] : any @@ -4615,11 +4615,11 @@ module TypeScript { >this.jumpRefs[this.jumpRefs.length] = id : Identifier >this.jumpRefs[this.jumpRefs.length] : Identifier >this.jumpRefs : Identifier[] ->this : this +>this : FuncDecl >jumpRefs : Identifier[] >this.jumpRefs.length : number >this.jumpRefs : Identifier[] ->this : this +>this : FuncDecl >jumpRefs : Identifier[] >length : number >id : Identifier @@ -4638,7 +4638,7 @@ module TypeScript { >cloId : number >this.addCloRef(id, null) : number >this.addCloRef : (id: Identifier, sym: Symbol) => number ->this : this +>this : FuncDecl >addCloRef : (id: Identifier, sym: Symbol) => number >id : Identifier >null : null @@ -4709,9 +4709,9 @@ module TypeScript { >walker : any >walk : any >this.bod : ASTList ->this : this +>this : FuncDecl >bod : ASTList ->this : this +>this : FuncDecl return context; >context : any @@ -4726,7 +4726,7 @@ module TypeScript { >typeFlow.typeCheckFunction : any >typeFlow : TypeFlow >typeCheckFunction : any ->this : this +>this : FuncDecl } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -4740,7 +4740,7 @@ module TypeScript { >emitter.emitJavascriptFunction : any >emitter : Emitter >emitJavascriptFunction : any ->this : this +>this : FuncDecl } public getNameText() { @@ -4748,20 +4748,20 @@ module TypeScript { if (this.name) { >this.name : Identifier ->this : this +>this : FuncDecl >name : Identifier return this.name.actualText; >this.name.actualText : string >this.name : Identifier ->this : this +>this : FuncDecl >name : Identifier >actualText : string } else { return this.hint; >this.hint : string ->this : this +>this : FuncDecl >hint : string } } @@ -4774,7 +4774,7 @@ module TypeScript { >(this.fncFlags & FncFlags.Method) : number >this.fncFlags & FncFlags.Method : number >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.Method : any >FncFlags : any @@ -4789,7 +4789,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.CallMember) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.CallMember : any >FncFlags : any @@ -4800,7 +4800,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.ConstructMember) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.ConstructMember : any >FncFlags : any @@ -4811,7 +4811,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.IndexerMember) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.IndexerMember : any >FncFlags : any @@ -4823,22 +4823,22 @@ module TypeScript { >this.isCallMember() || this.isIndexerMember() : any >this.isCallMember() : any >this.isCallMember : () => any ->this : this +>this : FuncDecl >isCallMember : () => any >this.isIndexerMember() : any >this.isIndexerMember : () => any ->this : this +>this : FuncDecl >isIndexerMember : () => any >this.isConstructMember() : any >this.isConstructMember : () => any ->this : this +>this : FuncDecl >isConstructMember : () => any public isAnonymousFn() { return this.name === null; } >isAnonymousFn : () => boolean >this.name === null : boolean >this.name : Identifier ->this : this +>this : FuncDecl >name : Identifier >null : null @@ -4848,7 +4848,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.GetAccessor) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.GetAccessor : any >FncFlags : any @@ -4856,7 +4856,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.SetAccessor) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.SetAccessor : any >FncFlags : any @@ -4867,7 +4867,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.GetAccessor) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.GetAccessor : any >FncFlags : any @@ -4878,7 +4878,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.SetAccessor) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.SetAccessor : any >FncFlags : any @@ -4889,7 +4889,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.Ambient) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.Ambient : any >FncFlags : any @@ -4900,7 +4900,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.Exported) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.Exported : any >FncFlags : any @@ -4911,7 +4911,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.Private) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.Private : any >FncFlags : any @@ -4922,7 +4922,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.Public) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.Public : any >FncFlags : any @@ -4933,7 +4933,7 @@ module TypeScript { >hasFlag(this.fncFlags, FncFlags.Static) : any >hasFlag : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.Static : any >FncFlags : any @@ -4945,7 +4945,7 @@ module TypeScript { if (this.name == null) { >this.name == null : boolean >this.name : Identifier ->this : this +>this : FuncDecl >name : Identifier >null : null @@ -4958,7 +4958,7 @@ module TypeScript { >"func: " : "func: " >this.name.actualText : string >this.name : Identifier ->this : this +>this : FuncDecl >name : Identifier >actualText : string } @@ -4970,7 +4970,7 @@ module TypeScript { this.fncFlags = FncFlags.None; >this.fncFlags = FncFlags.None : any >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.None : any >FncFlags : any @@ -4983,7 +4983,7 @@ module TypeScript { >(this.fncFlags & FncFlags.Signature) : number >this.fncFlags & FncFlags.Signature : number >this.fncFlags : any ->this : this +>this : FuncDecl >fncFlags : any >FncFlags.Signature : any >FncFlags : any @@ -4998,7 +4998,7 @@ module TypeScript { >!this.isConstructor && (this.statics.members.length > 0 || this.innerStaticFuncs.length > 0) : boolean >!this.isConstructor : boolean >this.isConstructor : boolean ->this : this +>this : FuncDecl >isConstructor : boolean >(this.statics.members.length > 0 || this.innerStaticFuncs.length > 0) : boolean >this.statics.members.length > 0 || this.innerStaticFuncs.length > 0 : boolean @@ -5006,7 +5006,7 @@ module TypeScript { >this.statics.members.length : number >this.statics.members : AST[] >this.statics : ASTList ->this : this +>this : FuncDecl >statics : ASTList >members : AST[] >length : number @@ -5014,7 +5014,7 @@ module TypeScript { >this.innerStaticFuncs.length > 0 : boolean >this.innerStaticFuncs.length : number >this.innerStaticFuncs : FuncDecl[] ->this : this +>this : FuncDecl >innerStaticFuncs : FuncDecl[] >length : number >0 : 0 @@ -5120,14 +5120,14 @@ module TypeScript { this.vars = vars; >this.vars = vars : ASTList >this.vars : ASTList ->this : this +>this : Script >vars : ASTList >vars : ASTList this.scopes = scopes; >this.scopes = scopes : ASTList >this.scopes : ASTList ->this : this +>this : Script >scopes : ASTList >scopes : ASTList } @@ -5141,7 +5141,7 @@ module TypeScript { >typeFlow.typeCheckScript : any >typeFlow : TypeFlow >typeCheckScript : any ->this : this +>this : Script } public treeViewLabel() { @@ -5159,14 +5159,14 @@ module TypeScript { >!this.isDeclareFile && !this.isResident : boolean >!this.isDeclareFile : boolean >this.isDeclareFile : boolean ->this : this +>this : Script >isDeclareFile : boolean >!this.isResident : boolean >this.isResident : boolean ->this : this +>this : Script >isResident : boolean >this.bod : ASTList ->this : this +>this : Script >bod : ASTList for (var i = 0, len = this.bod.members.length; i < len; i++) { @@ -5176,7 +5176,7 @@ module TypeScript { >this.bod.members.length : number >this.bod.members : AST[] >this.bod : ASTList ->this : this +>this : Script >bod : ASTList >members : AST[] >length : number @@ -5191,7 +5191,7 @@ module TypeScript { >this.bod.members[i] : AST >this.bod.members : AST[] >this.bod : ASTList ->this : this +>this : Script >bod : ASTList >members : AST[] >i : number @@ -5335,7 +5335,7 @@ module TypeScript { if (this.emitRequired()) { >this.emitRequired() : boolean >this.emitRequired : () => boolean ->this : this +>this : Script >emitRequired : () => boolean emitter.emitParensAndCommentsInPlace(this, true); @@ -5343,7 +5343,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Script >true : true emitter.recordSourceMappingStart(this); @@ -5351,7 +5351,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : Script emitter.emitJavascriptList(this.bod, null, TokenID.Semicolon, true, false, false, true, this.requiresInherits); >emitter.emitJavascriptList(this.bod, null, TokenID.Semicolon, true, false, false, true, this.requiresInherits) : any @@ -5359,7 +5359,7 @@ module TypeScript { >emitter : Emitter >emitJavascriptList : any >this.bod : ASTList ->this : this +>this : Script >bod : ASTList >null : null >TokenID.Semicolon : any @@ -5370,7 +5370,7 @@ module TypeScript { >false : false >true : true >this.requiresInherits : boolean ->this : this +>this : Script >requiresInherits : boolean emitter.recordSourceMappingEnd(this); @@ -5378,14 +5378,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : Script emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Script >false : false } } @@ -5473,25 +5473,25 @@ module TypeScript { this.vars = vars; >this.vars = vars : ASTList >this.vars : ASTList ->this : this +>this : ModuleDeclaration >vars : ASTList >vars : ASTList this.scopes = scopes; >this.scopes = scopes : ASTList >this.scopes : ASTList ->this : this +>this : ModuleDeclaration >scopes : ASTList >scopes : ASTList this.prettyName = this.name.actualText; >this.prettyName = this.name.actualText : string >this.prettyName : string ->this : this +>this : ModuleDeclaration >prettyName : string >this.name.actualText : string >this.name : Identifier ->this : this +>this : ModuleDeclaration >name : Identifier >actualText : string } @@ -5501,7 +5501,7 @@ module TypeScript { >hasFlag(this.modFlags, ModuleFlags.Exported) : any >hasFlag : any >this.modFlags : any ->this : this +>this : ModuleDeclaration >modFlags : any >ModuleFlags.Exported : any >ModuleFlags : any @@ -5512,7 +5512,7 @@ module TypeScript { >hasFlag(this.modFlags, ModuleFlags.Ambient) : any >hasFlag : any >this.modFlags : any ->this : this +>this : ModuleDeclaration >modFlags : any >ModuleFlags.Ambient : any >ModuleFlags : any @@ -5523,7 +5523,7 @@ module TypeScript { >hasFlag(this.modFlags, ModuleFlags.IsEnum) : any >hasFlag : any >this.modFlags : any ->this : this +>this : ModuleDeclaration >modFlags : any >ModuleFlags.IsEnum : any >ModuleFlags : any @@ -5535,7 +5535,7 @@ module TypeScript { this.modFlags &= ~ModuleFlags.ShouldEmitModuleDecl; >this.modFlags &= ~ModuleFlags.ShouldEmitModuleDecl : number >this.modFlags : any ->this : this +>this : ModuleDeclaration >modFlags : any >~ModuleFlags.ShouldEmitModuleDecl : number >ModuleFlags.ShouldEmitModuleDecl : any @@ -5552,7 +5552,7 @@ module TypeScript { >typeFlow.typeCheckModule : any >typeFlow : TypeFlow >typeCheckModule : any ->this : this +>this : ModuleDeclaration } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -5566,7 +5566,7 @@ module TypeScript { >hasFlag(this.modFlags, ModuleFlags.ShouldEmitModuleDecl) : any >hasFlag : any >this.modFlags : any ->this : this +>this : ModuleDeclaration >modFlags : any >ModuleFlags.ShouldEmitModuleDecl : any >ModuleFlags : any @@ -5577,7 +5577,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ModuleDeclaration >true : true emitter.recordSourceMappingStart(this); @@ -5585,28 +5585,28 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : ModuleDeclaration emitter.emitJavascriptModule(this); >emitter.emitJavascriptModule(this) : any >emitter.emitJavascriptModule : any >emitter : Emitter >emitJavascriptModule : any ->this : this +>this : ModuleDeclaration emitter.recordSourceMappingEnd(this); >emitter.recordSourceMappingEnd(this) : any >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : ModuleDeclaration emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ModuleDeclaration >false : false } } @@ -5652,7 +5652,7 @@ module TypeScript { >hasFlag(this.varFlags, VarFlags.Exported) : any >hasFlag : any >this.varFlags : any ->this : this +>this : TypeDeclaration >varFlags : any >VarFlags.Exported : any >VarFlags : any @@ -5666,7 +5666,7 @@ module TypeScript { >hasFlag(this.varFlags, VarFlags.Ambient) : any >hasFlag : any >this.varFlags : any ->this : this +>this : TypeDeclaration >varFlags : any >VarFlags.Ambient : any >VarFlags : any @@ -5727,7 +5727,7 @@ module TypeScript { >typeFlow.typeCheckClass : any >typeFlow : TypeFlow >typeCheckClass : any ->this : this +>this : ClassDeclaration } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -5741,7 +5741,7 @@ module TypeScript { >emitter.emitJavascriptClass : any >emitter : Emitter >emitJavascriptClass : any ->this : this +>this : ClassDeclaration } } @@ -5782,7 +5782,7 @@ module TypeScript { >typeFlow.typeCheckInterface : any >typeFlow : TypeFlow >typeCheckInterface : any ->this : this +>this : InterfaceDeclaration } public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { @@ -5808,7 +5808,7 @@ module TypeScript { this.flags |= ASTFlags.IsStatement; >this.flags |= ASTFlags.IsStatement : number >this.flags : any ->this : this +>this : Statement >flags : any >ASTFlags.IsStatement : any >ASTFlags : any @@ -5827,24 +5827,24 @@ module TypeScript { >isCompoundStatement : () => boolean >this.isLoop() : boolean >this.isLoop : () => boolean ->this : this +>this : Statement >isLoop : () => boolean public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => Statement >typeFlow : TypeFlow this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any >this.type : Type ->this : this +>this : Statement >type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any return this; ->this : this +>this : Statement } } @@ -5875,7 +5875,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : LabeledStatement >true : true emitter.recordSourceMappingStart(this); @@ -5883,11 +5883,11 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : LabeledStatement if (this.labels) { >this.labels : ASTList ->this : this +>this : LabeledStatement >labels : ASTList var labelsLen = this.labels.members.length; @@ -5895,7 +5895,7 @@ module TypeScript { >this.labels.members.length : number >this.labels.members : AST[] >this.labels : ASTList ->this : this +>this : LabeledStatement >labels : ASTList >members : AST[] >length : number @@ -5915,7 +5915,7 @@ module TypeScript { >this.labels.members[i] : AST >this.labels.members : AST[] >this.labels : ASTList ->this : this +>this : LabeledStatement >labels : ASTList >members : AST[] >i : number @@ -5929,7 +5929,7 @@ module TypeScript { >this.stmt.emit(emitter, tokenId, true) : void >this.stmt.emit : (emitter: Emitter, tokenId: TokenID, startLine: boolean) => void >this.stmt : AST ->this : this +>this : LabeledStatement >stmt : AST >emit : (emitter: Emitter, tokenId: TokenID, startLine: boolean) => void >emitter : Emitter @@ -5941,19 +5941,19 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : LabeledStatement emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : LabeledStatement >false : false } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => LabeledStatement >typeFlow : TypeFlow typeFlow.typeCheck(this.labels); @@ -5962,24 +5962,24 @@ module TypeScript { >typeFlow : TypeFlow >typeCheck : any >this.labels : ASTList ->this : this +>this : LabeledStatement >labels : ASTList this.stmt = this.stmt.typeCheck(typeFlow); >this.stmt = this.stmt.typeCheck(typeFlow) : any >this.stmt : AST ->this : this +>this : LabeledStatement >stmt : AST >this.stmt.typeCheck(typeFlow) : any >this.stmt.typeCheck : (typeFlow: TypeFlow) => any >this.stmt : AST ->this : this +>this : LabeledStatement >stmt : AST >typeCheck : (typeFlow: TypeFlow) => any >typeFlow : TypeFlow return this; ->this : this +>this : LabeledStatement } public addToControlFlow(context: ControlFlowContext): void { @@ -6042,7 +6042,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Block >true : true emitter.recordSourceMappingStart(this); @@ -6050,11 +6050,11 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : Block if (this.isStatementBlock) { >this.isStatementBlock : boolean ->this : this +>this : Block >isStatementBlock : boolean emitter.writeLineToOutput(" {"); @@ -6081,7 +6081,7 @@ module TypeScript { >this.statements.members.length : number >this.statements.members : AST[] >this.statements : ASTList ->this : this +>this : Block >statements : ASTList >members : AST[] >length : number @@ -6096,7 +6096,7 @@ module TypeScript { if (this.statements) { >this.statements : ASTList ->this : this +>this : Block >statements : ASTList emitter.emitJavascriptList(this.statements, null, TokenID.Semicolon, true, false, false); @@ -6105,7 +6105,7 @@ module TypeScript { >emitter : Emitter >emitJavascriptList : any >this.statements : ASTList ->this : this +>this : Block >statements : ASTList >null : null >TokenID.Semicolon : any @@ -6117,7 +6117,7 @@ module TypeScript { } if (this.isStatementBlock) { >this.isStatementBlock : boolean ->this : this +>this : Block >isStatementBlock : boolean emitter.indenter.decreaseIndent(); @@ -6153,14 +6153,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : Block emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Block >false : false } @@ -6178,7 +6178,7 @@ module TypeScript { >context.pushStatement : any >context : ControlFlowContext >pushStatement : any ->this : this +>this : Block >context.current : any >context : ControlFlowContext >current : any @@ -6186,7 +6186,7 @@ module TypeScript { if (this.statements) { >this.statements : ASTList ->this : this +>this : Block >statements : ASTList context.walk(this.statements, this); @@ -6195,9 +6195,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.statements : ASTList ->this : this +>this : Block >statements : ASTList ->this : this +>this : Block } context.walker.options.goChildren = false; >context.walker.options.goChildren = false : false @@ -6244,7 +6244,7 @@ module TypeScript { } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => Block >typeFlow : TypeFlow if (!typeFlow.checker.styleSettings.emptyBlocks) { @@ -6262,7 +6262,7 @@ module TypeScript { >(this.statements === null) : boolean >this.statements === null : boolean >this.statements : ASTList ->this : this +>this : Block >statements : ASTList >null : null >(this.statements.members.length == 0) : boolean @@ -6270,7 +6270,7 @@ module TypeScript { >this.statements.members.length : number >this.statements.members : AST[] >this.statements : ASTList ->this : this +>this : Block >statements : ASTList >members : AST[] >length : number @@ -6285,7 +6285,7 @@ module TypeScript { >checker : any >errorReporter : any >styleError : any ->this : this +>this : Block >"empty block" : "empty block" } } @@ -6296,11 +6296,11 @@ module TypeScript { >typeFlow : TypeFlow >typeCheck : any >this.statements : ASTList ->this : this +>this : Block >statements : ASTList return this; ->this : this +>this : Block } } @@ -6316,7 +6316,7 @@ module TypeScript { >hasExplicitTarget : () => string >(this.target) : string >this.target : string ->this : this +>this : Jump >target : string public resolvedTarget: Statement = null; @@ -6346,7 +6346,7 @@ module TypeScript { this.resolvedTarget = stmt; >this.resolvedTarget = stmt : Statement >this.resolvedTarget : Statement ->this : this +>this : Jump >resolvedTarget : Statement >stmt : Statement @@ -6356,7 +6356,7 @@ module TypeScript { if (this.nodeType === NodeType.Continue) { >this.nodeType === NodeType.Continue : boolean >this.nodeType : NodeType ->this : this +>this : Jump >nodeType : NodeType >NodeType.Continue : any >NodeType : any @@ -6385,13 +6385,13 @@ module TypeScript { >Switch : any >this.hasExplicitTarget() : string >this.hasExplicitTarget : () => string ->this : this +>this : Jump >hasExplicitTarget : () => string this.resolvedTarget = stmt; >this.resolvedTarget = stmt : Statement >this.resolvedTarget : Statement ->this : this +>this : Jump >resolvedTarget : Statement >stmt : Statement @@ -6429,12 +6429,12 @@ module TypeScript { >context : ControlFlowContext >unconditionalBranch : any >this.resolvedTarget : Statement ->this : this +>this : Jump >resolvedTarget : Statement >(this.nodeType == NodeType.Continue) : boolean >this.nodeType == NodeType.Continue : boolean >this.nodeType : NodeType ->this : this +>this : Jump >nodeType : NodeType >NodeType.Continue : any >NodeType : any @@ -6452,7 +6452,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Jump >true : true emitter.recordSourceMappingStart(this); @@ -6460,12 +6460,12 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : Jump if (this.nodeType == NodeType.Break) { >this.nodeType == NodeType.Break : boolean >this.nodeType : NodeType ->this : this +>this : Jump >nodeType : NodeType >NodeType.Break : any >NodeType : any @@ -6489,7 +6489,7 @@ module TypeScript { if (this.hasExplicitTarget()) { >this.hasExplicitTarget() : string >this.hasExplicitTarget : () => string ->this : this +>this : Jump >hasExplicitTarget : () => string emitter.writeToOutput(" " + this.target); @@ -6500,7 +6500,7 @@ module TypeScript { >" " + this.target : string >" " : " " >this.target : string ->this : this +>this : Jump >target : string } emitter.recordSourceMappingEnd(this); @@ -6508,7 +6508,7 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : Jump emitter.writeToOutput(";"); >emitter.writeToOutput(";") : any @@ -6522,7 +6522,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Jump >false : false } } @@ -6561,7 +6561,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : WhileStatement >true : true emitter.recordSourceMappingStart(this); @@ -6569,7 +6569,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : WhileStatement var temp = emitter.setInObjectLiteral(false); >temp : any @@ -6592,7 +6592,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.cond : AST ->this : this +>this : WhileStatement >cond : AST >TokenID.While : any >TokenID : any @@ -6612,7 +6612,7 @@ module TypeScript { >emitter : Emitter >emitJavascriptStatements : any >this.body : AST ->this : this +>this : WhileStatement >body : AST >false : false >false : false @@ -6629,14 +6629,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : WhileStatement emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : WhileStatement >false : false } @@ -6649,7 +6649,7 @@ module TypeScript { >typeFlow.typeCheckWhile : any >typeFlow : TypeFlow >typeCheckWhile : any ->this : this +>this : WhileStatement } public addToControlFlow(context: ControlFlowContext): void { @@ -6692,7 +6692,7 @@ module TypeScript { >context : ControlFlowContext >addContent : any >this.cond : AST ->this : this +>this : WhileStatement >cond : AST var condBlock = context.current; @@ -6707,7 +6707,7 @@ module TypeScript { if (this.body) { >this.body : AST ->this : this +>this : WhileStatement >body : AST context.current = new BasicBlock(); @@ -6732,7 +6732,7 @@ module TypeScript { >context.pushStatement : any >context : ControlFlowContext >pushStatement : any ->this : this +>this : WhileStatement >loopStart : any >afterLoop : any @@ -6742,9 +6742,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.body : AST ->this : this +>this : WhileStatement >body : AST ->this : this +>this : WhileStatement targetInfo = context.popStatement(); >targetInfo = context.popStatement() : any @@ -6849,7 +6849,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : DoWhileStatement >true : true emitter.recordSourceMappingStart(this); @@ -6857,7 +6857,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : DoWhileStatement var temp = emitter.setInObjectLiteral(false); >temp : any @@ -6880,7 +6880,7 @@ module TypeScript { >emitter : Emitter >emitJavascriptStatements : any >this.body : AST ->this : this +>this : DoWhileStatement >body : AST >true : true >false : false @@ -6891,7 +6891,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingStart : any >this.whileAST : AST ->this : this +>this : DoWhileStatement >whileAST : AST emitter.writeToOutput("while"); @@ -6907,7 +6907,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingEnd : any >this.whileAST : AST ->this : this +>this : DoWhileStatement >whileAST : AST emitter.writeToOutput('('); @@ -6923,7 +6923,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.cond : AST ->this : this +>this : DoWhileStatement >cond : AST >TokenID.CloseParen : any >TokenID : any @@ -6949,14 +6949,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : DoWhileStatement emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : DoWhileStatement >false : false } @@ -6969,7 +6969,7 @@ module TypeScript { >typeFlow.typeCheckDoWhile : any >typeFlow : TypeFlow >typeCheckDoWhile : any ->this : this +>this : DoWhileStatement } public addToControlFlow(context: ControlFlowContext): void { @@ -7012,7 +7012,7 @@ module TypeScript { if (this.body) { >this.body : AST ->this : this +>this : DoWhileStatement >body : AST context.pushStatement(this, loopStart, afterLoop); @@ -7020,7 +7020,7 @@ module TypeScript { >context.pushStatement : any >context : ControlFlowContext >pushStatement : any ->this : this +>this : DoWhileStatement >loopStart : any >afterLoop : any @@ -7030,9 +7030,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.body : AST ->this : this +>this : DoWhileStatement >body : AST ->this : this +>this : DoWhileStatement targetInfo = context.popStatement(); >targetInfo = context.popStatement() : any @@ -7068,7 +7068,7 @@ module TypeScript { >context : ControlFlowContext >addContent : any >this.cond : AST ->this : this +>this : DoWhileStatement >cond : AST // TODO: check for while (true) @@ -7093,7 +7093,7 @@ module TypeScript { >context : ControlFlowContext >addUnreachable : any >this.cond : AST ->this : this +>this : DoWhileStatement >cond : AST } context.walker.options.goChildren = false; @@ -7151,7 +7151,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : IfStatement >true : true emitter.recordSourceMappingStart(this); @@ -7159,7 +7159,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : IfStatement var temp = emitter.setInObjectLiteral(false); >temp : any @@ -7175,7 +7175,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingStart : any >this.statement : ASTSpan ->this : this +>this : IfStatement >statement : ASTSpan emitter.writeToOutput("if("); @@ -7191,7 +7191,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.cond : AST ->this : this +>this : IfStatement >cond : AST >TokenID.If : any >TokenID : any @@ -7211,7 +7211,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingEnd : any >this.statement : ASTSpan ->this : this +>this : IfStatement >statement : ASTSpan emitter.emitJavascriptStatements(this.thenBod, true, false); @@ -7220,14 +7220,14 @@ module TypeScript { >emitter : Emitter >emitJavascriptStatements : any >this.thenBod : AST ->this : this +>this : IfStatement >thenBod : AST >true : true >false : false if (this.elseBod) { >this.elseBod : AST ->this : this +>this : IfStatement >elseBod : AST emitter.writeToOutput(" else"); @@ -7243,7 +7243,7 @@ module TypeScript { >emitter : Emitter >emitJavascriptStatements : any >this.elseBod : AST ->this : this +>this : IfStatement >elseBod : AST >true : true >true : true @@ -7260,14 +7260,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : IfStatement emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : IfStatement >false : false } @@ -7280,7 +7280,7 @@ module TypeScript { >typeFlow.typeCheckIf : any >typeFlow : TypeFlow >typeCheckIf : any ->this : this +>this : IfStatement } public addToControlFlow(context: ControlFlowContext): void { @@ -7291,7 +7291,7 @@ module TypeScript { >this.cond.addToControlFlow(context) : void >this.cond.addToControlFlow : (context: ControlFlowContext) => void >this.cond : AST ->this : this +>this : IfStatement >cond : AST >addToControlFlow : (context: ControlFlowContext) => void >context : ControlFlowContext @@ -7312,7 +7312,7 @@ module TypeScript { >context.pushStatement : any >context : ControlFlowContext >pushStatement : any ->this : this +>this : IfStatement >beforeIf : any >afterIf : any @@ -7343,9 +7343,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.thenBod : AST ->this : this +>this : IfStatement >thenBod : AST ->this : this +>this : IfStatement if (!context.noContinuation) { >!context.noContinuation : boolean @@ -7369,7 +7369,7 @@ module TypeScript { } if (this.elseBod) { >this.elseBod : AST ->this : this +>this : IfStatement >elseBod : AST // current block will be thenBod @@ -7403,9 +7403,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.elseBod : AST ->this : this +>this : IfStatement >elseBod : AST ->this : this +>this : IfStatement if (!context.noContinuation) { >!context.noContinuation : boolean @@ -7540,7 +7540,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ReturnStatement >true : true emitter.recordSourceMappingStart(this); @@ -7548,7 +7548,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : ReturnStatement var temp = emitter.setInObjectLiteral(false); >temp : any @@ -7560,7 +7560,7 @@ module TypeScript { if (this.returnExpression) { >this.returnExpression : AST ->this : this +>this : ReturnStatement >returnExpression : AST emitter.writeToOutput("return "); @@ -7576,7 +7576,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.returnExpression : AST ->this : this +>this : ReturnStatement >returnExpression : AST >TokenID.Semicolon : any >TokenID : any @@ -7603,14 +7603,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : ReturnStatement emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ReturnStatement >false : false } @@ -7641,7 +7641,7 @@ module TypeScript { >typeFlow.typeCheckReturn : any >typeFlow : TypeFlow >typeCheckReturn : any ->this : this +>this : ReturnStatement } } @@ -7677,13 +7677,13 @@ module TypeScript { if (this.lval && (this.lval.nodeType == NodeType.VarDecl)) { >this.lval && (this.lval.nodeType == NodeType.VarDecl) : boolean >this.lval : AST ->this : this +>this : ForInStatement >lval : AST >(this.lval.nodeType == NodeType.VarDecl) : boolean >this.lval.nodeType == NodeType.VarDecl : boolean >this.lval.nodeType : NodeType >this.lval : AST ->this : this +>this : ForInStatement >lval : AST >nodeType : NodeType >NodeType.VarDecl : any @@ -7696,7 +7696,7 @@ module TypeScript { >(this.lval) : BoundDecl >this.lval : BoundDecl >this.lval : AST ->this : this +>this : ForInStatement >lval : AST >varFlags : any >VarFlags.AutoInit : any @@ -7721,7 +7721,7 @@ module TypeScript { if (this.body) { >this.body : AST ->this : this +>this : ForInStatement >body : AST var singleItem: AST = null; @@ -7732,7 +7732,7 @@ module TypeScript { >this.body.nodeType == NodeType.List : boolean >this.body.nodeType : NodeType >this.body : AST ->this : this +>this : ForInStatement >body : AST >nodeType : NodeType >NodeType.List : any @@ -7743,7 +7743,7 @@ module TypeScript { >stmts : ASTList >this.body : ASTList >this.body : AST ->this : this +>this : ForInStatement >body : AST if (stmts.members.length == 1) { @@ -7770,7 +7770,7 @@ module TypeScript { >singleItem = this.body : AST >singleItem : AST >this.body : AST ->this : this +>this : ForInStatement >body : AST } // match template for filtering 'own' properties from obj @@ -7891,7 +7891,7 @@ module TypeScript { >this.obj.nodeType == NodeType.Name : boolean >this.obj.nodeType : NodeType >this.obj : AST ->this : this +>this : ForInStatement >obj : AST >nodeType : NodeType >NodeType.Name : any @@ -7912,7 +7912,7 @@ module TypeScript { >(this.obj) : Identifier >this.obj : Identifier >this.obj : AST ->this : this +>this : ForInStatement >obj : AST >actualText : string @@ -7977,7 +7977,7 @@ module TypeScript { >this.lval.nodeType == NodeType.Name : boolean >this.lval.nodeType : NodeType >this.lval : AST ->this : this +>this : ForInStatement >lval : AST >nodeType : NodeType >NodeType.Name : any @@ -7991,7 +7991,7 @@ module TypeScript { >(this.lval) : Identifier >this.lval : Identifier >this.lval : AST ->this : this +>this : ForInStatement >lval : AST >actualText : string >(arg).actualText : string @@ -8027,7 +8027,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ForInStatement >true : true emitter.recordSourceMappingStart(this); @@ -8035,7 +8035,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : ForInStatement var temp = emitter.setInObjectLiteral(false); >temp : any @@ -8051,7 +8051,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingStart : any >this.statement : ASTSpan ->this : this +>this : ForInStatement >statement : ASTSpan emitter.writeToOutput("for("); @@ -8067,7 +8067,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.lval : AST ->this : this +>this : ForInStatement >lval : AST >TokenID.For : any >TokenID : any @@ -8087,7 +8087,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.obj : AST ->this : this +>this : ForInStatement >obj : AST >TokenID.For : any >TokenID : any @@ -8107,7 +8107,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingEnd : any >this.statement : ASTSpan ->this : this +>this : ForInStatement >statement : ASTSpan emitter.emitJavascriptStatements(this.body, true, false); @@ -8116,7 +8116,7 @@ module TypeScript { >emitter : Emitter >emitJavascriptStatements : any >this.body : AST ->this : this +>this : ForInStatement >body : AST >true : true >false : false @@ -8133,14 +8133,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : ForInStatement emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ForInStatement >false : false } @@ -8161,7 +8161,7 @@ module TypeScript { >!this.isFiltered() : boolean >this.isFiltered() : boolean >this.isFiltered : () => boolean ->this : this +>this : ForInStatement >isFiltered : () => boolean typeFlow.checker.errorReporter.styleError(this, "no hasOwnProperty filter"); @@ -8173,7 +8173,7 @@ module TypeScript { >checker : any >errorReporter : any >styleError : any ->this : this +>this : ForInStatement >"no hasOwnProperty filter" : "no hasOwnProperty filter" } } @@ -8182,7 +8182,7 @@ module TypeScript { >typeFlow.typeCheckForIn : any >typeFlow : TypeFlow >typeCheckForIn : any ->this : this +>this : ForInStatement } public addToControlFlow(context: ControlFlowContext): void { @@ -8191,7 +8191,7 @@ module TypeScript { if (this.lval) { >this.lval : AST ->this : this +>this : ForInStatement >lval : AST context.addContent(this.lval); @@ -8200,12 +8200,12 @@ module TypeScript { >context : ControlFlowContext >addContent : any >this.lval : AST ->this : this +>this : ForInStatement >lval : AST } if (this.obj) { >this.obj : AST ->this : this +>this : ForInStatement >obj : AST context.addContent(this.obj); @@ -8214,7 +8214,7 @@ module TypeScript { >context : ControlFlowContext >addContent : any >this.obj : AST ->this : this +>this : ForInStatement >obj : AST } @@ -8250,7 +8250,7 @@ module TypeScript { if (this.body) { >this.body : AST ->this : this +>this : ForInStatement >body : AST context.pushStatement(this, loopStart, afterLoop); @@ -8258,7 +8258,7 @@ module TypeScript { >context.pushStatement : any >context : ControlFlowContext >pushStatement : any ->this : this +>this : ForInStatement >loopStart : any >afterLoop : any @@ -8268,9 +8268,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.body : AST ->this : this +>this : ForInStatement >body : AST ->this : this +>this : ForInStatement context.popStatement(); >context.popStatement() : any @@ -8371,7 +8371,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ForStatement >true : true emitter.recordSourceMappingStart(this); @@ -8379,7 +8379,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : ForStatement var temp = emitter.setInObjectLiteral(false); >temp : any @@ -8398,14 +8398,14 @@ module TypeScript { if (this.init) { >this.init : AST ->this : this +>this : ForStatement >init : AST if (this.init.nodeType != NodeType.List) { >this.init.nodeType != NodeType.List : boolean >this.init.nodeType : NodeType >this.init : AST ->this : this +>this : ForStatement >init : AST >nodeType : NodeType >NodeType.List : any @@ -8418,7 +8418,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.init : AST ->this : this +>this : ForStatement >init : AST >TokenID.For : any >TokenID : any @@ -8436,7 +8436,7 @@ module TypeScript { >(this.init) : ASTList >this.init : ASTList >this.init : AST ->this : this +>this : ForStatement >init : AST >members : AST[] >length : number @@ -8447,7 +8447,7 @@ module TypeScript { >emitter : Emitter >emitJavascriptList : any >this.init : AST ->this : this +>this : ForStatement >init : AST >null : null >TokenID.For : any @@ -8471,7 +8471,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.cond : AST ->this : this +>this : ForStatement >cond : AST >TokenID.For : any >TokenID : any @@ -8491,7 +8491,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.incr : AST ->this : this +>this : ForStatement >incr : AST >TokenID.For : any >TokenID : any @@ -8511,7 +8511,7 @@ module TypeScript { >emitter : Emitter >emitJavascriptStatements : any >this.body : AST ->this : this +>this : ForStatement >body : AST >true : true >false : false @@ -8528,14 +8528,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : ForStatement emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : ForStatement >false : false } @@ -8548,7 +8548,7 @@ module TypeScript { >typeFlow.typeCheckFor : any >typeFlow : TypeFlow >typeCheckFor : any ->this : this +>this : ForStatement } public addToControlFlow(context: ControlFlowContext): void { @@ -8557,7 +8557,7 @@ module TypeScript { if (this.init) { >this.init : AST ->this : this +>this : ForStatement >init : AST context.addContent(this.init); @@ -8566,7 +8566,7 @@ module TypeScript { >context : ControlFlowContext >addContent : any >this.init : AST ->this : this +>this : ForStatement >init : AST } var loopHeader = context.current; @@ -8613,7 +8613,7 @@ module TypeScript { if (this.incr) { >this.incr : AST ->this : this +>this : ForStatement >incr : AST incrBB = new BasicBlock(); @@ -8629,7 +8629,7 @@ module TypeScript { } if (this.cond) { >this.cond : AST ->this : this +>this : ForStatement >cond : AST condBlock = context.current; @@ -8645,7 +8645,7 @@ module TypeScript { >context : ControlFlowContext >addContent : any >this.cond : AST ->this : this +>this : ForStatement >cond : AST context.current = new BasicBlock(); @@ -8671,7 +8671,7 @@ module TypeScript { if (this.body) { >this.body : AST ->this : this +>this : ForStatement >body : AST context.pushStatement(this, continueTarget, afterLoop); @@ -8679,7 +8679,7 @@ module TypeScript { >context.pushStatement : any >context : ControlFlowContext >pushStatement : any ->this : this +>this : ForStatement >continueTarget : any >afterLoop : any @@ -8689,9 +8689,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.body : AST ->this : this +>this : ForStatement >body : AST ->this : this +>this : ForStatement targetInfo = context.popStatement(); >targetInfo = context.popStatement() : any @@ -8703,7 +8703,7 @@ module TypeScript { } if (this.incr) { >this.incr : AST ->this : this +>this : ForStatement >incr : AST if (context.noContinuation) { @@ -8726,7 +8726,7 @@ module TypeScript { >context : ControlFlowContext >addUnreachable : any >this.incr : AST ->this : this +>this : ForStatement >incr : AST } } @@ -8753,7 +8753,7 @@ module TypeScript { >context : ControlFlowContext >addContent : any >this.incr : AST ->this : this +>this : ForStatement >incr : AST } } @@ -8868,7 +8868,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : WithStatement >true : true emitter.recordSourceMappingStart(this); @@ -8876,7 +8876,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : WithStatement emitter.writeToOutput("with ("); >emitter.writeToOutput("with (") : any @@ -8887,7 +8887,7 @@ module TypeScript { if (this.expr) { >this.expr : AST ->this : this +>this : WithStatement >expr : AST emitter.emitJavascript(this.expr, TokenID.With, false); @@ -8896,7 +8896,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.expr : AST ->this : this +>this : WithStatement >expr : AST >TokenID.With : any >TokenID : any @@ -8917,7 +8917,7 @@ module TypeScript { >emitter : Emitter >emitJavascriptStatements : any >this.body : AST ->this : this +>this : WithStatement >body : AST >true : true >false : false @@ -8927,14 +8927,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : WithStatement emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : WithStatement >false : false } @@ -8947,7 +8947,7 @@ module TypeScript { >typeFlow.typeCheckWith : any >typeFlow : TypeFlow >typeCheckWith : any ->this : this +>this : WithStatement } } @@ -8993,7 +8993,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : SwitchStatement >true : true emitter.recordSourceMappingStart(this); @@ -9001,7 +9001,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : SwitchStatement var temp = emitter.setInObjectLiteral(false); >temp : any @@ -9017,7 +9017,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingStart : any >this.statement : ASTSpan ->this : this +>this : SwitchStatement >statement : ASTSpan emitter.writeToOutput("switch("); @@ -9033,7 +9033,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.val : AST ->this : this +>this : SwitchStatement >val : AST >TokenID.Identifier : any >TokenID : any @@ -9053,7 +9053,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingEnd : any >this.statement : ASTSpan ->this : this +>this : SwitchStatement >statement : ASTSpan emitter.writeLineToOutput(" {"); @@ -9076,7 +9076,7 @@ module TypeScript { >this.caseList.members.length : number >this.caseList.members : AST[] >this.caseList : ASTList ->this : this +>this : SwitchStatement >caseList : ASTList >members : AST[] >length : number @@ -9095,7 +9095,7 @@ module TypeScript { >this.caseList.members[i] : AST >this.caseList.members : AST[] >this.caseList : ASTList ->this : this +>this : SwitchStatement >caseList : ASTList >members : AST[] >i : number @@ -9151,19 +9151,19 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : SwitchStatement emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : SwitchStatement >false : false } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => SwitchStatement >typeFlow : TypeFlow var len = this.caseList.members.length; @@ -9171,7 +9171,7 @@ module TypeScript { >this.caseList.members.length : number >this.caseList.members : AST[] >this.caseList : ASTList ->this : this +>this : SwitchStatement >caseList : ASTList >members : AST[] >length : number @@ -9179,14 +9179,14 @@ module TypeScript { this.val = typeFlow.typeCheck(this.val); >this.val = typeFlow.typeCheck(this.val) : any >this.val : AST ->this : this +>this : SwitchStatement >val : AST >typeFlow.typeCheck(this.val) : any >typeFlow.typeCheck : any >typeFlow : TypeFlow >typeCheck : any >this.val : AST ->this : this +>this : SwitchStatement >val : AST for (var i = 0; i < len; i++) { @@ -9203,7 +9203,7 @@ module TypeScript { >this.caseList.members[i] : AST >this.caseList.members : AST[] >this.caseList : ASTList ->this : this +>this : SwitchStatement >caseList : ASTList >members : AST[] >i : number @@ -9214,7 +9214,7 @@ module TypeScript { >this.caseList.members[i] : AST >this.caseList.members : AST[] >this.caseList : ASTList ->this : this +>this : SwitchStatement >caseList : ASTList >members : AST[] >i : number @@ -9222,7 +9222,7 @@ module TypeScript { this.defaultCase = typeFlow.typeCheck(this.defaultCase); >this.defaultCase = typeFlow.typeCheck(this.defaultCase) : CaseStatement >this.defaultCase : CaseStatement ->this : this +>this : SwitchStatement >defaultCase : CaseStatement >typeFlow.typeCheck(this.defaultCase) : CaseStatement >typeFlow.typeCheck(this.defaultCase) : any @@ -9230,20 +9230,20 @@ module TypeScript { >typeFlow : TypeFlow >typeCheck : any >this.defaultCase : CaseStatement ->this : this +>this : SwitchStatement >defaultCase : CaseStatement this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any >this.type : Type ->this : this +>this : SwitchStatement >type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any return this; ->this : this +>this : SwitchStatement } // if there are break statements that match this switch, then just link cond block with block after switch @@ -9263,7 +9263,7 @@ module TypeScript { >context : ControlFlowContext >addContent : any >this.val : AST ->this : this +>this : SwitchStatement >val : AST var execBlock = new BasicBlock(); @@ -9302,7 +9302,7 @@ module TypeScript { >context.pushStatement : any >context : ControlFlowContext >pushStatement : any ->this : this +>this : SwitchStatement >execBlock : any >afterSwitch : any @@ -9312,9 +9312,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.caseList : ASTList ->this : this +>this : SwitchStatement >caseList : ASTList ->this : this +>this : SwitchStatement context.popSwitch(); >context.popSwitch() : any @@ -9334,14 +9334,14 @@ module TypeScript { >(this.defaultCase == null) : boolean >this.defaultCase == null : boolean >this.defaultCase : CaseStatement ->this : this +>this : SwitchStatement >defaultCase : CaseStatement >null : null if (this.defaultCase == null) { >this.defaultCase == null : boolean >this.defaultCase : CaseStatement ->this : this +>this : SwitchStatement >defaultCase : CaseStatement >null : null @@ -9427,7 +9427,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : CaseStatement >true : true emitter.recordSourceMappingStart(this); @@ -9435,11 +9435,11 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : CaseStatement if (this.expr) { >this.expr : AST ->this : this +>this : CaseStatement >expr : AST emitter.writeToOutput("case "); @@ -9455,7 +9455,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.expr : AST ->this : this +>this : CaseStatement >expr : AST >TokenID.Identifier : any >TokenID : any @@ -9483,7 +9483,7 @@ module TypeScript { >emitter : Emitter >emitJavascriptStatements : any >this.body : ASTList ->this : this +>this : CaseStatement >body : ASTList >false : false >false : false @@ -9493,32 +9493,32 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : CaseStatement emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : CaseStatement >false : false } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => CaseStatement >typeFlow : TypeFlow this.expr = typeFlow.typeCheck(this.expr); >this.expr = typeFlow.typeCheck(this.expr) : any >this.expr : AST ->this : this +>this : CaseStatement >expr : AST >typeFlow.typeCheck(this.expr) : any >typeFlow.typeCheck : any >typeFlow : TypeFlow >typeCheck : any >this.expr : AST ->this : this +>this : CaseStatement >expr : AST typeFlow.typeCheck(this.body); @@ -9527,20 +9527,20 @@ module TypeScript { >typeFlow : TypeFlow >typeCheck : any >this.body : ASTList ->this : this +>this : CaseStatement >body : ASTList this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any >this.type : Type ->this : this +>this : CaseStatement >type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any return this; ->this : this +>this : CaseStatement } // TODO: more reasoning about unreachable cases (such as duplicate literals as case expressions) @@ -9571,7 +9571,7 @@ module TypeScript { // TODO: fall-through from previous (+ to end of switch) if (this.expr) { >this.expr : AST ->this : this +>this : CaseStatement >expr : AST var exprBlock = new BasicBlock(); @@ -9599,7 +9599,7 @@ module TypeScript { >context : ControlFlowContext >addContent : any >this.expr : AST ->this : this +>this : CaseStatement >expr : AST exprBlock.addSuccessor(execBlock); @@ -9626,7 +9626,7 @@ module TypeScript { if (this.body) { >this.body : ASTList ->this : this +>this : CaseStatement >body : ASTList context.walk(this.body, this); @@ -9635,9 +9635,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.body : ASTList ->this : this +>this : CaseStatement >body : ASTList ->this : this +>this : CaseStatement } context.noContinuation = false; >context.noContinuation = false : false @@ -9688,7 +9688,7 @@ module TypeScript { } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => TypeReference >typeFlow : TypeFlow var prevInTCTR = typeFlow.inTypeRefTypeCheck; @@ -9708,7 +9708,7 @@ module TypeScript { >typeLink : any >getTypeLink(this, typeFlow.checker, true) : any >getTypeLink : any ->this : this +>this : TypeReference >typeFlow.checker : any >typeFlow : TypeFlow >checker : any @@ -9729,7 +9729,7 @@ module TypeScript { if (this.term) { >this.term : AST ->this : this +>this : TypeReference >term : AST typeFlow.typeCheck(this.term); @@ -9738,7 +9738,7 @@ module TypeScript { >typeFlow : TypeFlow >typeCheck : any >this.term : AST ->this : this +>this : TypeReference >term : AST } @@ -9750,12 +9750,12 @@ module TypeScript { >typeLink.type : any >typeLink : any >type : any ->this : this +>this : TypeReference this.type = typeLink.type; >this.type = typeLink.type : any >this.type : Type ->this : this +>this : TypeReference >type : Type >typeLink.type : any >typeLink : any @@ -9764,18 +9764,18 @@ module TypeScript { // in error recovery cases, there may not be a term if (this.term) { >this.term : AST ->this : this +>this : TypeReference >term : AST this.term.type = this.type; >this.term.type = this.type : Type >this.term.type : Type >this.term : AST ->this : this +>this : TypeReference >term : AST >type : Type >this.type : Type ->this : this +>this : TypeReference >type : Type } @@ -9787,7 +9787,7 @@ module TypeScript { >prevInTCTR : any return this; ->this : this +>this : TypeReference } } @@ -9822,7 +9822,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : TryFinally emitter.emitJavascript(this.tryNode, TokenID.Try, false); >emitter.emitJavascript(this.tryNode, TokenID.Try, false) : any @@ -9830,7 +9830,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.tryNode : AST ->this : this +>this : TryFinally >tryNode : AST >TokenID.Try : any >TokenID : any @@ -9843,7 +9843,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.finallyNode : Finally ->this : this +>this : TryFinally >finallyNode : Finally >TokenID.Finally : any >TokenID : any @@ -9855,30 +9855,30 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : TryFinally } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => TryFinally >typeFlow : TypeFlow this.tryNode = typeFlow.typeCheck(this.tryNode); >this.tryNode = typeFlow.typeCheck(this.tryNode) : any >this.tryNode : AST ->this : this +>this : TryFinally >tryNode : AST >typeFlow.typeCheck(this.tryNode) : any >typeFlow.typeCheck : any >typeFlow : TypeFlow >typeCheck : any >this.tryNode : AST ->this : this +>this : TryFinally >tryNode : AST this.finallyNode = typeFlow.typeCheck(this.finallyNode); >this.finallyNode = typeFlow.typeCheck(this.finallyNode) : Finally >this.finallyNode : Finally ->this : this +>this : TryFinally >finallyNode : Finally >typeFlow.typeCheck(this.finallyNode) : Finally >typeFlow.typeCheck(this.finallyNode) : any @@ -9886,20 +9886,20 @@ module TypeScript { >typeFlow : TypeFlow >typeCheck : any >this.finallyNode : Finally ->this : this +>this : TryFinally >finallyNode : Finally this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any >this.type : Type ->this : this +>this : TryFinally >type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any return this; ->this : this +>this : TryFinally } public addToControlFlow(context: ControlFlowContext) { @@ -9917,9 +9917,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.tryNode : AST ->this : this +>this : TryFinally >tryNode : AST ->this : this +>this : TryFinally var finBlock = new BasicBlock(); >finBlock : any @@ -9952,7 +9952,7 @@ module TypeScript { >context.pushStatement : any >context : ControlFlowContext >pushStatement : any ->this : this +>this : TryFinally >null : null >afterFinally : any @@ -9962,9 +9962,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.finallyNode : Finally ->this : this +>this : TryFinally >finallyNode : Finally ->this : this +>this : TryFinally if (!context.noContinuation && context.current) { >!context.noContinuation && context.current : any @@ -10059,7 +10059,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : TryCatch >true : true emitter.recordSourceMappingStart(this); @@ -10067,7 +10067,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : TryCatch emitter.emitJavascript(this.tryNode, TokenID.Try, false); >emitter.emitJavascript(this.tryNode, TokenID.Try, false) : any @@ -10075,7 +10075,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.tryNode : Try ->this : this +>this : TryCatch >tryNode : Try >TokenID.Try : any >TokenID : any @@ -10088,7 +10088,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.catchNode : Catch ->this : this +>this : TryCatch >catchNode : Catch >TokenID.Catch : any >TokenID : any @@ -10100,14 +10100,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : TryCatch emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : TryCatch >false : false } @@ -10150,7 +10150,7 @@ module TypeScript { >context.pushStatement : any >context : ControlFlowContext >pushStatement : any ->this : this +>this : TryCatch >null : null >afterTryCatch : any @@ -10160,9 +10160,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.tryNode : Try ->this : this +>this : TryCatch >tryNode : Try ->this : this +>this : TryCatch if (!context.noContinuation) { >!context.noContinuation : boolean @@ -10208,9 +10208,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.catchNode : Catch ->this : this +>this : TryCatch >catchNode : Catch ->this : this +>this : TryCatch context.popStatement(); >context.popStatement() : any @@ -10259,13 +10259,13 @@ module TypeScript { } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => TryCatch >typeFlow : TypeFlow this.tryNode = typeFlow.typeCheck(this.tryNode); >this.tryNode = typeFlow.typeCheck(this.tryNode) : Try >this.tryNode : Try ->this : this +>this : TryCatch >tryNode : Try >typeFlow.typeCheck(this.tryNode) : Try >typeFlow.typeCheck(this.tryNode) : any @@ -10273,13 +10273,13 @@ module TypeScript { >typeFlow : TypeFlow >typeCheck : any >this.tryNode : Try ->this : this +>this : TryCatch >tryNode : Try this.catchNode = typeFlow.typeCheck(this.catchNode); >this.catchNode = typeFlow.typeCheck(this.catchNode) : Catch >this.catchNode : Catch ->this : this +>this : TryCatch >catchNode : Catch >typeFlow.typeCheck(this.catchNode) : Catch >typeFlow.typeCheck(this.catchNode) : any @@ -10287,20 +10287,20 @@ module TypeScript { >typeFlow : TypeFlow >typeCheck : any >this.catchNode : Catch ->this : this +>this : TryCatch >catchNode : Catch this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any >this.type : Type ->this : this +>this : TryCatch >type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any return this; ->this : this +>this : TryCatch } } @@ -10330,7 +10330,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Try >true : true emitter.recordSourceMappingStart(this); @@ -10338,7 +10338,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : Try emitter.writeToOutput("try "); >emitter.writeToOutput("try ") : any @@ -10353,7 +10353,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.body : AST ->this : this +>this : Try >body : AST >TokenID.Try : any >TokenID : any @@ -10365,36 +10365,36 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : Try emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Try >false : false } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => Try >typeFlow : TypeFlow this.body = typeFlow.typeCheck(this.body); >this.body = typeFlow.typeCheck(this.body) : any >this.body : AST ->this : this +>this : Try >body : AST >typeFlow.typeCheck(this.body) : any >typeFlow.typeCheck : any >typeFlow : TypeFlow >typeCheck : any >this.body : AST ->this : this +>this : Try >body : AST return this; ->this : this +>this : Try } public addToControlFlow(context: ControlFlowContext) { @@ -10403,7 +10403,7 @@ module TypeScript { if (this.body) { >this.body : AST ->this : this +>this : Try >body : AST context.walk(this.body, this); @@ -10412,9 +10412,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.body : AST ->this : this +>this : Try >body : AST ->this : this +>this : Try } context.walker.options.goChildren = false; >context.walker.options.goChildren = false : false @@ -10453,14 +10453,14 @@ module TypeScript { if (this.param) { >this.param : VarDecl ->this : this +>this : Catch >param : VarDecl this.param.varFlags |= VarFlags.AutoInit; >this.param.varFlags |= VarFlags.AutoInit : number >this.param.varFlags : any >this.param : VarDecl ->this : this +>this : Catch >param : VarDecl >varFlags : any >VarFlags.AutoInit : any @@ -10488,7 +10488,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Catch >true : true emitter.recordSourceMappingStart(this); @@ -10496,7 +10496,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : Catch emitter.writeToOutput(" "); >emitter.writeToOutput(" ") : any @@ -10511,7 +10511,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingStart : any >this.statement : ASTSpan ->this : this +>this : Catch >statement : ASTSpan emitter.writeToOutput("catch ("); @@ -10527,7 +10527,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.param : VarDecl ->this : this +>this : Catch >param : VarDecl >TokenID.OpenParen : any >TokenID : any @@ -10547,7 +10547,7 @@ module TypeScript { >emitter : Emitter >recordSourceMappingEnd : any >this.statement : ASTSpan ->this : this +>this : Catch >statement : ASTSpan emitter.emitJavascript(this.body, TokenID.Catch, false); @@ -10556,7 +10556,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.body : AST ->this : this +>this : Catch >body : AST >TokenID.Catch : any >TokenID : any @@ -10568,14 +10568,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : Catch emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Catch >false : false } @@ -10585,7 +10585,7 @@ module TypeScript { if (this.param) { >this.param : VarDecl ->this : this +>this : Catch >param : VarDecl context.addContent(this.param); @@ -10594,7 +10594,7 @@ module TypeScript { >context : ControlFlowContext >addContent : any >this.param : VarDecl ->this : this +>this : Catch >param : VarDecl var bodBlock = new BasicBlock(); @@ -10620,7 +10620,7 @@ module TypeScript { } if (this.body) { >this.body : AST ->this : this +>this : Catch >body : AST context.walk(this.body, this); @@ -10629,9 +10629,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.body : AST ->this : this +>this : Catch >body : AST ->this : this +>this : Catch } context.noContinuation = false; >context.noContinuation = false : false @@ -10653,7 +10653,7 @@ module TypeScript { } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => Catch >typeFlow : TypeFlow var prevScope = typeFlow.scope; @@ -10668,13 +10668,13 @@ module TypeScript { >typeFlow : TypeFlow >scope : any >this.containedScope : SymbolScope ->this : this +>this : Catch >containedScope : SymbolScope this.param = typeFlow.typeCheck(this.param); >this.param = typeFlow.typeCheck(this.param) : VarDecl >this.param : VarDecl ->this : this +>this : Catch >param : VarDecl >typeFlow.typeCheck(this.param) : VarDecl >typeFlow.typeCheck(this.param) : any @@ -10682,7 +10682,7 @@ module TypeScript { >typeFlow : TypeFlow >typeCheck : any >this.param : VarDecl ->this : this +>this : Catch >param : VarDecl var exceptVar = new ValueLocation(); @@ -10699,7 +10699,7 @@ module TypeScript { >(this.param) : VarDecl >this.param : VarDecl >this.param : VarDecl ->this : this +>this : Catch >param : VarDecl >id : Identifier >text : string @@ -10707,7 +10707,7 @@ module TypeScript { this.param.minChar, >this.param.minChar : number >this.param : VarDecl ->this : this +>this : Catch >param : VarDecl >minChar : number @@ -10790,7 +10790,7 @@ module TypeScript { >this.param.sym = exceptVar.symbol : any >this.param.sym : Symbol >this.param : VarDecl ->this : this +>this : Catch >param : VarDecl >sym : Symbol >exceptVar.symbol : any @@ -10810,7 +10810,7 @@ module TypeScript { >symbol : any >container : any >this.param : VarDecl ->this : this +>this : Catch >param : VarDecl >exceptVar.symbol : any >exceptVar : any @@ -10829,14 +10829,14 @@ module TypeScript { this.body = typeFlow.typeCheck(this.body); >this.body = typeFlow.typeCheck(this.body) : any >this.body : AST ->this : this +>this : Catch >body : AST >typeFlow.typeCheck(this.body) : any >typeFlow.typeCheck : any >typeFlow : TypeFlow >typeCheck : any >this.body : AST ->this : this +>this : Catch >body : AST // if we're in provisional typecheck mode, clean up the symbol entry @@ -10880,7 +10880,7 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any >this.type : Type ->this : this +>this : Catch >type : Type >typeFlow.voidType : any >typeFlow : TypeFlow @@ -10894,7 +10894,7 @@ module TypeScript { >prevScope : any return this; ->this : this +>this : Catch } } @@ -10924,7 +10924,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Finally >true : true emitter.recordSourceMappingStart(this); @@ -10932,7 +10932,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : Finally emitter.writeToOutput("finally"); >emitter.writeToOutput("finally") : any @@ -10947,7 +10947,7 @@ module TypeScript { >emitter : Emitter >emitJavascript : any >this.body : AST ->this : this +>this : Finally >body : AST >TokenID.Finally : any >TokenID : any @@ -10959,14 +10959,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : Finally emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : Finally >false : false } @@ -10976,7 +10976,7 @@ module TypeScript { if (this.body) { >this.body : AST ->this : this +>this : Finally >body : AST context.walk(this.body, this); @@ -10985,9 +10985,9 @@ module TypeScript { >context : ControlFlowContext >walk : any >this.body : AST ->this : this +>this : Finally >body : AST ->this : this +>this : Finally } context.walker.options.goChildren = false; >context.walker.options.goChildren = false : false @@ -11009,24 +11009,24 @@ module TypeScript { } public typeCheck(typeFlow: TypeFlow) { ->typeCheck : (typeFlow: TypeFlow) => this +>typeCheck : (typeFlow: TypeFlow) => Finally >typeFlow : TypeFlow this.body = typeFlow.typeCheck(this.body); >this.body = typeFlow.typeCheck(this.body) : any >this.body : AST ->this : this +>this : Finally >body : AST >typeFlow.typeCheck(this.body) : any >typeFlow.typeCheck : any >typeFlow : TypeFlow >typeCheck : any >this.body : AST ->this : this +>this : Finally >body : AST return this; ->this : this +>this : Finally } } @@ -11057,24 +11057,24 @@ module TypeScript { if (this.text == null) { >this.text == null : boolean >this.text : string[] ->this : this +>this : Comment >text : string[] >null : null if (this.isBlockComment) { >this.isBlockComment : boolean ->this : this +>this : Comment >isBlockComment : boolean this.text = this.content.split("\n"); >this.text = this.content.split("\n") : string[] >this.text : string[] ->this : this +>this : Comment >text : string[] >this.content.split("\n") : string[] >this.content.split : (separator: string | RegExp, limit?: number) => string[] >this.content : string ->this : this +>this : Comment >content : string >split : (separator: string | RegExp, limit?: number) => string[] >"\n" : "\n" @@ -11086,7 +11086,7 @@ module TypeScript { >i : number >this.text.length : number >this.text : string[] ->this : this +>this : Comment >text : string[] >length : number >i++ : number @@ -11096,14 +11096,14 @@ module TypeScript { >this.text[i] = this.text[i].replace(/^\s+|\s+$/g, '') : string >this.text[i] : string >this.text : string[] ->this : this +>this : Comment >text : string[] >i : number >this.text[i].replace(/^\s+|\s+$/g, '') : string >this.text[i].replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >this.text[i] : string >this.text : string[] ->this : this +>this : Comment >text : string[] >i : number >replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } @@ -11115,14 +11115,14 @@ module TypeScript { this.text = [(this.content.replace(/^\s+|\s+$/g, ''))]; >this.text = [(this.content.replace(/^\s+|\s+$/g, ''))] : string[] >this.text : string[] ->this : this +>this : Comment >text : string[] >[(this.content.replace(/^\s+|\s+$/g, ''))] : string[] >(this.content.replace(/^\s+|\s+$/g, '')) : string >this.content.replace(/^\s+|\s+$/g, '') : string >this.content.replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >this.content : string ->this : this +>this : Comment >content : string >replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >/^\s+|\s+$/g : RegExp @@ -11132,7 +11132,7 @@ module TypeScript { return this.text; >this.text : string[] ->this : this +>this : Comment >text : string[] } } @@ -11161,7 +11161,7 @@ module TypeScript { >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : DebuggerStatement >true : true emitter.recordSourceMappingStart(this); @@ -11169,7 +11169,7 @@ module TypeScript { >emitter.recordSourceMappingStart : any >emitter : Emitter >recordSourceMappingStart : any ->this : this +>this : DebuggerStatement emitter.writeLineToOutput("debugger;"); >emitter.writeLineToOutput("debugger;") : any @@ -11183,14 +11183,14 @@ module TypeScript { >emitter.recordSourceMappingEnd : any >emitter : Emitter >recordSourceMappingEnd : any ->this : this +>this : DebuggerStatement emitter.emitParensAndCommentsInPlace(this, false); >emitter.emitParensAndCommentsInPlace(this, false) : any >emitter.emitParensAndCommentsInPlace : any >emitter : Emitter >emitParensAndCommentsInPlace : any ->this : this +>this : DebuggerStatement >false : false } } diff --git a/tests/baselines/reference/parserRealSource12.types b/tests/baselines/reference/parserRealSource12.types index 0f7b67d9121..4330ffaf7f0 100644 --- a/tests/baselines/reference/parserRealSource12.types +++ b/tests/baselines/reference/parserRealSource12.types @@ -43,7 +43,7 @@ module TypeScript { this.goChildren = !stop; >this.goChildren = !stop : boolean >this.goChildren : boolean ->this : this +>this : AstWalkOptions >goChildren : boolean >!stop : boolean >stop : boolean @@ -51,7 +51,7 @@ module TypeScript { this.goNextSibling = !stop; >this.goNextSibling = !stop : boolean >this.goNextSibling : boolean ->this : this +>this : AstWalkOptions >goNextSibling : boolean >!stop : boolean >stop : boolean @@ -101,11 +101,11 @@ module TypeScript { >preAst : AST >this.pre(ast, parent, this) : AST >this.pre : IAstWalkCallback ->this : this +>this : AstWalker >pre : IAstWalkCallback >ast : AST >parent : AST ->this : this +>this : AstWalker if (preAst === undefined) { >preAst === undefined : boolean @@ -120,7 +120,7 @@ module TypeScript { if (this.options.goChildren) { >this.options.goChildren : boolean >this.options : AstWalkOptions ->this : this +>this : AstWalker >options : AstWalkOptions >goChildren : boolean @@ -128,7 +128,7 @@ module TypeScript { >svGoSib : boolean >this.options.goNextSibling : boolean >this.options : AstWalkOptions ->this : this +>this : AstWalker >options : AstWalkOptions >goNextSibling : boolean @@ -136,7 +136,7 @@ module TypeScript { >this.options.goNextSibling = true : true >this.options.goNextSibling : boolean >this.options : AstWalkOptions ->this : this +>this : AstWalker >options : AstWalkOptions >goNextSibling : boolean >true : true @@ -146,20 +146,20 @@ module TypeScript { >this.childrenWalkers[ast.nodeType](ast, parent, this) : void >this.childrenWalkers[ast.nodeType] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalker >childrenWalkers : IAstWalkChildren[] >ast.nodeType : any >ast : AST >nodeType : any >ast : AST >parent : AST ->this : this +>this : AstWalker this.options.goNextSibling = svGoSib; >this.options.goNextSibling = svGoSib : boolean >this.options.goNextSibling : boolean >this.options : AstWalkOptions ->this : this +>this : AstWalker >options : AstWalkOptions >goNextSibling : boolean >svGoSib : boolean @@ -170,25 +170,25 @@ module TypeScript { >this.options.goChildren = true : true >this.options.goChildren : boolean >this.options : AstWalkOptions ->this : this +>this : AstWalker >options : AstWalkOptions >goChildren : boolean >true : true } if (this.post) { >this.post : IAstWalkCallback ->this : this +>this : AstWalker >post : IAstWalkCallback var postAst = this.post(preAst, parent, this); >postAst : AST >this.post(preAst, parent, this) : AST >this.post : IAstWalkCallback ->this : this +>this : AstWalker >post : IAstWalkCallback >preAst : AST >parent : AST ->this : this +>this : AstWalker if (postAst === undefined) { >postAst === undefined : boolean @@ -221,7 +221,7 @@ module TypeScript { this.initChildrenWalkers(); >this.initChildrenWalkers() : void >this.initChildrenWalkers : () => void ->this : this +>this : AstWalkerFactory >initChildrenWalkers : () => void } @@ -238,7 +238,7 @@ module TypeScript { >this.getWalker(pre, post, options, state).walk : (ast: AST, parent: AST) => AST >this.getWalker(pre, post, options, state) : IAstWalker >this.getWalker : (pre: IAstWalkCallback, post?: IAstWalkCallback, options?: AstWalkOptions, state?: any) => IAstWalker ->this : this +>this : AstWalkerFactory >getWalker : (pre: IAstWalkCallback, post?: IAstWalkCallback, options?: AstWalkOptions, state?: any) => IAstWalker >pre : IAstWalkCallback >post : IAstWalkCallback @@ -259,7 +259,7 @@ module TypeScript { return this.getSlowWalker(pre, post, options, state); >this.getSlowWalker(pre, post, options, state) : IAstWalker >this.getSlowWalker : (pre: IAstWalkCallback, post?: IAstWalkCallback, options?: AstWalkOptions, state?: any) => IAstWalker ->this : this +>this : AstWalkerFactory >getSlowWalker : (pre: IAstWalkCallback, post?: IAstWalkCallback, options?: AstWalkOptions, state?: any) => IAstWalker >pre : IAstWalkCallback >post : IAstWalkCallback @@ -289,7 +289,7 @@ module TypeScript { >new AstWalker(this.childrenWalkers, pre, post, options, state) : AstWalker >AstWalker : typeof AstWalker >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >pre : IAstWalkCallback >post : IAstWalkCallback @@ -304,7 +304,7 @@ module TypeScript { >this.childrenWalkers[NodeType.None] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.None] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.None : any >NodeType : any @@ -317,7 +317,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Empty] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Empty] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Empty : any >NodeType : any @@ -330,7 +330,7 @@ module TypeScript { >this.childrenWalkers[NodeType.EmptyExpr] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.EmptyExpr] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.EmptyExpr : any >NodeType : any @@ -343,7 +343,7 @@ module TypeScript { >this.childrenWalkers[NodeType.True] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.True] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.True : any >NodeType : any @@ -356,7 +356,7 @@ module TypeScript { >this.childrenWalkers[NodeType.False] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.False] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.False : any >NodeType : any @@ -369,7 +369,7 @@ module TypeScript { >this.childrenWalkers[NodeType.This] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.This] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.This : any >NodeType : any @@ -382,7 +382,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Super] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Super] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Super : any >NodeType : any @@ -395,7 +395,7 @@ module TypeScript { >this.childrenWalkers[NodeType.QString] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.QString] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.QString : any >NodeType : any @@ -408,7 +408,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Regex] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Regex] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Regex : any >NodeType : any @@ -421,7 +421,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Null] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Null] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Null : any >NodeType : any @@ -434,7 +434,7 @@ module TypeScript { >this.childrenWalkers[NodeType.ArrayLit] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.ArrayLit] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.ArrayLit : any >NodeType : any @@ -447,7 +447,7 @@ module TypeScript { >this.childrenWalkers[NodeType.ObjectLit] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.ObjectLit] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.ObjectLit : any >NodeType : any @@ -460,7 +460,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Void] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Void] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Void : any >NodeType : any @@ -473,7 +473,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Comma] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Comma] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Comma : any >NodeType : any @@ -486,7 +486,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Pos] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Pos] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Pos : any >NodeType : any @@ -499,7 +499,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Neg] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Neg] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Neg : any >NodeType : any @@ -512,7 +512,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Delete] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Delete] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Delete : any >NodeType : any @@ -525,7 +525,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Await] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Await] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Await : any >NodeType : any @@ -538,7 +538,7 @@ module TypeScript { >this.childrenWalkers[NodeType.In] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.In] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.In : any >NodeType : any @@ -551,7 +551,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Dot] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Dot] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Dot : any >NodeType : any @@ -564,7 +564,7 @@ module TypeScript { >this.childrenWalkers[NodeType.From] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.From] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.From : any >NodeType : any @@ -577,7 +577,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Is] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Is] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Is : any >NodeType : any @@ -590,7 +590,7 @@ module TypeScript { >this.childrenWalkers[NodeType.InstOf] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.InstOf] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.InstOf : any >NodeType : any @@ -603,7 +603,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Typeof] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Typeof] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Typeof : any >NodeType : any @@ -616,7 +616,7 @@ module TypeScript { >this.childrenWalkers[NodeType.NumberLit] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.NumberLit] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.NumberLit : any >NodeType : any @@ -629,7 +629,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Name] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Name] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Name : any >NodeType : any @@ -642,7 +642,7 @@ module TypeScript { >this.childrenWalkers[NodeType.TypeRef] = ChildrenWalkers.walkTypeReferenceChildren : (preAst: TypeReference, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.TypeRef] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.TypeRef : any >NodeType : any @@ -655,7 +655,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Index] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Index] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Index : any >NodeType : any @@ -668,7 +668,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Call] = ChildrenWalkers.walkCallExpressionChildren : (preAst: CallExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Call] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Call : any >NodeType : any @@ -681,7 +681,7 @@ module TypeScript { >this.childrenWalkers[NodeType.New] = ChildrenWalkers.walkCallExpressionChildren : (preAst: CallExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.New] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.New : any >NodeType : any @@ -694,7 +694,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Asg] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Asg] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Asg : any >NodeType : any @@ -707,7 +707,7 @@ module TypeScript { >this.childrenWalkers[NodeType.AsgAdd] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.AsgAdd] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.AsgAdd : any >NodeType : any @@ -720,7 +720,7 @@ module TypeScript { >this.childrenWalkers[NodeType.AsgSub] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.AsgSub] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.AsgSub : any >NodeType : any @@ -733,7 +733,7 @@ module TypeScript { >this.childrenWalkers[NodeType.AsgDiv] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.AsgDiv] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.AsgDiv : any >NodeType : any @@ -746,7 +746,7 @@ module TypeScript { >this.childrenWalkers[NodeType.AsgMul] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.AsgMul] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.AsgMul : any >NodeType : any @@ -759,7 +759,7 @@ module TypeScript { >this.childrenWalkers[NodeType.AsgMod] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.AsgMod] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.AsgMod : any >NodeType : any @@ -772,7 +772,7 @@ module TypeScript { >this.childrenWalkers[NodeType.AsgAnd] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.AsgAnd] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.AsgAnd : any >NodeType : any @@ -785,7 +785,7 @@ module TypeScript { >this.childrenWalkers[NodeType.AsgXor] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.AsgXor] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.AsgXor : any >NodeType : any @@ -798,7 +798,7 @@ module TypeScript { >this.childrenWalkers[NodeType.AsgOr] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.AsgOr] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.AsgOr : any >NodeType : any @@ -811,7 +811,7 @@ module TypeScript { >this.childrenWalkers[NodeType.AsgLsh] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.AsgLsh] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.AsgLsh : any >NodeType : any @@ -824,7 +824,7 @@ module TypeScript { >this.childrenWalkers[NodeType.AsgRsh] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.AsgRsh] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.AsgRsh : any >NodeType : any @@ -837,7 +837,7 @@ module TypeScript { >this.childrenWalkers[NodeType.AsgRs2] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.AsgRs2] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.AsgRs2 : any >NodeType : any @@ -850,7 +850,7 @@ module TypeScript { >this.childrenWalkers[NodeType.ConditionalExpression] = ChildrenWalkers.walkTrinaryExpressionChildren : (preAst: ConditionalExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.ConditionalExpression] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.ConditionalExpression : any >NodeType : any @@ -863,7 +863,7 @@ module TypeScript { >this.childrenWalkers[NodeType.LogOr] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.LogOr] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.LogOr : any >NodeType : any @@ -876,7 +876,7 @@ module TypeScript { >this.childrenWalkers[NodeType.LogAnd] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.LogAnd] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.LogAnd : any >NodeType : any @@ -889,7 +889,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Or] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Or] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Or : any >NodeType : any @@ -902,7 +902,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Xor] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Xor] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Xor : any >NodeType : any @@ -915,7 +915,7 @@ module TypeScript { >this.childrenWalkers[NodeType.And] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.And] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.And : any >NodeType : any @@ -928,7 +928,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Eq] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Eq] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Eq : any >NodeType : any @@ -941,7 +941,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Ne] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Ne] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Ne : any >NodeType : any @@ -954,7 +954,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Eqv] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Eqv] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Eqv : any >NodeType : any @@ -967,7 +967,7 @@ module TypeScript { >this.childrenWalkers[NodeType.NEqv] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.NEqv] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.NEqv : any >NodeType : any @@ -980,7 +980,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Lt] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Lt] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Lt : any >NodeType : any @@ -993,7 +993,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Le] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Le] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Le : any >NodeType : any @@ -1006,7 +1006,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Gt] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Gt] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Gt : any >NodeType : any @@ -1019,7 +1019,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Ge] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Ge] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Ge : any >NodeType : any @@ -1032,7 +1032,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Add] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Add] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Add : any >NodeType : any @@ -1045,7 +1045,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Sub] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Sub] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Sub : any >NodeType : any @@ -1058,7 +1058,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Mul] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Mul] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Mul : any >NodeType : any @@ -1071,7 +1071,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Div] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Div] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Div : any >NodeType : any @@ -1084,7 +1084,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Mod] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Mod] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Mod : any >NodeType : any @@ -1097,7 +1097,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Lsh] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Lsh] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Lsh : any >NodeType : any @@ -1110,7 +1110,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Rsh] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Rsh] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Rsh : any >NodeType : any @@ -1123,7 +1123,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Rs2] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Rs2] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Rs2 : any >NodeType : any @@ -1136,7 +1136,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Not] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Not] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Not : any >NodeType : any @@ -1149,7 +1149,7 @@ module TypeScript { >this.childrenWalkers[NodeType.LogNot] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.LogNot] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.LogNot : any >NodeType : any @@ -1162,7 +1162,7 @@ module TypeScript { >this.childrenWalkers[NodeType.IncPre] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.IncPre] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.IncPre : any >NodeType : any @@ -1175,7 +1175,7 @@ module TypeScript { >this.childrenWalkers[NodeType.DecPre] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.DecPre] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.DecPre : any >NodeType : any @@ -1188,7 +1188,7 @@ module TypeScript { >this.childrenWalkers[NodeType.IncPost] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.IncPost] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.IncPost : any >NodeType : any @@ -1201,7 +1201,7 @@ module TypeScript { >this.childrenWalkers[NodeType.DecPost] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.DecPost] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.DecPost : any >NodeType : any @@ -1214,7 +1214,7 @@ module TypeScript { >this.childrenWalkers[NodeType.TypeAssertion] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.TypeAssertion] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.TypeAssertion : any >NodeType : any @@ -1227,7 +1227,7 @@ module TypeScript { >this.childrenWalkers[NodeType.FuncDecl] = ChildrenWalkers.walkFuncDeclChildren : (preAst: FuncDecl, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.FuncDecl] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.FuncDecl : any >NodeType : any @@ -1240,7 +1240,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Member] = ChildrenWalkers.walkBinaryExpressionChildren : (preAst: BinaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Member] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Member : any >NodeType : any @@ -1253,7 +1253,7 @@ module TypeScript { >this.childrenWalkers[NodeType.VarDecl] = ChildrenWalkers.walkBoundDeclChildren : (preAst: BoundDecl, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.VarDecl] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.VarDecl : any >NodeType : any @@ -1266,7 +1266,7 @@ module TypeScript { >this.childrenWalkers[NodeType.ArgDecl] = ChildrenWalkers.walkBoundDeclChildren : (preAst: BoundDecl, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.ArgDecl] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.ArgDecl : any >NodeType : any @@ -1279,7 +1279,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Return] = ChildrenWalkers.walkReturnStatementChildren : (preAst: ReturnStatement, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Return] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Return : any >NodeType : any @@ -1292,7 +1292,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Break] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Break] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Break : any >NodeType : any @@ -1305,7 +1305,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Continue] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Continue] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Continue : any >NodeType : any @@ -1318,7 +1318,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Throw] = ChildrenWalkers.walkUnaryExpressionChildren : (preAst: UnaryExpression, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Throw] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Throw : any >NodeType : any @@ -1331,7 +1331,7 @@ module TypeScript { >this.childrenWalkers[NodeType.For] = ChildrenWalkers.walkForStatementChildren : (preAst: ForStatement, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.For] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.For : any >NodeType : any @@ -1344,7 +1344,7 @@ module TypeScript { >this.childrenWalkers[NodeType.ForIn] = ChildrenWalkers.walkForInStatementChildren : (preAst: ForInStatement, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.ForIn] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.ForIn : any >NodeType : any @@ -1357,7 +1357,7 @@ module TypeScript { >this.childrenWalkers[NodeType.If] = ChildrenWalkers.walkIfStatementChildren : (preAst: IfStatement, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.If] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.If : any >NodeType : any @@ -1370,7 +1370,7 @@ module TypeScript { >this.childrenWalkers[NodeType.While] = ChildrenWalkers.walkWhileStatementChildren : (preAst: WhileStatement, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.While] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.While : any >NodeType : any @@ -1383,7 +1383,7 @@ module TypeScript { >this.childrenWalkers[NodeType.DoWhile] = ChildrenWalkers.walkDoWhileStatementChildren : (preAst: DoWhileStatement, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.DoWhile] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.DoWhile : any >NodeType : any @@ -1396,7 +1396,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Block] = ChildrenWalkers.walkBlockChildren : (preAst: Block, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Block] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Block : any >NodeType : any @@ -1409,7 +1409,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Case] = ChildrenWalkers.walkCaseStatementChildren : (preAst: CaseStatement, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Case] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Case : any >NodeType : any @@ -1422,7 +1422,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Switch] = ChildrenWalkers.walkSwitchStatementChildren : (preAst: SwitchStatement, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Switch] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Switch : any >NodeType : any @@ -1435,7 +1435,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Try] = ChildrenWalkers.walkTryChildren : (preAst: Try, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Try] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Try : any >NodeType : any @@ -1448,7 +1448,7 @@ module TypeScript { >this.childrenWalkers[NodeType.TryCatch] = ChildrenWalkers.walkTryCatchChildren : (preAst: TryCatch, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.TryCatch] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.TryCatch : any >NodeType : any @@ -1461,7 +1461,7 @@ module TypeScript { >this.childrenWalkers[NodeType.TryFinally] = ChildrenWalkers.walkTryFinallyChildren : (preAst: TryFinally, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.TryFinally] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.TryFinally : any >NodeType : any @@ -1474,7 +1474,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Finally] = ChildrenWalkers.walkFinallyChildren : (preAst: Finally, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Finally] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Finally : any >NodeType : any @@ -1487,7 +1487,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Catch] = ChildrenWalkers.walkCatchChildren : (preAst: Catch, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Catch] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Catch : any >NodeType : any @@ -1500,7 +1500,7 @@ module TypeScript { >this.childrenWalkers[NodeType.List] = ChildrenWalkers.walkListChildren : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.List] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.List : any >NodeType : any @@ -1513,7 +1513,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Script] = ChildrenWalkers.walkScriptChildren : (preAst: Script, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Script] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Script : any >NodeType : any @@ -1526,7 +1526,7 @@ module TypeScript { >this.childrenWalkers[NodeType.ClassDeclaration] = ChildrenWalkers.walkClassDeclChildren : (preAst: ClassDeclaration, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.ClassDeclaration] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.ClassDeclaration : any >NodeType : any @@ -1539,7 +1539,7 @@ module TypeScript { >this.childrenWalkers[NodeType.InterfaceDeclaration] = ChildrenWalkers.walkTypeDeclChildren : (preAst: InterfaceDeclaration, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.InterfaceDeclaration] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.InterfaceDeclaration : any >NodeType : any @@ -1552,7 +1552,7 @@ module TypeScript { >this.childrenWalkers[NodeType.ModuleDeclaration] = ChildrenWalkers.walkModuleDeclChildren : (preAst: ModuleDeclaration, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.ModuleDeclaration] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.ModuleDeclaration : any >NodeType : any @@ -1565,7 +1565,7 @@ module TypeScript { >this.childrenWalkers[NodeType.ImportDeclaration] = ChildrenWalkers.walkImportDeclChildren : (preAst: ImportDeclaration, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.ImportDeclaration] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.ImportDeclaration : any >NodeType : any @@ -1578,7 +1578,7 @@ module TypeScript { >this.childrenWalkers[NodeType.With] = ChildrenWalkers.walkWithStatementChildren : (preAst: WithStatement, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.With] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.With : any >NodeType : any @@ -1591,7 +1591,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Label] = ChildrenWalkers.walkLabelChildren : (preAst: Label, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Label] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Label : any >NodeType : any @@ -1604,7 +1604,7 @@ module TypeScript { >this.childrenWalkers[NodeType.LabeledStatement] = ChildrenWalkers.walkLabeledStatementChildren : (preAst: LabeledStatement, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.LabeledStatement] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.LabeledStatement : any >NodeType : any @@ -1617,7 +1617,7 @@ module TypeScript { >this.childrenWalkers[NodeType.EBStart] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.EBStart] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.EBStart : any >NodeType : any @@ -1630,7 +1630,7 @@ module TypeScript { >this.childrenWalkers[NodeType.GotoEB] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.GotoEB] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.GotoEB : any >NodeType : any @@ -1643,7 +1643,7 @@ module TypeScript { >this.childrenWalkers[NodeType.EndCode] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.EndCode] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.EndCode : any >NodeType : any @@ -1656,7 +1656,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Error] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Error] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Error : any >NodeType : any @@ -1669,7 +1669,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Comment] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Comment] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Comment : any >NodeType : any @@ -1682,7 +1682,7 @@ module TypeScript { >this.childrenWalkers[NodeType.Debugger] = ChildrenWalkers.walkNone : (preAst: ASTList, parent: AST, walker: IAstWalker) => void >this.childrenWalkers[NodeType.Debugger] : IAstWalkChildren >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >NodeType.Debugger : any >NodeType : any @@ -1706,7 +1706,7 @@ module TypeScript { >(this.childrenWalkers) : any >this.childrenWalkers : any >this.childrenWalkers : IAstWalkChildren[] ->this : this +>this : AstWalkerFactory >childrenWalkers : IAstWalkChildren[] >e : string >undefined : undefined diff --git a/tests/baselines/reference/parserRealSource14.types b/tests/baselines/reference/parserRealSource14.types index 6bff1f2cd6f..7583abe120e 100644 --- a/tests/baselines/reference/parserRealSource14.types +++ b/tests/baselines/reference/parserRealSource14.types @@ -123,7 +123,7 @@ module TypeScript { >this.asts.map((value) => { return value; }) : TypeScript.AST[] >this.asts.map : (callbackfn: (value: TypeScript.AST, index: number, array: TypeScript.AST[]) => U, thisArg?: any) => U[] >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >map : (callbackfn: (value: TypeScript.AST, index: number, array: TypeScript.AST[]) => U, thisArg?: any) => U[] >(value) => { return value; } : (value: TypeScript.AST) => TypeScript.AST @@ -136,7 +136,7 @@ module TypeScript { >clone : AstPath >top : number >this.top : number ->this : this +>this : AstPath >top : number return clone; @@ -151,32 +151,32 @@ module TypeScript { >head : TypeScript.AST >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST this.up(); >this.up() : void >this.up : () => void ->this : this +>this : AstPath >up : () => void while (this.asts.length > this.count()) { >this.asts.length > this.count() : boolean >this.asts.length : number >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >length : number >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number this.asts.pop(); >this.asts.pop() : TypeScript.AST >this.asts.pop : () => TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >pop : () => TypeScript.AST } @@ -193,30 +193,30 @@ module TypeScript { >this.asts.length > this.count() : boolean >this.asts.length : number >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >length : number >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number this.asts.pop(); >this.asts.pop() : TypeScript.AST >this.asts.pop : () => TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >pop : () => TypeScript.AST } this.top = this.asts.length; >this.top = this.asts.length : number >this.top : number ->this : this +>this : AstPath >top : number >this.asts.length : number >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >length : number @@ -224,7 +224,7 @@ module TypeScript { >this.asts.push(ast) : number >this.asts.push : (...items: TypeScript.AST[]) => number >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >push : (...items: TypeScript.AST[]) => number >ast : TypeScript.AST @@ -236,7 +236,7 @@ module TypeScript { if (this.top <= -1) >this.top <= -1 : boolean >this.top : number ->this : this +>this : AstPath >top : number >-1 : -1 >1 : 1 @@ -249,7 +249,7 @@ module TypeScript { this.top--; >this.top-- : number >this.top : number ->this : this +>this : AstPath >top : number } @@ -259,12 +259,12 @@ module TypeScript { if (this.top == this.ast.length - 1) >this.top == this.ast.length - 1 : boolean >this.top : number ->this : this +>this : AstPath >top : number >this.ast.length - 1 : number >this.ast.length : number >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >length : number >1 : 1 @@ -277,7 +277,7 @@ module TypeScript { this.top++; >this.top++ : number >this.top : number ->this : this +>this : AstPath >top : number } @@ -289,7 +289,7 @@ module TypeScript { >this.ast() == null : boolean >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >null : null @@ -304,7 +304,7 @@ module TypeScript { >this.ast().nodeType : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >nodeType : any } @@ -320,18 +320,18 @@ module TypeScript { >AstPath : typeof AstPath >reverseIndexOf : (items: any[], index: number) => any >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.asts.length - (this.top + 1) : number >this.asts.length : number >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >length : number >(this.top + 1) : number >this.top + 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 } @@ -347,16 +347,16 @@ module TypeScript { >AstPath : typeof AstPath >reverseIndexOf : (items: any[], index: number) => any >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.asts.length - this.top : number >this.asts.length : number >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >length : number >this.top : number ->this : this +>this : AstPath >top : number } @@ -366,7 +366,7 @@ module TypeScript { return this.top + 1; >this.top + 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 } @@ -379,7 +379,7 @@ module TypeScript { return this.asts[index]; >this.asts[index] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >index : number } @@ -392,13 +392,13 @@ module TypeScript { >this.ast() === null : boolean >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >null : null >this.parent() === null : boolean >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >null : null @@ -413,7 +413,7 @@ module TypeScript { >this.ast().nodeType : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.Name : any @@ -428,7 +428,7 @@ module TypeScript { >this.parent().nodeType : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.ClassDeclaration : any @@ -446,12 +446,12 @@ module TypeScript { >TypeScript : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >name : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST } @@ -463,13 +463,13 @@ module TypeScript { >this.ast() === null : boolean >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >null : null >this.parent() === null : boolean >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >null : null @@ -484,7 +484,7 @@ module TypeScript { >this.ast().nodeType : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.Name : any @@ -499,7 +499,7 @@ module TypeScript { >this.parent().nodeType : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.InterfaceDeclaration : any @@ -517,12 +517,12 @@ module TypeScript { >TypeScript : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >name : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST } @@ -534,13 +534,13 @@ module TypeScript { >this.ast() === null : boolean >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >null : null >this.parent() === null : boolean >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >null : null @@ -555,7 +555,7 @@ module TypeScript { >this.ast().nodeType : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.Name : any @@ -570,7 +570,7 @@ module TypeScript { >this.parent().nodeType : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.ArgDecl : any @@ -588,12 +588,12 @@ module TypeScript { >TypeScript : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >id : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST } @@ -605,13 +605,13 @@ module TypeScript { >this.ast() === null : boolean >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >null : null >this.parent() === null : boolean >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >null : null @@ -626,7 +626,7 @@ module TypeScript { >this.ast().nodeType : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.Name : any @@ -641,7 +641,7 @@ module TypeScript { >this.parent().nodeType : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.VarDecl : any @@ -659,12 +659,12 @@ module TypeScript { >TypeScript : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >id : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST } @@ -676,13 +676,13 @@ module TypeScript { >this.ast() === null : boolean >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >null : null >this.parent() === null : boolean >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >null : null @@ -697,7 +697,7 @@ module TypeScript { >this.ast().nodeType : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.Name : any @@ -712,7 +712,7 @@ module TypeScript { >this.parent().nodeType : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.ModuleDeclaration : any @@ -730,12 +730,12 @@ module TypeScript { >TypeScript : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >name : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST } @@ -747,13 +747,13 @@ module TypeScript { >this.ast() === null : boolean >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >null : null >this.parent() === null : boolean >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >null : null @@ -768,7 +768,7 @@ module TypeScript { >this.ast().nodeType : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.Name : any @@ -783,7 +783,7 @@ module TypeScript { >this.parent().nodeType : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >nodeType : any >TypeScript.NodeType.FuncDecl : any @@ -801,12 +801,12 @@ module TypeScript { >TypeScript : any >this.parent() : TypeScript.AST >this.parent : () => TypeScript.AST ->this : this +>this : AstPath >parent : () => TypeScript.AST >name : any >this.ast() : TypeScript.AST >this.ast : () => TypeScript.AST ->this : this +>this : AstPath >ast : () => TypeScript.AST } @@ -818,7 +818,7 @@ module TypeScript { >lastOf(this.asts) : any >lastOf : (items: any[]) => any >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] return this.count() >= 3 && @@ -828,7 +828,7 @@ module TypeScript { >this.count() >= 3 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >3 : 3 @@ -836,10 +836,10 @@ module TypeScript { >this.asts[this.top] === ast : boolean >this.asts[this.top] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top : number ->this : this +>this : AstPath >top : number >ast : any @@ -848,11 +848,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -867,11 +867,11 @@ module TypeScript { >this.asts[this.top - 2].nodeType : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >nodeType : any @@ -890,7 +890,7 @@ module TypeScript { >lastOf(this.asts) : any >lastOf : (items: any[]) => any >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] return this.count() >= 3 && @@ -900,7 +900,7 @@ module TypeScript { >this.count() >= 3 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >3 : 3 @@ -908,10 +908,10 @@ module TypeScript { >this.asts[this.top] === ast : boolean >this.asts[this.top] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top : number ->this : this +>this : AstPath >top : number >ast : any @@ -920,11 +920,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -939,11 +939,11 @@ module TypeScript { >this.asts[this.top - 2].nodeType : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >nodeType : any @@ -962,7 +962,7 @@ module TypeScript { >lastOf(this.asts) : any >lastOf : (items: any[]) => any >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] return this.count() >= 3 && @@ -972,7 +972,7 @@ module TypeScript { >this.count() >= 3 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >3 : 3 @@ -980,10 +980,10 @@ module TypeScript { >this.asts[this.top] === ast : boolean >this.asts[this.top] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top : number ->this : this +>this : AstPath >top : number >ast : any @@ -992,11 +992,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1011,11 +1011,11 @@ module TypeScript { >this.asts[this.top - 2].nodeType : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >nodeType : any @@ -1034,7 +1034,7 @@ module TypeScript { >lastOf(this.asts) : any >lastOf : (items: any[]) => any >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] return this.count() >= 5 && @@ -1049,7 +1049,7 @@ module TypeScript { >this.count() >= 5 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >5 : 5 @@ -1057,10 +1057,10 @@ module TypeScript { >this.asts[this.top] === ast : boolean >this.asts[this.top] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top : number ->this : this +>this : AstPath >top : number >ast : any @@ -1069,11 +1069,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1088,11 +1088,11 @@ module TypeScript { >this.asts[this.top - 2].nodeType : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >nodeType : any @@ -1107,11 +1107,11 @@ module TypeScript { >this.asts[this.top - 3].nodeType : any >this.asts[this.top - 3] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 3 : number >this.top : number ->this : this +>this : AstPath >top : number >3 : 3 >nodeType : any @@ -1126,11 +1126,11 @@ module TypeScript { >this.asts[this.top - 4].nodeType : any >this.asts[this.top - 4] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 4 : number >this.top : number ->this : this +>this : AstPath >top : number >4 : 4 >nodeType : any @@ -1148,11 +1148,11 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >isConstructor : any @@ -1166,21 +1166,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >arguments : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 @@ -1193,21 +1193,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 4] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 4 : number >this.top : number ->this : this +>this : AstPath >top : number >4 : 4 >constructorDecl : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 } @@ -1220,7 +1220,7 @@ module TypeScript { >lastOf(this.asts) : any >lastOf : (items: any[]) => any >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] return this.count() >= 3 && @@ -1230,7 +1230,7 @@ module TypeScript { >this.count() >= 3 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >3 : 3 @@ -1238,10 +1238,10 @@ module TypeScript { >this.asts[this.top] === ast : boolean >this.asts[this.top] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top : number ->this : this +>this : AstPath >top : number >ast : any @@ -1250,11 +1250,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1269,11 +1269,11 @@ module TypeScript { >this.asts[this.top - 2].nodeType : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >nodeType : any @@ -1293,7 +1293,7 @@ module TypeScript { >this.count() >= 1 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >1 : 1 @@ -1302,10 +1302,10 @@ module TypeScript { >this.asts[this.top].nodeType : any >this.asts[this.top] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top : number ->this : this +>this : AstPath >top : number >nodeType : any >TypeScript.NodeType.ModuleDeclaration : any @@ -1325,10 +1325,10 @@ module TypeScript { >TypeScript : any >this.asts[this.top] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top : number ->this : this +>this : AstPath >top : number >modFlags : any >TypeScript.ModuleFlags.IsWholeFile : any @@ -1349,7 +1349,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -1358,11 +1358,11 @@ module TypeScript { >this.asts[this.top - 0].nodeType : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >nodeType : any @@ -1377,11 +1377,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1399,21 +1399,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >members : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 @@ -1428,11 +1428,11 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >modFlags : any @@ -1452,7 +1452,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -1461,11 +1461,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1483,21 +1483,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >bod : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -1511,7 +1511,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -1520,11 +1520,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1542,21 +1542,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >caseList : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -1570,7 +1570,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -1579,11 +1579,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1601,21 +1601,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >members : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -1629,7 +1629,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -1638,11 +1638,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1660,21 +1660,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >members : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -1688,7 +1688,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -1697,11 +1697,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1719,21 +1719,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >bod : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -1747,7 +1747,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -1756,11 +1756,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1778,21 +1778,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >members : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -1806,7 +1806,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -1815,11 +1815,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1837,21 +1837,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >statements : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -1865,7 +1865,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -1874,11 +1874,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1896,21 +1896,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >body : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -1924,7 +1924,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -1933,11 +1933,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -1955,21 +1955,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >body : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -1983,7 +1983,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -1992,11 +1992,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2014,21 +2014,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >body : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -2042,7 +2042,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -2051,11 +2051,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2073,21 +2073,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >body : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -2101,7 +2101,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -2110,11 +2110,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2132,21 +2132,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >body : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -2160,7 +2160,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -2169,11 +2169,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2191,21 +2191,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >body : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -2219,7 +2219,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -2228,11 +2228,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2250,21 +2250,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >body : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -2278,7 +2278,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -2287,11 +2287,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2309,21 +2309,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >body : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -2337,7 +2337,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -2346,11 +2346,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2368,21 +2368,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >body : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -2397,7 +2397,7 @@ module TypeScript { >this.count() >= 3 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >3 : 3 @@ -2406,11 +2406,11 @@ module TypeScript { >this.asts[this.top - 2].nodeType : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >nodeType : any @@ -2425,11 +2425,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2447,21 +2447,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >caseList : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 } @@ -2477,7 +2477,7 @@ module TypeScript { >this.count() >= 3 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >3 : 3 @@ -2486,11 +2486,11 @@ module TypeScript { >this.asts[this.top - 2].nodeType : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >nodeType : any @@ -2505,11 +2505,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2527,21 +2527,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >caseList : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 @@ -2553,21 +2553,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >defaultCase : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -2582,7 +2582,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -2591,11 +2591,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2610,11 +2610,11 @@ module TypeScript { >this.asts[this.top - 0].nodeType : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >nodeType : any @@ -2632,21 +2632,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >operand : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -2657,7 +2657,7 @@ module TypeScript { return this.isListOfObjectLit(); >this.isListOfObjectLit() : boolean >this.isListOfObjectLit : () => boolean ->this : this +>this : AstPath >isListOfObjectLit : () => boolean } @@ -2672,7 +2672,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -2681,11 +2681,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2700,11 +2700,11 @@ module TypeScript { >this.asts[this.top - 0].nodeType : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >nodeType : any @@ -2722,21 +2722,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >operand : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 @@ -2749,11 +2749,11 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >members : any @@ -2772,7 +2772,7 @@ module TypeScript { >this.count() >= 3 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >3 : 3 @@ -2781,11 +2781,11 @@ module TypeScript { >this.asts[this.top - 2].nodeType : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >nodeType : any @@ -2800,11 +2800,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2819,11 +2819,11 @@ module TypeScript { >this.asts[this.top - 0].nodeType : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >nodeType : any @@ -2841,21 +2841,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >operand : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 } @@ -2872,7 +2872,7 @@ module TypeScript { >this.count() >= 4 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >4 : 4 @@ -2881,11 +2881,11 @@ module TypeScript { >this.asts[this.top - 3].nodeType : any >this.asts[this.top - 3] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 3 : number >this.top : number ->this : this +>this : AstPath >top : number >3 : 3 >nodeType : any @@ -2900,11 +2900,11 @@ module TypeScript { >this.asts[this.top - 2].nodeType : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >nodeType : any @@ -2919,11 +2919,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -2938,11 +2938,11 @@ module TypeScript { >this.asts[this.top - 0].nodeType : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >nodeType : any @@ -2960,21 +2960,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 3] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 3 : number >this.top : number ->this : this +>this : AstPath >top : number >3 : 3 >operand : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 } @@ -2989,7 +2989,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -2998,11 +2998,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -3017,11 +3017,11 @@ module TypeScript { >this.asts[this.top - 0].nodeType : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >nodeType : any @@ -3039,21 +3039,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >operand : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -3067,7 +3067,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -3076,11 +3076,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -3098,21 +3098,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >operand1 : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -3126,7 +3126,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -3135,11 +3135,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -3157,21 +3157,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >operand2 : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -3184,7 +3184,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -3193,11 +3193,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -3219,7 +3219,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -3228,11 +3228,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -3250,21 +3250,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >thenBod : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -3278,7 +3278,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -3287,11 +3287,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -3309,21 +3309,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >elseBod : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -3334,7 +3334,7 @@ module TypeScript { return this.isBodyOfCase(); >this.isBodyOfCase() : boolean >this.isBodyOfCase : () => boolean ->this : this +>this : AstPath >isBodyOfCase : () => boolean } @@ -3347,7 +3347,7 @@ module TypeScript { >this.count() >= 1 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >1 : 1 @@ -3356,10 +3356,10 @@ module TypeScript { >this.asts[this.top].nodeType : any >this.asts[this.top] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top : number ->this : this +>this : AstPath >top : number >nodeType : any >TypeScript.NodeType.List : any @@ -3377,10 +3377,10 @@ module TypeScript { >TypeScript : any >this.asts[this.top] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top : number ->this : this +>this : AstPath >top : number >members : any >length : any @@ -3397,7 +3397,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -3406,11 +3406,11 @@ module TypeScript { >this.asts[this.top - 0].nodeType : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >nodeType : any @@ -3425,11 +3425,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -3447,21 +3447,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >arguments : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -3476,7 +3476,7 @@ module TypeScript { >this.count() >= 3 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >3 : 3 @@ -3485,11 +3485,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -3504,11 +3504,11 @@ module TypeScript { >this.asts[this.top - 2].nodeType : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >nodeType : any @@ -3526,21 +3526,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 2] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 2 : number >this.top : number ->this : this +>this : AstPath >top : number >2 : 2 >arguments : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 } @@ -3555,7 +3555,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -3564,11 +3564,11 @@ module TypeScript { >this.asts[this.top - 0].nodeType : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >nodeType : any @@ -3583,11 +3583,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -3605,21 +3605,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >arguments : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -3634,7 +3634,7 @@ module TypeScript { >this.count() >= 2 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >2 : 2 @@ -3643,11 +3643,11 @@ module TypeScript { >this.asts[this.top - 0].nodeType : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >nodeType : any @@ -3662,11 +3662,11 @@ module TypeScript { >this.asts[this.top - 1].nodeType : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >nodeType : any @@ -3684,21 +3684,21 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 1] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 1 : number >this.top : number ->this : this +>this : AstPath >top : number >1 : 1 >arguments : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 } @@ -3712,7 +3712,7 @@ module TypeScript { >this.count() >= 1 : boolean >this.count() : number >this.count : () => number ->this : this +>this : AstPath >count : () => number >1 : 1 @@ -3721,11 +3721,11 @@ module TypeScript { >this.asts[this.top - 0].nodeType : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >nodeType : any @@ -3743,11 +3743,11 @@ module TypeScript { >TypeScript : any >this.asts[this.top - 0] : TypeScript.AST >this.asts : TypeScript.AST[] ->this : this +>this : AstPath >asts : TypeScript.AST[] >this.top - 0 : number >this.top : number ->this : this +>this : AstPath >top : number >0 : 0 >isStatementBlock : any diff --git a/tests/baselines/reference/parserRealSource4.types b/tests/baselines/reference/parserRealSource4.types index f46c6835aaa..759ad9f0896 100644 --- a/tests/baselines/reference/parserRealSource4.types +++ b/tests/baselines/reference/parserRealSource4.types @@ -43,7 +43,7 @@ module TypeScript { this["constructor"] = undefined; >this["constructor"] = undefined : undefined >this["constructor"] : Function ->this : this +>this : BlockIntrinsics >"constructor" : "constructor" >undefined : undefined } @@ -120,14 +120,14 @@ module TypeScript { for (var k in this.table) { >k : string >this.table : any ->this : this +>this : StringHashTable >table : any if (this.table[k] != undefined) { >this.table[k] != undefined : boolean >this.table[k] : any >this.table : any ->this : this +>this : StringHashTable >table : any >k : string >undefined : undefined @@ -155,7 +155,7 @@ module TypeScript { >this.table[key] != undefined : boolean >this.table[key] : any >this.table : any ->this : this +>this : StringHashTable >table : any >key : string >undefined : undefined @@ -167,7 +167,7 @@ module TypeScript { >this.table[key] = data : any >this.table[key] : any >this.table : any ->this : this +>this : StringHashTable >table : any >key : string >data : any @@ -175,7 +175,7 @@ module TypeScript { this.itemCount++; >this.itemCount++ : number >this.itemCount : number ->this : this +>this : StringHashTable >itemCount : number return true; @@ -191,7 +191,7 @@ module TypeScript { >this.table[key] != undefined : boolean >this.table[key] : any >this.table : any ->this : this +>this : StringHashTable >table : any >key : string >undefined : undefined @@ -200,7 +200,7 @@ module TypeScript { >this.table[key] = data : any >this.table[key] : any >this.table : any ->this : this +>this : StringHashTable >table : any >key : string >data : any @@ -212,7 +212,7 @@ module TypeScript { >this.table[key] = data : any >this.table[key] : any >this.table : any ->this : this +>this : StringHashTable >table : any >key : string >data : any @@ -220,7 +220,7 @@ module TypeScript { this.itemCount++; >this.itemCount++ : number >this.itemCount : number ->this : this +>this : StringHashTable >itemCount : number return true; @@ -238,14 +238,14 @@ module TypeScript { for (var k in this.table) { >k : string >this.table : any ->this : this +>this : StringHashTable >table : any var data = this.table[k]; >data : any >this.table[k] : any >this.table : any ->this : this +>this : StringHashTable >table : any >k : string @@ -260,7 +260,7 @@ module TypeScript { >k : string >this.table[k] : any >this.table : any ->this : this +>this : StringHashTable >table : any >k : string >context : any @@ -279,14 +279,14 @@ module TypeScript { for (var k in this.table) { >k : string >this.table : any ->this : this +>this : StringHashTable >table : any var data = this.table[k]; >data : any >this.table[k] : any >this.table : any ->this : this +>this : StringHashTable >table : any >k : string @@ -302,7 +302,7 @@ module TypeScript { >k : string >this.table[k] : any >this.table : any ->this : this +>this : StringHashTable >table : any >k : string >context : any @@ -327,14 +327,14 @@ module TypeScript { for (var k in this.table) { >k : string >this.table : any ->this : this +>this : StringHashTable >table : any var data = this.table[k]; >data : any >this.table[k] : any >this.table : any ->this : this +>this : StringHashTable >table : any >k : string @@ -349,7 +349,7 @@ module TypeScript { >k : string >this.table[k] : any >this.table : any ->this : this +>this : StringHashTable >table : any >k : string >context : any @@ -366,7 +366,7 @@ module TypeScript { public count(): number { return this.itemCount; } >count : () => number >this.itemCount : number ->this : this +>this : StringHashTable >itemCount : number public lookup(key: string) { @@ -377,7 +377,7 @@ module TypeScript { >data : any >this.table[key] : any >this.table : any ->this : this +>this : StringHashTable >table : any >key : string @@ -422,14 +422,14 @@ module TypeScript { >this.primaryTable.getAllKeys() : string[] >this.primaryTable.getAllKeys : () => string[] >this.primaryTable : IHashTable ->this : this +>this : DualStringHashTable >primaryTable : IHashTable >getAllKeys : () => string[] >concat : { (...items: ConcatArray[]): string[]; (...items: (string | ConcatArray)[]): string[]; } >this.secondaryTable.getAllKeys() : string[] >this.secondaryTable.getAllKeys : () => string[] >this.secondaryTable : IHashTable ->this : this +>this : DualStringHashTable >secondaryTable : IHashTable >getAllKeys : () => string[] } @@ -441,14 +441,14 @@ module TypeScript { if (this.insertPrimary) { >this.insertPrimary : boolean ->this : this +>this : DualStringHashTable >insertPrimary : boolean return this.primaryTable.add(key, data); >this.primaryTable.add(key, data) : boolean >this.primaryTable.add : (key: string, data: any) => boolean >this.primaryTable : IHashTable ->this : this +>this : DualStringHashTable >primaryTable : IHashTable >add : (key: string, data: any) => boolean >key : string @@ -459,7 +459,7 @@ module TypeScript { >this.secondaryTable.add(key, data) : boolean >this.secondaryTable.add : (key: string, data: any) => boolean >this.secondaryTable : IHashTable ->this : this +>this : DualStringHashTable >secondaryTable : IHashTable >add : (key: string, data: any) => boolean >key : string @@ -474,14 +474,14 @@ module TypeScript { if (this.insertPrimary) { >this.insertPrimary : boolean ->this : this +>this : DualStringHashTable >insertPrimary : boolean return this.primaryTable.addOrUpdate(key, data); >this.primaryTable.addOrUpdate(key, data) : boolean >this.primaryTable.addOrUpdate : (key: string, data: any) => boolean >this.primaryTable : IHashTable ->this : this +>this : DualStringHashTable >primaryTable : IHashTable >addOrUpdate : (key: string, data: any) => boolean >key : string @@ -492,7 +492,7 @@ module TypeScript { >this.secondaryTable.addOrUpdate(key, data) : boolean >this.secondaryTable.addOrUpdate : (key: string, data: any) => boolean >this.secondaryTable : IHashTable ->this : this +>this : DualStringHashTable >secondaryTable : IHashTable >addOrUpdate : (key: string, data: any) => boolean >key : string @@ -512,7 +512,7 @@ module TypeScript { >this.primaryTable.map(fn, context) : void >this.primaryTable.map : (fn: (k: string, v: any, c: any) => void, context: any) => void >this.primaryTable : IHashTable ->this : this +>this : DualStringHashTable >primaryTable : IHashTable >map : (fn: (k: string, v: any, c: any) => void, context: any) => void >fn : (k: string, v: any, c: any) => void @@ -522,7 +522,7 @@ module TypeScript { >this.secondaryTable.map(fn, context) : void >this.secondaryTable.map : (fn: (k: string, v: any, c: any) => void, context: any) => void >this.secondaryTable : IHashTable ->this : this +>this : DualStringHashTable >secondaryTable : IHashTable >map : (fn: (k: string, v: any, c: any) => void, context: any) => void >fn : (k: string, v: any, c: any) => void @@ -542,7 +542,7 @@ module TypeScript { >this.primaryTable.every(fn, context) : boolean >this.primaryTable.every : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean >this.primaryTable : IHashTable ->this : this +>this : DualStringHashTable >primaryTable : IHashTable >every : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean >fn : (k: string, v: any, c: any) => boolean @@ -550,7 +550,7 @@ module TypeScript { >this.secondaryTable.every(fn, context) : boolean >this.secondaryTable.every : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean >this.secondaryTable : IHashTable ->this : this +>this : DualStringHashTable >secondaryTable : IHashTable >every : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean >fn : (k: string, v: any, c: any) => boolean @@ -570,7 +570,7 @@ module TypeScript { >this.primaryTable.some(fn, context) : boolean >this.primaryTable.some : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean >this.primaryTable : IHashTable ->this : this +>this : DualStringHashTable >primaryTable : IHashTable >some : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean >fn : (k: string, v: any, c: any) => boolean @@ -578,7 +578,7 @@ module TypeScript { >this.secondaryTable.some(fn, context) : boolean >this.secondaryTable.some : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean >this.secondaryTable : IHashTable ->this : this +>this : DualStringHashTable >secondaryTable : IHashTable >some : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean >fn : (k: string, v: any, c: any) => boolean @@ -593,13 +593,13 @@ module TypeScript { >this.primaryTable.count() : number >this.primaryTable.count : () => number >this.primaryTable : IHashTable ->this : this +>this : DualStringHashTable >primaryTable : IHashTable >count : () => number >this.secondaryTable.count() : number >this.secondaryTable.count : () => number >this.secondaryTable : IHashTable ->this : this +>this : DualStringHashTable >secondaryTable : IHashTable >count : () => number } @@ -613,7 +613,7 @@ module TypeScript { >this.primaryTable.lookup(key) : any >this.primaryTable.lookup : (key: string) => any >this.primaryTable : IHashTable ->this : this +>this : DualStringHashTable >primaryTable : IHashTable >lookup : (key: string) => any >key : string @@ -631,7 +631,7 @@ module TypeScript { >this.secondaryTable.lookup(key) : any >this.secondaryTable.lookup : (key: string) => any >this.secondaryTable : IHashTable ->this : this +>this : DualStringHashTable >secondaryTable : IHashTable >lookup : (key: string) => any >key : string @@ -759,7 +759,7 @@ module TypeScript { >i < this.size : boolean >i : number >this.size : number ->this : this +>this : HashTable >size : number >i++ : number >i : number @@ -768,7 +768,7 @@ module TypeScript { >this.table[i] = null : null >this.table[i] : any >this.table : any ->this : this +>this : HashTable >table : any >i : number >null : null @@ -794,7 +794,7 @@ module TypeScript { >val : number >this.hashFn(key) : number >this.hashFn : (key: any) => number ->this : this +>this : HashTable >hashFn : (key: any) => number >key : any @@ -804,7 +804,7 @@ module TypeScript { >val % this.size : number >val : number >this.size : number ->this : this +>this : HashTable >size : number for (current = this.table[val]; current != null ; current = current.next) { @@ -812,7 +812,7 @@ module TypeScript { >current : HashEntry >this.table[val] : any >this.table : any ->this : this +>this : HashTable >table : any >val : number >current != null : boolean @@ -827,7 +827,7 @@ module TypeScript { if (this.equalsFn(key, current.key)) { >this.equalsFn(key, current.key) : boolean >this.equalsFn : (key1: any, key2: any) => boolean ->this : this +>this : HashTable >equalsFn : (key1: any, key2: any) => boolean >key : any >current.key : any @@ -845,7 +845,7 @@ module TypeScript { >next : HashEntry >this.table[val] : any >this.table : any ->this : this +>this : HashTable >table : any >val : number @@ -853,7 +853,7 @@ module TypeScript { >this.table[val] = entry : HashEntry >this.table[val] : any >this.table : any ->this : this +>this : HashTable >table : any >val : number >entry : HashEntry @@ -861,7 +861,7 @@ module TypeScript { this.itemCount++; >this.itemCount++ : number >this.itemCount : number ->this : this +>this : HashTable >itemCount : number return true; @@ -879,7 +879,7 @@ module TypeScript { >val : number >this.hashFn(key) : number >this.hashFn : (key: any) => number ->this : this +>this : HashTable >hashFn : (key: any) => number >key : any @@ -889,7 +889,7 @@ module TypeScript { >val % this.size : number >val : number >this.size : number ->this : this +>this : HashTable >size : number var result = null; @@ -905,7 +905,7 @@ module TypeScript { >current : HashEntry >this.table[val] : any >this.table : any ->this : this +>this : HashTable >table : any >val : number >current != null : boolean @@ -920,7 +920,7 @@ module TypeScript { if (this.equalsFn(key, current.key)) { >this.equalsFn(key, current.key) : boolean >this.equalsFn : (key1: any, key2: any) => boolean ->this : this +>this : HashTable >equalsFn : (key1: any, key2: any) => boolean >key : any >current.key : any @@ -937,7 +937,7 @@ module TypeScript { this.itemCount--; >this.itemCount-- : number >this.itemCount : number ->this : this +>this : HashTable >itemCount : number if (prevEntry) { @@ -957,7 +957,7 @@ module TypeScript { >this.table[val] = current.next : HashEntry >this.table[val] : any >this.table : any ->this : this +>this : HashTable >table : any >val : number >current.next : HashEntry @@ -978,7 +978,7 @@ module TypeScript { public count(): number { return this.itemCount; } >count : () => number >this.itemCount : number ->this : this +>this : HashTable >itemCount : number public lookup(key) { @@ -992,7 +992,7 @@ module TypeScript { >val : number >this.hashFn(key) : number >this.hashFn : (key: any) => number ->this : this +>this : HashTable >hashFn : (key: any) => number >key : any @@ -1002,7 +1002,7 @@ module TypeScript { >val % this.size : number >val : number >this.size : number ->this : this +>this : HashTable >size : number for (current = this.table[val]; current != null ; current = current.next) { @@ -1010,7 +1010,7 @@ module TypeScript { >current : HashEntry >this.table[val] : any >this.table : any ->this : this +>this : HashTable >table : any >val : number >current != null : boolean @@ -1025,7 +1025,7 @@ module TypeScript { if (this.equalsFn(key, current.key)) { >this.equalsFn(key, current.key) : boolean >this.equalsFn : (key1: any, key2: any) => boolean ->this : this +>this : HashTable >equalsFn : (key1: any, key2: any) => boolean >key : any >current.key : any @@ -1065,7 +1065,7 @@ module TypeScript { var searchArray = this.keys; >searchArray : any[] >this.keys : any[] ->this : this +>this : SimpleHashTable >keys : any[] if (findValue) { @@ -1075,7 +1075,7 @@ module TypeScript { >searchArray = this.values : any[] >searchArray : any[] >this.values : any[] ->this : this +>this : SimpleHashTable >values : any[] } @@ -1104,7 +1104,7 @@ module TypeScript { >key : any >this.keys[i] : any >this.keys : any[] ->this : this +>this : SimpleHashTable >keys : any[] >i : number @@ -1112,7 +1112,7 @@ module TypeScript { >data : any >this.values[i] : any >this.values : any[] ->this : this +>this : SimpleHashTable >values : any[] >i : number @@ -1132,7 +1132,7 @@ module TypeScript { >lookupData : { key: any; data: any; } >this.lookup(key) : { key: any; data: any; } >this.lookup : (key: any, findValue?: boolean) => { key: any; data: any; } ->this : this +>this : SimpleHashTable >lookup : (key: any, findValue?: boolean) => { key: any; data: any; } >key : any @@ -1147,11 +1147,11 @@ module TypeScript { >this.keys[this.keys.length] = key : any >this.keys[this.keys.length] : any >this.keys : any[] ->this : this +>this : SimpleHashTable >keys : any[] >this.keys.length : number >this.keys : any[] ->this : this +>this : SimpleHashTable >keys : any[] >length : number >key : any @@ -1160,11 +1160,11 @@ module TypeScript { >this.values[this.values.length] = data : any >this.values[this.values.length] : any >this.values : any[] ->this : this +>this : SimpleHashTable >values : any[] >this.values.length : number >this.values : any[] ->this : this +>this : SimpleHashTable >values : any[] >length : number >data : any diff --git a/tests/baselines/reference/parserRealSource5.types b/tests/baselines/reference/parserRealSource5.types index fcce9a438cb..6211e4d5b11 100644 --- a/tests/baselines/reference/parserRealSource5.types +++ b/tests/baselines/reference/parserRealSource5.types @@ -38,7 +38,7 @@ module TypeScript { this.indentAmt++; >this.indentAmt++ : number >this.indentAmt : number ->this : this +>this : PrintContext >indentAmt : number } @@ -48,7 +48,7 @@ module TypeScript { this.indentAmt--; >this.indentAmt-- : number >this.indentAmt : number ->this : this +>this : PrintContext >indentAmt : number } @@ -59,7 +59,7 @@ module TypeScript { >this.builder.length > 0 : boolean >this.builder.length : number >this.builder : string ->this : this +>this : PrintContext >builder : string >length : number >0 : 0 @@ -70,17 +70,17 @@ module TypeScript { >CompilerDiagnostics : any >Alert : any >this.builder : string ->this : this +>this : PrintContext >builder : string } var indentString = this.indentStrings[this.indentAmt]; >indentString : string >this.indentStrings[this.indentAmt] : string >this.indentStrings : string[] ->this : this +>this : PrintContext >indentStrings : string[] >this.indentAmt : number ->this : this +>this : PrintContext >indentAmt : number if (indentString === undefined) { @@ -99,7 +99,7 @@ module TypeScript { >i < this.indentAmt : boolean >i : number >this.indentAmt : number ->this : this +>this : PrintContext >indentAmt : number >i++ : number >i : number @@ -108,24 +108,24 @@ module TypeScript { >indentString += this.indent1 : string >indentString : string >this.indent1 : string ->this : this +>this : PrintContext >indent1 : string } this.indentStrings[this.indentAmt] = indentString; >this.indentStrings[this.indentAmt] = indentString : string >this.indentStrings[this.indentAmt] : string >this.indentStrings : string[] ->this : this +>this : PrintContext >indentStrings : string[] >this.indentAmt : number ->this : this +>this : PrintContext >indentAmt : number >indentString : string } this.builder += indentString; >this.builder += indentString : string >this.builder : string ->this : this +>this : PrintContext >builder : string >indentString : string } @@ -137,7 +137,7 @@ module TypeScript { this.builder += s; >this.builder += s : string >this.builder : string ->this : this +>this : PrintContext >builder : string >s : any } @@ -149,7 +149,7 @@ module TypeScript { this.builder += s; >this.builder += s : string >this.builder : string ->this : this +>this : PrintContext >builder : string >s : any @@ -157,17 +157,17 @@ module TypeScript { >this.outfile.WriteLine(this.builder) : void >this.outfile.WriteLine : (s: string) => void >this.outfile : ITextWriter ->this : this +>this : PrintContext >outfile : ITextWriter >WriteLine : (s: string) => void >this.builder : string ->this : this +>this : PrintContext >builder : string this.builder = ""; >this.builder = "" : "" >this.builder : string ->this : this +>this : PrintContext >builder : string >"" : "" } diff --git a/tests/baselines/reference/parserRealSource6.types b/tests/baselines/reference/parserRealSource6.types index 9cdb52f6bb4..7a33a663e35 100644 --- a/tests/baselines/reference/parserRealSource6.types +++ b/tests/baselines/reference/parserRealSource6.types @@ -110,7 +110,7 @@ module TypeScript { return this.scopeGetter(); >this.scopeGetter() : SymbolScope >this.scopeGetter : () => SymbolScope ->this : this +>this : EnclosingScopeContext >scopeGetter : () => SymbolScope } @@ -120,7 +120,7 @@ module TypeScript { return this.objectLiteralScopeGetter(); >this.objectLiteralScopeGetter() : SymbolScope >this.objectLiteralScopeGetter : () => SymbolScope ->this : this +>this : EnclosingScopeContext >objectLiteralScopeGetter : () => SymbolScope } @@ -129,7 +129,7 @@ module TypeScript { return this.scopeStartAST; >this.scopeStartAST : AST ->this : this +>this : EnclosingScopeContext >scopeStartAST : AST } @@ -139,7 +139,7 @@ module TypeScript { return this.scopeStartAST.minChar; >this.scopeStartAST.minChar : any >this.scopeStartAST : AST ->this : this +>this : EnclosingScopeContext >scopeStartAST : AST >minChar : any } @@ -149,7 +149,7 @@ module TypeScript { return this.scopeStartAST; >this.scopeStartAST : AST ->this : this +>this : EnclosingScopeContext >scopeStartAST : AST } @@ -160,7 +160,7 @@ module TypeScript { >this.getScriptFragmentStartAST().minChar : any >this.getScriptFragmentStartAST() : AST >this.getScriptFragmentStartAST : () => AST ->this : this +>this : EnclosingScopeContext >getScriptFragmentStartAST : () => AST >minChar : any } @@ -171,7 +171,7 @@ module TypeScript { if (this.scriptFragment == null) { >this.scriptFragment == null : boolean >this.scriptFragment : Script ->this : this +>this : EnclosingScopeContext >scriptFragment : Script >null : null @@ -179,7 +179,7 @@ module TypeScript { >ast : AST >this.getScriptFragmentStartAST() : AST >this.getScriptFragmentStartAST : () => AST ->this : this +>this : EnclosingScopeContext >getScriptFragmentStartAST : () => AST var minChar = ast.minChar; @@ -193,21 +193,21 @@ module TypeScript { >(this.isMemberCompletion ? this.pos : this.pos + 1) : number >this.isMemberCompletion ? this.pos : this.pos + 1 : number >this.isMemberCompletion : boolean ->this : this +>this : EnclosingScopeContext >isMemberCompletion : boolean >this.pos : number ->this : this +>this : EnclosingScopeContext >pos : number >this.pos + 1 : number >this.pos : number ->this : this +>this : EnclosingScopeContext >pos : number >1 : 1 this.scriptFragment = TypeScript.quickParse(this.logger, ast, this.text, minChar, limChar, null/*errorCapture*/).Script; >this.scriptFragment = TypeScript.quickParse(this.logger, ast, this.text, minChar, limChar, null/*errorCapture*/).Script : any >this.scriptFragment : Script ->this : this +>this : EnclosingScopeContext >scriptFragment : Script >TypeScript.quickParse(this.logger, ast, this.text, minChar, limChar, null/*errorCapture*/).Script : any >TypeScript.quickParse(this.logger, ast, this.text, minChar, limChar, null/*errorCapture*/) : any @@ -215,11 +215,11 @@ module TypeScript { >TypeScript : typeof TypeScript >quickParse : any >this.logger : ILogger ->this : this +>this : EnclosingScopeContext >logger : ILogger >ast : AST >this.text : ISourceText ->this : this +>this : EnclosingScopeContext >text : ISourceText >minChar : any >limChar : number @@ -228,7 +228,7 @@ module TypeScript { } return this.scriptFragment; >this.scriptFragment : Script ->this : this +>this : EnclosingScopeContext >scriptFragment : Script } } diff --git a/tests/baselines/reference/parserRealSource8.types b/tests/baselines/reference/parserRealSource8.types index 14e7b6c3787..c25fea794c3 100644 --- a/tests/baselines/reference/parserRealSource8.types +++ b/tests/baselines/reference/parserRealSource8.types @@ -153,7 +153,7 @@ module TypeScript { this.result = null; >this.result = null : null >this.result : Symbol ->this : this +>this : ScopeSearchFilter >result : Symbol >null : null } @@ -165,29 +165,29 @@ module TypeScript { this.result = this.select(this.result, b); >this.result = this.select(this.result, b) : Symbol >this.result : Symbol ->this : this +>this : ScopeSearchFilter >result : Symbol >this.select(this.result, b) : Symbol >this.select : (a: Symbol, b: Symbol) => Symbol ->this : this +>this : ScopeSearchFilter >select : (a: Symbol, b: Symbol) => Symbol >this.result : Symbol ->this : this +>this : ScopeSearchFilter >result : Symbol >b : Symbol if (this.result) { >this.result : Symbol ->this : this +>this : ScopeSearchFilter >result : Symbol return this.stop(this.result); >this.stop(this.result) : boolean >this.stop : (s: Symbol) => boolean ->this : this +>this : ScopeSearchFilter >stop : (s: Symbol) => boolean >this.result : Symbol ->this : this +>this : ScopeSearchFilter >result : Symbol } else { diff --git a/tests/baselines/reference/parserRealSource9.types b/tests/baselines/reference/parserRealSource9.types index 104bef3aff5..f72aebabd49 100644 --- a/tests/baselines/reference/parserRealSource9.types +++ b/tests/baselines/reference/parserRealSource9.types @@ -56,7 +56,7 @@ module TypeScript { >this.checker.resolvingBases = true : true >this.checker.resolvingBases : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >resolvingBases : any >true : true @@ -65,7 +65,7 @@ module TypeScript { >this.checker.resolveTypeLink(scope, typeLink, true) : any >this.checker.resolveTypeLink : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >resolveTypeLink : any >scope : SymbolScope @@ -76,7 +76,7 @@ module TypeScript { >this.checker.resolvingBases = false : false >this.checker.resolvingBases : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >resolvingBases : any >false : false @@ -128,7 +128,7 @@ module TypeScript { >extendsList : any >this.resolveBaseTypeLinks(type.extendsTypeLinks, scope) : Type[] >this.resolveBaseTypeLinks : (typeLinks: TypeLink[], scope: SymbolScope) => Type[] ->this : this +>this : Binder >resolveBaseTypeLinks : (typeLinks: TypeLink[], scope: SymbolScope) => Type[] >type.extendsTypeLinks : any >type : Type @@ -179,7 +179,7 @@ module TypeScript { >i : number >this.checker.anyType : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >anyType : any @@ -195,7 +195,7 @@ module TypeScript { >this.checker.errorReporter.simpleErrorFromSym : any >this.checker.errorReporter : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >errorReporter : any >simpleErrorFromSym : any @@ -229,7 +229,7 @@ module TypeScript { >this.checker.errorReporter.simpleErrorFromSym : any >this.checker.errorReporter : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >errorReporter : any >simpleErrorFromSym : any @@ -264,7 +264,7 @@ module TypeScript { >implementsList : any >this.resolveBaseTypeLinks(type.implementsTypeLinks, scope) : Type[] >this.resolveBaseTypeLinks : (typeLinks: TypeLink[], scope: SymbolScope) => Type[] ->this : this +>this : Binder >resolveBaseTypeLinks : (typeLinks: TypeLink[], scope: SymbolScope) => Type[] >type.implementsTypeLinks : any >type : Type @@ -316,7 +316,7 @@ module TypeScript { >this.checker.errorReporter.simpleErrorFromSym : any >this.checker.errorReporter : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >errorReporter : any >simpleErrorFromSym : any @@ -395,7 +395,7 @@ module TypeScript { >this.checker.resolveTypeLink(scope, signature.returnType, supplyVar) : any >this.checker.resolveTypeLink : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >resolveTypeLink : any >scope : SymbolScope @@ -424,7 +424,7 @@ module TypeScript { this.bindSymbol(scope, signature.parameters[j]); >this.bindSymbol(scope, signature.parameters[j]) : void >this.bindSymbol : (scope: SymbolScope, symbol: Symbol) => void ->this : this +>this : Binder >bindSymbol : (scope: SymbolScope, symbol: Symbol) => void >scope : SymbolScope >signature.parameters[j] : any @@ -474,7 +474,7 @@ module TypeScript { >this.checker.errorReporter.simpleErrorFromSym : any >this.checker.errorReporter : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >errorReporter : any >simpleErrorFromSym : any @@ -495,7 +495,7 @@ module TypeScript { >this.checker.makeArrayType(lastParam.parameter.typeLink.type) : any >this.checker.makeArrayType : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >makeArrayType : any >lastParam.parameter.typeLink.type : any @@ -522,7 +522,7 @@ module TypeScript { this.bindType(scope, instanceType, null); >this.bindType(scope, instanceType, null) : void >this.bindType : (scope: SymbolScope, type: Type, instanceType: Type) => void ->this : this +>this : Binder >bindType : (scope: SymbolScope, type: Type, instanceType: Type) => void >scope : SymbolScope >instanceType : Type @@ -584,7 +584,7 @@ module TypeScript { >prevCurrentModDecl : any >this.checker.currentModDecl : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >currentModDecl : any @@ -592,7 +592,7 @@ module TypeScript { >prevBindStatus : any >this.checker.inBind : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >inBind : any @@ -620,7 +620,7 @@ module TypeScript { >this.checker.currentModDecl = type.symbol.declAST : ModuleDeclaration >this.checker.currentModDecl : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >currentModDecl : any >type.symbol.declAST : ModuleDeclaration @@ -634,7 +634,7 @@ module TypeScript { >this.checker.inBind = true : true >this.checker.inBind : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >inBind : any >true : true @@ -645,7 +645,7 @@ module TypeScript { this.bind(agg, type.members.allMembers); // REVIEW: Should only be getting exported types? >this.bind(agg, type.members.allMembers) : void >this.bind : (scope: SymbolScope, table: IHashTable) => void ->this : this +>this : Binder >bind : (scope: SymbolScope, table: IHashTable) => void >agg : any >type.members.allMembers : any @@ -660,7 +660,7 @@ module TypeScript { this.bind(agg, typeMembers.allMembers); >this.bind(agg, typeMembers.allMembers) : void >this.bind : (scope: SymbolScope, table: IHashTable) => void ->this : this +>this : Binder >bind : (scope: SymbolScope, table: IHashTable) => void >agg : any >typeMembers.allMembers : any @@ -673,7 +673,7 @@ module TypeScript { this.bind(agg, ambientMembers.allMembers); >this.bind(agg, ambientMembers.allMembers) : void >this.bind : (scope: SymbolScope, table: IHashTable) => void ->this : this +>this : Binder >bind : (scope: SymbolScope, table: IHashTable) => void >agg : any >ambientMembers.allMembers : any @@ -686,7 +686,7 @@ module TypeScript { this.bind(agg, ambientTypeMembers.allMembers); >this.bind(agg, ambientTypeMembers.allMembers) : void >this.bind : (scope: SymbolScope, table: IHashTable) => void ->this : this +>this : Binder >bind : (scope: SymbolScope, table: IHashTable) => void >agg : any >ambientTypeMembers.allMembers : any @@ -697,7 +697,7 @@ module TypeScript { >this.checker.currentModDecl = prevCurrentModDecl : any >this.checker.currentModDecl : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >currentModDecl : any >prevCurrentModDecl : any @@ -706,7 +706,7 @@ module TypeScript { >this.checker.inBind = prevBindStatus : any >this.checker.inBind : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >inBind : any >prevBindStatus : any @@ -719,7 +719,7 @@ module TypeScript { this.resolveBases(scope, type); >this.resolveBases(scope, type) : void >this.resolveBases : (scope: SymbolScope, type: Type) => void ->this : this +>this : Binder >resolveBases : (scope: SymbolScope, type: Type) => void >scope : SymbolScope >type : Type @@ -732,7 +732,7 @@ module TypeScript { this.resolveSignatureGroup(type.construct, scope, instanceType); >this.resolveSignatureGroup(type.construct, scope, instanceType) : void >this.resolveSignatureGroup : (signatureGroup: SignatureGroup, scope: SymbolScope, instanceType: Type) => void ->this : this +>this : Binder >resolveSignatureGroup : (signatureGroup: SignatureGroup, scope: SymbolScope, instanceType: Type) => void >type.construct : any >type : Type @@ -748,7 +748,7 @@ module TypeScript { this.resolveSignatureGroup(type.call, scope, null); >this.resolveSignatureGroup(type.call, scope, null) : void >this.resolveSignatureGroup : (signatureGroup: SignatureGroup, scope: SymbolScope, instanceType: Type) => void ->this : this +>this : Binder >resolveSignatureGroup : (signatureGroup: SignatureGroup, scope: SymbolScope, instanceType: Type) => void >type.call : any >type : Type @@ -764,7 +764,7 @@ module TypeScript { this.resolveSignatureGroup(type.index, scope, null); >this.resolveSignatureGroup(type.index, scope, null) : void >this.resolveSignatureGroup : (signatureGroup: SignatureGroup, scope: SymbolScope, instanceType: Type) => void ->this : this +>this : Binder >resolveSignatureGroup : (signatureGroup: SignatureGroup, scope: SymbolScope, instanceType: Type) => void >type.index : any >type : Type @@ -780,7 +780,7 @@ module TypeScript { this.bindType(scope, type.elementType, null); >this.bindType(scope, type.elementType, null) : void >this.bindType : (scope: SymbolScope, type: Type, instanceType: Type) => void ->this : this +>this : Binder >bindType : (scope: SymbolScope, type: Type, instanceType: Type) => void >scope : SymbolScope >type.elementType : any @@ -805,7 +805,7 @@ module TypeScript { >prevLocationInfo : any >this.checker.locationInfo : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >locationInfo : any @@ -815,7 +815,7 @@ module TypeScript { >(this.checker.units) : any >this.checker.units : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >units : any >(symbol.unitIndex >= 0) : boolean @@ -832,7 +832,7 @@ module TypeScript { >this.checker.units.length : any >this.checker.units : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >units : any >length : any @@ -841,13 +841,13 @@ module TypeScript { >this.checker.locationInfo = this.checker.units[symbol.unitIndex] : any >this.checker.locationInfo : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >locationInfo : any >this.checker.units[symbol.unitIndex] : any >this.checker.units : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >units : any >symbol.unitIndex : any @@ -935,14 +935,14 @@ module TypeScript { >this.checker.findSymbolForDynamicModule(modPath, this.checker.locationInfo.filename, (id) => scope.find(id, false, true)) : any >this.checker.findSymbolForDynamicModule : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >findSymbolForDynamicModule : any >modPath : any >this.checker.locationInfo.filename : any >this.checker.locationInfo : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >locationInfo : any >filename : any @@ -982,14 +982,14 @@ module TypeScript { >type : any >this.checker.gloModType : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >gloModType : any this.bindType(scope, typeSymbol.type, typeSymbol.instanceType); >this.bindType(scope, typeSymbol.type, typeSymbol.instanceType) : void >this.bindType : (scope: SymbolScope, type: Type, instanceType: Type) => void ->this : this +>this : Binder >bindType : (scope: SymbolScope, type: Type, instanceType: Type) => void >scope : SymbolScope >typeSymbol.type : any @@ -1024,7 +1024,7 @@ module TypeScript { this.bindType(scope, typeSymbol.expansions[i], typeSymbol.instanceType); >this.bindType(scope, typeSymbol.expansions[i], typeSymbol.instanceType) : void >this.bindType : (scope: SymbolScope, type: Type, instanceType: Type) => void ->this : this +>this : Binder >bindType : (scope: SymbolScope, type: Type, instanceType: Type) => void >scope : SymbolScope >typeSymbol.expansions[i] : any @@ -1048,7 +1048,7 @@ module TypeScript { >this.checker.resolveTypeLink(scope, (symbol).field.typeLink, false) : any >this.checker.resolveTypeLink : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >resolveTypeLink : any >scope : SymbolScope @@ -1073,7 +1073,7 @@ module TypeScript { >this.checker.resolveTypeLink(scope, (symbol).parameter.typeLink, true) : any >this.checker.resolveTypeLink : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >resolveTypeLink : any >scope : SymbolScope @@ -1096,7 +1096,7 @@ module TypeScript { >this.checker.locationInfo = prevLocationInfo : any >this.checker.locationInfo : any >this.checker : TypeChecker ->this : this +>this : Binder >checker : TypeChecker >locationInfo : any >prevLocationInfo : any @@ -1136,7 +1136,7 @@ module TypeScript { }, this); ->this : this +>this : Binder } } diff --git a/tests/baselines/reference/parserSuperExpression3.types b/tests/baselines/reference/parserSuperExpression3.types index 02f49c5c10a..0623dab321e 100644 --- a/tests/baselines/reference/parserSuperExpression3.types +++ b/tests/baselines/reference/parserSuperExpression3.types @@ -8,7 +8,7 @@ class C { this.super(0); >this.super(0) : any >this.super : any ->this : this +>this : C >super : any >0 : 0 } diff --git a/tests/baselines/reference/parserharness.errors.txt b/tests/baselines/reference/parserharness.errors.txt index c3cb53f4b17..ba02988ddc9 100644 --- a/tests/baselines/reference/parserharness.errors.txt +++ b/tests/baselines/reference/parserharness.errors.txt @@ -12,6 +12,9 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(347,13): e tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(351,17): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(354,17): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(354,35): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(363,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Runnable'. +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(406,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Runnable'. +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(466,13): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Runnable'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(691,50): error TS2304: Cannot find name 'ITextWriter'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(716,47): error TS2503: Cannot find namespace 'TypeScript'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(721,62): error TS2304: Cannot find name 'ITextWriter'. @@ -110,7 +113,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(1787,68): tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): error TS2304: Cannot find name 'Diff'. -==== tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts (110 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts (113 errors) ==== // // Copyright (c) Microsoft Corporation. All rights reserved. // @@ -502,6 +505,8 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): constructor(description: string, block: any) { super(description, block); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Runnable'. this.description = description; this.block = block; } @@ -545,6 +550,8 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): constructor(description: string, block: any) { super(description, block); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Runnable'. this.description = description; this.block = block; } @@ -605,6 +612,8 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): export class Run extends Runnable { constructor() { super('Test Run', null); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Runnable'. } public run() { diff --git a/tests/baselines/reference/parserharness.types b/tests/baselines/reference/parserharness.types index 498e9bf7ea7..4da93ff8fd0 100644 --- a/tests/baselines/reference/parserharness.types +++ b/tests/baselines/reference/parserharness.types @@ -1068,7 +1068,7 @@ module Harness { >this.children.push(child) : number >this.children.push : (...items: Runnable[]) => number >this.children : Runnable[] ->this : this +>this : Runnable >children : Runnable[] >push : (...items: Runnable[]) => number >child : Runnable @@ -1168,10 +1168,10 @@ module Harness { return this.call(this.block, done); >this.call(this.block, done) : boolean >this.call : (fn: (done?: IDone) => void, done: IDone) => boolean ->this : this +>this : Runnable >call : (fn: (done?: IDone) => void, done: IDone) => boolean >this.block : any ->this : this +>this : Runnable >block : any >done : IDone } @@ -1184,7 +1184,7 @@ module Harness { return this.call(((done) => this.children[index].run(done)), done); >this.call(((done) => this.children[index].run(done)), done) : boolean >this.call : (fn: (done?: IDone) => void, done: IDone) => boolean ->this : this +>this : Runnable >call : (fn: (done?: IDone) => void, done: IDone) => boolean >((done) => this.children[index].run(done)) : any >((done) => this.children[index].run(done)) : (done: any) => void @@ -1194,7 +1194,7 @@ module Harness { >this.children[index].run : (done: IDone) => void >this.children[index] : Runnable >this.children : Runnable[] ->this : this +>this : Runnable >children : Runnable[] >index : number >run : (done: IDone) => void @@ -1294,14 +1294,14 @@ module Harness { this.description = description; >this.description = description : string >this.description : string ->this : this +>this : TestCase >description : string >description : string this.block = block; >this.block = block : any >this.block : any ->this : this +>this : TestCase >block : any >block : any } @@ -1322,8 +1322,8 @@ module Harness { >done : IDone var that = this; ->that : this ->this : this +>that : TestCase +>this : TestCase Runnable.currentStack.push(this); >Runnable.currentStack.push(this) : number @@ -1332,7 +1332,7 @@ module Harness { >Runnable : typeof Runnable >currentStack : Runnable[] >push : (...items: Runnable[]) => number ->this : this +>this : TestCase emitLog('testStart', { desc: this.description }); >emitLog('testStart', { desc: this.description }) : void @@ -1341,19 +1341,19 @@ module Harness { >{ desc: this.description } : { desc: string; } >desc : string >this.description : string ->this : this +>this : TestCase >description : string if (this.block) { >this.block : any ->this : this +>this : TestCase >block : any var async = this.runBlock(function (e) { >async : boolean >this.runBlock(function (e) { if (e) { that.passed = false; that.error = e; emitLog('error', { desc: this.description, pass: false }, e); } else { that.passed = true; emitLog('pass', { desc: this.description, pass: true }); } Runnable.currentStack.pop(); done() }) : boolean >this.runBlock : (done: IDone) => boolean ->this : this +>this : TestCase >runBlock : (done: IDone) => boolean >function (e) { if (e) { that.passed = false; that.error = e; emitLog('error', { desc: this.description, pass: false }, e); } else { that.passed = true; emitLog('pass', { desc: this.description, pass: true }); } Runnable.currentStack.pop(); done() } : any >function (e) { if (e) { that.passed = false; that.error = e; emitLog('error', { desc: this.description, pass: false }, e); } else { that.passed = true; emitLog('pass', { desc: this.description, pass: true }); } Runnable.currentStack.pop(); done() } : (e: any) => void @@ -1365,14 +1365,14 @@ module Harness { that.passed = false; >that.passed = false : false >that.passed : any ->that : this +>that : TestCase >passed : any >false : false that.error = e; >that.error = e : any >that.error : Error ->that : this +>that : TestCase >error : Error >e : any @@ -1393,7 +1393,7 @@ module Harness { that.passed = true; >that.passed = true : true >that.passed : any ->that : this +>that : TestCase >passed : any >true : true @@ -1451,14 +1451,14 @@ module Harness { this.description = description; >this.description = description : string >this.description : string ->this : this +>this : Scenario >description : string >description : string this.block = block; >this.block = block : any >this.block : any ->this : this +>this : Scenario >block : any >block : any } @@ -1469,8 +1469,8 @@ module Harness { >done : IDone var that = this; ->that : this ->this : this +>that : Scenario +>this : Scenario Runnable.currentStack.push(this); >Runnable.currentStack.push(this) : number @@ -1479,7 +1479,7 @@ module Harness { >Runnable : typeof Runnable >currentStack : Runnable[] >push : (...items: Runnable[]) => number ->this : this +>this : Scenario emitLog('scenarioStart', { desc: this.description }); >emitLog('scenarioStart', { desc: this.description }) : void @@ -1488,14 +1488,14 @@ module Harness { >{ desc: this.description } : { desc: string; } >desc : string >this.description : string ->this : this +>this : Scenario >description : string var async = this.runBlock(function (e) { >async : boolean >this.runBlock(function (e) { Runnable.currentStack.pop(); if (e) { that.passed = false; that.error = e; var metadata: IScenarioMetadata = { id: undefined, desc: this.description, pass: false, bugs: assert.bugIds }; // Report all bugs affecting this scenario assert.bugIds.forEach(desc => emitLog('bug', metadata, desc)); emitLog('scenarioEnd', metadata, e); done(); } else { that.passed = true; // so far so good. that.runChildren(done); } }) : boolean >this.runBlock : (done: IDone) => boolean ->this : this +>this : Scenario >runBlock : (done: IDone) => boolean >function (e) { Runnable.currentStack.pop(); if (e) { that.passed = false; that.error = e; var metadata: IScenarioMetadata = { id: undefined, desc: this.description, pass: false, bugs: assert.bugIds }; // Report all bugs affecting this scenario assert.bugIds.forEach(desc => emitLog('bug', metadata, desc)); emitLog('scenarioEnd', metadata, e); done(); } else { that.passed = true; // so far so good. that.runChildren(done); } } : any >function (e) { Runnable.currentStack.pop(); if (e) { that.passed = false; that.error = e; var metadata: IScenarioMetadata = { id: undefined, desc: this.description, pass: false, bugs: assert.bugIds }; // Report all bugs affecting this scenario assert.bugIds.forEach(desc => emitLog('bug', metadata, desc)); emitLog('scenarioEnd', metadata, e); done(); } else { that.passed = true; // so far so good. that.runChildren(done); } } : (e: any) => void @@ -1515,14 +1515,14 @@ module Harness { that.passed = false; >that.passed = false : false >that.passed : any ->that : this +>that : Scenario >passed : any >false : false that.error = e; >that.error = e : any >that.error : Error ->that : this +>that : Scenario >error : Error >e : any @@ -1573,14 +1573,14 @@ module Harness { that.passed = true; // so far so good. >that.passed = true : true >that.passed : any ->that : this +>that : Scenario >passed : any >true : true that.runChildren(done); >that.runChildren(done) : void >that.runChildren : (done: IDone, index?: number) => void ->that : this +>that : Scenario >runChildren : (done: IDone, index?: number) => void >done : IDone } @@ -1598,8 +1598,8 @@ module Harness { >0 : 0 var that = this; ->that : this ->this : this +>that : Scenario +>this : Scenario var async = false; >async : boolean @@ -1610,7 +1610,7 @@ module Harness { >index : number >this.children.length : number >this.children : Runnable[] ->this : this +>this : Scenario >children : Runnable[] >length : number >index++ : number @@ -1621,7 +1621,7 @@ module Harness { >async : boolean >this.runChild(index, function (e) { that.passed = that.passed && that.children[index].passed; if (async) that.runChildren(done, index + 1); }) : boolean >this.runChild : (index: number, done: IDone) => boolean ->this : this +>this : Scenario >runChild : (index: number, done: IDone) => boolean >index : number >function (e) { that.passed = that.passed && that.children[index].passed; if (async) that.runChildren(done, index + 1); } : any @@ -1631,16 +1631,16 @@ module Harness { that.passed = that.passed && that.children[index].passed; >that.passed = that.passed && that.children[index].passed : any >that.passed : any ->that : this +>that : Scenario >passed : any >that.passed && that.children[index].passed : any >that.passed : any ->that : this +>that : Scenario >passed : any >that.children[index].passed : any >that.children[index] : Runnable >that.children : Runnable[] ->that : this +>that : Scenario >children : Runnable[] >index : number >passed : any @@ -1651,7 +1651,7 @@ module Harness { that.runChildren(done, index + 1); >that.runChildren(done, index + 1) : void >that.runChildren : (done: IDone, index?: number) => void ->that : this +>that : Scenario >runChildren : (done: IDone, index?: number) => void >done : IDone >index + 1 : number @@ -1673,11 +1673,11 @@ module Harness { >undefined : undefined >desc : string >this.description : string ->this : this +>this : Scenario >description : string >pass : any >this.passed : any ->this : this +>this : Scenario >passed : any >bugs : any >assert.bugIds : any @@ -1734,7 +1734,7 @@ module Harness { this.runChildren(); >this.runChildren() : void >this.runChildren : (index?: number) => void ->this : this +>this : Run >runChildren : (index?: number) => void } @@ -1748,15 +1748,15 @@ module Harness { >false : false var that = this; ->that : this ->this : this +>that : Run +>this : Run for (; index < this.children.length; index++) { >index < this.children.length : boolean >index : number >this.children.length : number >this.children : Runnable[] ->this : this +>this : Run >children : Runnable[] >length : number >index++ : number @@ -1775,7 +1775,7 @@ module Harness { >async : boolean >this.runChild(index, function (e) { if (async) { that.runChildren(index + 1); } }) : boolean >this.runChild : (index: number, done: IDone) => boolean ->this : this +>this : Run >runChild : (index: number, done: IDone) => boolean >index : number >function (e) { if (async) { that.runChildren(index + 1); } } : any @@ -1788,7 +1788,7 @@ module Harness { that.runChildren(index + 1); >that.runChildren(index + 1) : void >that.runChildren : (index?: number) => void ->that : this +>that : Run >runChildren : (index?: number) => void >index + 1 : number >index : number @@ -1926,14 +1926,14 @@ module Harness { this.time = 0; >this.time = 0 : 0 >this.time : number ->this : this +>this : Timer >time : number >0 : 0 this.startTime = Clock.now(); >this.startTime = Clock.now() : number >this.startTime : any ->this : this +>this : Timer >startTime : any >Clock.now() : number >Clock.now : () => number @@ -1948,7 +1948,7 @@ module Harness { this.time = (Clock.now() - this.startTime) / Clock.resolution * 1000; >this.time = (Clock.now() - this.startTime) / Clock.resolution * 1000 : number >this.time : number ->this : this +>this : Timer >time : number >(Clock.now() - this.startTime) / Clock.resolution * 1000 : number >(Clock.now() - this.startTime) / Clock.resolution : number @@ -1959,7 +1959,7 @@ module Harness { >Clock : typeof Clock >now : () => number >this.startTime : any ->this : this +>this : Timer >startTime : any >Clock.resolution : number >Clock : typeof Clock @@ -1983,7 +1983,7 @@ module Harness { >this.data.push(value) : number >this.data.push : (...items: number[]) => number >this.data : number[] ->this : this +>this : Dataset >data : number[] >push : (...items: number[]) => number >value : number @@ -2003,7 +2003,7 @@ module Harness { >i : number >this.data.length : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >length : number >i++ : number @@ -2014,7 +2014,7 @@ module Harness { >sum : number >this.data[i] : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >i : number } @@ -2024,7 +2024,7 @@ module Harness { >sum : number >this.data.length : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >length : number } @@ -2036,7 +2036,7 @@ module Harness { >min : number >this.data[0] : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >0 : 0 @@ -2047,7 +2047,7 @@ module Harness { >i : number >this.data.length : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >length : number >i++ : number @@ -2057,7 +2057,7 @@ module Harness { >this.data[i] < min : boolean >this.data[i] : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >i : number >min : number @@ -2067,7 +2067,7 @@ module Harness { >min : number >this.data[i] : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >i : number } @@ -2084,7 +2084,7 @@ module Harness { >max : number >this.data[0] : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >0 : 0 @@ -2095,7 +2095,7 @@ module Harness { >i : number >this.data.length : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >length : number >i++ : number @@ -2105,7 +2105,7 @@ module Harness { >this.data[i] > max : boolean >this.data[i] : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >i : number >max : number @@ -2115,7 +2115,7 @@ module Harness { >max : number >this.data[i] : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >i : number } @@ -2132,7 +2132,7 @@ module Harness { >sampleMean : number >this.mean() : number >this.mean : () => number ->this : this +>this : Dataset >mean : () => number var sumOfSquares = 0; @@ -2146,7 +2146,7 @@ module Harness { >i : number >this.data.length : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >length : number >i++ : number @@ -2162,7 +2162,7 @@ module Harness { >this.data[i] - sampleMean : number >this.data[i] : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >i : number >sampleMean : number @@ -2178,7 +2178,7 @@ module Harness { >sumOfSquares : number >this.data.length : number >this.data : number[] ->this : this +>this : Dataset >data : number[] >length : number } @@ -2228,13 +2228,13 @@ module Harness { >this.results[name] = this.results[name] || new Dataset() : Dataset >this.results[name] : Dataset >this.results : { [x: string]: Dataset; } ->this : this +>this : Benchmark >results : { [x: string]: Dataset; } >name : string >this.results[name] || new Dataset() : Dataset >this.results[name] : Dataset >this.results : { [x: string]: Dataset; } ->this : this +>this : Benchmark >results : { [x: string]: Dataset; } >name : string >new Dataset() : Dataset @@ -2245,7 +2245,7 @@ module Harness { >this.results[name].add : (value: number) => void >this.results[name] : Dataset >this.results : { [x: string]: Dataset; } ->this : this +>this : Benchmark >results : { [x: string]: Dataset; } >name : string >add : (value: number) => void @@ -2563,7 +2563,7 @@ module Harness { this.currentLine += str; >this.currentLine += str : string >this.currentLine : string ->this : this +>this : WriterAggregator >currentLine : string >str : any } @@ -2576,19 +2576,19 @@ module Harness { >this.lines.push(this.currentLine + str) : number >this.lines.push : (...items: string[]) => number >this.lines : string[] ->this : this +>this : WriterAggregator >lines : string[] >push : (...items: string[]) => number >this.currentLine + str : string >this.currentLine : string ->this : this +>this : WriterAggregator >currentLine : string >str : any this.currentLine = ""; >this.currentLine = "" : "" >this.currentLine : string ->this : this +>this : WriterAggregator >currentLine : string >"" : "" } @@ -2600,24 +2600,24 @@ module Harness { >this.currentLine.length > 0 : boolean >this.currentLine.length : number >this.currentLine : string ->this : this +>this : WriterAggregator >currentLine : string >length : number >0 : 0 >this.lines.push(this.currentLine) : number >this.lines.push : (...items: string[]) => number >this.lines : string[] ->this : this +>this : WriterAggregator >lines : string[] >push : (...items: string[]) => number >this.currentLine : string ->this : this +>this : WriterAggregator >currentLine : string this.currentLine = ""; >this.currentLine = "" : "" >this.currentLine : string ->this : this +>this : WriterAggregator >currentLine : string >"" : "" } @@ -2628,14 +2628,14 @@ module Harness { this.lines = []; >this.lines = [] : undefined[] >this.lines : string[] ->this : this +>this : WriterAggregator >lines : string[] >[] : undefined[] this.currentLine = ""; >this.currentLine = "" : "" >this.currentLine : string ->this : this +>this : WriterAggregator >currentLine : string >"" : "" } @@ -2659,7 +2659,7 @@ module Harness { if (this.fileCollection[s]) { >this.fileCollection[s] : any >this.fileCollection : {} ->this : this +>this : EmitterIOHost >fileCollection : {} >s : string @@ -2667,7 +2667,7 @@ module Harness { >this.fileCollection[s] : ITextWriter >this.fileCollection[s] : any >this.fileCollection : {} ->this : this +>this : EmitterIOHost >fileCollection : {} >s : string } @@ -2685,7 +2685,7 @@ module Harness { >this.fileCollection[s] = writer : WriterAggregator >this.fileCollection[s] : any >this.fileCollection : {} ->this : this +>this : EmitterIOHost >fileCollection : {} >s : string >writer : WriterAggregator @@ -2706,7 +2706,7 @@ module Harness { >typeof this.fileCollection[s] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >this.fileCollection[s] : any >this.fileCollection : {} ->this : this +>this : EmitterIOHost >fileCollection : {} >s : string >'undefined' : "undefined" @@ -2720,7 +2720,7 @@ module Harness { >reset : () => void >this.fileCollection = {} : {} >this.fileCollection : {} ->this : this +>this : EmitterIOHost >fileCollection : {} >{} : {} @@ -2738,14 +2738,14 @@ module Harness { for (var p in this.fileCollection) { >p : string >this.fileCollection : {} ->this : this +>this : EmitterIOHost >fileCollection : {} if (this.fileCollection.hasOwnProperty(p)) { >this.fileCollection.hasOwnProperty(p) : boolean >this.fileCollection.hasOwnProperty : (v: PropertyKey) => boolean >this.fileCollection : {} ->this : this +>this : EmitterIOHost >fileCollection : {} >hasOwnProperty : (v: PropertyKey) => boolean >p : string @@ -2757,7 +2757,7 @@ module Harness { >Compiler : any >this.fileCollection[p] : any >this.fileCollection : {} ->this : this +>this : EmitterIOHost >fileCollection : {} >p : string @@ -2797,7 +2797,7 @@ module Harness { >file : any >this.fileCollection[p] : any >this.fileCollection : {} ->this : this +>this : EmitterIOHost >fileCollection : {} >p : string } @@ -3183,7 +3183,7 @@ module Harness { >' ' + this.code : string >' ' : " " >this.code : any ->this : this +>this : Type >code : any >';\n' : ";\n" @@ -3211,7 +3211,7 @@ module Harness { return this.compilesOk(testCode); >this.compilesOk(testCode) : boolean >this.compilesOk : (testCode: any) => boolean ->this : this +>this : Type >compilesOk : (testCode: any) => boolean >testCode : string } @@ -3244,7 +3244,7 @@ module Harness { >others : any >this.normalizeToArray(others) : any[] >this.normalizeToArray : (arg: any) => any[] ->this : this +>this : Type >normalizeToArray : (arg: any) => any[] >others : any @@ -3263,7 +3263,7 @@ module Harness { >!this.isSubtypeOf(others[i]) : boolean >this.isSubtypeOf(others[i]) : boolean >this.isSubtypeOf : (other: Type) => boolean ->this : this +>this : Type >isSubtypeOf : (other: Type) => boolean >others[i] : any >others : any @@ -3277,7 +3277,7 @@ module Harness { >"Expected " + this.type : string >"Expected " : "Expected " >this.type : any ->this : this +>this : Type >type : any >" to be a subtype of " : " to be a subtype of " >others[i].type : any @@ -3298,7 +3298,7 @@ module Harness { >others : any >this.normalizeToArray(others) : any[] >this.normalizeToArray : (arg: any) => any[] ->this : this +>this : Type >normalizeToArray : (arg: any) => any[] >others : any @@ -3316,7 +3316,7 @@ module Harness { if (this.isSubtypeOf(others[i])) { >this.isSubtypeOf(others[i]) : boolean >this.isSubtypeOf : (other: Type) => boolean ->this : this +>this : Type >isSubtypeOf : (other: Type) => boolean >others[i] : any >others : any @@ -3330,7 +3330,7 @@ module Harness { >"Expected " + this.type : string >"Expected " : "Expected " >this.type : any ->this : this +>this : Type >type : any >" to be a subtype of " : " to be a subtype of " >others[i].type : any @@ -3369,7 +3369,7 @@ module Harness { >' ' + this.code : string >' ' : " " >this.code : any ->this : this +>this : Type >code : any >';\n' : ";\n" @@ -3380,7 +3380,7 @@ module Harness { >' export var __val__ = ' + this.identifier : string >' export var __val__ = ' : " export var __val__ = " >this.identifier : any ->this : this +>this : Type >identifier : any >';\n' : ";\n" @@ -3439,7 +3439,7 @@ module Harness { return this.compilesOk(testCode); >this.compilesOk(testCode) : boolean >this.compilesOk : (testCode: any) => boolean ->this : this +>this : Type >compilesOk : (testCode: any) => boolean >testCode : string } @@ -3453,7 +3453,7 @@ module Harness { >others : any >this.normalizeToArray(others) : any[] >this.normalizeToArray : (arg: any) => any[] ->this : this +>this : Type >normalizeToArray : (arg: any) => any[] >others : any @@ -3478,7 +3478,7 @@ module Harness { >!this.isAssignmentCompatibleWith(other) : boolean >this.isAssignmentCompatibleWith(other) : boolean >this.isAssignmentCompatibleWith : (other: Type) => boolean ->this : this +>this : Type >isAssignmentCompatibleWith : (other: Type) => boolean >other : any @@ -3490,7 +3490,7 @@ module Harness { >"Expected " + this.type : string >"Expected " : "Expected " >this.type : any ->this : this +>this : Type >type : any >" to be assignment compatible with " : " to be assignment compatible with " >other.type : any @@ -3509,7 +3509,7 @@ module Harness { >others : any >this.normalizeToArray(others) : any[] >this.normalizeToArray : (arg: any) => any[] ->this : this +>this : Type >normalizeToArray : (arg: any) => any[] >others : any @@ -3533,7 +3533,7 @@ module Harness { if (this.isAssignmentCompatibleWith(other)) { >this.isAssignmentCompatibleWith(other) : boolean >this.isAssignmentCompatibleWith : (other: Type) => boolean ->this : this +>this : Type >isAssignmentCompatibleWith : (other: Type) => boolean >other : any @@ -3545,7 +3545,7 @@ module Harness { >"Expected " + this.type : string >"Expected " : "Expected " >this.type : any ->this : this +>this : Type >type : any >" to not be assignment compatible with " : " to not be assignment compatible with " >other.type : any @@ -3572,7 +3572,7 @@ module Harness { this.assertAssignmentCompatibleWith(these); >this.assertAssignmentCompatibleWith(these) : void >this.assertAssignmentCompatibleWith : (others: any) => void ->this : this +>this : Type >assertAssignmentCompatibleWith : (others: any) => void >these : any[] @@ -3589,7 +3589,7 @@ module Harness { this.assertNotAssignmentCompatibleWith(notThese); >this.assertNotAssignmentCompatibleWith(notThese) : void >this.assertNotAssignmentCompatibleWith : (others: any) => void ->this : this +>this : Type >assertNotAssignmentCompatibleWith : (others: any) => void >notThese : any[] @@ -3617,11 +3617,11 @@ module Harness { this.any = this.get('var x : any', 'x'); >this.any = this.get('var x : any', 'x') : Type >this.any : Type ->this : this +>this : TypeFactory >any : Type >this.get('var x : any', 'x') : Type >this.get : (code: string, target: any) => Type ->this : this +>this : TypeFactory >get : (code: string, target: any) => Type >'var x : any' : "var x : any" >'x' : "x" @@ -3629,11 +3629,11 @@ module Harness { this.number = this.get('var x : number', 'x'); >this.number = this.get('var x : number', 'x') : Type >this.number : Type ->this : this +>this : TypeFactory >number : Type >this.get('var x : number', 'x') : Type >this.get : (code: string, target: any) => Type ->this : this +>this : TypeFactory >get : (code: string, target: any) => Type >'var x : number' : "var x : number" >'x' : "x" @@ -3641,11 +3641,11 @@ module Harness { this.string = this.get('var x : string', 'x'); >this.string = this.get('var x : string', 'x') : Type >this.string : Type ->this : this +>this : TypeFactory >string : Type >this.get('var x : string', 'x') : Type >this.get : (code: string, target: any) => Type ->this : this +>this : TypeFactory >get : (code: string, target: any) => Type >'var x : string' : "var x : string" >'x' : "x" @@ -3653,11 +3653,11 @@ module Harness { this.boolean = this.get('var x : boolean', 'x'); >this.boolean = this.get('var x : boolean', 'x') : Type >this.boolean : Type ->this : this +>this : TypeFactory >boolean : Type >this.get('var x : boolean', 'x') : Type >this.get : (code: string, target: any) => Type ->this : this +>this : TypeFactory >get : (code: string, target: any) => Type >'var x : boolean' : "var x : boolean" >'x' : "x" @@ -3912,7 +3912,7 @@ module Harness { >name : string >this.getTypeInfoName(tyInfo.ast) : string >this.getTypeInfoName : (ast: TypeScript.AST) => string ->this : this +>this : TypeFactory >getTypeInfoName : (ast: TypeScript.AST) => string >tyInfo.ast : any >tyInfo : any @@ -3996,7 +3996,7 @@ module Harness { >name : string >this.getTypeInfoName(tyInfo.ast) : string >this.getTypeInfoName : (ast: TypeScript.AST) => string ->this : this +>this : TypeFactory >getTypeInfoName : (ast: TypeScript.AST) => string >tyInfo.ast : any >tyInfo : any @@ -4429,7 +4429,7 @@ module Harness { >actualType : Type >this.get('var _v_a_r_ = ' + expr, '_v_a_r_') : Type >this.get : (code: string, target: any) => Type ->this : this +>this : TypeFactory >get : (code: string, target: any) => Type >'var _v_a_r_ = ' + expr : string >'var _v_a_r_ = ' : "var _v_a_r_ = " @@ -4787,7 +4787,7 @@ module Harness { this.code = lines.join("\n") >this.code = lines.join("\n") : string >this.code : string ->this : this +>this : CompilerResult >code : string >lines.join("\n") : string >lines.join : (separator?: string) => string @@ -4798,7 +4798,7 @@ module Harness { this.errors = []; >this.errors = [] : undefined[] >this.errors : CompilerError[] ->this : this +>this : CompilerResult >errors : CompilerError[] >[] : undefined[] @@ -4829,7 +4829,7 @@ module Harness { >this.errors.push(new CompilerError(err.filename, 0, 0, err.message)) : number >this.errors.push : (...items: CompilerError[]) => number >this.errors : CompilerError[] ->this : this +>this : CompilerResult >errors : CompilerError[] >push : (...items: CompilerError[]) => number >new CompilerError(err.filename, 0, 0, err.message) : CompilerError @@ -4861,7 +4861,7 @@ module Harness { >this.errors.push(new CompilerError(match[1], parseFloat(match[2]), parseFloat(match[3]), match[4])) : number >this.errors.push : (...items: CompilerError[]) => number >this.errors : CompilerError[] ->this : this +>this : CompilerResult >errors : CompilerError[] >push : (...items: CompilerError[]) => number >new CompilerError(match[1], parseFloat(match[2]), parseFloat(match[3]), match[4]) : CompilerError @@ -4912,7 +4912,7 @@ module Harness { >i : number >this.errors.length : number >this.errors : CompilerError[] ->this : this +>this : CompilerResult >errors : CompilerError[] >length : number >i++ : number @@ -4925,7 +4925,7 @@ module Harness { >this.errors[i].line : number >this.errors[i] : CompilerError >this.errors : CompilerError[] ->this : this +>this : CompilerResult >errors : CompilerError[] >i : number >line : number @@ -4934,7 +4934,7 @@ module Harness { >this.errors[i].column : number >this.errors[i] : CompilerError >this.errors : CompilerError[] ->this : this +>this : CompilerResult >errors : CompilerError[] >i : number >column : number @@ -4943,7 +4943,7 @@ module Harness { >this.errors[i].message : string >this.errors[i] : CompilerError >this.errors : CompilerError[] ->this : this +>this : CompilerResult >errors : CompilerError[] >i : number >message : string @@ -4985,19 +4985,19 @@ module Harness { >this.file + "(" + this.line : string >this.file + "(" : string >this.file : string ->this : this +>this : CompilerError >file : string >"(" : "(" >this.line : number ->this : this +>this : CompilerError >line : number >"," : "," >this.column : number ->this : this +>this : CompilerError >column : number >"): " : "): " >this.message : string ->this : this +>this : CompilerError >message : string } } @@ -6252,7 +6252,7 @@ module Harness { this.version = 1; >this.version = 1 : 1 >this.version : number ->this : this +>this : ScriptInfo >version : number >1 : 1 } @@ -6265,28 +6265,28 @@ module Harness { this.editRanges = []; >this.editRanges = [] : undefined[] >this.editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] ->this : this +>this : ScriptInfo >editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] >[] : undefined[] this.content = content; >this.content = content : string >this.content : string ->this : this +>this : ScriptInfo >content : string >content : string this.isResident = isResident; >this.isResident = isResident : boolean >this.isResident : boolean ->this : this +>this : ScriptInfo >isResident : boolean >isResident : boolean this.version++; >this.version++ : number >this.version : number ->this : this +>this : ScriptInfo >version : number } @@ -6302,7 +6302,7 @@ module Harness { >this.content.substring(0, minChar) : string >this.content.substring : (start: number, end?: number) => string >this.content : string ->this : this +>this : ScriptInfo >content : string >substring : (start: number, end?: number) => string >0 : 0 @@ -6317,7 +6317,7 @@ module Harness { >this.content.substring(limChar) : string >this.content.substring : (start: number, end?: number) => string >this.content : string ->this : this +>this : ScriptInfo >content : string >substring : (start: number, end?: number) => string >limChar : number @@ -6325,7 +6325,7 @@ module Harness { this.content = prefix + middle + suffix; >this.content = prefix + middle + suffix : string >this.content : string ->this : this +>this : ScriptInfo >content : string >prefix + middle + suffix : string >prefix + middle : string @@ -6338,7 +6338,7 @@ module Harness { >this.editRanges.push({ length: this.content.length, editRange: new TypeScript.ScriptEditRange(minChar, limChar, (limChar - minChar) + newText.length) }) : number >this.editRanges.push : (...items: { length: number; editRange: TypeScript.ScriptEditRange; }[]) => number >this.editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] ->this : this +>this : ScriptInfo >editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] >push : (...items: { length: number; editRange: TypeScript.ScriptEditRange; }[]) => number >{ length: this.content.length, editRange: new TypeScript.ScriptEditRange(minChar, limChar, (limChar - minChar) + newText.length) } : { length: number; editRange: any; } @@ -6347,7 +6347,7 @@ module Harness { >length : number >this.content.length : number >this.content : string ->this : this +>this : ScriptInfo >content : string >length : number @@ -6374,28 +6374,28 @@ module Harness { >this.editRanges.length > this.maxScriptVersions : boolean >this.editRanges.length : number >this.editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] ->this : this +>this : ScriptInfo >editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] >length : number >this.maxScriptVersions : number ->this : this +>this : ScriptInfo >maxScriptVersions : number this.editRanges.splice(0, this.maxScriptVersions - this.editRanges.length); >this.editRanges.splice(0, this.maxScriptVersions - this.editRanges.length) : { length: number; editRange: TypeScript.ScriptEditRange; }[] >this.editRanges.splice : { (start: number, deleteCount?: number): { length: number; editRange: TypeScript.ScriptEditRange; }[]; (start: number, deleteCount: number, ...items: { length: number; editRange: TypeScript.ScriptEditRange; }[]): { length: number; editRange: TypeScript.ScriptEditRange; }[]; } >this.editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] ->this : this +>this : ScriptInfo >editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] >splice : { (start: number, deleteCount?: number): { length: number; editRange: TypeScript.ScriptEditRange; }[]; (start: number, deleteCount: number, ...items: { length: number; editRange: TypeScript.ScriptEditRange; }[]): { length: number; editRange: TypeScript.ScriptEditRange; }[]; } >0 : 0 >this.maxScriptVersions - this.editRanges.length : number >this.maxScriptVersions : number ->this : this +>this : ScriptInfo >maxScriptVersions : number >this.editRanges.length : number >this.editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] ->this : this +>this : ScriptInfo >editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] >length : number } @@ -6404,7 +6404,7 @@ module Harness { this.version++; >this.version++ : number >this.version : number ->this : this +>this : ScriptInfo >version : number } @@ -6416,7 +6416,7 @@ module Harness { if (this.version == version) { >this.version == version : boolean >this.version : number ->this : this +>this : ScriptInfo >version : number >version : number @@ -6430,13 +6430,13 @@ module Harness { >this.editRanges.length - (this.version - version) : number >this.editRanges.length : number >this.editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] ->this : this +>this : ScriptInfo >editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] >length : number >(this.version - version) : number >this.version - version : number >this.version : number ->this : this +>this : ScriptInfo >version : number >version : number @@ -6449,7 +6449,7 @@ module Harness { >initialEditRangeIndex : number >this.editRanges.length : number >this.editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] ->this : this +>this : ScriptInfo >editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] >length : number @@ -6468,7 +6468,7 @@ module Harness { >this.editRanges.slice(initialEditRangeIndex) : { length: number; editRange: TypeScript.ScriptEditRange; }[] >this.editRanges.slice : (start?: number, end?: number) => { length: number; editRange: TypeScript.ScriptEditRange; }[] >this.editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] ->this : this +>this : ScriptInfo >editRanges : { length: number; editRange: TypeScript.ScriptEditRange; }[] >slice : (start?: number, end?: number) => { length: number; editRange: TypeScript.ScriptEditRange; }[] >initialEditRangeIndex : number @@ -6592,7 +6592,7 @@ module Harness { this.addScript("lib.d.ts", Harness.Compiler.libText, true); >this.addScript("lib.d.ts", Harness.Compiler.libText, true) : void >this.addScript : (name: string, content: string, isResident?: boolean) => void ->this : this +>this : TypeScriptLS >addScript : (name: string, content: string, isResident?: boolean) => void >"lib.d.ts" : "lib.d.ts" >Harness.Compiler.libText : any @@ -6618,7 +6618,7 @@ module Harness { this.addScript(name, code, isResident); >this.addScript(name, code, isResident) : void >this.addScript : (name: string, content: string, isResident?: boolean) => void ->this : this +>this : TypeScriptLS >addScript : (name: string, content: string, isResident?: boolean) => void >name : string >code : string @@ -6640,14 +6640,14 @@ module Harness { >content : string >isResident : boolean >this.maxScriptVersions : number ->this : this +>this : TypeScriptLS >maxScriptVersions : number this.scripts.push(script); >this.scripts.push(script) : number >this.scripts.push : (...items: ScriptInfo[]) => number >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >push : (...items: ScriptInfo[]) => number >script : ScriptInfo @@ -6667,7 +6667,7 @@ module Harness { >i : number >this.scripts.length : number >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >length : number >i++ : number @@ -6678,7 +6678,7 @@ module Harness { >this.scripts[i].name : string >this.scripts[i] : ScriptInfo >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >i : number >name : string @@ -6689,7 +6689,7 @@ module Harness { >this.scripts[i].updateContent : (content: string, isResident: boolean) => void >this.scripts[i] : ScriptInfo >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >i : number >updateContent : (content: string, isResident: boolean) => void @@ -6703,7 +6703,7 @@ module Harness { this.addScript(name, content, isResident); >this.addScript(name, content, isResident) : void >this.addScript : (name: string, content: string, isResident?: boolean) => void ->this : this +>this : TypeScriptLS >addScript : (name: string, content: string, isResident?: boolean) => void >name : string >content : string @@ -6724,7 +6724,7 @@ module Harness { >i : number >this.scripts.length : number >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >length : number >i++ : number @@ -6735,7 +6735,7 @@ module Harness { >this.scripts[i].name : string >this.scripts[i] : ScriptInfo >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >i : number >name : string @@ -6746,7 +6746,7 @@ module Harness { >this.scripts[i].editContent : (minChar: number, limChar: number, newText: string) => void >this.scripts[i] : ScriptInfo >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >i : number >editContent : (minChar: number, limChar: number, newText: string) => void @@ -6776,7 +6776,7 @@ module Harness { >this.scripts[scriptIndex].content : string >this.scripts[scriptIndex] : ScriptInfo >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >scriptIndex : number >content : string @@ -6830,7 +6830,7 @@ module Harness { return this.scripts.length; >this.scripts.length : number >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >length : number } @@ -6847,7 +6847,7 @@ module Harness { >this.scripts[scriptIndex].content : string >this.scripts[scriptIndex] : ScriptInfo >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >scriptIndex : number >content : string @@ -6865,7 +6865,7 @@ module Harness { >this.scripts[scriptIndex].content : string >this.scripts[scriptIndex] : ScriptInfo >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >scriptIndex : number >content : string @@ -6880,7 +6880,7 @@ module Harness { >this.scripts[scriptIndex].name : string >this.scripts[scriptIndex] : ScriptInfo >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >scriptIndex : number >name : string @@ -6894,7 +6894,7 @@ module Harness { >this.scripts[scriptIndex].isResident : boolean >this.scripts[scriptIndex] : ScriptInfo >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >scriptIndex : number >isResident : boolean @@ -6908,7 +6908,7 @@ module Harness { >this.scripts[scriptIndex].version : number >this.scripts[scriptIndex] : ScriptInfo >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >scriptIndex : number >version : number @@ -6925,7 +6925,7 @@ module Harness { >this.scripts[scriptIndex].getEditRangeSinceVersion : (version: number) => TypeScript.ScriptEditRange >this.scripts[scriptIndex] : ScriptInfo >this.scripts : ScriptInfo[] ->this : this +>this : TypeScriptLS >scripts : ScriptInfo[] >scriptIndex : number >getEditRangeSinceVersion : (version: number) => TypeScript.ScriptEditRange @@ -6970,7 +6970,7 @@ module Harness { >Services : any >TypeScriptServicesFactory : any >createLanguageServiceShim : any ->this : this +>this : TypeScriptLS ls.refresh(true); >ls.refresh(true) : any @@ -6982,7 +6982,7 @@ module Harness { this.ls = ls; >this.ls = ls : any >this.ls : Services.ILanguageServiceShim ->this : this +>this : TypeScriptLS >ls : Services.ILanguageServiceShim >ls : any @@ -7057,7 +7057,7 @@ module Harness { return this.parseSourceText(fileName, sourceText); >this.parseSourceText(fileName, sourceText) : TypeScript.Script >this.parseSourceText : (fileName: string, sourceText: TypeScript.ISourceText) => TypeScript.Script ->this : this +>this : TypeScriptLS >parseSourceText : (fileName: string, sourceText: TypeScript.ISourceText) => TypeScript.Script >fileName : string >sourceText : any @@ -7079,7 +7079,7 @@ module Harness { >this.ls.languageService.getScriptAST : any >this.ls.languageService : any >this.ls : Services.ILanguageServiceShim ->this : this +>this : TypeScriptLS >ls : Services.ILanguageServiceShim >languageService : any >getScriptAST : any @@ -7155,7 +7155,7 @@ module Harness { >this.ls.languageService.getScriptAST : any >this.ls.languageService : any >this.ls : Services.ILanguageServiceShim ->this : this +>this : TypeScriptLS >ls : Services.ILanguageServiceShim >languageService : any >getScriptAST : any @@ -7221,7 +7221,7 @@ module Harness { >formattedScript : string >this.applyEdits(script, edits) : string >this.applyEdits : (content: string, edits: Services.TextEdit[]) => string ->this : this +>this : TypeScriptLS >applyEdits : (content: string, edits: Services.TextEdit[]) => string >script : any >edits : Services.TextEdit[] @@ -7266,7 +7266,7 @@ module Harness { >edits : Services.TextEdit[] >this.normalizeEdits(edits) : Services.TextEdit[] >this.normalizeEdits : (edits: Services.TextEdit[]) => Services.TextEdit[] ->this : this +>this : TypeScriptLS >normalizeEdits : (edits: Services.TextEdit[]) => Services.TextEdit[] >edits : Services.TextEdit[] diff --git a/tests/baselines/reference/parserindenter.types b/tests/baselines/reference/parserindenter.types index 8032bbdb79c..34abe8bec57 100644 --- a/tests/baselines/reference/parserindenter.types +++ b/tests/baselines/reference/parserindenter.types @@ -59,18 +59,18 @@ module Formatting { this.indentationBag = new IndentationBag(this.snapshot); >this.indentationBag = new IndentationBag(this.snapshot) : any >this.indentationBag : IndentationBag ->this : this +>this : Indenter >indentationBag : IndentationBag >new IndentationBag(this.snapshot) : any >IndentationBag : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot this.scriptBlockBeginLineNumber = -1; >this.scriptBlockBeginLineNumber = -1 : -1 >this.scriptBlockBeginLineNumber : number ->this : this +>this : Indenter >scriptBlockBeginLineNumber : number >-1 : -1 >1 : 1 @@ -78,7 +78,7 @@ module Formatting { this.offsetIndentationDeltas = new Dictionary_int_int(); // text offset -> indentation delta >this.offsetIndentationDeltas = new Dictionary_int_int() : any >this.offsetIndentationDeltas : Dictionary_int_int ->this : this +>this : Indenter >offsetIndentationDeltas : Dictionary_int_int >new Dictionary_int_int() : any >Dictionary_int_int : any @@ -89,7 +89,7 @@ module Formatting { >this.tree.Root.SetIndentationOverride : any >this.tree.Root : any >this.tree : ParseTree ->this : this +>this : Indenter >tree : ParseTree >Root : any >SetIndentationOverride : any @@ -98,22 +98,22 @@ module Formatting { this.ApplyScriptBlockIndentation(this.languageHostIndentation, this.tree); >this.ApplyScriptBlockIndentation(this.languageHostIndentation, this.tree) : void >this.ApplyScriptBlockIndentation : (languageHostIndentation: string, tree: ParseTree) => void ->this : this +>this : Indenter >ApplyScriptBlockIndentation : (languageHostIndentation: string, tree: ParseTree) => void >this.languageHostIndentation : string ->this : this +>this : Indenter >languageHostIndentation : string >this.tree : ParseTree ->this : this +>this : Indenter >tree : ParseTree this.FillInheritedIndentation(this.tree); >this.FillInheritedIndentation(this.tree) : void >this.FillInheritedIndentation : (tree: ParseTree) => void ->this : this +>this : Indenter >FillInheritedIndentation : (tree: ParseTree) => void >this.tree : ParseTree ->this : this +>this : Indenter >tree : ParseTree } @@ -129,7 +129,7 @@ module Formatting { >this.logger.information() : any >this.logger.information : any >this.logger : TypeScript.ILogger ->this : this +>this : Indenter >logger : TypeScript.ILogger >information : any @@ -137,7 +137,7 @@ module Formatting { >this.logger.log("GetIndentationEdits(" + "t1=[" + token.Span.startPosition() + "," + token.Span.endPosition()+ "], " + "t2=[" + (nextToken == null ? "null" : (nextToken.Span.startPosition() + "," + nextToken.Span.endPosition())) + "]" + ")") : any >this.logger.log : any >this.logger : TypeScript.ILogger ->this : this +>this : Indenter >logger : TypeScript.ILogger >log : any >"GetIndentationEdits(" + "t1=[" + token.Span.startPosition() + "," + token.Span.endPosition()+ "], " + "t2=[" + (nextToken == null ? "null" : (nextToken.Span.startPosition() + "," + nextToken.Span.endPosition())) + "]" + ")" : string @@ -202,7 +202,7 @@ module Formatting { >result : List_TextEditInfo >this.GetIndentationEditsWorker(token, nextToken, node, sameLineIndent) : List_TextEditInfo >this.GetIndentationEditsWorker : (token: TokenSpan, nextToken: TokenSpan, node: ParseNode, sameLineIndent: boolean) => List_TextEditInfo ->this : this +>this : Indenter >GetIndentationEditsWorker : (token: TokenSpan, nextToken: TokenSpan, node: ParseNode, sameLineIndent: boolean) => List_TextEditInfo >token : TokenSpan >nextToken : TokenSpan @@ -213,7 +213,7 @@ module Formatting { >this.logger.information() : any >this.logger.information : any >this.logger : TypeScript.ILogger ->this : this +>this : Indenter >logger : TypeScript.ILogger >information : any @@ -241,7 +241,7 @@ module Formatting { >this.logger.log("edit: minChar=" + edit.position + ", limChar=" + (edit.position + edit.length) + ", text=\"" + TypeScript.stringToLiteral(edit.replaceWith, 30) + "\"") : any >this.logger.log : any >this.logger : TypeScript.ILogger ->this : this +>this : Indenter >logger : TypeScript.ILogger >log : any >"edit: minChar=" + edit.position + ", limChar=" + (edit.position + edit.length) + ", text=\"" + TypeScript.stringToLiteral(edit.replaceWith, 30) + "\"" : string @@ -309,7 +309,7 @@ module Formatting { this.AdjustStartOffsetIfNeeded(token, node); >this.AdjustStartOffsetIfNeeded(token, node) : void >this.AdjustStartOffsetIfNeeded : (token: TokenSpan, node: ParseNode) => void ->this : this +>this : Indenter >AdjustStartOffsetIfNeeded : (token: TokenSpan, node: ParseNode) => void >token : TokenSpan >node : ParseNode @@ -318,7 +318,7 @@ module Formatting { if (this.scriptBlockBeginLineNumber == token.lineNumber()) { >this.scriptBlockBeginLineNumber == token.lineNumber() : boolean >this.scriptBlockBeginLineNumber : number ->this : this +>this : Indenter >scriptBlockBeginLineNumber : number >token.lineNumber() : any >token.lineNumber : any @@ -336,7 +336,7 @@ module Formatting { >sameLineIndent : boolean >this.IsMultiLineString(token) : boolean >this.IsMultiLineString : (token: TokenSpan) => boolean ->this : this +>this : Indenter >IsMultiLineString : (token: TokenSpan) => boolean >token : TokenSpan @@ -350,7 +350,7 @@ module Formatting { >indentationInfo : IndentationInfo >this.GetSpecialCaseIndentation(token, node) : IndentationInfo >this.GetSpecialCaseIndentation : (token: TokenSpan, node: ParseNode) => IndentationInfo ->this : this +>this : Indenter >GetSpecialCaseIndentation : (token: TokenSpan, node: ParseNode) => IndentationInfo >token : TokenSpan >node : ParseNode @@ -433,7 +433,7 @@ module Formatting { >node.GetEffectiveIndentation : any >node : ParseNode >GetEffectiveIndentation : any ->this : this +>this : Indenter } else { //// Special cases for anything else that is not in the tree and should be indented @@ -474,7 +474,7 @@ module Formatting { >node.GetEffectiveChildrenIndentation : any >node : ParseNode >GetEffectiveChildrenIndentation : any ->this : this +>this : Indenter } else { //// Move the token the same indentation-delta that moved its indentable parent @@ -487,7 +487,7 @@ module Formatting { >indentationInfo : IndentationInfo >this.ApplyIndentationDeltaFromParent(token, node) : IndentationInfo >this.ApplyIndentationDeltaFromParent : (token: TokenSpan, node: ParseNode) => IndentationInfo ->this : this +>this : Indenter >ApplyIndentationDeltaFromParent : (token: TokenSpan, node: ParseNode) => IndentationInfo >token : TokenSpan >node : ParseNode @@ -505,7 +505,7 @@ module Formatting { >edit : TextEditInfo >this.GetIndentEdit(indentationInfo, token.Span.startPosition(), sameLineIndent) : TextEditInfo >this.GetIndentEdit : (indentInfo: IndentationInfo, tokenStartPosition: number, sameLineIndent: boolean) => TextEditInfo ->this : this +>this : Indenter >GetIndentEdit : (indentInfo: IndentationInfo, tokenStartPosition: number, sameLineIndent: boolean) => TextEditInfo >indentationInfo : IndentationInfo >token.Span.startPosition() : any @@ -524,7 +524,7 @@ module Formatting { this.RegisterIndentation(edit, sameLineIndent); >this.RegisterIndentation(edit, sameLineIndent) : void >this.RegisterIndentation : (indent: TextEditInfo, sameLineIndent: boolean) => void ->this : this +>this : Indenter >RegisterIndentation : (indent: TextEditInfo, sameLineIndent: boolean) => void >edit : TextEditInfo >sameLineIndent : boolean @@ -550,7 +550,7 @@ module Formatting { >commentEdits : List_TextEditInfo >this.GetCommentIndentationEdits(token) : List_TextEditInfo >this.GetCommentIndentationEdits : (token: TokenSpan) => List_TextEditInfo ->this : this +>this : Indenter >GetCommentIndentationEdits : (token: TokenSpan) => List_TextEditInfo >token : TokenSpan @@ -604,7 +604,7 @@ module Formatting { >this.snapshot.GetLineNumberFromPosition(token.Span.endPosition()) : any >this.snapshot.GetLineNumberFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineNumberFromPosition : any >token.Span.endPosition() : any @@ -629,7 +629,7 @@ module Formatting { >commentFirstLineIndentationDelta : number >this.GetIndentationDelta(token.Span.startPosition(), null) : number >this.GetIndentationDelta : (tokenStartPosition: number, childTokenStartPosition: number) => number ->this : this +>this : Indenter >GetIndentationDelta : (tokenStartPosition: number, childTokenStartPosition: number) => number >token.Span.startPosition() : any >token.Span.startPosition : any @@ -665,7 +665,7 @@ module Formatting { >this.snapshot.GetLineFromLineNumber(line) : any >this.snapshot.GetLineFromLineNumber : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineFromLineNumber : any >line : any @@ -675,7 +675,7 @@ module Formatting { >lineIndent : string >this.GetLineIndentationForOffset(lineStartPosition) : string >this.GetLineIndentationForOffset : (offset: number) => string ->this : this +>this : Indenter >GetLineIndentationForOffset : (offset: number) => string >lineStartPosition : any @@ -683,7 +683,7 @@ module Formatting { >commentIndentationInfo : IndentationInfo >this.ApplyIndentationDelta2(lineIndent, commentFirstLineIndentationDelta) : IndentationInfo >this.ApplyIndentationDelta2 : (currentIndent: string, delta: number) => IndentationInfo ->this : this +>this : Indenter >ApplyIndentationDelta2 : (currentIndent: string, delta: number) => IndentationInfo >lineIndent : string >commentFirstLineIndentationDelta : number @@ -705,7 +705,7 @@ module Formatting { >commentIndentationEdit : TextEditInfo >this.GetIndentEdit(commentIndentationInfo, tokenStartPosition, false) : TextEditInfo >this.GetIndentEdit : (indentInfo: IndentationInfo, tokenStartPosition: number, sameLineIndent: boolean) => TextEditInfo ->this : this +>this : Indenter >GetIndentEdit : (indentInfo: IndentationInfo, tokenStartPosition: number, sameLineIndent: boolean) => TextEditInfo >commentIndentationInfo : IndentationInfo >tokenStartPosition : any @@ -849,7 +849,7 @@ module Formatting { >indentationInfo : IndentationInfo >this.GetSpecialCaseIndentationForLCurly(node) : IndentationInfo >this.GetSpecialCaseIndentationForLCurly : (node: ParseNode) => IndentationInfo ->this : this +>this : Indenter >GetSpecialCaseIndentationForLCurly : (node: ParseNode) => IndentationInfo >node : ParseNode @@ -873,7 +873,7 @@ module Formatting { >node.GetNodeStartLineIndentation : any >node : ParseNode >GetNodeStartLineIndentation : any ->this : this +>this : Indenter return indentationInfo; >indentationInfo : IndentationInfo @@ -921,7 +921,7 @@ module Formatting { >node.GetNodeStartLineIndentation : any >node : ParseNode >GetNodeStartLineIndentation : any ->this : this +>this : Indenter return indentationInfo; >indentationInfo : IndentationInfo @@ -951,7 +951,7 @@ module Formatting { >node.GetNodeStartLineIndentation : any >node : ParseNode >GetNodeStartLineIndentation : any ->this : this +>this : Indenter return indentationInfo; >indentationInfo : IndentationInfo @@ -968,7 +968,7 @@ module Formatting { return this.GetSpecialCaseIndentationForSemicolon(token, node); >this.GetSpecialCaseIndentationForSemicolon(token, node) : IndentationInfo >this.GetSpecialCaseIndentationForSemicolon : (token: TokenSpan, node: ParseNode) => IndentationInfo ->this : this +>this : Indenter >GetSpecialCaseIndentationForSemicolon : (token: TokenSpan, node: ParseNode) => IndentationInfo >token : TokenSpan >node : ParseNode @@ -981,7 +981,7 @@ module Formatting { return this.GetSpecialCaseIndentationForComment(token, node); >this.GetSpecialCaseIndentationForComment(token, node) : IndentationInfo >this.GetSpecialCaseIndentationForComment : (token: TokenSpan, node: ParseNode) => IndentationInfo ->this : this +>this : Indenter >GetSpecialCaseIndentationForComment : (token: TokenSpan, node: ParseNode) => IndentationInfo >token : TokenSpan >node : ParseNode @@ -1043,7 +1043,7 @@ module Formatting { >node.GetNodeStartLineIndentation : any >node : ParseNode >GetNodeStartLineIndentation : any ->this : this +>this : Indenter return indentationInfo; >indentationInfo : IndentationInfo @@ -1080,7 +1080,7 @@ module Formatting { >node.GetEffectiveIndentation : any >node : ParseNode >GetEffectiveIndentation : any ->this : this +>this : Indenter return indentationInfo; >indentationInfo : IndentationInfo @@ -1097,7 +1097,7 @@ module Formatting { if (this.smartIndent) { >this.smartIndent : boolean ->this : this +>this : Indenter >smartIndent : boolean indentationInfo = node.GetEffectiveChildrenIndentation(this); @@ -1107,7 +1107,7 @@ module Formatting { >node.GetEffectiveChildrenIndentation : any >node : ParseNode >GetEffectiveChildrenIndentation : any ->this : this +>this : Indenter return indentationInfo; >indentationInfo : IndentationInfo @@ -1160,7 +1160,7 @@ module Formatting { >node.GetEffectiveChildrenIndentation : any >node : ParseNode >GetEffectiveChildrenIndentation : any ->this : this +>this : Indenter return indentationInfo; >indentationInfo : IndentationInfo @@ -1242,7 +1242,7 @@ module Formatting { if (this.CanIndentComment(token, node)) { >this.CanIndentComment(token, node) : boolean >this.CanIndentComment : (token: TokenSpan, node: ParseNode) => boolean ->this : this +>this : Indenter >CanIndentComment : (token: TokenSpan, node: ParseNode) => boolean >token : TokenSpan >node : ParseNode @@ -1254,7 +1254,7 @@ module Formatting { >node.GetEffectiveChildrenIndentationForComment : any >node : ParseNode >GetEffectiveChildrenIndentationForComment : any ->this : this +>this : Indenter } else { indentationInfo = this.ApplyIndentationDeltaFromParent(token, node); @@ -1262,7 +1262,7 @@ module Formatting { >indentationInfo : IndentationInfo >this.ApplyIndentationDeltaFromParent(token, node) : IndentationInfo >this.ApplyIndentationDeltaFromParent : (token: TokenSpan, node: ParseNode) => IndentationInfo ->this : this +>this : Indenter >ApplyIndentationDeltaFromParent : (token: TokenSpan, node: ParseNode) => IndentationInfo >token : TokenSpan >node : ParseNode @@ -1436,7 +1436,7 @@ module Formatting { >scriptBlockIndentation : string >this.ApplyIndentationLevel(languageHostIndentation, 1) : string >this.ApplyIndentationLevel : (existingIndentation: string, level: number) => string ->this : this +>this : Indenter >ApplyIndentationLevel : (existingIndentation: string, level: number) => string >languageHostIndentation : string >1 : 1 @@ -1504,7 +1504,7 @@ module Formatting { >indentText : string >this.ApplyIndentationLevel(indentInfo.Prefix, indentInfo.Level) : string >this.ApplyIndentationLevel : (existingIndentation: string, level: number) => string ->this : this +>this : Indenter >ApplyIndentationLevel : (existingIndentation: string, level: number) => string >indentInfo.Prefix : any >indentInfo : IndentationInfo @@ -1529,7 +1529,7 @@ module Formatting { >this.snapshot.GetLineFromPosition(tokenStartPosition) : any >this.snapshot.GetLineFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineFromPosition : any >tokenStartPosition : number @@ -1554,7 +1554,7 @@ module Formatting { >this.snapshot.GetText(currentIndentSpan) : any >this.snapshot.GetText : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetText : any >currentIndentSpan : any @@ -1568,7 +1568,7 @@ module Formatting { >this.logger.debug() : any >this.logger.debug : any >this.logger : TypeScript.ILogger ->this : this +>this : Indenter >logger : TypeScript.ILogger >debug : any @@ -1646,7 +1646,7 @@ module Formatting { >indentSize : any >this.editorOptions.IndentSize : any >this.editorOptions : Services.EditorOptions ->this : this +>this : Indenter >editorOptions : Services.EditorOptions >IndentSize : any @@ -1654,7 +1654,7 @@ module Formatting { >tabSize : any >this.editorOptions.TabSize : any >this.editorOptions : Services.EditorOptions ->this : this +>this : Indenter >editorOptions : Services.EditorOptions >TabSize : any @@ -1662,7 +1662,7 @@ module Formatting { >convertTabsToSpaces : any >this.editorOptions.ConvertTabsToSpaces : any >this.editorOptions : Services.EditorOptions ->this : this +>this : Indenter >editorOptions : Services.EditorOptions >ConvertTabsToSpaces : any @@ -1730,7 +1730,7 @@ module Formatting { return this.GetIndentString(null, totalIndent, tabSize, convertTabsToSpaces); >this.GetIndentString(null, totalIndent, tabSize, convertTabsToSpaces) : string >this.GetIndentString : (prefix: string, totalIndentSize: number, tabSize: number, convertTabsToSpaces: boolean) => string ->this : this +>this : Indenter >GetIndentString : (prefix: string, totalIndentSize: number, tabSize: number, convertTabsToSpaces: boolean) => string >null : null >totalIndent : number @@ -1747,7 +1747,7 @@ module Formatting { return this.GetIndentString(existingIndentation, totalIndentSize, tabSize, convertTabsToSpaces); >this.GetIndentString(existingIndentation, totalIndentSize, tabSize, convertTabsToSpaces) : string >this.GetIndentString : (prefix: string, totalIndentSize: number, tabSize: number, convertTabsToSpaces: boolean) => string ->this : this +>this : Indenter >GetIndentString : (prefix: string, totalIndentSize: number, tabSize: number, convertTabsToSpaces: boolean) => string >existingIndentation : string >totalIndentSize : number @@ -1886,7 +1886,7 @@ module Formatting { >parentIndentationDeltaSize : number >this.GetIndentationDelta(indentableParent.AuthorNode.Details.StartOffset, token.Span.startPosition()) : number >this.GetIndentationDelta : (tokenStartPosition: number, childTokenStartPosition: number) => number ->this : this +>this : Indenter >GetIndentationDelta : (tokenStartPosition: number, childTokenStartPosition: number) => number >indentableParent.AuthorNode.Details.StartOffset : any >indentableParent.AuthorNode.Details : any @@ -1912,7 +1912,7 @@ module Formatting { >indentationInfo : IndentationInfo >this.ApplyIndentationDelta1(token.Span.startPosition(), parentIndentationDeltaSize) : IndentationInfo >this.ApplyIndentationDelta1 : (tokenStartPosition: number, delta: number) => IndentationInfo ->this : this +>this : Indenter >ApplyIndentationDelta1 : (tokenStartPosition: number, delta: number) => IndentationInfo >token.Span.startPosition() : any >token.Span.startPosition : any @@ -1939,7 +1939,7 @@ module Formatting { >this.snapshot.GetLineFromPosition(tokenStartPosition) : any >this.snapshot.GetLineFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineFromPosition : any >tokenStartPosition : number @@ -1964,7 +1964,7 @@ module Formatting { >this.snapshot.GetText(currentIndentSpan) : any >this.snapshot.GetText : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetText : any >currentIndentSpan : any @@ -1973,7 +1973,7 @@ module Formatting { return this.ApplyIndentationDelta2(currentIndent, delta); >this.ApplyIndentationDelta2(currentIndent, delta) : IndentationInfo >this.ApplyIndentationDelta2 : (currentIndent: string, delta: number) => IndentationInfo ->this : this +>this : Indenter >ApplyIndentationDelta2 : (currentIndent: string, delta: number) => IndentationInfo >currentIndent : any >delta : number @@ -2000,7 +2000,7 @@ module Formatting { >GetIndentSizeFromIndentText : (indentText: string, editorOptions: Services.EditorOptions) => number >currentIndent : string >this.editorOptions : Services.EditorOptions ->this : this +>this : Indenter >editorOptions : Services.EditorOptions var newIndentSize = currentIndentSize + delta; @@ -2024,18 +2024,18 @@ module Formatting { >newIndent : string >this.GetIndentString(null, newIndentSize, this.editorOptions.TabSize, this.editorOptions.ConvertTabsToSpaces) : string >this.GetIndentString : (prefix: string, totalIndentSize: number, tabSize: number, convertTabsToSpaces: boolean) => string ->this : this +>this : Indenter >GetIndentString : (prefix: string, totalIndentSize: number, tabSize: number, convertTabsToSpaces: boolean) => string >null : null >newIndentSize : number >this.editorOptions.TabSize : any >this.editorOptions : Services.EditorOptions ->this : this +>this : Indenter >editorOptions : Services.EditorOptions >TabSize : any >this.editorOptions.ConvertTabsToSpaces : any >this.editorOptions : Services.EditorOptions ->this : this +>this : Indenter >editorOptions : Services.EditorOptions >ConvertTabsToSpaces : any @@ -2075,7 +2075,7 @@ module Formatting { >this.offsetIndentationDeltas.GetValue(tokenStartPosition) : any >this.offsetIndentationDeltas.GetValue : any >this.offsetIndentationDeltas : Dictionary_int_int ->this : this +>this : Indenter >offsetIndentationDeltas : Dictionary_int_int >GetValue : any >tokenStartPosition : number @@ -2090,7 +2090,7 @@ module Formatting { >this.indentationBag.FindIndent(tokenStartPosition) : any >this.indentationBag.FindIndent : any >this.indentationBag : IndentationBag ->this : this +>this : Indenter >indentationBag : IndentationBag >FindIndent : any >tokenStartPosition : number @@ -2109,7 +2109,7 @@ module Formatting { >this.snapshot.GetText(new Span(indentEditInfo.OrigIndentPosition, indentEditInfo.OrigIndentLength())) : any >this.snapshot.GetText : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetText : any >new Span(indentEditInfo.OrigIndentPosition, indentEditInfo.OrigIndentLength()) : any @@ -2137,7 +2137,7 @@ module Formatting { >GetIndentSizeFromText : (text: string, editorOptions: Services.EditorOptions, includeNonIndentChars: boolean) => number >origIndentText : any >this.editorOptions : Services.EditorOptions ->this : this +>this : Indenter >editorOptions : Services.EditorOptions >true : true @@ -2149,7 +2149,7 @@ module Formatting { >GetIndentSizeFromIndentText : (indentText: string, editorOptions: Services.EditorOptions) => number >newIndentText : any >this.editorOptions : Services.EditorOptions ->this : this +>this : Indenter >editorOptions : Services.EditorOptions // Check the child's position whether it's before the parent position @@ -2178,7 +2178,7 @@ module Formatting { >this.snapshot.GetLineFromPosition(childTokenStartPosition) : any >this.snapshot.GetLineFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineFromPosition : any >childTokenStartPosition : number @@ -2189,7 +2189,7 @@ module Formatting { >this.snapshot.GetText(new Span(childTokenLineStartPosition, childTokenStartPosition - childTokenLineStartPosition)) : any >this.snapshot.GetText : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetText : any >new Span(childTokenLineStartPosition, childTokenStartPosition - childTokenLineStartPosition) : any @@ -2207,7 +2207,7 @@ module Formatting { >GetIndentSizeFromIndentText : (indentText: string, editorOptions: Services.EditorOptions) => number >childIndentText : any >this.editorOptions : Services.EditorOptions ->this : this +>this : Indenter >editorOptions : Services.EditorOptions if (childIndentSize < origIndentSize) @@ -2224,7 +2224,7 @@ module Formatting { >GetIndentSizeFromIndentText : (indentText: string, editorOptions: Services.EditorOptions) => number >origIndentText : any >this.editorOptions : Services.EditorOptions ->this : this +>this : Indenter >editorOptions : Services.EditorOptions } @@ -2239,7 +2239,7 @@ module Formatting { >this.offsetIndentationDeltas.Add(tokenStartPosition, indentationDeltaSize) : any >this.offsetIndentationDeltas.Add : any >this.offsetIndentationDeltas : Dictionary_int_int ->this : this +>this : Indenter >offsetIndentationDeltas : Dictionary_int_int >Add : any >tokenStartPosition : number @@ -2276,7 +2276,7 @@ module Formatting { >!this.smartIndent && tree.StartNodePreviousSibling !== null : boolean >!this.smartIndent : boolean >this.smartIndent : boolean ->this : this +>this : Indenter >smartIndent : boolean >tree.StartNodePreviousSibling !== null : boolean >tree.StartNodePreviousSibling : any @@ -2327,7 +2327,7 @@ module Formatting { >this.snapshot.GetLineNumberFromPosition(offset) : any >this.snapshot.GetLineNumberFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineNumberFromPosition : any >offset : number @@ -2347,7 +2347,7 @@ module Formatting { >this.snapshot.GetLineNumberFromPosition(node.Parent.AuthorNode.Details.StartOffset) : any >this.snapshot.GetLineNumberFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineNumberFromPosition : any >node.Parent.AuthorNode.Details.StartOffset : any @@ -2395,7 +2395,7 @@ module Formatting { // Otherwise base on parent indentation. if (this.smartIndent) { >this.smartIndent : boolean ->this : this +>this : Indenter >smartIndent : boolean // in smartIndent the self node is the parent node since it's the closest node to the new line @@ -2424,7 +2424,7 @@ module Formatting { >this.firstToken.Span.startPosition : any >this.firstToken.Span : any >this.firstToken : TokenSpan ->this : this +>this : Indenter >firstToken : TokenSpan >Span : any >startPosition : any @@ -2443,7 +2443,7 @@ module Formatting { >this.snapshot.GetLineNumberFromPosition(tree.StartNodeSelf.AuthorNode.Details.StartOffset) : any >this.snapshot.GetLineNumberFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineNumberFromPosition : any >tree.StartNodeSelf.AuthorNode.Details.StartOffset : any @@ -2477,7 +2477,7 @@ module Formatting { >this.snapshot.GetLineNumberFromPosition(parent.AuthorNode.Details.StartOffset) : any >this.snapshot.GetLineNumberFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineNumberFromPosition : any >parent.AuthorNode.Details.StartOffset : any @@ -2563,7 +2563,7 @@ module Formatting { >indentOverride : string >this.GetLineIndentationForOffset(offset) : string >this.GetLineIndentationForOffset : (offset: number) => string ->this : this +>this : Indenter >GetLineIndentationForOffset : (offset: number) => string >offset : number @@ -2573,7 +2573,7 @@ module Formatting { >!this.smartIndent && tree.StartNodePreviousSibling !== null : boolean >!this.smartIndent : boolean >this.smartIndent : boolean ->this : this +>this : Indenter >smartIndent : boolean >tree.StartNodePreviousSibling !== null : boolean >tree.StartNodePreviousSibling : any @@ -2631,7 +2631,7 @@ module Formatting { >this.snapshot.GetLineNumberFromPosition(indentNode.AuthorNode.Details.StartOffset) : any >this.snapshot.GetLineNumberFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineNumberFromPosition : any >indentNode.AuthorNode.Details.StartOffset : any @@ -2648,7 +2648,7 @@ module Formatting { >this.snapshot.GetLineNumberFromPosition(indentNode.AuthorNode.Details.StartOffset) : any >this.snapshot.GetLineNumberFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineNumberFromPosition : any >indentNode.AuthorNode.Details.StartOffset : any @@ -2674,7 +2674,7 @@ module Formatting { >indentOverride : string >this.ApplyIndentationLevel(indentOverride, -lastDelta) : string >this.ApplyIndentationLevel : (existingIndentation: string, level: number) => string ->this : this +>this : Indenter >ApplyIndentationLevel : (existingIndentation: string, level: number) => string >indentOverride : string >-lastDelta : number @@ -2735,7 +2735,7 @@ module Formatting { >this.indentationBag.FindIndent(offset) : any >this.indentationBag.FindIndent : any >this.indentationBag : IndentationBag ->this : this +>this : Indenter >indentationBag : IndentationBag >FindIndent : any >offset : number @@ -2758,7 +2758,7 @@ module Formatting { >this.snapshot.GetLineFromPosition(offset) : any >this.snapshot.GetLineFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineFromPosition : any >offset : number @@ -2833,7 +2833,7 @@ module Formatting { >this.snapshot.GetLineFromPosition(indent.Position) : any >this.snapshot.GetLineFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineFromPosition : any >indent.Position : any @@ -2878,7 +2878,7 @@ module Formatting { >this.indentationBag.AddIndent(indentationInfo) : any >this.indentationBag.AddIndent : any >this.indentationBag : IndentationBag ->this : this +>this : Indenter >indentationBag : IndentationBag >AddIndent : any >indentationInfo : IndentationEditInfo @@ -2892,7 +2892,7 @@ module Formatting { this.RegisterIndentation(new TextEditInfo(position, 0, indent), false); >this.RegisterIndentation(new TextEditInfo(position, 0, indent), false) : void >this.RegisterIndentation : (indent: TextEditInfo, sameLineIndent: boolean) => void ->this : this +>this : Indenter >RegisterIndentation : (indent: TextEditInfo, sameLineIndent: boolean) => void >new TextEditInfo(position, 0, indent) : any >TextEditInfo : any @@ -3036,7 +3036,7 @@ module Formatting { >this.snapshot.GetLineNumberFromPosition(token.Span.endPosition()) : any >this.snapshot.GetLineNumberFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineNumberFromPosition : any >token.Span.endPosition() : any @@ -3048,7 +3048,7 @@ module Formatting { >this.snapshot.GetLineNumberFromPosition(token.Span.startPosition()) : any >this.snapshot.GetLineNumberFromPosition : any >this.snapshot : ITextSnapshot ->this : this +>this : Indenter >snapshot : ITextSnapshot >GetLineNumberFromPosition : any >token.Span.startPosition() : any diff --git a/tests/baselines/reference/potentiallyUncalledDecorators.types b/tests/baselines/reference/potentiallyUncalledDecorators.types index c740e297a64..b0e58dec1e6 100644 --- a/tests/baselines/reference/potentiallyUncalledDecorators.types +++ b/tests/baselines/reference/potentiallyUncalledDecorators.types @@ -44,7 +44,7 @@ class MultiplyByTwo { >this.args.number * 2 : number >this.args.number : any >this.args : any ->this : this +>this : MultiplyByTwo >args : any >number : any >2 : 2 diff --git a/tests/baselines/reference/primitiveConstraints2.errors.txt b/tests/baselines/reference/primitiveConstraints2.errors.txt index e571ee73417..c2ac655940b 100644 --- a/tests/baselines/reference/primitiveConstraints2.errors.txt +++ b/tests/baselines/reference/primitiveConstraints2.errors.txt @@ -1,4 +1,6 @@ -tests/cases/compiler/primitiveConstraints2.ts(8,11): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/compiler/primitiveConstraints2.ts(8,1): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. tests/cases/compiler/primitiveConstraints2.ts(9,8): error TS2344: Type 'string' does not satisfy the constraint 'number'. @@ -11,8 +13,10 @@ tests/cases/compiler/primitiveConstraints2.ts(9,8): error TS2344: Type 'string' var x = new C(); x.bar2(2, ""); // should error - ~~ -!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. x.bar2(2, ""); // should error ~~~~~~ !!! error TS2344: Type 'string' does not satisfy the constraint 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.types b/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.types index c80b12bbbd6..58ffa3ccaa3 100644 --- a/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.types +++ b/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.types @@ -7,10 +7,10 @@ export class A{ >self : A var child = new B(this); ->child : B ->new B(this) : B +>child : B> +>new B(this) : B> >B : typeof B ->this : this +>this : A } } diff --git a/tests/baselines/reference/privateAccessInSubclass1.types b/tests/baselines/reference/privateAccessInSubclass1.types index f3c40684dd1..9588dfb8582 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.types +++ b/tests/baselines/reference/privateAccessInSubclass1.types @@ -15,7 +15,7 @@ class D extends Base { this.options; >this.options : any ->this : this +>this : D >options : any } } diff --git a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.types b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.types index 56aedbe2535..42cb5abc5e0 100644 --- a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.types +++ b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.types @@ -10,7 +10,7 @@ class C { private get y() { return this.x; } >y : string >this.x : string ->this : this +>this : C >x : string private set y(x) { this.y = this.x; } @@ -18,16 +18,16 @@ class C { >x : string >this.y = this.x : string >this.y : string ->this : this +>this : C >y : string >this.x : string ->this : this +>this : C >x : string private foo() { return this.foo; } ->foo : () => any +>foo : () => () => any >this.foo : () => any ->this : this +>this : C >foo : () => any private static x: string; @@ -75,7 +75,7 @@ class C2 { >y : any >() => this.x : () => string >this.x : string ->this : this +>this : C2 >x : string >null : null @@ -85,17 +85,17 @@ class C2 { >() => { this.y = this.x; } : () => void >this.y = this.x : string >this.y : any ->this : this +>this : C2 >y : any >this.x : string ->this : this +>this : C2 >x : string private foo() { () => this.foo; } >foo : () => void >() => this.foo : () => () => void >this.foo : () => void ->this : this +>this : C2 >foo : () => void private static x: string; diff --git a/tests/baselines/reference/privateClassPropertyAccessibleWithinNestedClass.types b/tests/baselines/reference/privateClassPropertyAccessibleWithinNestedClass.types index c5338b68c41..e02570c662e 100644 --- a/tests/baselines/reference/privateClassPropertyAccessibleWithinNestedClass.types +++ b/tests/baselines/reference/privateClassPropertyAccessibleWithinNestedClass.types @@ -10,7 +10,7 @@ class C { private get y() { return this.x; } >y : string >this.x : string ->this : this +>this : C >x : string private set y(x) { this.y = this.x; } @@ -18,16 +18,16 @@ class C { >x : string >this.y = this.x : string >this.y : string ->this : this +>this : C >y : string >this.x : string ->this : this +>this : C >x : string private foo() { return this.foo; } ->foo : () => any +>foo : () => () => any >this.foo : () => any ->this : this +>this : C >foo : () => any private static x: string; diff --git a/tests/baselines/reference/privateIdentifierChain.1.types b/tests/baselines/reference/privateIdentifierChain.1.types index faf9a763c04..60649024807 100644 --- a/tests/baselines/reference/privateIdentifierChain.1.types +++ b/tests/baselines/reference/privateIdentifierChain.1.types @@ -18,20 +18,20 @@ class A { constructor() { this?.#b; // Error >this?.#b : A | undefined ->this : this +>this : A this?.a.#b; // Error >this?.a.#b : A | undefined >this?.a : A | undefined ->this : this +>this : A >a : A | undefined this?.getA().#b; // Error >this?.getA().#b : A | undefined ->this?.getA() : A | undefined ->this?.getA : (() => A) | undefined ->this : this ->getA : (() => A) | undefined +>this?.getA() : A +>this?.getA : () => A +>this : A +>getA : () => A } } diff --git a/tests/baselines/reference/privateInstanceVisibility.types b/tests/baselines/reference/privateInstanceVisibility.types index 2359b1ca2b8..091b61d9f15 100644 --- a/tests/baselines/reference/privateInstanceVisibility.types +++ b/tests/baselines/reference/privateInstanceVisibility.types @@ -14,8 +14,8 @@ module Test { >doSomething : () => void var that = this; ->that : this ->this : this +>that : Example +>this : Example function innerFunction() { >innerFunction : () => void @@ -23,7 +23,7 @@ module Test { var num = that.someNumber; >num : number >that.someNumber : number ->that : this +>that : Example >someNumber : number } @@ -45,7 +45,7 @@ class C { getX() { return this.x; } >getX : () => number >this.x : number ->this : this +>this : C >x : number clone(other: C) { @@ -55,7 +55,7 @@ class C { this.x = other.x; >this.x = other.x : number >this.x : number ->this : this +>this : C >x : number >other.x : number >other : C diff --git a/tests/baselines/reference/privateNameAccessors.types b/tests/baselines/reference/privateNameAccessors.types index 8449fba9f70..a2202fe21f2 100644 --- a/tests/baselines/reference/privateNameAccessors.types +++ b/tests/baselines/reference/privateNameAccessors.types @@ -20,13 +20,13 @@ class A1 { this.#prop = ""; >this.#prop = "" : "" >this.#prop : string ->this : this +>this : A1 >"" : "" this.#roProp = ""; // Error >this.#roProp = "" : "" >this.#roProp : any ->this : this +>this : A1 >"" : "" console.log(this.#prop); @@ -35,7 +35,7 @@ class A1 { >console : Console >log : (...data: any[]) => void >this.#prop : string ->this : this +>this : A1 console.log(this.#roProp); >console.log(this.#roProp) : void @@ -43,7 +43,7 @@ class A1 { >console : Console >log : (...data: any[]) => void >this.#roProp : string ->this : this +>this : A1 } } diff --git a/tests/baselines/reference/privateNameAccessorsAccess.types b/tests/baselines/reference/privateNameAccessorsAccess.types index 9381e31558f..7223a5700aa 100644 --- a/tests/baselines/reference/privateNameAccessorsAccess.types +++ b/tests/baselines/reference/privateNameAccessorsAccess.types @@ -17,11 +17,11 @@ class A2 { >console : Console >log : (...data: any[]) => void >this.#prop : string ->this : this +>this : A2 let a: A2 = this; >a : A2 ->this : this +>this : A2 a.#prop; >a.#prop : string diff --git a/tests/baselines/reference/privateNameAccessorsCallExpression.types b/tests/baselines/reference/privateNameAccessorsCallExpression.types index 3beb279a5cb..f41aa47c8c7 100644 --- a/tests/baselines/reference/privateNameAccessorsCallExpression.types +++ b/tests/baselines/reference/privateNameAccessorsCallExpression.types @@ -27,12 +27,12 @@ class A { this.#fieldFunc(); >this.#fieldFunc() : void >this.#fieldFunc : () => void ->this : this +>this : A const func = this.#fieldFunc; >func : () => void >this.#fieldFunc : () => void ->this : this +>this : A func(); >func() : void @@ -41,7 +41,7 @@ class A { new this.#fieldFunc(); >new this.#fieldFunc() : any >this.#fieldFunc : () => void ->this : this +>this : A const arr = [ 1, 2 ]; >arr : number[] @@ -52,7 +52,7 @@ class A { this.#fieldFunc2(0, ...arr, 3); >this.#fieldFunc2(0, ...arr, 3) : void >this.#fieldFunc2 : (a: any, ...b: any[]) => void ->this : this +>this : A >0 : 0 >...arr : number >arr : number[] @@ -62,7 +62,7 @@ class A { >b : any >new this.#fieldFunc2(0, ...arr, 3) : any >this.#fieldFunc2 : (a: any, ...b: any[]) => void ->this : this +>this : A >0 : 0 >...arr : number >arr : number[] @@ -72,7 +72,7 @@ class A { >str : void >this.#fieldFunc2`head${1}middle${2}tail` : void >this.#fieldFunc2 : (a: any, ...b: any[]) => void ->this : this +>this : A >`head${1}middle${2}tail` : string >1 : 1 >2 : 2 @@ -82,7 +82,7 @@ class A { >this.getInstance().#fieldFunc2 : (a: any, ...b: any[]) => void >this.getInstance() : A >this.getInstance : () => A ->this : this +>this : A >getInstance : () => A >`test${1}and${2}` : string >1 : 1 diff --git a/tests/baselines/reference/privateNameAndIndexSignature.types b/tests/baselines/reference/privateNameAndIndexSignature.types index 984139aea38..0b6e5fa86eb 100644 --- a/tests/baselines/reference/privateNameAndIndexSignature.types +++ b/tests/baselines/reference/privateNameAndIndexSignature.types @@ -22,13 +22,13 @@ class A { this.#f = 3 // Error (index signatures do not implicitly declare private names) >this.#f = 3 : 3 >this.#f : any ->this : this +>this : A >3 : 3 this["#foo"] = 3; // Okay (type has index signature and "#foo" does not collide with private identifier #foo) >this["#foo"] = 3 : 3 >this["#foo"] : any ->this : this +>this : A >"#foo" : "#foo" >3 : 3 diff --git a/tests/baselines/reference/privateNameBadAssignment.types b/tests/baselines/reference/privateNameBadAssignment.types index 3562dab3f47..e31e18f9665 100644 --- a/tests/baselines/reference/privateNameBadAssignment.types +++ b/tests/baselines/reference/privateNameBadAssignment.types @@ -42,7 +42,7 @@ class C { this.#foo = 3; // Error (undeclared) >this.#foo = 3 : 3 >this.#foo : any ->this : this +>this : C >3 : 3 } } diff --git a/tests/baselines/reference/privateNameBadDeclaration.types b/tests/baselines/reference/privateNameBadDeclaration.types index 8dc5b5f65cb..763791e59e6 100644 --- a/tests/baselines/reference/privateNameBadDeclaration.types +++ b/tests/baselines/reference/privateNameBadDeclaration.types @@ -48,7 +48,7 @@ class C { this.#z = 3; >this.#z = 3 : 3 >this.#z : any ->this : this +>this : C >3 : 3 } } diff --git a/tests/baselines/reference/privateNameComputedPropertyName1(target=es2015).types b/tests/baselines/reference/privateNameComputedPropertyName1(target=es2015).types index f8b24c7ecd8..81901eb1425 100644 --- a/tests/baselines/reference/privateNameComputedPropertyName1(target=es2015).types +++ b/tests/baselines/reference/privateNameComputedPropertyName1(target=es2015).types @@ -24,13 +24,13 @@ class A { this.#b = 'b'; >this.#b = 'b' : "b" >this.#b : string ->this : this +>this : A >'b' : "b" this.#d = 'd'; >this.#d = 'd' : "d" >this.#d : string ->this : this +>this : A >'d' : "d" } @@ -54,28 +54,28 @@ class A { const { [this.#a]: a, >this.#a : string ->this : this +>this : A >a : string [this.#b]: b, >this.#b : string ->this : this +>this : A >b : string [this.#c]: c, >this.#c : "c" ->this : this +>this : A >c : string [this.#d]: d, >this.#d : string ->this : this +>this : A >d : string [this.#e = 'e']: e, >this.#e = 'e' : "e" >this.#e : string ->this : this +>this : A >'e' : "e" >e : string @@ -98,35 +98,35 @@ class A { >data[this.#a] : string >data : Record >this.#a : string ->this : this +>this : A const b1 = data[this.#b]; >b1 : string >data[this.#b] : string >data : Record >this.#b : string ->this : this +>this : A const c1 = data[this.#c]; >c1 : string >data[this.#c] : string >data : Record >this.#c : "c" ->this : this +>this : A const d1 = data[this.#d]; >d1 : string >data[this.#d] : string >data : Record >this.#d : string ->this : this +>this : A const e1 = data[this.#e]; >e1 : string >data[this.#e] : string >data : Record >this.#e : string ->this : this +>this : A console.log(a1, b1, c1, d1); >console.log(a1, b1, c1, d1) : void diff --git a/tests/baselines/reference/privateNameComputedPropertyName1(target=esnext).types b/tests/baselines/reference/privateNameComputedPropertyName1(target=esnext).types index f8b24c7ecd8..81901eb1425 100644 --- a/tests/baselines/reference/privateNameComputedPropertyName1(target=esnext).types +++ b/tests/baselines/reference/privateNameComputedPropertyName1(target=esnext).types @@ -24,13 +24,13 @@ class A { this.#b = 'b'; >this.#b = 'b' : "b" >this.#b : string ->this : this +>this : A >'b' : "b" this.#d = 'd'; >this.#d = 'd' : "d" >this.#d : string ->this : this +>this : A >'d' : "d" } @@ -54,28 +54,28 @@ class A { const { [this.#a]: a, >this.#a : string ->this : this +>this : A >a : string [this.#b]: b, >this.#b : string ->this : this +>this : A >b : string [this.#c]: c, >this.#c : "c" ->this : this +>this : A >c : string [this.#d]: d, >this.#d : string ->this : this +>this : A >d : string [this.#e = 'e']: e, >this.#e = 'e' : "e" >this.#e : string ->this : this +>this : A >'e' : "e" >e : string @@ -98,35 +98,35 @@ class A { >data[this.#a] : string >data : Record >this.#a : string ->this : this +>this : A const b1 = data[this.#b]; >b1 : string >data[this.#b] : string >data : Record >this.#b : string ->this : this +>this : A const c1 = data[this.#c]; >c1 : string >data[this.#c] : string >data : Record >this.#c : "c" ->this : this +>this : A const d1 = data[this.#d]; >d1 : string >data[this.#d] : string >data : Record >this.#d : string ->this : this +>this : A const e1 = data[this.#e]; >e1 : string >data[this.#e] : string >data : Record >this.#e : string ->this : this +>this : A console.log(a1, b1, c1, d1); >console.log(a1, b1, c1, d1) : void diff --git a/tests/baselines/reference/privateNameComputedPropertyName3(target=es2015).types b/tests/baselines/reference/privateNameComputedPropertyName3(target=es2015).types index 6bffb1abbae..56a4620ef27 100644 --- a/tests/baselines/reference/privateNameComputedPropertyName3(target=es2015).types +++ b/tests/baselines/reference/privateNameComputedPropertyName3(target=es2015).types @@ -11,7 +11,7 @@ class Foo { this.#name = name; >this.#name = name : any >this.#name : any ->this : this +>this : Foo >name : any } @@ -20,8 +20,8 @@ class Foo { >x : any const obj = this; ->obj : this ->this : this +>obj : Foo +>this : Foo class Bar { >Bar : Bar @@ -33,13 +33,13 @@ class Foo { [obj.#name]() { >[obj.#name] : () => any >obj.#name : any ->obj : this +>obj : Foo return x + this.#y; >x + this.#y : any >x : any >this.#y : number ->this : this +>this : Bar } } @@ -49,7 +49,7 @@ class Foo { >new Bar() : Bar >Bar : typeof Bar >obj.#name : any ->obj : this +>obj : Foo } } diff --git a/tests/baselines/reference/privateNameComputedPropertyName3(target=esnext).types b/tests/baselines/reference/privateNameComputedPropertyName3(target=esnext).types index 6bffb1abbae..56a4620ef27 100644 --- a/tests/baselines/reference/privateNameComputedPropertyName3(target=esnext).types +++ b/tests/baselines/reference/privateNameComputedPropertyName3(target=esnext).types @@ -11,7 +11,7 @@ class Foo { this.#name = name; >this.#name = name : any >this.#name : any ->this : this +>this : Foo >name : any } @@ -20,8 +20,8 @@ class Foo { >x : any const obj = this; ->obj : this ->this : this +>obj : Foo +>this : Foo class Bar { >Bar : Bar @@ -33,13 +33,13 @@ class Foo { [obj.#name]() { >[obj.#name] : () => any >obj.#name : any ->obj : this +>obj : Foo return x + this.#y; >x + this.#y : any >x : any >this.#y : number ->this : this +>this : Bar } } @@ -49,7 +49,7 @@ class Foo { >new Bar() : Bar >Bar : typeof Bar >obj.#name : any ->obj : this +>obj : Foo } } diff --git a/tests/baselines/reference/privateNameEmitHelpers.types b/tests/baselines/reference/privateNameEmitHelpers.types index e45e6b60df3..69d736f1b21 100644 --- a/tests/baselines/reference/privateNameEmitHelpers.types +++ b/tests/baselines/reference/privateNameEmitHelpers.types @@ -10,7 +10,7 @@ export class C { >#b : () => void >this.#c = 42 : 42 >this.#c : number ->this : this +>this : C >42 : 42 set #c(v: number) { this.#a += v; } @@ -18,7 +18,7 @@ export class C { >v : number >this.#a += v : number >this.#a : number ->this : this +>this : C >v : number } diff --git a/tests/baselines/reference/privateNameField.types b/tests/baselines/reference/privateNameField.types index 2609548a6e0..d90189796ef 100644 --- a/tests/baselines/reference/privateNameField.types +++ b/tests/baselines/reference/privateNameField.types @@ -11,7 +11,7 @@ class A { this.#name = name; >this.#name = name : string >this.#name : string ->this : this +>this : A >name : string } } diff --git a/tests/baselines/reference/privateNameFieldAccess.types b/tests/baselines/reference/privateNameFieldAccess.types index 04d9abbea2e..0b5f512b4c4 100644 --- a/tests/baselines/reference/privateNameFieldAccess.types +++ b/tests/baselines/reference/privateNameFieldAccess.types @@ -13,7 +13,7 @@ class A { >console : Console >log : (...data: any[]) => void >this.#myField : string ->this : this +>this : A } } diff --git a/tests/baselines/reference/privateNameFieldAssignment.types b/tests/baselines/reference/privateNameFieldAssignment.types index 8a3c507c393..55076055c73 100644 --- a/tests/baselines/reference/privateNameFieldAssignment.types +++ b/tests/baselines/reference/privateNameFieldAssignment.types @@ -10,79 +10,79 @@ class A { this.#field = 1; >this.#field = 1 : 1 >this.#field : number ->this : this +>this : A >1 : 1 this.#field += 2; >this.#field += 2 : number >this.#field : number ->this : this +>this : A >2 : 2 this.#field -= 3; >this.#field -= 3 : number >this.#field : number ->this : this +>this : A >3 : 3 this.#field /= 4; >this.#field /= 4 : number >this.#field : number ->this : this +>this : A >4 : 4 this.#field *= 5; >this.#field *= 5 : number >this.#field : number ->this : this +>this : A >5 : 5 this.#field **= 6; >this.#field **= 6 : number >this.#field : number ->this : this +>this : A >6 : 6 this.#field %= 7; >this.#field %= 7 : number >this.#field : number ->this : this +>this : A >7 : 7 this.#field <<= 8; >this.#field <<= 8 : number >this.#field : number ->this : this +>this : A >8 : 8 this.#field >>= 9; >this.#field >>= 9 : number >this.#field : number ->this : this +>this : A >9 : 9 this.#field >>>= 10; >this.#field >>>= 10 : number >this.#field : number ->this : this +>this : A >10 : 10 this.#field &= 11; >this.#field &= 11 : number >this.#field : number ->this : this +>this : A >11 : 11 this.#field |= 12; >this.#field |= 12 : number >this.#field : number ->this : this +>this : A >12 : 12 this.#field ^= 13; >this.#field ^= 13 : number >this.#field : number ->this : this +>this : A >13 : 13 A.getInstance().#field = 1; diff --git a/tests/baselines/reference/privateNameFieldCallExpression.types b/tests/baselines/reference/privateNameFieldCallExpression.types index 21a72c92c81..adee0d1dfd5 100644 --- a/tests/baselines/reference/privateNameFieldCallExpression.types +++ b/tests/baselines/reference/privateNameFieldCallExpression.types @@ -27,17 +27,17 @@ class A { this.#fieldFunc(); >this.#fieldFunc() : void >this.#fieldFunc : () => void ->this : this +>this : A this.#fieldFunc?.(); >this.#fieldFunc?.() : void >this.#fieldFunc : () => void ->this : this +>this : A const func = this.#fieldFunc; >func : () => void >this.#fieldFunc : () => void ->this : this +>this : A func(); >func() : void @@ -46,7 +46,7 @@ class A { new this.#fieldFunc(); >new this.#fieldFunc() : any >this.#fieldFunc : () => void ->this : this +>this : A const arr = [ 1, 2 ]; >arr : number[] @@ -57,7 +57,7 @@ class A { this.#fieldFunc2(0, ...arr, 3); >this.#fieldFunc2(0, ...arr, 3) : void >this.#fieldFunc2 : (a: any, ...b: any[]) => void ->this : this +>this : A >0 : 0 >...arr : number >arr : number[] @@ -67,7 +67,7 @@ class A { >b : any >new this.#fieldFunc2(0, ...arr, 3) : any >this.#fieldFunc2 : (a: any, ...b: any[]) => void ->this : this +>this : A >0 : 0 >...arr : number >arr : number[] @@ -77,7 +77,7 @@ class A { >str : void >this.#fieldFunc2`head${1}middle${2}tail` : void >this.#fieldFunc2 : (a: any, ...b: any[]) => void ->this : this +>this : A >`head${1}middle${2}tail` : string >1 : 1 >2 : 2 @@ -87,7 +87,7 @@ class A { >this.getInstance().#fieldFunc2 : (a: any, ...b: any[]) => void >this.getInstance() : A >this.getInstance : () => A ->this : this +>this : A >getInstance : () => A >`test${1}and${2}` : string >1 : 1 diff --git a/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2015).types b/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2015).types index d361e73d382..74221ae2737 100644 --- a/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2015).types +++ b/tests/baselines/reference/privateNameFieldDestructuredBinding(target=es2015).types @@ -39,11 +39,11 @@ class A { >{ x: this.#field, y } : { x: number; y: number; } >x : number >this.#field : number ->this : this +>this : A >y : number >this.testObject() : { x: number; y: number; } >this.testObject : () => { x: number; y: number; } ->this : this +>this : A >testObject : () => { x: number; y: number; } ([this.#field, y] = this.testArray()); @@ -51,11 +51,11 @@ class A { >[this.#field, y] = this.testArray() : number[] >[this.#field, y] : [number, number] >this.#field : number ->this : this +>this : A >y : number >this.testArray() : number[] >this.testArray : () => number[] ->this : this +>this : A >testArray : () => number[] ({ a: this.#field, b: [this.#field] } = { a: 1, b: [2] }); @@ -64,11 +64,11 @@ class A { >{ a: this.#field, b: [this.#field] } : { a: number; b: [number]; } >a : number >this.#field : number ->this : this +>this : A >b : [number] >[this.#field] : [number] >this.#field : number ->this : this +>this : A >{ a: 1, b: [2] } : { a: number; b: [number]; } >a : number >1 : 1 @@ -80,10 +80,10 @@ class A { >[this.#field, [this.#field]] = [1, [2]] : [number, [number]] >[this.#field, [this.#field]] : [number, [number]] >this.#field : number ->this : this +>this : A >[this.#field] : [number] >this.#field : number ->this : this +>this : A >[1, [2]] : [number, [number]] >1 : 1 >[2] : [number] @@ -96,13 +96,13 @@ class A { >a : number >this.#field = 1 : 1 >this.#field : number ->this : this +>this : A >1 : 1 >b : [number] >[this.#field = 1] : [number] >this.#field = 1 : 1 >this.#field : number ->this : this +>this : A >1 : 1 >{ b: [] } : { b: []; a?: number; } >b : [] @@ -113,7 +113,7 @@ class A { >[this.#field = 2] : [number] >this.#field = 2 : 2 >this.#field : number ->this : this +>this : A >2 : 2 >[] : [] @@ -123,7 +123,7 @@ class A { >this.otherObject.#field = 2 : 2 >this.otherObject.#field : number >this.otherObject : A ->this : this +>this : A >otherObject : A >2 : 2 >[] : [] diff --git a/tests/baselines/reference/privateNameFieldDestructuredBinding(target=esnext).types b/tests/baselines/reference/privateNameFieldDestructuredBinding(target=esnext).types index d361e73d382..74221ae2737 100644 --- a/tests/baselines/reference/privateNameFieldDestructuredBinding(target=esnext).types +++ b/tests/baselines/reference/privateNameFieldDestructuredBinding(target=esnext).types @@ -39,11 +39,11 @@ class A { >{ x: this.#field, y } : { x: number; y: number; } >x : number >this.#field : number ->this : this +>this : A >y : number >this.testObject() : { x: number; y: number; } >this.testObject : () => { x: number; y: number; } ->this : this +>this : A >testObject : () => { x: number; y: number; } ([this.#field, y] = this.testArray()); @@ -51,11 +51,11 @@ class A { >[this.#field, y] = this.testArray() : number[] >[this.#field, y] : [number, number] >this.#field : number ->this : this +>this : A >y : number >this.testArray() : number[] >this.testArray : () => number[] ->this : this +>this : A >testArray : () => number[] ({ a: this.#field, b: [this.#field] } = { a: 1, b: [2] }); @@ -64,11 +64,11 @@ class A { >{ a: this.#field, b: [this.#field] } : { a: number; b: [number]; } >a : number >this.#field : number ->this : this +>this : A >b : [number] >[this.#field] : [number] >this.#field : number ->this : this +>this : A >{ a: 1, b: [2] } : { a: number; b: [number]; } >a : number >1 : 1 @@ -80,10 +80,10 @@ class A { >[this.#field, [this.#field]] = [1, [2]] : [number, [number]] >[this.#field, [this.#field]] : [number, [number]] >this.#field : number ->this : this +>this : A >[this.#field] : [number] >this.#field : number ->this : this +>this : A >[1, [2]] : [number, [number]] >1 : 1 >[2] : [number] @@ -96,13 +96,13 @@ class A { >a : number >this.#field = 1 : 1 >this.#field : number ->this : this +>this : A >1 : 1 >b : [number] >[this.#field = 1] : [number] >this.#field = 1 : 1 >this.#field : number ->this : this +>this : A >1 : 1 >{ b: [] } : { b: []; a?: number; } >b : [] @@ -113,7 +113,7 @@ class A { >[this.#field = 2] : [number] >this.#field = 2 : 2 >this.#field : number ->this : this +>this : A >2 : 2 >[] : [] @@ -123,7 +123,7 @@ class A { >this.otherObject.#field = 2 : 2 >this.otherObject.#field : number >this.otherObject : A ->this : this +>this : A >otherObject : A >2 : 2 >[] : [] diff --git a/tests/baselines/reference/privateNameFieldUnaryMutation.types b/tests/baselines/reference/privateNameFieldUnaryMutation.types index 4fc0d7805d9..80d57a65dd9 100644 --- a/tests/baselines/reference/privateNameFieldUnaryMutation.types +++ b/tests/baselines/reference/privateNameFieldUnaryMutation.types @@ -10,72 +10,72 @@ class C { this.#test++; >this.#test++ : number >this.#test : number ->this : this +>this : C this.#test--; >this.#test-- : number >this.#test : number ->this : this +>this : C ++this.#test; >++this.#test : number >this.#test : number ->this : this +>this : C --this.#test; >--this.#test : number >this.#test : number ->this : this +>this : C const a = this.#test++; >a : number >this.#test++ : number >this.#test : number ->this : this +>this : C const b = this.#test--; >b : number >this.#test-- : number >this.#test : number ->this : this +>this : C const c = ++this.#test; >c : number >++this.#test : number >this.#test : number ->this : this +>this : C const d = --this.#test; >d : number >--this.#test : number >this.#test : number ->this : this +>this : C for (this.#test = 0; this.#test < 10; ++this.#test) {} >this.#test = 0 : 0 >this.#test : number ->this : this +>this : C >0 : 0 >this.#test < 10 : boolean >this.#test : number ->this : this +>this : C >10 : 10 >++this.#test : number >this.#test : number ->this : this +>this : C for (this.#test = 0; this.#test < 10; this.#test++) {} >this.#test = 0 : 0 >this.#test : number ->this : this +>this : C >0 : 0 >this.#test < 10 : boolean >this.#test : number ->this : this +>this : C >10 : 10 >this.#test++ : number >this.#test : number ->this : this +>this : C } test() { >test : () => void @@ -85,7 +85,7 @@ class C { >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C this.getInstance().#test--; @@ -93,7 +93,7 @@ class C { >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C ++this.getInstance().#test; @@ -101,7 +101,7 @@ class C { >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C --this.getInstance().#test; @@ -109,7 +109,7 @@ class C { >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C const a = this.getInstance().#test++; @@ -118,7 +118,7 @@ class C { >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C const b = this.getInstance().#test--; @@ -127,7 +127,7 @@ class C { >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C const c = ++this.getInstance().#test; @@ -136,7 +136,7 @@ class C { >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C const d = --this.getInstance().#test; @@ -145,7 +145,7 @@ class C { >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C for (this.getInstance().#test = 0; this.getInstance().#test < 10; ++this.getInstance().#test) {} @@ -153,21 +153,21 @@ class C { >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C >0 : 0 >this.getInstance().#test < 10 : boolean >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C >10 : 10 >++this.getInstance().#test : number >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C for (this.getInstance().#test = 0; this.getInstance().#test < 10; this.getInstance().#test++) {} @@ -175,21 +175,21 @@ class C { >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C >0 : 0 >this.getInstance().#test < 10 : boolean >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C >10 : 10 >this.getInstance().#test++ : number >this.getInstance().#test : number >this.getInstance() : C >this.getInstance : () => C ->this : this +>this : C >getInstance : () => C } getInstance() { return new C(); } diff --git a/tests/baselines/reference/privateNameFieldsESNext.types b/tests/baselines/reference/privateNameFieldsESNext.types index 8496622cbe3..20064d6cd95 100644 --- a/tests/baselines/reference/privateNameFieldsESNext.types +++ b/tests/baselines/reference/privateNameFieldsESNext.types @@ -26,12 +26,12 @@ class C { >console : Console >log : (...data: any[]) => void >this.#a : number ->this : this +>this : C this.#a = "hello"; >this.#a = "hello" : "hello" >this.#a : number ->this : this +>this : C >"hello" : "hello" console.log(this.#b); @@ -40,7 +40,7 @@ class C { >console : Console >log : (...data: any[]) => void >this.#b : any ->this : this +>this : C } static #m = "test"; >#m : string diff --git a/tests/baselines/reference/privateNameHashCharName.types b/tests/baselines/reference/privateNameHashCharName.types index 520e51ee434..5163875b08b 100644 --- a/tests/baselines/reference/privateNameHashCharName.types +++ b/tests/baselines/reference/privateNameHashCharName.types @@ -12,7 +12,7 @@ class C { this.# >this.# : any ->this : this +>this : C } } diff --git a/tests/baselines/reference/privateNameImplicitDeclaration.types b/tests/baselines/reference/privateNameImplicitDeclaration.types index 13f80356b4f..1a220324279 100644 --- a/tests/baselines/reference/privateNameImplicitDeclaration.types +++ b/tests/baselines/reference/privateNameImplicitDeclaration.types @@ -6,7 +6,7 @@ class C { /** @type {string} */ this.#x; >this.#x : any ->this : this +>this : C } } diff --git a/tests/baselines/reference/privateNameJsBadAssignment.types b/tests/baselines/reference/privateNameJsBadAssignment.types index d1a10791600..561f85a1af0 100644 --- a/tests/baselines/reference/privateNameJsBadAssignment.types +++ b/tests/baselines/reference/privateNameJsBadAssignment.types @@ -36,7 +36,7 @@ class C { this.#foo = 3; // Error (undeclared) >this.#foo = 3 : 3 >this.#foo : any ->this : this +>this : C >3 : 3 } } diff --git a/tests/baselines/reference/privateNameJsBadDeclaration.types b/tests/baselines/reference/privateNameJsBadDeclaration.types index 9799d7e6ad3..237f6ee5932 100644 --- a/tests/baselines/reference/privateNameJsBadDeclaration.types +++ b/tests/baselines/reference/privateNameJsBadDeclaration.types @@ -48,7 +48,7 @@ class C { this.#z = 3; >this.#z = 3 : 3 >this.#z : any ->this : this +>this : C >3 : 3 } } diff --git a/tests/baselines/reference/privateNameJsx.types b/tests/baselines/reference/privateNameJsx.types index a0d95597199..3a9f11da6cd 100644 --- a/tests/baselines/reference/privateNameJsx.types +++ b/tests/baselines/reference/privateNameJsx.types @@ -14,7 +14,7 @@ class Test { return ; > : any >this.#prop : any ->this : this +>this : Test > : any } } diff --git a/tests/baselines/reference/privateNameMethod.types b/tests/baselines/reference/privateNameMethod.types index f28e5412679..b88f9b84241 100644 --- a/tests/baselines/reference/privateNameMethod.types +++ b/tests/baselines/reference/privateNameMethod.types @@ -15,19 +15,19 @@ class A1 { this.#method("") >this.#method("") : string >this.#method : (param: string) => string ->this : this +>this : A1 >"" : "" this.#method(1) // Error >this.#method(1) : string >this.#method : (param: string) => string ->this : this +>this : A1 >1 : 1 this.#method() // Error >this.#method() : string >this.#method : (param: string) => string ->this : this +>this : A1 } } diff --git a/tests/baselines/reference/privateNameMethodAccess.types b/tests/baselines/reference/privateNameMethodAccess.types index 9b126fe672c..d367aae7ac5 100644 --- a/tests/baselines/reference/privateNameMethodAccess.types +++ b/tests/baselines/reference/privateNameMethodAccess.types @@ -13,11 +13,11 @@ class A2 { >console : Console >log : (...data: any[]) => void >this.#method : () => string ->this : this +>this : A2 let a: A2 = this; >a : A2 ->this : this +>this : A2 a.#method(); >a.#method() : string diff --git a/tests/baselines/reference/privateNameMethodAssignment.types b/tests/baselines/reference/privateNameMethodAssignment.types index 963ba0c7186..6c3de0103d5 100644 --- a/tests/baselines/reference/privateNameMethodAssignment.types +++ b/tests/baselines/reference/privateNameMethodAssignment.types @@ -12,7 +12,7 @@ class A3 { this.#method = () => {} // Error, not writable >this.#method = () => {} : () => void >this.#method : () => void ->this : this +>this : A3 >() => {} : () => void a.#method = () => { }; // Error, not writable @@ -33,7 +33,7 @@ class A3 { >{ x: this.#method } : { x: () => void; } >x : () => void >this.#method : () => void ->this : this +>this : A3 >{ x: () => {}} : { x: () => void; } >x : () => void >() => {} : () => void @@ -41,7 +41,7 @@ class A3 { let x = this.#method; >x : () => void >this.#method : () => void ->this : this +>this : A3 b.#method++ //Error, not writable >b.#method++ : number diff --git a/tests/baselines/reference/privateNameMethodAsync.types b/tests/baselines/reference/privateNameMethodAsync.types index 3ac547af040..7e236fc320e 100644 --- a/tests/baselines/reference/privateNameMethodAsync.types +++ b/tests/baselines/reference/privateNameMethodAsync.types @@ -20,7 +20,7 @@ const C = class { >await this.#bar() : number >this.#bar() : Promise >this.#bar : () => Promise ->this : this +>this : C return b + (this.#baz().next().value || 0) + ((await this.#qux().next()).value || 0); >b + (this.#baz().next().value || 0) + ((await this.#qux().next()).value || 0) : number @@ -33,7 +33,7 @@ const C = class { >this.#baz().next : (...args: [] | [unknown]) => IteratorResult >this.#baz() : Generator >this.#baz : () => Generator ->this : this +>this : C >next : (...args: [] | [unknown]) => IteratorResult >value : number | void >0 : 0 @@ -46,7 +46,7 @@ const C = class { >this.#qux().next : (...args: [] | [unknown]) => Promise> >this.#qux() : AsyncGenerator >this.#qux : () => AsyncGenerator ->this : this +>this : C >next : (...args: [] | [unknown]) => Promise> >value : number | void >0 : 0 diff --git a/tests/baselines/reference/privateNameMethodCallExpression.errors.txt b/tests/baselines/reference/privateNameMethodCallExpression.errors.txt new file mode 100644 index 00000000000..eb62c90d5d5 --- /dev/null +++ b/tests/baselines/reference/privateNameMethodCallExpression.errors.txt @@ -0,0 +1,30 @@ +tests/cases/conformance/classes/members/privateNames/privateNameMethodCallExpression.ts(8,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AA'. + + +==== tests/cases/conformance/classes/members/privateNames/privateNameMethodCallExpression.ts (1 errors) ==== + class AA { + #method() { this.x = 10; }; + #method2(a, ...b) {}; + x = 1; + test() { + this.#method(); + const func = this.#method; + func(); + ~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'AA'. + new this.#method(); + + const arr = [ 1, 2 ]; + this.#method2(0, ...arr, 3); + + const b = new this.#method2(0, ...arr, 3); //Error + const str = this.#method2`head${1}middle${2}tail`; + this.getInstance().#method2`test${1}and${2}`; + + this.getInstance().#method2(0, ...arr, 3); + const b2 = new (this.getInstance().#method2)(0, ...arr, 3); //Error + const str2 = this.getInstance().#method2`head${1}middle${2}tail`; + } + getInstance() { return new AA(); } + } + \ No newline at end of file diff --git a/tests/baselines/reference/privateNameMethodCallExpression.types b/tests/baselines/reference/privateNameMethodCallExpression.types index 6937a06a63e..f6730c2c105 100644 --- a/tests/baselines/reference/privateNameMethodCallExpression.types +++ b/tests/baselines/reference/privateNameMethodCallExpression.types @@ -6,7 +6,7 @@ class AA { >#method : () => void >this.x = 10 : 10 >this.x : number ->this : this +>this : AA >x : number >10 : 10 @@ -25,12 +25,12 @@ class AA { this.#method(); >this.#method() : void >this.#method : () => void ->this : this +>this : AA const func = this.#method; >func : () => void >this.#method : () => void ->this : this +>this : AA func(); >func() : void @@ -39,7 +39,7 @@ class AA { new this.#method(); >new this.#method() : any >this.#method : () => void ->this : this +>this : AA const arr = [ 1, 2 ]; >arr : number[] @@ -50,7 +50,7 @@ class AA { this.#method2(0, ...arr, 3); >this.#method2(0, ...arr, 3) : void >this.#method2 : (a: any, ...b: any[]) => void ->this : this +>this : AA >0 : 0 >...arr : number >arr : number[] @@ -60,7 +60,7 @@ class AA { >b : any >new this.#method2(0, ...arr, 3) : any >this.#method2 : (a: any, ...b: any[]) => void ->this : this +>this : AA >0 : 0 >...arr : number >arr : number[] @@ -70,7 +70,7 @@ class AA { >str : void >this.#method2`head${1}middle${2}tail` : void >this.#method2 : (a: any, ...b: any[]) => void ->this : this +>this : AA >`head${1}middle${2}tail` : string >1 : 1 >2 : 2 @@ -80,7 +80,7 @@ class AA { >this.getInstance().#method2 : (a: any, ...b: any[]) => void >this.getInstance() : AA >this.getInstance : () => AA ->this : this +>this : AA >getInstance : () => AA >`test${1}and${2}` : string >1 : 1 @@ -91,7 +91,7 @@ class AA { >this.getInstance().#method2 : (a: any, ...b: any[]) => void >this.getInstance() : AA >this.getInstance : () => AA ->this : this +>this : AA >getInstance : () => AA >0 : 0 >...arr : number @@ -105,7 +105,7 @@ class AA { >this.getInstance().#method2 : (a: any, ...b: any[]) => void >this.getInstance() : AA >this.getInstance : () => AA ->this : this +>this : AA >getInstance : () => AA >0 : 0 >...arr : number @@ -118,7 +118,7 @@ class AA { >this.getInstance().#method2 : (a: any, ...b: any[]) => void >this.getInstance() : AA >this.getInstance : () => AA ->this : this +>this : AA >getInstance : () => AA >`head${1}middle${2}tail` : string >1 : 1 diff --git a/tests/baselines/reference/privateNameMethodClassExpression.types b/tests/baselines/reference/privateNameMethodClassExpression.types index 4800eefe522..1f0739ceb19 100644 --- a/tests/baselines/reference/privateNameMethodClassExpression.types +++ b/tests/baselines/reference/privateNameMethodClassExpression.types @@ -21,7 +21,7 @@ const C = class { getField() { return this.#field }; >getField : () => number >this.#field : number ->this : this +>this : C } console.log(C.getInstance().getField()); diff --git a/tests/baselines/reference/privateNameReadonly.types b/tests/baselines/reference/privateNameReadonly.types index e4e460df3a5..9938808336b 100644 --- a/tests/baselines/reference/privateNameReadonly.types +++ b/tests/baselines/reference/privateNameReadonly.types @@ -12,7 +12,7 @@ const C = class { this.#bar = console.log("should log this then throw"); >this.#bar = console.log("should log this then throw") : void >this.#bar : () => void ->this : this +>this : C >console.log("should log this then throw") : void >console.log : (...data: any[]) => void >console : Console diff --git a/tests/baselines/reference/privateNameSetterExprReturnValue.types b/tests/baselines/reference/privateNameSetterExprReturnValue.types index 2713756c0ab..a7711f740c7 100644 --- a/tests/baselines/reference/privateNameSetterExprReturnValue.types +++ b/tests/baselines/reference/privateNameSetterExprReturnValue.types @@ -14,7 +14,7 @@ class C { >(this.#foo = 42 * 2) : number >this.#foo = 42 * 2 : number >this.#foo : number ->this : this +>this : C >42 * 2 : number >42 : 42 >2 : 2 diff --git a/tests/baselines/reference/privateNameSetterNoGetter.types b/tests/baselines/reference/privateNameSetterNoGetter.types index 542069f49ad..1f25625f525 100644 --- a/tests/baselines/reference/privateNameSetterNoGetter.types +++ b/tests/baselines/reference/privateNameSetterNoGetter.types @@ -13,7 +13,7 @@ const C = class { this.#x += 2; // Error >this.#x += 2 : any >this.#x : any ->this : this +>this : C >2 : 2 } } diff --git a/tests/baselines/reference/privateNameStaticFieldAccess.types b/tests/baselines/reference/privateNameStaticFieldAccess.types index 4d549b845bc..037e6296fb5 100644 --- a/tests/baselines/reference/privateNameStaticFieldAccess.types +++ b/tests/baselines/reference/privateNameStaticFieldAccess.types @@ -21,7 +21,7 @@ class A { >console : Console >log : (...data: any[]) => void >this.#myField : any ->this : this +>this : A } } diff --git a/tests/baselines/reference/privateNameStaticFieldCallExpression.types b/tests/baselines/reference/privateNameStaticFieldCallExpression.types index 45b26b4edd6..bd44e24e5db 100644 --- a/tests/baselines/reference/privateNameStaticFieldCallExpression.types +++ b/tests/baselines/reference/privateNameStaticFieldCallExpression.types @@ -87,7 +87,7 @@ class A { >this.getClass().#fieldFunc2 : (a: any, ...b: any[]) => void >this.getClass() : typeof A >this.getClass : () => typeof A ->this : this +>this : A >getClass : () => typeof A >`test${1}and${2}` : string >1 : 1 diff --git a/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2015).types b/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2015).types index ef8a216bdb2..292f76c1227 100644 --- a/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2015).types +++ b/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=es2015).types @@ -42,7 +42,7 @@ class A { >y : number >this.testObject() : { x: number; y: number; } >this.testObject : () => { x: number; y: number; } ->this : this +>this : A >testObject : () => { x: number; y: number; } ([A.#field, y] = this.testArray()); @@ -54,7 +54,7 @@ class A { >y : number >this.testArray() : number[] >this.testArray : () => number[] ->this : this +>this : A >testArray : () => number[] ({ a: A.#field, b: [A.#field] } = { a: 1, b: [2] }); @@ -122,7 +122,7 @@ class A { >this.otherClass.#field = 2 : 2 >this.otherClass.#field : number >this.otherClass : typeof A ->this : this +>this : A >otherClass : typeof A >2 : 2 >[] : [] diff --git a/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=esnext).types b/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=esnext).types index ef8a216bdb2..292f76c1227 100644 --- a/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=esnext).types +++ b/tests/baselines/reference/privateNameStaticFieldDestructuredBinding(target=esnext).types @@ -42,7 +42,7 @@ class A { >y : number >this.testObject() : { x: number; y: number; } >this.testObject : () => { x: number; y: number; } ->this : this +>this : A >testObject : () => { x: number; y: number; } ([A.#field, y] = this.testArray()); @@ -54,7 +54,7 @@ class A { >y : number >this.testArray() : number[] >this.testArray : () => number[] ->this : this +>this : A >testArray : () => number[] ({ a: A.#field, b: [A.#field] } = { a: 1, b: [2] }); @@ -122,7 +122,7 @@ class A { >this.otherClass.#field = 2 : 2 >this.otherClass.#field : number >this.otherClass : typeof A ->this : this +>this : A >otherClass : typeof A >2 : 2 >[] : [] diff --git a/tests/baselines/reference/privateNameStaticFieldUnaryMutation.types b/tests/baselines/reference/privateNameStaticFieldUnaryMutation.types index 893f9dd472b..9785e5beb73 100644 --- a/tests/baselines/reference/privateNameStaticFieldUnaryMutation.types +++ b/tests/baselines/reference/privateNameStaticFieldUnaryMutation.types @@ -85,7 +85,7 @@ class C { >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C this.getClass().#test--; @@ -93,7 +93,7 @@ class C { >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C ++this.getClass().#test; @@ -101,7 +101,7 @@ class C { >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C --this.getClass().#test; @@ -109,7 +109,7 @@ class C { >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C const a = this.getClass().#test++; @@ -118,7 +118,7 @@ class C { >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C const b = this.getClass().#test--; @@ -127,7 +127,7 @@ class C { >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C const c = ++this.getClass().#test; @@ -136,7 +136,7 @@ class C { >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C const d = --this.getClass().#test; @@ -145,7 +145,7 @@ class C { >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C for (this.getClass().#test = 0; this.getClass().#test < 10; ++this.getClass().#test) {} @@ -153,21 +153,21 @@ class C { >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C >0 : 0 >this.getClass().#test < 10 : boolean >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C >10 : 10 >++this.getClass().#test : number >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C for (this.getClass().#test = 0; this.getClass().#test < 10; this.getClass().#test++) {} @@ -175,21 +175,21 @@ class C { >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C >0 : 0 >this.getClass().#test < 10 : boolean >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C >10 : 10 >this.getClass().#test++ : number >this.getClass().#test : number >this.getClass() : typeof C >this.getClass : () => typeof C ->this : this +>this : C >getClass : () => typeof C } getClass() { return C; } diff --git a/tests/baselines/reference/privateNameStaticMethodCallExpression.errors.txt b/tests/baselines/reference/privateNameStaticMethodCallExpression.errors.txt new file mode 100644 index 00000000000..f437785c28b --- /dev/null +++ b/tests/baselines/reference/privateNameStaticMethodCallExpression.errors.txt @@ -0,0 +1,30 @@ +tests/cases/conformance/classes/members/privateNames/privateNameStaticMethodCallExpression.ts(8,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'typeof AA'. + + +==== tests/cases/conformance/classes/members/privateNames/privateNameStaticMethodCallExpression.ts (1 errors) ==== + class AA { + static #method() { this.x = 10; }; + static #method2(a, ...b) {}; + static x = 1; + test() { + AA.#method(); + const func = AA.#method; + func(); + ~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'typeof AA'. + new AA.#method(); + + const arr = [ 1, 2 ]; + AA.#method2(0, ...arr, 3); + + const b = new AA.#method2(0, ...arr, 3); //Error + const str = AA.#method2`head${1}middle${2}tail`; + AA.getClass().#method2`test${1}and${2}`; + + AA.getClass().#method2(0, ...arr, 3); + const b2 = new (AA.getClass().#method2)(0, ...arr, 3); //Error + const str2 = AA.getClass().#method2`head${1}middle${2}tail`; + } + static getClass() { return AA; } + } + \ No newline at end of file diff --git a/tests/baselines/reference/privateNameStaticsAndStaticMethods.errors.txt b/tests/baselines/reference/privateNameStaticsAndStaticMethods.errors.txt new file mode 100644 index 00000000000..ceacdf3a969 --- /dev/null +++ b/tests/baselines/reference/privateNameStaticsAndStaticMethods.errors.txt @@ -0,0 +1,36 @@ +tests/cases/conformance/classes/members/privateNames/privateNameStaticsAndStaticMethods.ts(26,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/conformance/classes/members/privateNames/privateNameStaticsAndStaticMethods.ts (1 errors) ==== + class A { + static #foo(a: number) {} + static async #bar(a: number) {} + static async *#baz(a: number) { + return 3; + } + static #_quux: number; + static get #quux (): number { + return this.#_quux; + } + static set #quux (val: number) { + this.#_quux = val; + } + constructor () { + A.#foo(30); + A.#bar(30); + A.#bar(30); + A.#quux = A.#quux + 1; + A.#quux++; + } + } + + class B extends A { + static #foo(a: string) {} + constructor () { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + B.#foo("str"); + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/privateNameUncheckedJsOptionalChain.types b/tests/baselines/reference/privateNameUncheckedJsOptionalChain.types index bc6acf5a458..28297418c0a 100644 --- a/tests/baselines/reference/privateNameUncheckedJsOptionalChain.types +++ b/tests/baselines/reference/privateNameUncheckedJsOptionalChain.types @@ -8,11 +8,11 @@ class C { constructor () { this?.#foo; >this?.#foo : any ->this : this +>this : C this?.#bar; >this?.#bar : any ->this : this +>this : C } } diff --git a/tests/baselines/reference/privateNameUnused.types b/tests/baselines/reference/privateNameUnused.types index 66ab9cf92e9..9e7ca0d3384 100644 --- a/tests/baselines/reference/privateNameUnused.types +++ b/tests/baselines/reference/privateNameUnused.types @@ -17,7 +17,7 @@ export class A { >console : Console >log : (...data: any[]) => void >this.#used : string ->this : this +>this : A } } @@ -38,7 +38,7 @@ export class A2 { >log : (...data: any[]) => void >this.#used() : void >this.#used : () => void ->this : this +>this : A2 } } @@ -68,6 +68,6 @@ export class A3 { >console : Console >log : (...data: any[]) => void >this.#used : number ->this : this +>this : A3 } } diff --git a/tests/baselines/reference/privateNamesAndFields.errors.txt b/tests/baselines/reference/privateNamesAndFields.errors.txt new file mode 100644 index 00000000000..acb8fde2cf7 --- /dev/null +++ b/tests/baselines/reference/privateNamesAndFields.errors.txt @@ -0,0 +1,21 @@ +tests/cases/conformance/classes/members/privateNames/privateNamesAndFields.ts(11,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/conformance/classes/members/privateNames/privateNamesAndFields.ts (1 errors) ==== + class A { + #foo: number; + constructor () { + this.#foo = 3; + } + } + + class B extends A { + #foo: string; + constructor () { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + this.#foo = "some string"; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/privateNamesAndFields.types b/tests/baselines/reference/privateNamesAndFields.types index d794cefa063..d00221a062a 100644 --- a/tests/baselines/reference/privateNamesAndFields.types +++ b/tests/baselines/reference/privateNamesAndFields.types @@ -9,7 +9,7 @@ class A { this.#foo = 3; >this.#foo = 3 : 3 >this.#foo : number ->this : this +>this : A >3 : 3 } } @@ -29,7 +29,7 @@ class B extends A { this.#foo = "some string"; >this.#foo = "some string" : "some string" >this.#foo : string ->this : this +>this : B >"some string" : "some string" } } diff --git a/tests/baselines/reference/privateNamesAndGenericClasses-2.types b/tests/baselines/reference/privateNamesAndGenericClasses-2.types index 42f5b237d06..30914ea6e2c 100644 --- a/tests/baselines/reference/privateNamesAndGenericClasses-2.types +++ b/tests/baselines/reference/privateNamesAndGenericClasses-2.types @@ -10,7 +10,7 @@ class C { return this.#foo; >this.#foo : T ->this : this +>this : C } constructor(t: T) { >t : T @@ -18,7 +18,7 @@ class C { this.#foo = t; >this.#foo = t : T >this.#foo : T ->this : this +>this : C >t : T t = this.#bar(); @@ -26,7 +26,7 @@ class C { >t : T >this.#bar() : T >this.#bar : () => T ->this : this +>this : C } set baz(t: T) { >baz : T @@ -35,7 +35,7 @@ class C { this.#foo = t; >this.#foo = t : T >this.#foo : T ->this : this +>this : C >t : T } @@ -44,7 +44,7 @@ class C { return this.#foo; >this.#foo : T ->this : this +>this : C } } diff --git a/tests/baselines/reference/privateNamesAndMethods.errors.txt b/tests/baselines/reference/privateNamesAndMethods.errors.txt new file mode 100644 index 00000000000..a1b17763108 --- /dev/null +++ b/tests/baselines/reference/privateNamesAndMethods.errors.txt @@ -0,0 +1,36 @@ +tests/cases/conformance/classes/members/privateNames/privateNamesAndMethods.ts(26,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/conformance/classes/members/privateNames/privateNamesAndMethods.ts (1 errors) ==== + class A { + #foo(a: number) {} + async #bar(a: number) {} + async *#baz(a: number) { + return 3; + } + #_quux: number; + get #quux (): number { + return this.#_quux; + } + set #quux (val: number) { + this.#_quux = val; + } + constructor () { + this.#foo(30); + this.#bar(30); + this.#baz(30); + this.#quux = this.#quux + 1; + this.#quux++; + } + } + + class B extends A { + #foo(a: string) {} + constructor () { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + this.#foo("str"); + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/privateNamesAndMethods.types b/tests/baselines/reference/privateNamesAndMethods.types index 2d9a1d93634..c852592f5f5 100644 --- a/tests/baselines/reference/privateNamesAndMethods.types +++ b/tests/baselines/reference/privateNamesAndMethods.types @@ -25,7 +25,7 @@ class A { return this.#_quux; >this.#_quux : number ->this : this +>this : A } set #quux (val: number) { >#quux : number @@ -34,41 +34,41 @@ class A { this.#_quux = val; >this.#_quux = val : number >this.#_quux : number ->this : this +>this : A >val : number } constructor () { this.#foo(30); >this.#foo(30) : void >this.#foo : (a: number) => void ->this : this +>this : A >30 : 30 this.#bar(30); >this.#bar(30) : Promise >this.#bar : (a: number) => Promise ->this : this +>this : A >30 : 30 this.#baz(30); >this.#baz(30) : AsyncGenerator >this.#baz : (a: number) => AsyncGenerator ->this : this +>this : A >30 : 30 this.#quux = this.#quux + 1; >this.#quux = this.#quux + 1 : number >this.#quux : number ->this : this +>this : A >this.#quux + 1 : number >this.#quux : number ->this : this +>this : A >1 : 1 this.#quux++; >this.#quux++ : number >this.#quux : number ->this : this +>this : A } } @@ -88,7 +88,7 @@ class B extends A { this.#foo("str"); >this.#foo("str") : void >this.#foo : (a: string) => void ->this : this +>this : B >"str" : "str" } } diff --git a/tests/baselines/reference/privateNamesAndStaticFields.errors.txt b/tests/baselines/reference/privateNamesAndStaticFields.errors.txt index 5efd57230d0..d242e267f8b 100644 --- a/tests/baselines/reference/privateNamesAndStaticFields.errors.txt +++ b/tests/baselines/reference/privateNamesAndStaticFields.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts(6,11): error TS18013: Property '#foo' is not accessible outside class 'B' because it has a private identifier. tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts(7,11): error TS2339: Property '#bar' does not exist on type 'typeof B'. +tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts(14,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. -==== tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts (2 errors) ==== +==== tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts (3 errors) ==== class A { static #foo: number; static #bar: number; @@ -21,6 +22,8 @@ tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields static #foo: string; constructor () { super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. B.#foo = "some string"; } } diff --git a/tests/baselines/reference/privateNamesAndStaticMethods.errors.txt b/tests/baselines/reference/privateNamesAndStaticMethods.errors.txt new file mode 100644 index 00000000000..a3e6748da1b --- /dev/null +++ b/tests/baselines/reference/privateNamesAndStaticMethods.errors.txt @@ -0,0 +1,36 @@ +tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethods.ts(26,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethods.ts (1 errors) ==== + class A { + static #foo(a: number) {} + static async #bar(a: number) {} + static async *#baz(a: number) { + return 3; + } + static #_quux: number; + static get #quux (): number { + return this.#_quux; + } + static set #quux (val: number) { + this.#_quux = val; + } + constructor () { + A.#foo(30); + A.#bar(30); + A.#bar(30); + A.#quux = A.#quux + 1; + A.#quux++; + } + } + + class B extends A { + static #foo(a: string) {} + constructor () { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + B.#foo("str"); + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/privateNamesAssertion.types b/tests/baselines/reference/privateNamesAssertion.types index 44a052728e9..a8f47499156 100644 --- a/tests/baselines/reference/privateNamesAssertion.types +++ b/tests/baselines/reference/privateNamesAssertion.types @@ -26,7 +26,7 @@ class Foo { this.#p1(v); >this.#p1(v) : void >this.#p1 : (v: any) => asserts v is string ->this : this +>this : Foo >v : unknown v; @@ -59,7 +59,7 @@ class Foo2 { this.#p1(v); >this.#p1(v) : void >this.#p1 : (v: any) => asserts v is string ->this : this +>this : Foo2 >v : unknown v; diff --git a/tests/baselines/reference/privateNamesInGenericClasses.types b/tests/baselines/reference/privateNamesInGenericClasses.types index c8f2b95121f..018406d1249 100644 --- a/tests/baselines/reference/privateNamesInGenericClasses.types +++ b/tests/baselines/reference/privateNamesInGenericClasses.types @@ -8,19 +8,19 @@ class C { #method(): T { return this.#foo; } >#method : () => T >this.#foo : T ->this : this +>this : C get #prop(): T { return this.#foo; } >#prop : T >this.#foo : T ->this : this +>this : C set #prop(value : T) { this.#foo = value; } >#prop : T >value : T >this.#foo = value : T >this.#foo : T ->this : this +>this : C >value : T bar(x: C) { return x.#foo; } // OK diff --git a/tests/baselines/reference/privateNamesNoDelete.types b/tests/baselines/reference/privateNamesNoDelete.types index d23b8712dbd..a58c365acca 100644 --- a/tests/baselines/reference/privateNamesNoDelete.types +++ b/tests/baselines/reference/privateNamesNoDelete.types @@ -10,7 +10,7 @@ class A { delete this.#v; // Error: The operand of a delete operator cannot be a private name. >delete this.#v : boolean >this.#v : number ->this : this +>this : A } } diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.types b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.types index 6f6803e21c1..5dc132bf38c 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.types +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.types @@ -19,7 +19,7 @@ class K { >a : any >prot : any >b : any ->this : this +>this : K let { priv, prot } = new K(); // ok >priv : any @@ -38,12 +38,12 @@ class C extends K { let { priv: a } = this; // error >priv : any >a : any ->this : this +>this : C let { prot: b } = this; // ok >prot : any >b : any ->this : this +>this : C } } let k = new K(); diff --git a/tests/baselines/reference/privateVisibility.types b/tests/baselines/reference/privateVisibility.types index effa6e0fe46..a3123d1ba4e 100644 --- a/tests/baselines/reference/privateVisibility.types +++ b/tests/baselines/reference/privateVisibility.types @@ -6,7 +6,7 @@ class Foo { >pubMeth : () => void >this.privMeth() : void >this.privMeth : () => void ->this : this +>this : Foo >privMeth : () => void private privMeth() {} diff --git a/tests/baselines/reference/privateVisibles.types b/tests/baselines/reference/privateVisibles.types index 95f60839fc1..9a26c4014ab 100644 --- a/tests/baselines/reference/privateVisibles.types +++ b/tests/baselines/reference/privateVisibles.types @@ -10,7 +10,7 @@ class Foo { var n = this.pvar; >n : number >this.pvar : number ->this : this +>this : Foo >pvar : number } @@ -18,7 +18,7 @@ class Foo { >meth : () => void >q : number >this.pvar : number ->this : this +>this : Foo >pvar : number } diff --git a/tests/baselines/reference/privateWriteOnlyAccessorRead.types b/tests/baselines/reference/privateWriteOnlyAccessorRead.types index 23e62fda4c6..e62ac7d9a7d 100644 --- a/tests/baselines/reference/privateWriteOnlyAccessorRead.types +++ b/tests/baselines/reference/privateWriteOnlyAccessorRead.types @@ -35,19 +35,19 @@ class Test { >console : Console >log : (...data: any[]) => void >this.#value : { foo: { bar: number; }; } ->this : this +>this : Test this.#value = { foo }; // ok >this.#value = { foo } : { foo: { bar: number; }; } >this.#value : { foo: { bar: number; }; } ->this : this +>this : Test >{ foo } : { foo: { bar: number; }; } >foo : { bar: number; } this.#value = { foo }; // ok >this.#value = { foo } : { foo: { bar: number; }; } >this.#value : { foo: { bar: number; }; } ->this : this +>this : Test >{ foo } : { foo: { bar: number; }; } >foo : { bar: number; } @@ -55,7 +55,7 @@ class Test { >this.#value.foo = foo : { bar: number; } >this.#value.foo : { bar: number; } >this.#value : { foo: { bar: number; }; } ->this : this +>this : Test >foo : { bar: number; } >foo : { bar: number; } @@ -65,7 +65,7 @@ class Test { >{ o: this.#value } : { o: { foo: { bar: number; }; }; } >o : { foo: { bar: number; }; } >this.#value : { foo: { bar: number; }; } ->this : this +>this : Test >{ o: { foo } } : { o: { foo: { bar: number; }; }; } >o : { foo: { bar: number; }; } >{ foo } : { foo: { bar: number; }; } @@ -76,7 +76,7 @@ class Test { >{ ...this.#value } = { foo } : { foo: { bar: number; }; } >{ ...this.#value } : { foo: { bar: number; }; } >this.#value : { foo: { bar: number; }; } ->this : this +>this : Test >{ foo } : { foo: { bar: number; }; } >foo : { bar: number; } @@ -87,7 +87,7 @@ class Test { >foo : { bar: number; } >this.#value.foo : { bar: number; } >this.#value : { foo: { bar: number; }; } ->this : this +>this : Test >foo : { bar: number; } >{ foo } : { foo: { bar: number; }; } >foo : { bar: number; } @@ -102,7 +102,7 @@ class Test { >{ ...this.#value.foo } : { bar: number; } >this.#value.foo : { bar: number; } >this.#value : { foo: { bar: number; }; } ->this : this +>this : Test >foo : { bar: number; } } = { foo }); //error @@ -114,16 +114,16 @@ class Test { >{ o: this.#value } : { o: { foo: { bar: number; }; }; } >o : { foo: { bar: number; }; } >this.#value : { foo: { bar: number; }; } ->this : this +>this : Test [this.#valueOne, ...this.#valueRest] = [1, 2, 3]; >[this.#valueOne, ...this.#valueRest] = [1, 2, 3] : [number, number, number] >[this.#valueOne, ...this.#valueRest] : [number, ...number[]] >this.#valueOne : number ->this : this +>this : Test >...this.#valueRest : number >this.#valueRest : number[] ->this : this +>this : Test >[1, 2, 3] : [number, number, number] >1 : 1 >2 : 2 @@ -135,19 +135,19 @@ class Test { this.#valueOne, >this.#valueOne : number ->this : this +>this : Test ...this.#valueRest >...this.#valueRest : number >this.#valueRest : number[] ->this : this +>this : Test ]; this.#valueCompound += 3; >this.#valueCompound += 3 : number >this.#valueCompound : number ->this : this +>this : Test >3 : 3 } } diff --git a/tests/baselines/reference/promiseChaining.errors.txt b/tests/baselines/reference/promiseChaining.errors.txt new file mode 100644 index 00000000000..8063df6acc6 --- /dev/null +++ b/tests/baselines/reference/promiseChaining.errors.txt @@ -0,0 +1,31 @@ +tests/cases/compiler/promiseChaining.ts(6,17): error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. + Type 'S' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'S'. +tests/cases/compiler/promiseChaining.ts(6,17): error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. + Type 'unknown' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'unknown'. +tests/cases/compiler/promiseChaining.ts(6,84): error TS2339: Property 'length' does not exist on type 'unknown'. + + +==== tests/cases/compiler/promiseChaining.ts (3 errors) ==== + class Chain { + constructor(public value: T) { } + then(cb: (x: T) => S): Chain { + var result = cb(this.value); + // should get a fresh type parameter which each then call + var z = this.then(x => result)/*S*/.then(x => "abc")/*string*/.then(x => x.length)/*number*/; // No error + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. +!!! error TS2684: Type 'S' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'S'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain' is not assignable to method's 'this' of type 'Chain'. +!!! error TS2684: Type 'unknown' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'unknown'. + ~~~~~~ +!!! error TS2339: Property 'length' does not exist on type 'unknown'. + return new Chain(result); + } + } + + \ No newline at end of file diff --git a/tests/baselines/reference/promiseChaining.symbols b/tests/baselines/reference/promiseChaining.symbols index 13e9232acdc..beb64a8d9b6 100644 --- a/tests/baselines/reference/promiseChaining.symbols +++ b/tests/baselines/reference/promiseChaining.symbols @@ -38,9 +38,7 @@ class Chain { >x : Symbol(x, Decl(promiseChaining.ts, 5, 49)) >then : Symbol(Chain.then, Decl(promiseChaining.ts, 1, 36)) >x : Symbol(x, Decl(promiseChaining.ts, 5, 76)) ->x.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(promiseChaining.ts, 5, 76)) ->length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) return new Chain(result); >Chain : Symbol(Chain, Decl(promiseChaining.ts, 0, 0)) diff --git a/tests/baselines/reference/promiseChaining.types b/tests/baselines/reference/promiseChaining.types index a41bed62454..7113b9526ed 100644 --- a/tests/baselines/reference/promiseChaining.types +++ b/tests/baselines/reference/promiseChaining.types @@ -15,19 +15,19 @@ class Chain { >cb(this.value) : S >cb : (x: T) => S >this.value : T ->this : this +>this : Chain >value : T // should get a fresh type parameter which each then call var z = this.then(x => result)/*S*/.then(x => "abc")/*string*/.then(x => x.length)/*number*/; // No error ->z : Chain ->this.then(x => result)/*S*/.then(x => "abc")/*string*/.then(x => x.length) : Chain ->this.then(x => result)/*S*/.then(x => "abc")/*string*/.then : (cb: (x: string) => S) => Chain ->this.then(x => result)/*S*/.then(x => "abc") : Chain +>z : Chain +>this.then(x => result)/*S*/.then(x => "abc")/*string*/.then(x => x.length) : Chain +>this.then(x => result)/*S*/.then(x => "abc")/*string*/.then : (cb: (x: unknown) => S) => Chain +>this.then(x => result)/*S*/.then(x => "abc") : Chain >this.then(x => result)/*S*/.then : (cb: (x: S) => S) => Chain >this.then(x => result) : Chain >this.then : (cb: (x: T) => S) => Chain ->this : this +>this : Chain >then : (cb: (x: T) => S) => Chain >x => result : (x: T) => S >x : T @@ -36,12 +36,12 @@ class Chain { >x => "abc" : (x: S) => string >x : S >"abc" : "abc" ->then : (cb: (x: string) => S) => Chain ->x => x.length : (x: string) => number ->x : string ->x.length : number ->x : string ->length : number +>then : (cb: (x: unknown) => S) => Chain +>x => x.length : (x: unknown) => any +>x : unknown +>x.length : any +>x : unknown +>length : any return new Chain(result); >new Chain(result) : Chain diff --git a/tests/baselines/reference/promiseChaining1.errors.txt b/tests/baselines/reference/promiseChaining1.errors.txt index 9ce81ee4d5d..c758067af0f 100644 --- a/tests/baselines/reference/promiseChaining1.errors.txt +++ b/tests/baselines/reference/promiseChaining1.errors.txt @@ -1,5 +1,9 @@ -tests/cases/compiler/promiseChaining1.ts(7,55): error TS2322: Type 'string' is not assignable to type 'Function'. -tests/cases/compiler/promiseChaining1.ts(7,84): error TS2322: Type 'number' is not assignable to type 'Function'. +tests/cases/compiler/promiseChaining1.ts(7,17): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. + Type 'S' is not assignable to type 'T'. + 'S' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ length: number; }'. +tests/cases/compiler/promiseChaining1.ts(7,17): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. + Type 'Function' is not assignable to type 'T'. + 'Function' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ length: number; }'. ==== tests/cases/compiler/promiseChaining1.ts (2 errors) ==== @@ -10,12 +14,14 @@ tests/cases/compiler/promiseChaining1.ts(7,84): error TS2322: Type 'number' is n var result = cb(this.value); // should get a fresh type parameter which each then call var z = this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then(x => x.length)/*number*/; // Should error on "abc" because it is not a Function - ~~~~~ -!!! error TS2322: Type 'string' is not assignable to type 'Function'. -!!! related TS6502 tests/cases/compiler/promiseChaining1.ts:4:34: The expected type comes from the return type of this signature. - ~~~~~~~~ -!!! error TS2322: Type 'number' is not assignable to type 'Function'. -!!! related TS6502 tests/cases/compiler/promiseChaining1.ts:4:34: The expected type comes from the return type of this signature. + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. +!!! error TS2684: Type 'S' is not assignable to type 'T'. +!!! error TS2684: 'S' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ length: number; }'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. +!!! error TS2684: Type 'Function' is not assignable to type 'T'. +!!! error TS2684: 'Function' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ length: number; }'. return new Chain2(result); } } \ No newline at end of file diff --git a/tests/baselines/reference/promiseChaining1.types b/tests/baselines/reference/promiseChaining1.types index 48c16cd64a1..9969e447e3b 100644 --- a/tests/baselines/reference/promiseChaining1.types +++ b/tests/baselines/reference/promiseChaining1.types @@ -17,7 +17,7 @@ class Chain2 { >cb(this.value) : S >cb : (x: T) => S >this.value : T ->this : this +>this : Chain2 >value : T // should get a fresh type parameter which each then call @@ -29,7 +29,7 @@ class Chain2 { >this.then(x => result)/*S*/.then : (cb: (x: S) => S) => Chain2 >this.then(x => result) : Chain2 >this.then : (cb: (x: T) => S) => Chain2 ->this : this +>this : Chain2 >then : (cb: (x: T) => S) => Chain2 >x => result : (x: T) => S >x : T diff --git a/tests/baselines/reference/promiseChaining2.errors.txt b/tests/baselines/reference/promiseChaining2.errors.txt index 98dee5cfe93..cf6c5c54500 100644 --- a/tests/baselines/reference/promiseChaining2.errors.txt +++ b/tests/baselines/reference/promiseChaining2.errors.txt @@ -1,5 +1,9 @@ -tests/cases/compiler/promiseChaining2.ts(7,50): error TS2322: Type 'string' is not assignable to type 'Function'. -tests/cases/compiler/promiseChaining2.ts(7,67): error TS2322: Type 'number' is not assignable to type 'Function'. +tests/cases/compiler/promiseChaining2.ts(7,17): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. + Type 'S' is not assignable to type 'T'. + 'S' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ length: number; }'. +tests/cases/compiler/promiseChaining2.ts(7,17): error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. + Type 'Function' is not assignable to type 'T'. + 'Function' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ length: number; }'. ==== tests/cases/compiler/promiseChaining2.ts (2 errors) ==== @@ -10,12 +14,14 @@ tests/cases/compiler/promiseChaining2.ts(7,67): error TS2322: Type 'number' is n var result = cb(this.value); // should get a fresh type parameter which each then call var z = this.then(x => result).then(x => "abc").then(x => x.length); - ~~~~~ -!!! error TS2322: Type 'string' is not assignable to type 'Function'. -!!! related TS6502 tests/cases/compiler/promiseChaining2.ts:4:34: The expected type comes from the return type of this signature. - ~~~~~~~~ -!!! error TS2322: Type 'number' is not assignable to type 'Function'. -!!! related TS6502 tests/cases/compiler/promiseChaining2.ts:4:34: The expected type comes from the return type of this signature. + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. +!!! error TS2684: Type 'S' is not assignable to type 'T'. +!!! error TS2684: 'S' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ length: number; }'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'Chain2' is not assignable to method's 'this' of type 'Chain2'. +!!! error TS2684: Type 'Function' is not assignable to type 'T'. +!!! error TS2684: 'Function' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ length: number; }'. return new Chain2(result); } } \ No newline at end of file diff --git a/tests/baselines/reference/promiseChaining2.types b/tests/baselines/reference/promiseChaining2.types index c980627c5b2..e1f908cb7df 100644 --- a/tests/baselines/reference/promiseChaining2.types +++ b/tests/baselines/reference/promiseChaining2.types @@ -17,7 +17,7 @@ class Chain2 { >cb(this.value) : S >cb : (x: T) => S >this.value : T ->this : this +>this : Chain2 >value : T // should get a fresh type parameter which each then call @@ -29,7 +29,7 @@ class Chain2 { >this.then(x => result).then : (cb: (x: S) => S) => Chain2 >this.then(x => result) : Chain2 >this.then : (cb: (x: T) => S) => Chain2 ->this : this +>this : Chain2 >then : (cb: (x: T) => S) => Chain2 >x => result : (x: T) => S >x : T diff --git a/tests/baselines/reference/promiseTypeInference.errors.txt b/tests/baselines/reference/promiseTypeInference.errors.txt new file mode 100644 index 00000000000..1e6108e8d71 --- /dev/null +++ b/tests/baselines/reference/promiseTypeInference.errors.txt @@ -0,0 +1,21 @@ +tests/cases/compiler/promiseTypeInference.ts(10,11): error TS2684: The 'this' context of type 'CPromise' is not assignable to method's 'this' of type 'CPromise'. + Type 'string' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. + + +==== tests/cases/compiler/promiseTypeInference.ts (1 errors) ==== + declare class CPromise { + then(success?: (value: T) => CPromise): CPromise; + } + interface IPromise { + then(success?: (value: T) => IPromise): IPromise; + } + declare function load(name: string): CPromise; + declare function convert(s: string): IPromise; + + var $$x = load("something").then(s => convert(s)); + ~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'CPromise' is not assignable to method's 'this' of type 'CPromise'. +!!! error TS2684: Type 'string' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. + \ No newline at end of file diff --git a/tests/baselines/reference/promiseTypeInference.types b/tests/baselines/reference/promiseTypeInference.types index d1d2072e91c..2484e9b97d2 100644 --- a/tests/baselines/reference/promiseTypeInference.types +++ b/tests/baselines/reference/promiseTypeInference.types @@ -22,8 +22,8 @@ declare function convert(s: string): IPromise; >s : string var $$x = load("something").then(s => convert(s)); ->$$x : CPromise ->load("something").then(s => convert(s)) : CPromise +>$$x : CPromise +>load("something").then(s => convert(s)) : CPromise >load("something").then : (success?: (value: string) => CPromise) => CPromise >load("something") : CPromise >load : (name: string) => CPromise diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.errors.txt b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.errors.txt new file mode 100644 index 00000000000..c3ef8f7640d --- /dev/null +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.errors.txt @@ -0,0 +1,94 @@ +tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints2.ts(38,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'B' is not assignable to type 'U'. + 'B' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'A'. +tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints2.ts(39,11): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + + +==== tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints2.ts (2 errors) ==== + // generic types should behave as if they have properties of their constraint type + + class A { + foo(): string { return ''; } + } + + class B extends A { + bar(): string { + return ''; + } + } + + class C { + f() { + var x: U; + var a = x['foo'](); // should be string + return a + x.foo(); + } + + g(x: U) { + var a = x['foo'](); // should be string + return a + x.foo(); + } + } + //class C { + // f() { + // var x: U; + // var a = x['foo'](); // should be string + // return a + x.foo(); + // } + + // g(x: U) { + // var a = x['foo'](); // should be string + // return a + x.foo(); + // } + //} + + var r1 = (new C()).f(); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'B' is not assignable to type 'U'. +!!! error TS2684: 'B' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'A'. + var r1b = (new C()).g(new B()); + ~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + + interface I { + foo: U; + } + //interface I { + // foo: U; + //} + var i: I; + var r2 = i.foo.foo(); + var r2b = i.foo['foo'](); + + var a: { + (): U; + (x: U): U; + (x: U, y: T): U; + } + //var a: { + // (): U; + // (x: U): U; + // (x: U, y: T): U; + //} + var r3 = a().foo(); + var r3b = a()['foo'](); + // parameter supplied for type argument inference to succeed + var aB = new B(); + var r3c = a(aB, aB).foo(); + var r3d = a(aB, aB)['foo'](); + + var b = { + foo: (x: U, y: T) => { + var a = x['foo'](); // should be string + return a + x.foo(); + } + } + //var b = { + // foo: (x: U, y: T) => { + // var a = x['foo'](); // should be string + // return a + x.foo(); + // } + //} + + var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, error \ No newline at end of file diff --git a/tests/baselines/reference/propertyOrdering.types b/tests/baselines/reference/propertyOrdering.types index 9a915a7bc88..fe73df04607 100644 --- a/tests/baselines/reference/propertyOrdering.types +++ b/tests/baselines/reference/propertyOrdering.types @@ -11,7 +11,7 @@ class Foo { return this._store.length; // shouldn't be an error >this._store.length : any >this._store : any ->this : this +>this : Foo >_store : any >length : any } @@ -23,7 +23,7 @@ class Foo { public bar() { return this.store; } // should be an error >bar : () => any >this.store : any ->this : this +>this : Foo >store : any } @@ -37,7 +37,7 @@ class Bar { return this._store.length; // shouldn't be an error >this._store.length : any >this._store : any ->this : this +>this : Bar >_store : any >length : any @@ -48,7 +48,7 @@ class Bar { this._store = store; >this._store = store : string >this._store : any ->this : this +>this : Bar >_store : any >store : string } diff --git a/tests/baselines/reference/propertyOrdering2.types b/tests/baselines/reference/propertyOrdering2.types index 37ab3a4ab7a..30ac5c49045 100644 --- a/tests/baselines/reference/propertyOrdering2.types +++ b/tests/baselines/reference/propertyOrdering2.types @@ -12,12 +12,12 @@ class Foo { var a = this.x; >a : any >this.x : any ->this : this +>this : Foo >x : any return this.y; >this.y : any ->this : this +>this : Foo >y : any } } diff --git a/tests/baselines/reference/propertyOverridesAccessors.types b/tests/baselines/reference/propertyOverridesAccessors.types index 9ffec6e8fe6..3e1ce794ae6 100644 --- a/tests/baselines/reference/propertyOverridesAccessors.types +++ b/tests/baselines/reference/propertyOverridesAccessors.types @@ -24,7 +24,7 @@ class C { get p() { return this._secret } >p : number >this._secret : number ->this : this +>this : C >_secret : number set p(value) { this._secret = value } @@ -32,7 +32,7 @@ class C { >value : number >this._secret = value : number >this._secret : number ->this : this +>this : C >_secret : number >value : number } diff --git a/tests/baselines/reference/propertyOverridesAccessors3.types b/tests/baselines/reference/propertyOverridesAccessors3.types index be9aeddf86d..22fe3734dc5 100644 --- a/tests/baselines/reference/propertyOverridesAccessors3.types +++ b/tests/baselines/reference/propertyOverridesAccessors3.types @@ -9,7 +9,7 @@ class Animal { get sound() { return this._sound } >sound : string >this._sound : string ->this : this +>this : Animal >_sound : string set sound(val) { @@ -19,7 +19,7 @@ class Animal { this._sound = val; >this._sound = val : string >this._sound : string ->this : this +>this : Animal >_sound : string >val : string @@ -35,7 +35,7 @@ class Animal { >console : Console >log : (...data: any[]) => void >this._sound : string ->this : this +>this : Animal >_sound : string } } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.types b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.types index 1e325d1d6f5..bce0dc7a5d2 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.types +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.types @@ -10,7 +10,7 @@ class C { protected get y() { return this.x; } >y : string >this.x : string ->this : this +>this : C >x : string protected set y(x) { this.y = this.x; } @@ -18,16 +18,16 @@ class C { >x : string >this.y = this.x : string >this.y : string ->this : this +>this : C >y : string >this.x : string ->this : this +>this : C >x : string protected foo() { return this.foo; } ->foo : () => any +>foo : () => () => any >this.foo : () => any ->this : this +>this : C >foo : () => any protected static x: string; @@ -75,7 +75,7 @@ class C2 { >y : any >() => this.x : () => string >this.x : string ->this : this +>this : C2 >x : string >null : null @@ -85,17 +85,17 @@ class C2 { >() => { this.y = this.x; } : () => void >this.y = this.x : string >this.y : any ->this : this +>this : C2 >y : any >this.x : string ->this : this +>this : C2 >x : string protected foo() { () => this.foo; } >foo : () => void >() => this.foo : () => () => void >this.foo : () => void ->this : this +>this : C2 >foo : () => void protected static x: string; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedClass.types b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedClass.types index 6b6bf6edfc9..1d20cf0229a 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedClass.types +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedClass.types @@ -10,7 +10,7 @@ class C { protected get y() { return this.x; } >y : string >this.x : string ->this : this +>this : C >x : string protected set y(x) { this.y = this.x; } @@ -18,16 +18,16 @@ class C { >x : string >this.y = this.x : string >this.y : string ->this : this +>this : C >y : string >this.x : string ->this : this +>this : C >x : string protected foo() { return this.foo; } ->foo : () => any +>foo : () => () => any >this.foo : () => any ->this : this +>this : C >foo : () => any protected static x: string; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.types b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.types index 674ee11487c..0c815b4725d 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.types +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.types @@ -16,7 +16,7 @@ class C extends B { protected get y() { return this.x; } >y : string >this.x : string ->this : this +>this : C >x : string protected set y(x) { this.y = this.x; } @@ -24,16 +24,16 @@ class C extends B { >x : string >this.y = this.x : string >this.y : string ->this : this +>this : C >y : string >this.x : string ->this : this +>this : C >x : string protected foo() { return this.x; } >foo : () => string >this.x : string ->this : this +>this : C >x : string protected static get y() { return this.x; } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.types b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.types index 863f3100599..bd230239d47 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.types +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.types @@ -18,7 +18,7 @@ class C extends B { protected get y() { return this.x; } >y : string >this.x : string ->this : this +>this : C >x : string protected set y(x) { this.y = this.x; } @@ -26,23 +26,23 @@ class C extends B { >x : string >this.y = this.x : string >this.y : string ->this : this +>this : C >y : string >this.x : string ->this : this +>this : C >x : string protected foo() { return this.x; } >foo : () => string >this.x : string ->this : this +>this : C >x : string protected bar() { return this.foo(); } >bar : () => string >this.foo() : string >this.foo : () => string ->this : this +>this : C >foo : () => string protected static get y() { return this.x; } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.types b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.types index 0024157d42e..87128002ce4 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.types +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.types @@ -10,7 +10,7 @@ class Base { this.x; // OK, accessed within their declaring class >this.x : string ->this : this +>this : Base >x : string } } @@ -24,7 +24,7 @@ class Derived extends Base { this.x; // OK, accessed within a subclass of the declaring class >this.x : string ->this : this +>this : Derived >x : string super.x; // Error, x is not public diff --git a/tests/baselines/reference/protectedInstanceMemberAccessibility.types b/tests/baselines/reference/protectedInstanceMemberAccessibility.types index 2af49045672..74f421d0559 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.types +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.types @@ -26,26 +26,26 @@ class B extends A { var t1 = this.x; >t1 : string >this.x : string ->this : this +>this : B >x : string var t2 = this.f(); >t2 : string >this.f() : string >this.f : () => string ->this : this +>this : B >f : () => string var t3 = this.y; >t3 : string >this.y : string ->this : this +>this : B >y : string var t4 = this.z; // error >t4 : any >this.z : any ->this : this +>this : B >z : any var s1 = super.x; // error diff --git a/tests/baselines/reference/protectedMembers.types b/tests/baselines/reference/protectedMembers.types index 118c29a5bea..a61e9bc07c6 100644 --- a/tests/baselines/reference/protectedMembers.types +++ b/tests/baselines/reference/protectedMembers.types @@ -14,7 +14,7 @@ class C1 { return this.x; >this.x : number ->this : this +>this : C1 >x : number } protected static sf() { @@ -42,7 +42,7 @@ class C2 extends C1 { >super : C1 >f : () => number >this.x : number ->this : this +>this : C2 >x : number } protected static sf() { diff --git a/tests/baselines/reference/protoInIndexer.types b/tests/baselines/reference/protoInIndexer.types index e47bb0dd341..31ef4415eef 100644 --- a/tests/baselines/reference/protoInIndexer.types +++ b/tests/baselines/reference/protoInIndexer.types @@ -6,7 +6,7 @@ class X { this['__proto__'] = null; // used to cause ICE >this['__proto__'] = null : null >this['__proto__'] : error ->this : this +>this : X >'__proto__' : "__proto__" >null : null } diff --git a/tests/baselines/reference/quickInfoCommentsClassMembers.baseline b/tests/baselines/reference/quickInfoCommentsClassMembers.baseline index 4fbd66f7bf2..20f788a65c5 100644 --- a/tests/baselines/reference/quickInfoCommentsClassMembers.baseline +++ b/tests/baselines/reference/quickInfoCommentsClassMembers.baseline @@ -5680,8 +5680,8 @@ "kind": "space" }, { - "text": "this", - "kind": "keyword" + "text": "cWithConstructorProperty", + "kind": "className" } ], "documentation": [] diff --git a/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.errors.txt b/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.errors.txt index 3791e82e28c..d2946a0ef99 100644 --- a/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.errors.txt +++ b/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.errors.txt @@ -1,8 +1,14 @@ tests/cases/compiler/quickinfoTypeAtReturnPositionsInaccurate.ts(33,15): error TS2339: Property 'numExclusive' does not exist on type 'NumClass | StrClass'. Property 'numExclusive' does not exist on type 'StrClass'. +tests/cases/compiler/quickinfoTypeAtReturnPositionsInaccurate.ts(67,9): error TS2684: The 'this' context of type 'NumClass | StrClass' is not assignable to method's 'this' of type 'NumClass'. + Type 'NumClass' is not assignable to type 'NumClass'. + Type 'number' is not assignable to type 'T'. + 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'number'. +tests/cases/compiler/quickinfoTypeAtReturnPositionsInaccurate.ts(86,9): error TS2684: The 'this' context of type 'NumClass | StrClass' is not assignable to method's 'this' of type 'NumClass'. + Type 'NumClass' is not assignable to type 'NumClass'. -==== tests/cases/compiler/quickinfoTypeAtReturnPositionsInaccurate.ts (1 errors) ==== +==== tests/cases/compiler/quickinfoTypeAtReturnPositionsInaccurate.ts (3 errors) ==== class NumClass { private value!: T; public get(): T { @@ -73,6 +79,11 @@ tests/cases/compiler/quickinfoTypeAtReturnPositionsInaccurate.ts(33,15): error T } item.get(); + ~~~~ +!!! error TS2684: The 'this' context of type 'NumClass | StrClass' is not assignable to method's 'this' of type 'NumClass'. +!!! error TS2684: Type 'NumClass' is not assignable to type 'NumClass'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'number'. // unfortunately, doesn't work completely. // it seems like item's predicated type leaks outside the bracket... @@ -92,6 +103,9 @@ tests/cases/compiler/quickinfoTypeAtReturnPositionsInaccurate.ts(33,15): error T // truthy item.get(); + ~~~~ +!!! error TS2684: The 'this' context of type 'NumClass | StrClass' is not assignable to method's 'this' of type 'NumClass'. +!!! error TS2684: Type 'NumClass' is not assignable to type 'NumClass'. return item; // type is never } diff --git a/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.types b/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.types index 1782050b8f2..c186a89023c 100644 --- a/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.types +++ b/tests/baselines/reference/quickinfoTypeAtReturnPositionsInaccurate.types @@ -10,7 +10,7 @@ class NumClass { return this.value; >this.value : T ->this : this +>this : NumClass >value : T } public numExclusive() { } @@ -28,7 +28,7 @@ class StrClass { return this.value; >this.value : T ->this : this +>this : StrClass >value : T } public strExclusive() { } @@ -71,7 +71,7 @@ class SimpleStore | StrClass >entry : Entries[EntryId] >this.entries[entryId] : Entries[EntryId] >this.entries : Entries ->this : this +>this : SimpleStore >entries : Entries >entryId : EntryId @@ -137,7 +137,7 @@ class ComplexStore { >this.slices[sliceId][sliceKey] : Slices[SliceId][SliceKey] >this.slices[sliceId] : Slices[SliceId] >this.slices : Slices ->this : this +>this : ComplexStore >slices : Slices >sliceId : SliceId >sliceKey : SliceKey @@ -180,7 +180,7 @@ class ComplexStore { >this.slices[sliceId][sliceKey] : Slices[SliceId][SliceKey] >this.slices[sliceId] : Slices[SliceId] >this.slices : Slices ->this : this +>this : ComplexStore >slices : Slices >sliceId : SliceId >sliceKey : SliceKey diff --git a/tests/baselines/reference/quotedConstructors.types b/tests/baselines/reference/quotedConstructors.types index a79fc05cdf0..d6d7fc6fa64 100644 --- a/tests/baselines/reference/quotedConstructors.types +++ b/tests/baselines/reference/quotedConstructors.types @@ -8,7 +8,7 @@ class C { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->this : this +>this : C } } @@ -21,7 +21,7 @@ class D { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->this : this +>this : D } } @@ -37,7 +37,7 @@ class E { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->this : this +>this : E } } @@ -51,7 +51,7 @@ new class { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->this : this +>this : (Anonymous class) } }; @@ -69,7 +69,7 @@ class F { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->this : this +>this : F } } diff --git a/tests/baselines/reference/quotedPropertyName3.types b/tests/baselines/reference/quotedPropertyName3.types index 40c47212f3e..288b5f300a1 100644 --- a/tests/baselines/reference/quotedPropertyName3.types +++ b/tests/baselines/reference/quotedPropertyName3.types @@ -12,7 +12,7 @@ class Test { >x : () => number >() => this["prop1"] : () => number >this["prop1"] : number ->this : this +>this : Test >"prop1" : "prop1" var y: number = x(); diff --git a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt index 335f0febc86..1171b437eea 100644 --- a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt +++ b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt @@ -1,3 +1,14 @@ +tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(18,3): error TS2416: Property 'render' in type 'FieldFeedback

' is not assignable to the same property in base type 'Component'. + Type '() => Element' is not assignable to type '() => ReactNode'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'FieldFeedback

'. + Types of property 'render' are incompatible. + Type '() => ReactNode' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'FieldFeedback

' is not assignable to type 'Component'. + Types of property 'props' are incompatible. + Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

'. Two different types with this name exist, but they are unrelated. + Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(27,36): error TS2769: No overload matches this call. Overload 1 of 2, '(props: Readonly): FieldFeedback', gave the following error. Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. @@ -5,6 +16,17 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(27,36): error TS2769: Type 'void' is not assignable to type 'boolean'. Overload 2 of 2, '(props: Props, context?: any): FieldFeedback', gave the following error. Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. +tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(34,3): error TS2416: Property 'render' in type 'FieldFeedbackBeta

' is not assignable to the same property in base type 'Component'. + Type '() => Element' is not assignable to type '() => ReactNode'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'FieldFeedbackBeta

'. + Types of property 'render' are incompatible. + Type '() => ReactNode' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'FieldFeedbackBeta

' is not assignable to type 'Component'. + Types of property 'props' are incompatible. + Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

'. Two different types with this name exist, but they are unrelated. + Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(43,41): error TS2769: No overload matches this call. Overload 1 of 2, '(props: Readonly): FieldFeedbackBeta', gave the following error. Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. @@ -12,6 +34,17 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(43,41): error TS2769: Type 'void' is not assignable to type 'boolean'. Overload 2 of 2, '(props: Props, context?: any): FieldFeedbackBeta', gave the following error. Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. +tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(54,3): error TS2416: Property 'render' in type 'FieldFeedback2

' is not assignable to the same property in base type 'FieldFeedback

'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'FieldFeedback

' is not assignable to type 'FieldFeedback2

'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'FieldFeedback2

' is not assignable to type 'FieldFeedback

'. + Types of property 'props' are incompatible. + Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

'. Two different types with this name exist, but they are unrelated. + Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,37): error TS2769: No overload matches this call. Overload 1 of 2, '(props: Readonly): FieldFeedback2', gave the following error. Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. @@ -20,7 +53,7 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,37): error TS2769: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. -==== tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx (3 errors) ==== +==== tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx (6 errors) ==== /// import React from 'react'; @@ -39,6 +72,18 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,37): error TS2769: }; render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'FieldFeedback

' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => Element' is not assignable to type '() => ReactNode'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'FieldFeedback

'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => ReactNode' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'FieldFeedback

' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'props' are incompatible. +!!! error TS2416: Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. return

Hello
; } } @@ -65,6 +110,18 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,37): error TS2769: }; render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'FieldFeedbackBeta

' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => Element' is not assignable to type '() => ReactNode'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'FieldFeedbackBeta

'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => ReactNode' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'FieldFeedbackBeta

' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'props' are incompatible. +!!! error TS2416: Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. return

Hello
; } } @@ -95,6 +152,18 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,37): error TS2769: }; render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'FieldFeedback2

' is not assignable to the same property in base type 'FieldFeedback

'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'FieldFeedback

' is not assignable to type 'FieldFeedback2

'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'FieldFeedback2

' is not assignable to type 'FieldFeedback

'. +!!! error TS2416: Types of property 'props' are incompatible. +!!! error TS2416: Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. this.props.when("now"); // OK, always defined return

Hello
; } diff --git a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.types b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.types index 9995e298150..910fe37497d 100644 --- a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.types +++ b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.types @@ -158,7 +158,7 @@ class FieldFeedback2

extends FieldFeedbac >this.props.when("now") : boolean >this.props.when : P["when"] >this.props : Readonly<{ children?: React.ReactNode; }> & Readonly

->this : this +>this : FieldFeedback2

>props : Readonly<{ children?: React.ReactNode; }> & Readonly

>when : P["when"] >"now" : "now" diff --git a/tests/baselines/reference/reactHOCSpreadprops.errors.txt b/tests/baselines/reference/reactHOCSpreadprops.errors.txt new file mode 100644 index 00000000000..41e581f3dc4 --- /dev/null +++ b/tests/baselines/reference/reactHOCSpreadprops.errors.txt @@ -0,0 +1,36 @@ +tests/cases/compiler/reactHOCSpreadprops.tsx(5,9): error TS2416: Property 'render' in type 'C' is not assignable to the same property in base type 'Component

'. + Type '() => Element' is not assignable to type '() => ReactNode'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'C'. + Types of property 'render' are incompatible. + Type '() => ReactNode' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'C' is not assignable to type 'Component'. + Types of property 'props' are incompatible. + Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: ReactNode; }> & Readonly

'. + Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. + + +==== tests/cases/compiler/reactHOCSpreadprops.tsx (1 errors) ==== + /// + import React = require("react"); + function f

(App: React.ComponentClass

| React.StatelessComponent

): void { + class C extends React.Component

{ + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'C' is not assignable to the same property in base type 'Component

'. +!!! error TS2416: Type '() => Element' is not assignable to type '() => ReactNode'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'C'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => ReactNode' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'C' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'props' are incompatible. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: ReactNode; }> & Readonly

'. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. + return ; + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/reactHOCSpreadprops.types b/tests/baselines/reference/reactHOCSpreadprops.types index 2480196a217..51693e2a004 100644 --- a/tests/baselines/reference/reactHOCSpreadprops.types +++ b/tests/baselines/reference/reactHOCSpreadprops.types @@ -23,7 +23,7 @@ function f

(App: React.ComponentClass

| React.StatelessComponent

): void > : JSX.Element >App : React.ComponentClass | React.StatelessComponent

>this.props : Readonly<{ children?: React.ReactNode; }> & Readonly

->this : this +>this : C >props : Readonly<{ children?: React.ReactNode; }> & Readonly

} } diff --git a/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.errors.txt b/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.errors.txt new file mode 100644 index 00000000000..4247ecc6f4c --- /dev/null +++ b/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.errors.txt @@ -0,0 +1,53 @@ +tests/cases/compiler/reactReadonlyHOCAssignabilityReal.tsx(5,5): error TS2322: Type 'typeof OuterComponent' is not assignable to type 'ComponentClass'. + Construct signature return types 'OuterComponent' and 'Component' are incompatible. + The types of 'render' are incompatible between these types. + Type '() => Element' is not assignable to type '() => ReactNode'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'OuterComponent'. +tests/cases/compiler/reactReadonlyHOCAssignabilityReal.tsx(6,9): error TS2416: Property 'render' in type 'OuterComponent' is not assignable to the same property in base type 'Component'. + Type '() => Element' is not assignable to type '() => ReactNode'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'OuterComponent'. + Types of property 'render' are incompatible. + Type '() => ReactNode' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'OuterComponent' is not assignable to type 'Component'. + Types of property 'props' are incompatible. + Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

'. Two different types with this name exist, but they are unrelated. + Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. + + +==== tests/cases/compiler/reactReadonlyHOCAssignabilityReal.tsx (2 errors) ==== + /// + import * as React from "react"; + + function myHigherOrderComponent

(Inner: React.ComponentClass

): React.ComponentClass

{ + return class OuterComponent extends React.Component

{ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + render() { + ~~~~~~~~~~~~~~~~~~ + ~~~~~~ +!!! error TS2416: Property 'render' in type 'OuterComponent' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => Element' is not assignable to type '() => ReactNode'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'OuterComponent'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => ReactNode' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'OuterComponent' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'props' are incompatible. +!!! error TS2416: Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. + return ; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~ + }; + ~~~~~~ +!!! error TS2322: Type 'typeof OuterComponent' is not assignable to type 'ComponentClass'. +!!! error TS2322: Construct signature return types 'OuterComponent' and 'Component' are incompatible. +!!! error TS2322: The types of 'render' are incompatible between these types. +!!! error TS2322: Type '() => Element' is not assignable to type '() => ReactNode'. +!!! error TS2322: The 'this' types of each signature are incompatible. +!!! error TS2322: Type 'Component' is not assignable to type 'OuterComponent'. + } \ No newline at end of file diff --git a/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.types b/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.types index befb43a43a2..d2304988ae4 100644 --- a/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.types +++ b/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.types @@ -24,7 +24,7 @@ function myHigherOrderComponent

(Inner: React.ComponentClass

: JSX.Element >Inner : React.ComponentClass

>this.props : Readonly<{ children?: React.ReactNode; }> & Readonly

->this : this +>this : OuterComponent >props : Readonly<{ children?: React.ReactNode; }> & Readonly

>name : "Matt" } diff --git a/tests/baselines/reference/readonlyAssignmentInSubclassOfClassExpression.types b/tests/baselines/reference/readonlyAssignmentInSubclassOfClassExpression.types index 06c6455d327..1d9a2e85db5 100644 --- a/tests/baselines/reference/readonlyAssignmentInSubclassOfClassExpression.types +++ b/tests/baselines/reference/readonlyAssignmentInSubclassOfClassExpression.types @@ -14,7 +14,7 @@ class C extends (class {} as new () => Readonly<{ attrib: number }>) { this.attrib = 2 >this.attrib = 2 : 2 >this.attrib : any ->this : this +>this : C >attrib : any >2 : 2 } diff --git a/tests/baselines/reference/readonlyConstructorAssignment.errors.txt b/tests/baselines/reference/readonlyConstructorAssignment.errors.txt index ecd22168d72..87fd8ba1c47 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.errors.txt +++ b/tests/baselines/reference/readonlyConstructorAssignment.errors.txt @@ -1,9 +1,12 @@ +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyConstructorAssignment.ts(11,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyConstructorAssignment.ts(13,14): error TS2540: Cannot assign to 'x' because it is a read-only property. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyConstructorAssignment.ts(21,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyConstructorAssignment.ts(33,7): error TS2415: Class 'E' incorrectly extends base class 'D'. Property 'x' is private in type 'D' but not in type 'E'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyConstructorAssignment.ts(35,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'D'. -==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyConstructorAssignment.ts (2 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyConstructorAssignment.ts (5 errors) ==== // Tests that readonly parameter properties behave like regular readonly properties class A { @@ -15,6 +18,8 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/re class B extends A { constructor(x: number) { super(x); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. // Fails, x is readonly this.x = 1; ~ @@ -27,6 +32,8 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/re // if one is redeclared in a base class, then it can be assigned to. constructor(readonly x: number) { super(x); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. this.x = 1; } } @@ -44,6 +51,8 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/re !!! error TS2415: Property 'x' is private in type 'D' but not in type 'E'. constructor(readonly x: number) { super(x); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'D'. this.x = 1; } } diff --git a/tests/baselines/reference/readonlyConstructorAssignment.types b/tests/baselines/reference/readonlyConstructorAssignment.types index cc09b2d3857..409264bd4a4 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.types +++ b/tests/baselines/reference/readonlyConstructorAssignment.types @@ -10,7 +10,7 @@ class A { this.x = 0; >this.x = 0 : 0 >this.x : number ->this : this +>this : A >x : number >0 : 0 } @@ -32,7 +32,7 @@ class B extends A { this.x = 1; >this.x = 1 : 1 >this.x : any ->this : this +>this : B >x : any >1 : 1 } @@ -55,7 +55,7 @@ class C extends A { this.x = 1; >this.x = 1 : 1 >this.x : number ->this : this +>this : C >x : number >1 : 1 } @@ -70,7 +70,7 @@ class D { this.x = 0; >this.x = 0 : 0 >this.x : number ->this : this +>this : D >x : number >0 : 0 } @@ -92,7 +92,7 @@ class E extends D { this.x = 1; >this.x = 1 : 1 >this.x : number ->this : this +>this : E >x : number >1 : 1 } diff --git a/tests/baselines/reference/readonlyMembers.types b/tests/baselines/reference/readonlyMembers.types index eb71ec9eb59..896a103efad 100644 --- a/tests/baselines/reference/readonlyMembers.types +++ b/tests/baselines/reference/readonlyMembers.types @@ -44,21 +44,21 @@ class C { this.a = 1; // Ok >this.a = 1 : 1 >this.a : number ->this : this +>this : C >a : number >1 : 1 this.b = 1; // Ok >this.b = 1 : 1 >this.b : 1 ->this : this +>this : C >b : 1 >1 : 1 this.c = 1; // Error >this.c = 1 : 1 >this.c : any ->this : this +>this : C >c : any >1 : 1 @@ -69,21 +69,21 @@ class C { this.a = 1; // Error >this.a = 1 : 1 >this.a : any ->this : this +>this : C >a : any >1 : 1 this.b = 1; // Error >this.b = 1 : 1 >this.b : any ->this : this +>this : C >b : any >1 : 1 this.c = 1; // Error >this.c = 1 : 1 >this.c : any ->this : this +>this : C >c : any >1 : 1 } @@ -94,21 +94,21 @@ class C { this.a = 1; // Error >this.a = 1 : 1 >this.a : any ->this : this +>this : C >a : any >1 : 1 this.b = 1; // Error >this.b = 1 : 1 >this.b : any ->this : this +>this : C >b : any >1 : 1 this.c = 1; // Error >this.c = 1 : 1 >this.c : any ->this : this +>this : C >c : any >1 : 1 } diff --git a/tests/baselines/reference/recursiveClassReferenceTest.types b/tests/baselines/reference/recursiveClassReferenceTest.types index 761c6b93934..89a5b9dd949 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.types +++ b/tests/baselines/reference/recursiveClassReferenceTest.types @@ -96,7 +96,7 @@ module Sample.Thing.Widgets { >true : true >runner(this) : any >runner : (widget: IWidget) => any ->this : this +>this : FindWidget private domNode:any = null; >domNode : any @@ -114,7 +114,7 @@ module Sample.Thing.Widgets { >codeThing : ICodeThing >addWidget : (widgetId: string, widget: IWidget) => any >"addWidget" : "addWidget" ->this : this +>this : FindWidget } public getDomNode() { @@ -165,7 +165,7 @@ module Sample.Thing.Languages.PlainText { >clone : () => IState return this; ->this : this +>this : State } public equals(other:IState):boolean { @@ -174,7 +174,7 @@ module Sample.Thing.Languages.PlainText { return this === other; >this === other : boolean ->this : this +>this : State >other : IState } diff --git a/tests/baselines/reference/recursiveGetterAccess.types b/tests/baselines/reference/recursiveGetterAccess.types index 4e8702dffaf..835bac0a1b5 100644 --- a/tests/baselines/reference/recursiveGetterAccess.types +++ b/tests/baselines/reference/recursiveGetterAccess.types @@ -5,7 +5,7 @@ class MyClass { get testProp() { return this.testProp; } >testProp : any >this.testProp : any ->this : this +>this : MyClass >testProp : any } diff --git a/tests/baselines/reference/recursiveProperties.types b/tests/baselines/reference/recursiveProperties.types index 1e8a4ed3c1a..2c3f90c6503 100644 --- a/tests/baselines/reference/recursiveProperties.types +++ b/tests/baselines/reference/recursiveProperties.types @@ -5,7 +5,7 @@ class A { get testProp() { return this.testProp; } >testProp : any >this.testProp : any ->this : this +>this : A >testProp : any } @@ -17,7 +17,7 @@ class B { >value : string >this.testProp = value : string >this.testProp : string ->this : this +>this : B >testProp : string >value : string } diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.types b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.types index 2aca965b5fc..bbd239e9a68 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.types +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.types @@ -14,8 +14,8 @@ module rionegrensis { >salomonseni : () => caniventer >x : caniventer >() => { var y = this; } : () => void ->y : this ->this : this +>y : caniventer +>this : caniventer >x : caniventer uchidai() : lavali.xanthognathus { var x : lavali.xanthognathus; () => { var y = this; }; return x; } @@ -24,8 +24,8 @@ module rionegrensis { >x : lavali.xanthognathus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : caniventer +>this : caniventer >x : lavali.xanthognathus raffrayana() : lavali.otion { var x : lavali.otion; () => { var y = this; }; return x; } @@ -34,8 +34,8 @@ module rionegrensis { >x : lavali.otion >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : caniventer +>this : caniventer >x : lavali.otion Uranium() : minutus.inez, trivirgatus.falconeri> { var x : minutus.inez, trivirgatus.falconeri>; () => { var y = this; }; return x; } @@ -52,8 +52,8 @@ module rionegrensis { >dammermani : any >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : caniventer +>this : caniventer >x : minutus.inez, trivirgatus.falconeri> nayaur() : gabriellae.amicus { var x : gabriellae.amicus; () => { var y = this; }; return x; } @@ -62,8 +62,8 @@ module rionegrensis { >x : gabriellae.amicus >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : caniventer +>this : caniventer >x : gabriellae.amicus } export class veraecrucis extends trivirgatus.mixtus { @@ -88,8 +88,8 @@ module rionegrensis { >quasiater : any >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : veraecrucis +>this : veraecrucis >x : panamensis.setulosus> vancouverensis() : imperfecta.ciliolabrum { var x : imperfecta.ciliolabrum; () => { var y = this; }; return x; } @@ -102,8 +102,8 @@ module rionegrensis { >argurus : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : veraecrucis +>this : veraecrucis >x : imperfecta.ciliolabrum africana() : argurus.gilbertii, sagitta.cinereus> { var x : argurus.gilbertii, sagitta.cinereus>; () => { var y = this; }; return x; } @@ -124,8 +124,8 @@ module rionegrensis { >lavali : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : veraecrucis +>this : veraecrucis >x : argurus.gilbertii, sagitta.cinereus> palliolata() : Lanthanum.jugularis { var x : Lanthanum.jugularis; () => { var y = this; }; return x; } @@ -134,8 +134,8 @@ module rionegrensis { >x : Lanthanum.jugularis >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : veraecrucis +>this : veraecrucis >x : Lanthanum.jugularis nivicola() : samarensis.pallidus { var x : samarensis.pallidus; () => { var y = this; }; return x; } @@ -144,8 +144,8 @@ module rionegrensis { >x : samarensis.pallidus >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : veraecrucis +>this : veraecrucis >x : samarensis.pallidus } } @@ -164,8 +164,8 @@ module julianae { >x : argurus.germaini >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nudicaudus +>this : nudicaudus >x : argurus.germaini maxwellii() : ruatanica.Praseodymium { var x : ruatanica.Praseodymium; () => { var y = this; }; return x; } @@ -178,8 +178,8 @@ module julianae { >Lanthanum : any >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nudicaudus +>this : nudicaudus >x : ruatanica.Praseodymium endoi() : panglima.abidi { var x : panglima.abidi; () => { var y = this; }; return x; } @@ -192,8 +192,8 @@ module julianae { >dogramacii : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nudicaudus +>this : nudicaudus >x : panglima.abidi venezuelae() : howi.marcanoi { var x : howi.marcanoi; () => { var y = this; }; return x; } @@ -202,8 +202,8 @@ module julianae { >x : howi.marcanoi >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nudicaudus +>this : nudicaudus >x : howi.marcanoi zamicrus() : rionegrensis.caniventer { var x : rionegrensis.caniventer; () => { var y = this; }; return x; } @@ -212,8 +212,8 @@ module julianae { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nudicaudus +>this : nudicaudus >x : rionegrensis.caniventer } export class galapagoensis { @@ -229,8 +229,8 @@ module julianae { >macrorhinos : any >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : galapagoensis +>this : galapagoensis >x : panglima.amphibius rueppellii() : ruatanica.americanus { var x : ruatanica.americanus; () => { var y = this; }; return x; } @@ -239,8 +239,8 @@ module julianae { >x : ruatanica.americanus >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : galapagoensis +>this : galapagoensis >x : ruatanica.americanus peregusna() : dogramacii.kaiseri { var x : dogramacii.kaiseri; () => { var y = this; }; return x; } @@ -249,8 +249,8 @@ module julianae { >x : dogramacii.kaiseri >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : galapagoensis +>this : galapagoensis >x : dogramacii.kaiseri gliroides() : howi.coludo { var x : howi.coludo; () => { var y = this; }; return x; } @@ -263,8 +263,8 @@ module julianae { >howi : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : galapagoensis +>this : galapagoensis >x : howi.coludo banakrisi() : macrorhinos.daphaenodon { var x : macrorhinos.daphaenodon; () => { var y = this; }; return x; } @@ -273,8 +273,8 @@ module julianae { >x : macrorhinos.daphaenodon >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : galapagoensis +>this : galapagoensis >x : macrorhinos.daphaenodon rozendaali() : lutreolus.foina { var x : lutreolus.foina; () => { var y = this; }; return x; } @@ -283,8 +283,8 @@ module julianae { >x : lutreolus.foina >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : galapagoensis +>this : galapagoensis >x : lutreolus.foina stuhlmanni() : panamensis.linulus { var x : panamensis.linulus; () => { var y = this; }; return x; } @@ -297,8 +297,8 @@ module julianae { >caurinus : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : galapagoensis +>this : galapagoensis >x : panamensis.linulus } export class albidens { @@ -318,16 +318,16 @@ module julianae { >Lanthanum : any >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : albidens +>this : albidens >x : samarensis.fuscus> Astatine() : steerii { var x : steerii; () => { var y = this; }; return x; } >Astatine : () => steerii >x : steerii >() => { var y = this; } : () => void ->y : this ->this : this +>y : albidens +>this : albidens >x : steerii vincenti() : argurus.dauricus { var x : argurus.dauricus; () => { var y = this; }; return x; } @@ -340,8 +340,8 @@ module julianae { >macrorhinos : any >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : albidens +>this : albidens >x : argurus.dauricus hirta() : Lanthanum.jugularis { var x : Lanthanum.jugularis; () => { var y = this; }; return x; } @@ -350,16 +350,16 @@ module julianae { >x : Lanthanum.jugularis >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : albidens +>this : albidens >x : Lanthanum.jugularis virginianus() : durangae { var x : durangae; () => { var y = this; }; return x; } >virginianus : () => durangae >x : durangae >() => { var y = this; } : () => void ->y : this ->this : this +>y : albidens +>this : albidens >x : durangae macrophyllum() : howi.marcanoi { var x : howi.marcanoi; () => { var y = this; }; return x; } @@ -368,8 +368,8 @@ module julianae { >x : howi.marcanoi >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : albidens +>this : albidens >x : howi.marcanoi porcellus() : ruatanica.americanus { var x : ruatanica.americanus; () => { var y = this; }; return x; } @@ -378,8 +378,8 @@ module julianae { >x : ruatanica.americanus >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : albidens +>this : albidens >x : ruatanica.americanus } export class oralis extends caurinus.psilurus { @@ -394,8 +394,8 @@ module julianae { >x : caurinus.psilurus >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : caurinus.psilurus porteri() : lavali.thaeleri { var x : lavali.thaeleri; () => { var y = this; }; return x; } @@ -404,8 +404,8 @@ module julianae { >x : lavali.thaeleri >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : lavali.thaeleri bindi() : caurinus.mahaganus> { var x : caurinus.mahaganus>; () => { var y = this; }; return x; } @@ -422,8 +422,8 @@ module julianae { >macrorhinos : any >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : caurinus.mahaganus> puda() : sagitta.stolzmanni { var x : sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -432,8 +432,8 @@ module julianae { >x : sagitta.stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : sagitta.stolzmanni mindorensis() : trivirgatus.falconeri { var x : trivirgatus.falconeri; () => { var y = this; }; return x; } @@ -442,8 +442,8 @@ module julianae { >x : trivirgatus.falconeri >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : trivirgatus.falconeri ignitus() : petrophilus.rosalia, lavali.wilsoni> { var x : petrophilus.rosalia, lavali.wilsoni>; () => { var y = this; }; return x; } @@ -458,16 +458,16 @@ module julianae { >gabriellae : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : petrophilus.rosalia, lavali.wilsoni> rufus() : nudicaudus { var x : nudicaudus; () => { var y = this; }; return x; } >rufus : () => nudicaudus >x : nudicaudus >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : nudicaudus monax() : imperfecta.subspinosus { var x : imperfecta.subspinosus; () => { var y = this; }; return x; } @@ -476,8 +476,8 @@ module julianae { >x : imperfecta.subspinosus >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : imperfecta.subspinosus unalascensis() : minutus.inez, gabriellae.echinatus>, dogramacii.aurata> { var x : minutus.inez, gabriellae.echinatus>, dogramacii.aurata>; () => { var y = this; }; return x; } @@ -498,8 +498,8 @@ module julianae { >gabriellae : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : minutus.inez, gabriellae.echinatus>, dogramacii.aurata> wuchihensis() : howi.angulatus, petrophilus.minutilla> { var x : howi.angulatus, petrophilus.minutilla>; () => { var y = this; }; return x; } @@ -516,8 +516,8 @@ module julianae { >minutus : any >petrophilus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : howi.angulatus, petrophilus.minutilla> leucippe() : lavali.otion { var x : lavali.otion; () => { var y = this; }; return x; } @@ -526,8 +526,8 @@ module julianae { >x : lavali.otion >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : lavali.otion ordii() : daubentonii.arboreus { var x : daubentonii.arboreus; () => { var y = this; }; return x; } @@ -540,8 +540,8 @@ module julianae { >argurus : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : daubentonii.arboreus eisentrauti() : rendalli.zuluensis { var x : rendalli.zuluensis; () => { var y = this; }; return x; } @@ -550,8 +550,8 @@ module julianae { >x : rendalli.zuluensis >rendalli : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oralis +>this : oralis >x : rendalli.zuluensis } export class sumatrana extends Lanthanum.jugularis { @@ -570,8 +570,8 @@ module julianae { >dammermani : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sumatrana +>this : sumatrana >x : Lanthanum.suillus geata() : ruatanica.hector { var x : ruatanica.hector; () => { var y = this; }; return x; } @@ -582,8 +582,8 @@ module julianae { >ruatanica : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sumatrana +>this : sumatrana >x : ruatanica.hector awashensis() : petrophilus.minutilla { var x : petrophilus.minutilla; () => { var y = this; }; return x; } @@ -592,8 +592,8 @@ module julianae { >x : petrophilus.minutilla >petrophilus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sumatrana +>this : sumatrana >x : petrophilus.minutilla sturdeei() : lutreolus.cor { var x : lutreolus.cor; () => { var y = this; }; return x; } @@ -604,8 +604,8 @@ module julianae { >lutreolus : any >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sumatrana +>this : sumatrana >x : lutreolus.cor pachyurus() : howi.angulatus> { var x : howi.angulatus>; () => { var y = this; }; return x; } @@ -620,8 +620,8 @@ module julianae { >lavali : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sumatrana +>this : sumatrana >x : howi.angulatus> lyelli() : provocax.melanoleuca { var x : provocax.melanoleuca; () => { var y = this; }; return x; } @@ -630,8 +630,8 @@ module julianae { >x : provocax.melanoleuca >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sumatrana +>this : sumatrana >x : provocax.melanoleuca neohibernicus() : dammermani.siberu { var x : dammermani.siberu; () => { var y = this; }; return x; } @@ -644,8 +644,8 @@ module julianae { >lutreolus : any >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sumatrana +>this : sumatrana >x : dammermani.siberu } export class gerbillus { @@ -661,8 +661,8 @@ module julianae { >dogramacii : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gerbillus +>this : gerbillus >x : sagitta.sicarius tristrami() : petrophilus.minutilla { var x : petrophilus.minutilla; () => { var y = this; }; return x; } @@ -671,8 +671,8 @@ module julianae { >x : petrophilus.minutilla >petrophilus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gerbillus +>this : gerbillus >x : petrophilus.minutilla swarthi() : lutreolus.foina { var x : lutreolus.foina; () => { var y = this; }; return x; } @@ -681,8 +681,8 @@ module julianae { >x : lutreolus.foina >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gerbillus +>this : gerbillus >x : lutreolus.foina horsfieldii() : trivirgatus.falconeri { var x : trivirgatus.falconeri; () => { var y = this; }; return x; } @@ -691,8 +691,8 @@ module julianae { >x : trivirgatus.falconeri >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gerbillus +>this : gerbillus >x : trivirgatus.falconeri diazi() : imperfecta.lasiurus { var x : imperfecta.lasiurus; () => { var y = this; }; return x; } @@ -705,8 +705,8 @@ module julianae { >lutreolus : any >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gerbillus +>this : gerbillus >x : imperfecta.lasiurus rennelli() : argurus.luctuosa { var x : argurus.luctuosa; () => { var y = this; }; return x; } @@ -715,8 +715,8 @@ module julianae { >x : argurus.luctuosa >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gerbillus +>this : gerbillus >x : argurus.luctuosa maulinus() : lavali.lepturus { var x : lavali.lepturus; () => { var y = this; }; return x; } @@ -725,8 +725,8 @@ module julianae { >x : lavali.lepturus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gerbillus +>this : gerbillus >x : lavali.lepturus muscina() : daubentonii.arboreus { var x : daubentonii.arboreus; () => { var y = this; }; return x; } @@ -739,8 +739,8 @@ module julianae { >petrophilus : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gerbillus +>this : gerbillus >x : daubentonii.arboreus pelengensis() : sagitta.leptoceros { var x : sagitta.leptoceros; () => { var y = this; }; return x; } @@ -753,8 +753,8 @@ module julianae { >caurinus : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gerbillus +>this : gerbillus >x : sagitta.leptoceros abramus() : lavali.thaeleri { var x : lavali.thaeleri; () => { var y = this; }; return x; } @@ -763,8 +763,8 @@ module julianae { >x : lavali.thaeleri >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gerbillus +>this : gerbillus >x : lavali.thaeleri reevesi() : provocax.melanoleuca { var x : provocax.melanoleuca; () => { var y = this; }; return x; } @@ -773,8 +773,8 @@ module julianae { >x : provocax.melanoleuca >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gerbillus +>this : gerbillus >x : provocax.melanoleuca } export class acariensis { @@ -786,8 +786,8 @@ module julianae { >x : lavali.lepturus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : lavali.lepturus minous() : argurus.dauricus { var x : argurus.dauricus; () => { var y = this; }; return x; } @@ -800,8 +800,8 @@ module julianae { >quasiater : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : argurus.dauricus cinereiventer() : panamensis.setulosus { var x : panamensis.setulosus; () => { var y = this; }; return x; } @@ -814,8 +814,8 @@ module julianae { >sagitta : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : panamensis.setulosus longicaudatus() : macrorhinos.marmosurus> { var x : macrorhinos.marmosurus>; () => { var y = this; }; return x; } @@ -830,8 +830,8 @@ module julianae { >caurinus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : macrorhinos.marmosurus> baeodon() : argurus.netscheri, argurus.luctuosa> { var x : argurus.netscheri, argurus.luctuosa>; () => { var y = this; }; return x; } @@ -848,8 +848,8 @@ module julianae { >samarensis : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : argurus.netscheri, argurus.luctuosa> soricoides() : argurus.luctuosa { var x : argurus.luctuosa; () => { var y = this; }; return x; } @@ -858,8 +858,8 @@ module julianae { >x : argurus.luctuosa >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : argurus.luctuosa datae() : daubentonii.arboreus> { var x : daubentonii.arboreus>; () => { var y = this; }; return x; } @@ -876,8 +876,8 @@ module julianae { >macrorhinos : any >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : daubentonii.arboreus> spixii() : imperfecta.subspinosus { var x : imperfecta.subspinosus; () => { var y = this; }; return x; } @@ -886,8 +886,8 @@ module julianae { >x : imperfecta.subspinosus >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : imperfecta.subspinosus anakuma() : lavali.wilsoni { var x : lavali.wilsoni; () => { var y = this; }; return x; } @@ -896,8 +896,8 @@ module julianae { >x : lavali.wilsoni >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : lavali.wilsoni kihaulei() : panglima.amphibius { var x : panglima.amphibius; () => { var y = this; }; return x; } @@ -910,8 +910,8 @@ module julianae { >trivirgatus : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : panglima.amphibius gymnura() : quasiater.carolinensis { var x : quasiater.carolinensis; () => { var y = this; }; return x; } @@ -920,8 +920,8 @@ module julianae { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : quasiater.carolinensis olchonensis() : rendalli.crenulata { var x : rendalli.crenulata; () => { var y = this; }; return x; } @@ -934,8 +934,8 @@ module julianae { >trivirgatus : any >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : acariensis +>this : acariensis >x : rendalli.crenulata } export class durangae extends dogramacii.aurata { @@ -954,8 +954,8 @@ module julianae { >lutreolus : any >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : durangae +>this : durangae >x : panamensis.setulosus Flerovium() : howi.angulatus { var x : howi.angulatus; () => { var y = this; }; return x; } @@ -968,8 +968,8 @@ module julianae { >petrophilus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : durangae +>this : durangae >x : howi.angulatus phrudus() : sagitta.stolzmanni { var x : sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -978,8 +978,8 @@ module julianae { >x : sagitta.stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : durangae +>this : durangae >x : sagitta.stolzmanni } } @@ -995,8 +995,8 @@ module ruatanica { >x : julianae.steerii >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : hector +>this : hector >x : julianae.steerii eurycerus() : panamensis.linulus, lavali.wilsoni> { var x : panamensis.linulus, lavali.wilsoni>; () => { var y = this; }; return x; } @@ -1013,8 +1013,8 @@ module ruatanica { >dammermani : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : hector +>this : hector >x : panamensis.linulus, lavali.wilsoni> } } @@ -1030,8 +1030,8 @@ module Lanthanum { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : suillus +>this : suillus >x : quasiater.carolinensis tumbalensis() : caurinus.megaphyllus { var x : caurinus.megaphyllus; () => { var y = this; }; return x; } @@ -1040,8 +1040,8 @@ module Lanthanum { >x : caurinus.megaphyllus >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : suillus +>this : suillus >x : caurinus.megaphyllus anatolicus() : julianae.steerii { var x : julianae.steerii; () => { var y = this; }; return x; } @@ -1050,8 +1050,8 @@ module Lanthanum { >x : julianae.steerii >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : suillus +>this : suillus >x : julianae.steerii } export class nitidus extends argurus.gilbertii { @@ -1068,8 +1068,8 @@ module Lanthanum { >x : quasiater.bobrinskoi >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nitidus +>this : nitidus >x : quasiater.bobrinskoi negligens() : minutus.inez { var x : minutus.inez; () => { var y = this; }; return x; } @@ -1082,8 +1082,8 @@ module Lanthanum { >lavali : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nitidus +>this : nitidus >x : minutus.inez lewisi() : julianae.oralis { var x : julianae.oralis; () => { var y = this; }; return x; } @@ -1096,8 +1096,8 @@ module Lanthanum { >lavali : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nitidus +>this : nitidus >x : julianae.oralis arge() : chrysaeolus.sarasinorum { var x : chrysaeolus.sarasinorum; () => { var y = this; }; return x; } @@ -1110,8 +1110,8 @@ module Lanthanum { >caurinus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nitidus +>this : nitidus >x : chrysaeolus.sarasinorum dominicensis() : dammermani.melanops { var x : dammermani.melanops; () => { var y = this; }; return x; } @@ -1120,8 +1120,8 @@ module Lanthanum { >x : dammermani.melanops >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nitidus +>this : nitidus >x : dammermani.melanops taurus() : macrorhinos.konganensis { var x : macrorhinos.konganensis; () => { var y = this; }; return x; } @@ -1130,8 +1130,8 @@ module Lanthanum { >x : macrorhinos.konganensis >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nitidus +>this : nitidus >x : macrorhinos.konganensis tonganus() : argurus.netscheri { var x : argurus.netscheri; () => { var y = this; }; return x; } @@ -1144,8 +1144,8 @@ module Lanthanum { >dogramacii : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nitidus +>this : nitidus >x : argurus.netscheri silvatica() : rendalli.moojeni { var x : rendalli.moojeni; () => { var y = this; }; return x; } @@ -1158,8 +1158,8 @@ module Lanthanum { >dogramacii : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nitidus +>this : nitidus >x : rendalli.moojeni midas() : lavali.xanthognathus { var x : lavali.xanthognathus; () => { var y = this; }; return x; } @@ -1168,8 +1168,8 @@ module Lanthanum { >x : lavali.xanthognathus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nitidus +>this : nitidus >x : lavali.xanthognathus bicornis() : dogramacii.kaiseri { var x : dogramacii.kaiseri; () => { var y = this; }; return x; } @@ -1178,8 +1178,8 @@ module Lanthanum { >x : dogramacii.kaiseri >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nitidus +>this : nitidus >x : dogramacii.kaiseri } export class megalonyx extends caurinus.johorensis { @@ -1196,8 +1196,8 @@ module Lanthanum { >x : macrorhinos.konganensis >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megalonyx +>this : megalonyx >x : macrorhinos.konganensis melanogaster() : rionegrensis.veraecrucis { var x : rionegrensis.veraecrucis; () => { var y = this; }; return x; } @@ -1210,8 +1210,8 @@ module Lanthanum { >trivirgatus : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megalonyx +>this : megalonyx >x : rionegrensis.veraecrucis elaphus() : nitidus { var x : nitidus; () => { var y = this; }; return x; } @@ -1222,8 +1222,8 @@ module Lanthanum { >petrophilus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megalonyx +>this : megalonyx >x : nitidus elater() : lavali.lepturus { var x : lavali.lepturus; () => { var y = this; }; return x; } @@ -1232,8 +1232,8 @@ module Lanthanum { >x : lavali.lepturus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megalonyx +>this : megalonyx >x : lavali.lepturus ourebi() : provocax.melanoleuca { var x : provocax.melanoleuca; () => { var y = this; }; return x; } @@ -1242,8 +1242,8 @@ module Lanthanum { >x : provocax.melanoleuca >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megalonyx +>this : megalonyx >x : provocax.melanoleuca caraccioli() : imperfecta.ciliolabrum> { var x : imperfecta.ciliolabrum>; () => { var y = this; }; return x; } @@ -1260,8 +1260,8 @@ module Lanthanum { >lavali : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megalonyx +>this : megalonyx >x : imperfecta.ciliolabrum> parva() : gabriellae.echinatus { var x : gabriellae.echinatus; () => { var y = this; }; return x; } @@ -1270,8 +1270,8 @@ module Lanthanum { >x : gabriellae.echinatus >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megalonyx +>this : megalonyx >x : gabriellae.echinatus albipes() : quasiater.wattsi { var x : quasiater.wattsi; () => { var y = this; }; return x; } @@ -1282,8 +1282,8 @@ module Lanthanum { >quasiater : any >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megalonyx +>this : megalonyx >x : quasiater.wattsi } export class jugularis { @@ -1299,8 +1299,8 @@ module Lanthanum { >argurus : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : petrophilus.sodyi revoili() : lavali.wilsoni { var x : lavali.wilsoni; () => { var y = this; }; return x; } @@ -1309,8 +1309,8 @@ module Lanthanum { >x : lavali.wilsoni >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : lavali.wilsoni macrobullatus() : macrorhinos.daphaenodon { var x : macrorhinos.daphaenodon; () => { var y = this; }; return x; } @@ -1319,8 +1319,8 @@ module Lanthanum { >x : macrorhinos.daphaenodon >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : macrorhinos.daphaenodon compactus() : sagitta.stolzmanni { var x : sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -1329,8 +1329,8 @@ module Lanthanum { >x : sagitta.stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : sagitta.stolzmanni talpinus() : nitidus { var x : nitidus; () => { var y = this; }; return x; } @@ -1341,8 +1341,8 @@ module Lanthanum { >ruatanica : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : nitidus stramineus() : gabriellae.amicus { var x : gabriellae.amicus; () => { var y = this; }; return x; } @@ -1351,8 +1351,8 @@ module Lanthanum { >x : gabriellae.amicus >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : gabriellae.amicus dartmouthi() : trivirgatus.mixtus { var x : trivirgatus.mixtus; () => { var y = this; }; return x; } @@ -1365,8 +1365,8 @@ module Lanthanum { >macrorhinos : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : trivirgatus.mixtus ogilbyi() : argurus.dauricus { var x : argurus.dauricus; () => { var y = this; }; return x; } @@ -1379,8 +1379,8 @@ module Lanthanum { >argurus : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : argurus.dauricus incomtus() : daubentonii.nesiotes { var x : daubentonii.nesiotes; () => { var y = this; }; return x; } @@ -1393,8 +1393,8 @@ module Lanthanum { >julianae : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : daubentonii.nesiotes surdaster() : ruatanica.Praseodymium { var x : ruatanica.Praseodymium; () => { var y = this; }; return x; } @@ -1407,8 +1407,8 @@ module Lanthanum { >argurus : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : ruatanica.Praseodymium melanorhinus() : samarensis.pelurus { var x : samarensis.pelurus; () => { var y = this; }; return x; } @@ -1421,8 +1421,8 @@ module Lanthanum { >dammermani : any >rendalli : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : samarensis.pelurus picticaudata() : minutus.inez, dogramacii.kaiseri> { var x : minutus.inez, dogramacii.kaiseri>; () => { var y = this; }; return x; } @@ -1439,8 +1439,8 @@ module Lanthanum { >lavali : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : minutus.inez, dogramacii.kaiseri> pomona() : julianae.steerii { var x : julianae.steerii; () => { var y = this; }; return x; } @@ -1449,8 +1449,8 @@ module Lanthanum { >x : julianae.steerii >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : julianae.steerii ileile() : quasiater.carolinensis { var x : quasiater.carolinensis; () => { var y = this; }; return x; } @@ -1459,8 +1459,8 @@ module Lanthanum { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : jugularis +>this : jugularis >x : quasiater.carolinensis } } @@ -1483,8 +1483,8 @@ module rendalli { >Lanthanum : any >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : argurus.wetmorei keyensis() : quasiater.wattsi { var x : quasiater.wattsi; () => { var y = this; }; return x; } @@ -1497,8 +1497,8 @@ module rendalli { >quasiater : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : quasiater.wattsi occasius() : argurus.gilbertii { var x : argurus.gilbertii; () => { var y = this; }; return x; } @@ -1511,8 +1511,8 @@ module rendalli { >caurinus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : argurus.gilbertii damarensis() : julianae.galapagoensis { var x : julianae.galapagoensis; () => { var y = this; }; return x; } @@ -1521,8 +1521,8 @@ module rendalli { >x : julianae.galapagoensis >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : julianae.galapagoensis Neptunium() : panglima.abidi { var x : panglima.abidi; () => { var y = this; }; return x; } @@ -1535,8 +1535,8 @@ module rendalli { >dogramacii : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : panglima.abidi griseoflavus() : ruatanica.americanus { var x : ruatanica.americanus; () => { var y = this; }; return x; } @@ -1545,8 +1545,8 @@ module rendalli { >x : ruatanica.americanus >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : ruatanica.americanus thar() : argurus.oreas { var x : argurus.oreas; () => { var y = this; }; return x; } @@ -1555,8 +1555,8 @@ module rendalli { >x : argurus.oreas >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : argurus.oreas alborufus() : panamensis.linulus { var x : panamensis.linulus; () => { var y = this; }; return x; } @@ -1569,8 +1569,8 @@ module rendalli { >lavali : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : panamensis.linulus fusicaudus() : sagitta.stolzmanni { var x : sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -1579,8 +1579,8 @@ module rendalli { >x : sagitta.stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : sagitta.stolzmanni gordonorum() : howi.angulatus { var x : howi.angulatus; () => { var y = this; }; return x; } @@ -1593,8 +1593,8 @@ module rendalli { >ruatanica : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : howi.angulatus ruber() : dammermani.siberu { var x : dammermani.siberu; () => { var y = this; }; return x; } @@ -1607,8 +1607,8 @@ module rendalli { >lutreolus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : dammermani.siberu desmarestianus() : julianae.steerii { var x : julianae.steerii; () => { var y = this; }; return x; } @@ -1617,8 +1617,8 @@ module rendalli { >x : julianae.steerii >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : julianae.steerii lutillus() : nigra.dolichurus { var x : nigra.dolichurus; () => { var y = this; }; return x; } @@ -1631,8 +1631,8 @@ module rendalli { >howi : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : nigra.dolichurus salocco() : argurus.peninsulae { var x : argurus.peninsulae; () => { var y = this; }; return x; } @@ -1641,8 +1641,8 @@ module rendalli { >x : argurus.peninsulae >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : zuluensis +>this : zuluensis >x : argurus.peninsulae } export class moojeni { @@ -1654,8 +1654,8 @@ module rendalli { >x : lavali.otion >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : moojeni +>this : moojeni >x : lavali.otion montosa() : imperfecta.ciliolabrum { var x : imperfecta.ciliolabrum; () => { var y = this; }; return x; } @@ -1668,8 +1668,8 @@ module rendalli { >Lanthanum : any >petrophilus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : moojeni +>this : moojeni >x : imperfecta.ciliolabrum miletus() : julianae.sumatrana { var x : julianae.sumatrana; () => { var y = this; }; return x; } @@ -1678,16 +1678,16 @@ module rendalli { >x : julianae.sumatrana >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : moojeni +>this : moojeni >x : julianae.sumatrana heaneyi() : zuluensis { var x : zuluensis; () => { var y = this; }; return x; } >heaneyi : () => zuluensis >x : zuluensis >() => { var y = this; } : () => void ->y : this ->this : this +>y : moojeni +>this : moojeni >x : zuluensis marchei() : panglima.amphibius> { var x : panglima.amphibius>; () => { var y = this; }; return x; } @@ -1704,8 +1704,8 @@ module rendalli { >julianae : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : moojeni +>this : moojeni >x : panglima.amphibius> budini() : julianae.durangae { var x : julianae.durangae; () => { var y = this; }; return x; } @@ -1714,8 +1714,8 @@ module rendalli { >x : julianae.durangae >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : moojeni +>this : moojeni >x : julianae.durangae maggietaylorae() : trivirgatus.mixtus, imperfecta.subspinosus>, sagitta.stolzmanni> { var x : trivirgatus.mixtus, imperfecta.subspinosus>, sagitta.stolzmanni>; () => { var y = this; }; return x; } @@ -1736,8 +1736,8 @@ module rendalli { >imperfecta : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : moojeni +>this : moojeni >x : trivirgatus.mixtus, imperfecta.subspinosus>, sagitta.stolzmanni> poliocephalus() : julianae.gerbillus { var x : julianae.gerbillus; () => { var y = this; }; return x; } @@ -1750,8 +1750,8 @@ module rendalli { >julianae : any >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : moojeni +>this : moojeni >x : julianae.gerbillus zibethicus() : minutus.inez { var x : minutus.inez; () => { var y = this; }; return x; } @@ -1764,8 +1764,8 @@ module rendalli { >sagitta : any >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : moojeni +>this : moojeni >x : minutus.inez biacensis() : howi.coludo { var x : howi.coludo; () => { var y = this; }; return x; } @@ -1778,8 +1778,8 @@ module rendalli { >quasiater : any >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : moojeni +>this : moojeni >x : howi.coludo } export class crenulata extends trivirgatus.falconeri { @@ -1798,8 +1798,8 @@ module rendalli { >howi : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : crenulata +>this : crenulata >x : howi.coludo maritimus() : ruatanica.americanus { var x : ruatanica.americanus; () => { var y = this; }; return x; } @@ -1808,8 +1808,8 @@ module rendalli { >x : ruatanica.americanus >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : crenulata +>this : crenulata >x : ruatanica.americanus edax() : lutreolus.cor>, rionegrensis.caniventer> { var x : lutreolus.cor>, rionegrensis.caniventer>; () => { var y = this; }; return x; } @@ -1830,8 +1830,8 @@ module rendalli { >petrophilus : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : crenulata +>this : crenulata >x : lutreolus.cor>, rionegrensis.caniventer> } } @@ -1847,8 +1847,8 @@ module trivirgatus { >x : dogramacii.kaiseri >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : tumidifrons +>this : tumidifrons >x : dogramacii.kaiseri vestitus() : lavali.xanthognathus { var x : lavali.xanthognathus; () => { var y = this; }; return x; } @@ -1857,8 +1857,8 @@ module trivirgatus { >x : lavali.xanthognathus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : tumidifrons +>this : tumidifrons >x : lavali.xanthognathus aequatorius() : rionegrensis.caniventer { var x : rionegrensis.caniventer; () => { var y = this; }; return x; } @@ -1867,16 +1867,16 @@ module trivirgatus { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : tumidifrons +>this : tumidifrons >x : rionegrensis.caniventer scherman() : oconnelli { var x : oconnelli; () => { var y = this; }; return x; } >scherman : () => oconnelli >x : oconnelli >() => { var y = this; } : () => void ->y : this ->this : this +>y : tumidifrons +>this : tumidifrons >x : oconnelli improvisum() : argurus.peninsulae { var x : argurus.peninsulae; () => { var y = this; }; return x; } @@ -1885,8 +1885,8 @@ module trivirgatus { >x : argurus.peninsulae >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : tumidifrons +>this : tumidifrons >x : argurus.peninsulae cervinipes() : panglima.abidi { var x : panglima.abidi; () => { var y = this; }; return x; } @@ -1899,8 +1899,8 @@ module trivirgatus { >lavali : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : tumidifrons +>this : tumidifrons >x : panglima.abidi audax() : dogramacii.robustulus { var x : dogramacii.robustulus; () => { var y = this; }; return x; } @@ -1909,8 +1909,8 @@ module trivirgatus { >x : dogramacii.robustulus >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : tumidifrons +>this : tumidifrons >x : dogramacii.robustulus vallinus() : sagitta.sicarius { var x : sagitta.sicarius; () => { var y = this; }; return x; } @@ -1923,8 +1923,8 @@ module trivirgatus { >lavali : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : tumidifrons +>this : tumidifrons >x : sagitta.sicarius } export class mixtus extends argurus.pygmaea> { @@ -1943,8 +1943,8 @@ module trivirgatus { >x : dogramacii.aurata >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mixtus +>this : mixtus >x : dogramacii.aurata bryophilus() : macrorhinos.marmosurus>> { var x : macrorhinos.marmosurus>>; () => { var y = this; }; return x; } @@ -1965,8 +1965,8 @@ module trivirgatus { >caurinus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mixtus +>this : mixtus >x : macrorhinos.marmosurus>> liechtensteini() : rendalli.zuluensis { var x : rendalli.zuluensis; () => { var y = this; }; return x; } @@ -1975,8 +1975,8 @@ module trivirgatus { >x : rendalli.zuluensis >rendalli : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mixtus +>this : mixtus >x : rendalli.zuluensis crawfordi() : howi.coludo> { var x : howi.coludo>; () => { var y = this; }; return x; } @@ -1993,8 +1993,8 @@ module trivirgatus { >lavali : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mixtus +>this : mixtus >x : howi.coludo> hypsibia() : lavali.thaeleri { var x : lavali.thaeleri; () => { var y = this; }; return x; } @@ -2003,8 +2003,8 @@ module trivirgatus { >x : lavali.thaeleri >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mixtus +>this : mixtus >x : lavali.thaeleri matacus() : panglima.fundatus, lavali.beisa>, dammermani.melanops> { var x : panglima.fundatus, lavali.beisa>, dammermani.melanops>; () => { var y = this; }; return x; } @@ -2023,8 +2023,8 @@ module trivirgatus { >lavali : any >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mixtus +>this : mixtus >x : panglima.fundatus, lavali.beisa>, dammermani.melanops> demidoff() : caurinus.johorensis { var x : caurinus.johorensis; () => { var y = this; }; return x; } @@ -2037,8 +2037,8 @@ module trivirgatus { >julianae : any >rendalli : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mixtus +>this : mixtus >x : caurinus.johorensis } export class lotor { @@ -2050,8 +2050,8 @@ module trivirgatus { >x : samarensis.pallidus >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : lotor +>this : lotor >x : samarensis.pallidus pullata() : rionegrensis.veraecrucis { var x : rionegrensis.veraecrucis; () => { var y = this; }; return x; } @@ -2064,8 +2064,8 @@ module trivirgatus { >quasiater : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : lotor +>this : lotor >x : rionegrensis.veraecrucis } export class falconeri { @@ -2093,8 +2093,8 @@ module trivirgatus { >julianae : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : falconeri +>this : falconeri >x : rendalli.moojeni>, daubentonii.arboreus> gouldi() : nigra.dolichurus>, patas.uralensis> { var x : nigra.dolichurus>, patas.uralensis>; () => { var y = this; }; return x; } @@ -2115,8 +2115,8 @@ module trivirgatus { >howi : any >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : falconeri +>this : falconeri >x : nigra.dolichurus>, patas.uralensis> fuscicollis() : samarensis.pelurus> { var x : samarensis.pelurus>; () => { var y = this; }; return x; } @@ -2133,8 +2133,8 @@ module trivirgatus { >ruatanica : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : falconeri +>this : falconeri >x : samarensis.pelurus> martiensseni() : sagitta.cinereus>, dogramacii.koepckeae> { var x : sagitta.cinereus>, dogramacii.koepckeae>; () => { var y = this; }; return x; } @@ -2155,8 +2155,8 @@ module trivirgatus { >caurinus : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : falconeri +>this : falconeri >x : sagitta.cinereus>, dogramacii.koepckeae> gaoligongensis() : dogramacii.koepckeae { var x : dogramacii.koepckeae; () => { var y = this; }; return x; } @@ -2165,8 +2165,8 @@ module trivirgatus { >x : dogramacii.koepckeae >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : falconeri +>this : falconeri >x : dogramacii.koepckeae shawi() : minutus.inez> { var x : minutus.inez>; () => { var y = this; }; return x; } @@ -2183,8 +2183,8 @@ module trivirgatus { >lavali : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : falconeri +>this : falconeri >x : minutus.inez> gmelini() : rionegrensis.caniventer { var x : rionegrensis.caniventer; () => { var y = this; }; return x; } @@ -2193,8 +2193,8 @@ module trivirgatus { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : falconeri +>this : falconeri >x : rionegrensis.caniventer } export class oconnelli { @@ -2210,8 +2210,8 @@ module trivirgatus { >patas : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : nigra.thalia terrestris() : macrorhinos.konganensis { var x : macrorhinos.konganensis; () => { var y = this; }; return x; } @@ -2220,8 +2220,8 @@ module trivirgatus { >x : macrorhinos.konganensis >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : macrorhinos.konganensis chrysopus() : sagitta.sicarius> { var x : sagitta.sicarius>; () => { var y = this; }; return x; } @@ -2238,8 +2238,8 @@ module trivirgatus { >argurus : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : sagitta.sicarius> fuscomurina() : argurus.peninsulae { var x : argurus.peninsulae; () => { var y = this; }; return x; } @@ -2248,8 +2248,8 @@ module trivirgatus { >x : argurus.peninsulae >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : argurus.peninsulae hellwaldii() : nigra.gracilis, petrophilus.sodyi> { var x : nigra.gracilis, petrophilus.sodyi>; () => { var y = this; }; return x; } @@ -2270,8 +2270,8 @@ module trivirgatus { >argurus : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : nigra.gracilis, petrophilus.sodyi> aenea() : argurus.luctuosa { var x : argurus.luctuosa; () => { var y = this; }; return x; } @@ -2280,8 +2280,8 @@ module trivirgatus { >x : argurus.luctuosa >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : argurus.luctuosa perrini() : quasiater.bobrinskoi { var x : quasiater.bobrinskoi; () => { var y = this; }; return x; } @@ -2290,8 +2290,8 @@ module trivirgatus { >x : quasiater.bobrinskoi >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : quasiater.bobrinskoi entellus() : dammermani.melanops { var x : dammermani.melanops; () => { var y = this; }; return x; } @@ -2300,8 +2300,8 @@ module trivirgatus { >x : dammermani.melanops >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : dammermani.melanops krebsii() : rionegrensis.veraecrucis { var x : rionegrensis.veraecrucis; () => { var y = this; }; return x; } @@ -2314,8 +2314,8 @@ module trivirgatus { >rionegrensis : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : rionegrensis.veraecrucis cephalotes() : lutreolus.schlegeli { var x : lutreolus.schlegeli; () => { var y = this; }; return x; } @@ -2324,8 +2324,8 @@ module trivirgatus { >x : lutreolus.schlegeli >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : lutreolus.schlegeli molossinus() : daubentonii.nigricans> { var x : daubentonii.nigricans>; () => { var y = this; }; return x; } @@ -2342,8 +2342,8 @@ module trivirgatus { >julianae : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : daubentonii.nigricans> luisi() : dogramacii.robustulus { var x : dogramacii.robustulus; () => { var y = this; }; return x; } @@ -2352,8 +2352,8 @@ module trivirgatus { >x : dogramacii.robustulus >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : dogramacii.robustulus ceylonicus() : rionegrensis.caniventer { var x : rionegrensis.caniventer; () => { var y = this; }; return x; } @@ -2362,8 +2362,8 @@ module trivirgatus { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : rionegrensis.caniventer ralli() : lavali.xanthognathus { var x : lavali.xanthognathus; () => { var y = this; }; return x; } @@ -2372,8 +2372,8 @@ module trivirgatus { >x : lavali.xanthognathus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oconnelli +>this : oconnelli >x : lavali.xanthognathus } } @@ -2393,8 +2393,8 @@ module quasiater { >macrorhinos : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : bobrinskoi +>this : bobrinskoi >x : samarensis.cahirinus mulatta() : argurus.oreas { var x : argurus.oreas; () => { var y = this; }; return x; } @@ -2403,8 +2403,8 @@ module quasiater { >x : argurus.oreas >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : bobrinskoi +>this : bobrinskoi >x : argurus.oreas ansorgei() : rendalli.moojeni, gabriellae.echinatus> { var x : rendalli.moojeni, gabriellae.echinatus>; () => { var y = this; }; return x; } @@ -2421,8 +2421,8 @@ module quasiater { >caurinus : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : bobrinskoi +>this : bobrinskoi >x : rendalli.moojeni, gabriellae.echinatus> Copper() : argurus.netscheri { var x : argurus.netscheri; () => { var y = this; }; return x; } @@ -2435,8 +2435,8 @@ module quasiater { >quasiater : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : bobrinskoi +>this : bobrinskoi >x : argurus.netscheri } } @@ -2457,8 +2457,8 @@ module ruatanica { >x : macrorhinos.konganensis >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : americanus +>this : americanus >x : macrorhinos.konganensis mystacalis() : howi.angulatus { var x : howi.angulatus; () => { var y = this; }; return x; } @@ -2471,8 +2471,8 @@ module ruatanica { >quasiater : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : americanus +>this : americanus >x : howi.angulatus fardoulisi() : trivirgatus.oconnelli { var x : trivirgatus.oconnelli; () => { var y = this; }; return x; } @@ -2481,8 +2481,8 @@ module ruatanica { >x : trivirgatus.oconnelli >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : americanus +>this : americanus >x : trivirgatus.oconnelli tumidus() : gabriellae.amicus { var x : gabriellae.amicus; () => { var y = this; }; return x; } @@ -2491,8 +2491,8 @@ module ruatanica { >x : gabriellae.amicus >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : americanus +>this : americanus >x : gabriellae.amicus } } @@ -2515,8 +2515,8 @@ module lavali { >nigra : any >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : nigra.thalia lorentzii() : imperfecta.subspinosus { var x : imperfecta.subspinosus; () => { var y = this; }; return x; } @@ -2525,8 +2525,8 @@ module lavali { >x : imperfecta.subspinosus >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : imperfecta.subspinosus antisensis() : lutreolus.foina { var x : lutreolus.foina; () => { var y = this; }; return x; } @@ -2535,8 +2535,8 @@ module lavali { >x : lutreolus.foina >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : lutreolus.foina blossevillii() : dammermani.siberu { var x : dammermani.siberu; () => { var y = this; }; return x; } @@ -2549,8 +2549,8 @@ module lavali { >Lanthanum : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : dammermani.siberu bontanus() : rionegrensis.caniventer { var x : rionegrensis.caniventer; () => { var y = this; }; return x; } @@ -2559,8 +2559,8 @@ module lavali { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : rionegrensis.caniventer caligata() : argurus.oreas { var x : argurus.oreas; () => { var y = this; }; return x; } @@ -2569,8 +2569,8 @@ module lavali { >x : argurus.oreas >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : argurus.oreas franqueti() : panglima.amphibius, imperfecta.subspinosus> { var x : panglima.amphibius, imperfecta.subspinosus>; () => { var y = this; }; return x; } @@ -2587,8 +2587,8 @@ module lavali { >Lanthanum : any >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : panglima.amphibius, imperfecta.subspinosus> roberti() : julianae.acariensis { var x : julianae.acariensis; () => { var y = this; }; return x; } @@ -2597,8 +2597,8 @@ module lavali { >x : julianae.acariensis >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : julianae.acariensis degelidus() : chrysaeolus.sarasinorum { var x : chrysaeolus.sarasinorum; () => { var y = this; }; return x; } @@ -2611,8 +2611,8 @@ module lavali { >Lanthanum : any >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : chrysaeolus.sarasinorum amoenus() : quasiater.carolinensis { var x : quasiater.carolinensis; () => { var y = this; }; return x; } @@ -2621,8 +2621,8 @@ module lavali { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : quasiater.carolinensis kob() : trivirgatus.lotor { var x : trivirgatus.lotor; () => { var y = this; }; return x; } @@ -2633,8 +2633,8 @@ module lavali { >trivirgatus : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : trivirgatus.lotor csorbai() : caurinus.johorensis { var x : caurinus.johorensis; () => { var y = this; }; return x; } @@ -2647,8 +2647,8 @@ module lavali { >caurinus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : caurinus.johorensis dorsata() : gabriellae.echinatus { var x : gabriellae.echinatus; () => { var y = this; }; return x; } @@ -2657,8 +2657,8 @@ module lavali { >x : gabriellae.echinatus >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wilsoni +>this : wilsoni >x : gabriellae.echinatus } export class beisa { @@ -2678,8 +2678,8 @@ module lavali { >x : provocax.melanoleuca >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : provocax.melanoleuca dussumieri() : nigra.gracilis { var x : nigra.gracilis; () => { var y = this; }; return x; } @@ -2692,8 +2692,8 @@ module lavali { >julianae : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : nigra.gracilis osvaldoreigi() : julianae.albidens { var x : julianae.albidens; () => { var y = this; }; return x; } @@ -2706,8 +2706,8 @@ module lavali { >julianae : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : julianae.albidens grevyi() : samarensis.pallidus { var x : samarensis.pallidus; () => { var y = this; }; return x; } @@ -2716,16 +2716,16 @@ module lavali { >x : samarensis.pallidus >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : samarensis.pallidus hirtula() : lepturus { var x : lepturus; () => { var y = this; }; return x; } >hirtula : () => lepturus >x : lepturus >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : lepturus cristatus() : argurus.luctuosa { var x : argurus.luctuosa; () => { var y = this; }; return x; } @@ -2734,8 +2734,8 @@ module lavali { >x : argurus.luctuosa >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : argurus.luctuosa darlingtoni() : sagitta.leptoceros { var x : sagitta.leptoceros; () => { var y = this; }; return x; } @@ -2746,8 +2746,8 @@ module lavali { >sagitta : any >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : sagitta.leptoceros fontanierii() : panamensis.setulosus>, lutreolus.foina> { var x : panamensis.setulosus>, lutreolus.foina>; () => { var y = this; }; return x; } @@ -2766,8 +2766,8 @@ module lavali { >imperfecta : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : panamensis.setulosus>, lutreolus.foina> umbrosus() : howi.marcanoi { var x : howi.marcanoi; () => { var y = this; }; return x; } @@ -2776,8 +2776,8 @@ module lavali { >x : howi.marcanoi >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : howi.marcanoi chiriquinus() : imperfecta.lasiurus { var x : imperfecta.lasiurus; () => { var y = this; }; return x; } @@ -2790,8 +2790,8 @@ module lavali { >caurinus : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : imperfecta.lasiurus orarius() : lutreolus.schlegeli { var x : lutreolus.schlegeli; () => { var y = this; }; return x; } @@ -2800,8 +2800,8 @@ module lavali { >x : lutreolus.schlegeli >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : lutreolus.schlegeli ilaeus() : caurinus.mahaganus { var x : caurinus.mahaganus; () => { var y = this; }; return x; } @@ -2814,8 +2814,8 @@ module lavali { >julianae : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : caurinus.mahaganus musschenbroekii() : trivirgatus.falconeri { var x : trivirgatus.falconeri; () => { var y = this; }; return x; } @@ -2824,8 +2824,8 @@ module lavali { >x : trivirgatus.falconeri >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : otion +>this : otion >x : trivirgatus.falconeri } export class xanthognathus { @@ -2841,8 +2841,8 @@ module lavali { >imperfecta : any >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : daubentonii.nigricans albigena() : chrysaeolus.sarasinorum { var x : chrysaeolus.sarasinorum; () => { var y = this; }; return x; } @@ -2855,8 +2855,8 @@ module lavali { >caurinus : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : chrysaeolus.sarasinorum onca() : sagitta.stolzmanni { var x : sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -2865,8 +2865,8 @@ module lavali { >x : sagitta.stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : sagitta.stolzmanni gunnii() : minutus.himalayana, nigra.thalia> { var x : minutus.himalayana, nigra.thalia>; () => { var y = this; }; return x; } @@ -2885,8 +2885,8 @@ module lavali { >patas : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : minutus.himalayana, nigra.thalia> apeco() : lutreolus.foina { var x : lutreolus.foina; () => { var y = this; }; return x; } @@ -2895,8 +2895,8 @@ module lavali { >x : lutreolus.foina >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : lutreolus.foina variegates() : gabriellae.klossii { var x : gabriellae.klossii; () => { var y = this; }; return x; } @@ -2907,8 +2907,8 @@ module lavali { >gabriellae : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : gabriellae.klossii goudotii() : trivirgatus.falconeri { var x : trivirgatus.falconeri; () => { var y = this; }; return x; } @@ -2917,8 +2917,8 @@ module lavali { >x : trivirgatus.falconeri >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : trivirgatus.falconeri pohlei() : Lanthanum.megalonyx { var x : Lanthanum.megalonyx; () => { var y = this; }; return x; } @@ -2927,8 +2927,8 @@ module lavali { >x : Lanthanum.megalonyx >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : Lanthanum.megalonyx ineptus() : panamensis.setulosus { var x : panamensis.setulosus; () => { var y = this; }; return x; } @@ -2937,8 +2937,8 @@ module lavali { >x : panamensis.setulosus >panamensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : panamensis.setulosus euryotis() : rendalli.moojeni> { var x : rendalli.moojeni>; () => { var y = this; }; return x; } @@ -2955,8 +2955,8 @@ module lavali { >Lanthanum : any >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : rendalli.moojeni> maurisca() : Lanthanum.suillus { var x : Lanthanum.suillus; () => { var y = this; }; return x; } @@ -2969,8 +2969,8 @@ module lavali { >rionegrensis : any >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : Lanthanum.suillus coyhaiquensis() : caurinus.mahaganus, panglima.abidi>, lutreolus.punicus> { var x : caurinus.mahaganus, panglima.abidi>, lutreolus.punicus>; () => { var y = this; }; return x; } @@ -2995,8 +2995,8 @@ module lavali { >argurus : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : xanthognathus +>this : xanthognathus >x : caurinus.mahaganus, panglima.abidi>, lutreolus.punicus> } export class thaeleri extends argurus.oreas { @@ -3011,8 +3011,8 @@ module lavali { >x : julianae.galapagoensis >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thaeleri +>this : thaeleri >x : julianae.galapagoensis parvipes() : nigra.dolichurus { var x : nigra.dolichurus; () => { var y = this; }; return x; } @@ -3025,8 +3025,8 @@ module lavali { >argurus : any >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thaeleri +>this : thaeleri >x : nigra.dolichurus sponsorius() : rionegrensis.veraecrucis, julianae.steerii> { var x : rionegrensis.veraecrucis, julianae.steerii>; () => { var y = this; }; return x; } @@ -3043,8 +3043,8 @@ module lavali { >quasiater : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thaeleri +>this : thaeleri >x : rionegrensis.veraecrucis, julianae.steerii> vates() : dogramacii.robustulus { var x : dogramacii.robustulus; () => { var y = this; }; return x; } @@ -3053,8 +3053,8 @@ module lavali { >x : dogramacii.robustulus >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thaeleri +>this : thaeleri >x : dogramacii.robustulus roosmalenorum() : dogramacii.koepckeae { var x : dogramacii.koepckeae; () => { var y = this; }; return x; } @@ -3063,8 +3063,8 @@ module lavali { >x : dogramacii.koepckeae >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thaeleri +>this : thaeleri >x : dogramacii.koepckeae rubicola() : rendalli.moojeni, gabriellae.echinatus>> { var x : rendalli.moojeni, gabriellae.echinatus>>; () => { var y = this; }; return x; } @@ -3085,8 +3085,8 @@ module lavali { >caurinus : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thaeleri +>this : thaeleri >x : rendalli.moojeni, gabriellae.echinatus>> ikonnikovi() : argurus.luctuosa { var x : argurus.luctuosa; () => { var y = this; }; return x; } @@ -3095,8 +3095,8 @@ module lavali { >x : argurus.luctuosa >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thaeleri +>this : thaeleri >x : argurus.luctuosa paramicrus() : imperfecta.ciliolabrum> { var x : imperfecta.ciliolabrum>; () => { var y = this; }; return x; } @@ -3111,8 +3111,8 @@ module lavali { >macrorhinos : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thaeleri +>this : thaeleri >x : imperfecta.ciliolabrum> } export class lepturus extends Lanthanum.suillus { @@ -3133,8 +3133,8 @@ module lavali { >argurus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : lepturus +>this : lepturus >x : argurus.netscheri aequalis() : sagitta.cinereus>, petrophilus.minutilla>, Lanthanum.jugularis> { var x : sagitta.cinereus>, petrophilus.minutilla>, Lanthanum.jugularis>; () => { var y = this; }; return x; } @@ -3157,8 +3157,8 @@ module lavali { >petrophilus : any >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : lepturus +>this : lepturus >x : sagitta.cinereus>, petrophilus.minutilla>, Lanthanum.jugularis> } } @@ -3181,8 +3181,8 @@ module dogramacii { >argurus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : robustulus +>this : robustulus >x : minutus.inez humboldti() : sagitta.cinereus { var x : sagitta.cinereus; () => { var y = this; }; return x; } @@ -3195,8 +3195,8 @@ module dogramacii { >lavali : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : robustulus +>this : robustulus >x : sagitta.cinereus mexicana() : macrorhinos.konganensis { var x : macrorhinos.konganensis; () => { var y = this; }; return x; } @@ -3205,8 +3205,8 @@ module dogramacii { >x : macrorhinos.konganensis >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : robustulus +>this : robustulus >x : macrorhinos.konganensis martini() : julianae.oralis { var x : julianae.oralis; () => { var y = this; }; return x; } @@ -3219,8 +3219,8 @@ module dogramacii { >julianae : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : robustulus +>this : robustulus >x : julianae.oralis beatus() : Lanthanum.jugularis { var x : Lanthanum.jugularis; () => { var y = this; }; return x; } @@ -3229,8 +3229,8 @@ module dogramacii { >x : Lanthanum.jugularis >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : robustulus +>this : robustulus >x : Lanthanum.jugularis leporina() : trivirgatus.falconeri { var x : trivirgatus.falconeri; () => { var y = this; }; return x; } @@ -3239,8 +3239,8 @@ module dogramacii { >x : trivirgatus.falconeri >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : robustulus +>this : robustulus >x : trivirgatus.falconeri pearsonii() : dammermani.melanops { var x : dammermani.melanops; () => { var y = this; }; return x; } @@ -3249,8 +3249,8 @@ module dogramacii { >x : dammermani.melanops >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : robustulus +>this : robustulus >x : dammermani.melanops keaysi() : howi.angulatus { var x : howi.angulatus; () => { var y = this; }; return x; } @@ -3263,8 +3263,8 @@ module dogramacii { >lavali : any >rendalli : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : robustulus +>this : robustulus >x : howi.angulatus hindei() : imperfecta.lasiurus { var x : imperfecta.lasiurus; () => { var y = this; }; return x; } @@ -3277,8 +3277,8 @@ module dogramacii { >macrorhinos : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : robustulus +>this : robustulus >x : imperfecta.lasiurus } export class koepckeae { @@ -3296,8 +3296,8 @@ module dogramacii { >lutreolus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : koepckeae +>this : koepckeae >x : samarensis.pelurus, julianae.sumatrana> } export class kaiseri { @@ -3309,8 +3309,8 @@ module dogramacii { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : quasiater.carolinensis paramorum() : Lanthanum.megalonyx { var x : Lanthanum.megalonyx; () => { var y = this; }; return x; } @@ -3319,8 +3319,8 @@ module dogramacii { >x : Lanthanum.megalonyx >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : Lanthanum.megalonyx rubidus() : trivirgatus.lotor { var x : trivirgatus.lotor; () => { var y = this; }; return x; } @@ -3333,8 +3333,8 @@ module dogramacii { >julianae : any >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : trivirgatus.lotor juninensis() : quasiater.bobrinskoi { var x : quasiater.bobrinskoi; () => { var y = this; }; return x; } @@ -3343,8 +3343,8 @@ module dogramacii { >x : quasiater.bobrinskoi >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : quasiater.bobrinskoi marginata() : argurus.wetmorei>> { var x : argurus.wetmorei>>; () => { var y = this; }; return x; } @@ -3365,8 +3365,8 @@ module dogramacii { >quasiater : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : argurus.wetmorei>> Meitnerium() : ruatanica.Praseodymium> { var x : ruatanica.Praseodymium>; () => { var y = this; }; return x; } @@ -3383,8 +3383,8 @@ module dogramacii { >Lanthanum : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : ruatanica.Praseodymium> pinetorum() : rionegrensis.caniventer { var x : rionegrensis.caniventer; () => { var y = this; }; return x; } @@ -3393,8 +3393,8 @@ module dogramacii { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : rionegrensis.caniventer hoolock() : samarensis.pelurus { var x : samarensis.pelurus; () => { var y = this; }; return x; } @@ -3407,8 +3407,8 @@ module dogramacii { >argurus : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : samarensis.pelurus poeyi() : gabriellae.echinatus { var x : gabriellae.echinatus; () => { var y = this; }; return x; } @@ -3417,8 +3417,8 @@ module dogramacii { >x : gabriellae.echinatus >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : gabriellae.echinatus Thulium() : julianae.durangae { var x : julianae.durangae; () => { var y = this; }; return x; } @@ -3427,8 +3427,8 @@ module dogramacii { >x : julianae.durangae >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : julianae.durangae patrius() : Lanthanum.jugularis { var x : Lanthanum.jugularis; () => { var y = this; }; return x; } @@ -3437,8 +3437,8 @@ module dogramacii { >x : Lanthanum.jugularis >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : Lanthanum.jugularis quadraticauda() : julianae.nudicaudus { var x : julianae.nudicaudus; () => { var y = this; }; return x; } @@ -3447,8 +3447,8 @@ module dogramacii { >x : julianae.nudicaudus >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : julianae.nudicaudus ater() : ruatanica.americanus { var x : ruatanica.americanus; () => { var y = this; }; return x; } @@ -3457,8 +3457,8 @@ module dogramacii { >x : ruatanica.americanus >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : kaiseri +>this : kaiseri >x : ruatanica.americanus } export class aurata { @@ -3480,8 +3480,8 @@ module dogramacii { >julianae : any >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : aurata +>this : aurata >x : nigra.gracilis, julianae.sumatrana>, ruatanica.americanus> howensis() : ruatanica.americanus { var x : ruatanica.americanus; () => { var y = this; }; return x; } @@ -3490,8 +3490,8 @@ module dogramacii { >x : ruatanica.americanus >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : aurata +>this : aurata >x : ruatanica.americanus karlkoopmani() : caurinus.psilurus { var x : caurinus.psilurus; () => { var y = this; }; return x; } @@ -3500,8 +3500,8 @@ module dogramacii { >x : caurinus.psilurus >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : aurata +>this : aurata >x : caurinus.psilurus mirapitanga() : julianae.albidens { var x : julianae.albidens; () => { var y = this; }; return x; } @@ -3514,16 +3514,16 @@ module dogramacii { >gabriellae : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : aurata +>this : aurata >x : julianae.albidens ophiodon() : aurata { var x : aurata; () => { var y = this; }; return x; } >ophiodon : () => aurata >x : aurata >() => { var y = this; } : () => void ->y : this ->this : this +>y : aurata +>this : aurata >x : aurata landeri() : samarensis.pelurus { var x : samarensis.pelurus; () => { var y = this; }; return x; } @@ -3536,8 +3536,8 @@ module dogramacii { >Lanthanum : any >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : aurata +>this : aurata >x : samarensis.pelurus sonomae() : trivirgatus.lotor, koepckeae> { var x : trivirgatus.lotor, koepckeae>; () => { var y = this; }; return x; } @@ -3552,8 +3552,8 @@ module dogramacii { >lavali : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : aurata +>this : aurata >x : trivirgatus.lotor, koepckeae> erythromos() : caurinus.johorensis, nigra.dolichurus> { var x : caurinus.johorensis, nigra.dolichurus>; () => { var y = this; }; return x; } @@ -3574,8 +3574,8 @@ module dogramacii { >lavali : any >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : aurata +>this : aurata >x : caurinus.johorensis, nigra.dolichurus> } } @@ -3594,8 +3594,8 @@ module lutreolus { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : rionegrensis.caniventer blicki() : dogramacii.robustulus { var x : dogramacii.robustulus; () => { var y = this; }; return x; } @@ -3604,8 +3604,8 @@ module lutreolus { >x : dogramacii.robustulus >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : dogramacii.robustulus culionensis() : argurus.dauricus { var x : argurus.dauricus; () => { var y = this; }; return x; } @@ -3618,8 +3618,8 @@ module lutreolus { >ruatanica : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : argurus.dauricus scrofa() : petrophilus.sodyi { var x : petrophilus.sodyi; () => { var y = this; }; return x; } @@ -3632,8 +3632,8 @@ module lutreolus { >gabriellae : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : petrophilus.sodyi fernandoni() : quasiater.carolinensis { var x : quasiater.carolinensis; () => { var y = this; }; return x; } @@ -3642,8 +3642,8 @@ module lutreolus { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : quasiater.carolinensis Tin() : sagitta.leptoceros> { var x : sagitta.leptoceros>; () => { var y = this; }; return x; } @@ -3660,8 +3660,8 @@ module lutreolus { >quasiater : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : sagitta.leptoceros> marmorata() : panamensis.setulosus> { var x : panamensis.setulosus>; () => { var y = this; }; return x; } @@ -3678,8 +3678,8 @@ module lutreolus { >dogramacii : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : panamensis.setulosus> tavaratra() : Lanthanum.nitidus { var x : Lanthanum.nitidus; () => { var y = this; }; return x; } @@ -3692,8 +3692,8 @@ module lutreolus { >howi : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : Lanthanum.nitidus peregrina() : daubentonii.nesiotes { var x : daubentonii.nesiotes; () => { var y = this; }; return x; } @@ -3706,8 +3706,8 @@ module lutreolus { >macrorhinos : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : daubentonii.nesiotes frontalis() : macrorhinos.marmosurus>, samarensis.pallidus> { var x : macrorhinos.marmosurus>, samarensis.pallidus>; () => { var y = this; }; return x; } @@ -3728,8 +3728,8 @@ module lutreolus { >sagitta : any >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : macrorhinos.marmosurus>, samarensis.pallidus> cuniculus() : patas.uralensis { var x : patas.uralensis; () => { var y = this; }; return x; } @@ -3738,8 +3738,8 @@ module lutreolus { >x : patas.uralensis >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : patas.uralensis magdalenae() : julianae.gerbillus> { var x : julianae.gerbillus>; () => { var y = this; }; return x; } @@ -3756,8 +3756,8 @@ module lutreolus { >rendalli : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : julianae.gerbillus> andamanensis() : julianae.oralis { var x : julianae.oralis; () => { var y = this; }; return x; } @@ -3770,8 +3770,8 @@ module lutreolus { >ruatanica : any >rendalli : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : julianae.oralis dispar() : panamensis.linulus { var x : panamensis.linulus; () => { var y = this; }; return x; } @@ -3784,8 +3784,8 @@ module lutreolus { >dogramacii : any >minutus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : schlegeli +>this : schlegeli >x : panamensis.linulus } } @@ -3801,8 +3801,8 @@ module argurus { >x : Lanthanum.jugularis >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dauricus +>this : dauricus >x : Lanthanum.jugularis duodecimcostatus() : lavali.xanthognathus { var x : lavali.xanthognathus; () => { var y = this; }; return x; } @@ -3811,8 +3811,8 @@ module argurus { >x : lavali.xanthognathus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dauricus +>this : dauricus >x : lavali.xanthognathus foxi() : daubentonii.nesiotes { var x : daubentonii.nesiotes; () => { var y = this; }; return x; } @@ -3825,8 +3825,8 @@ module argurus { >lavali : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dauricus +>this : dauricus >x : daubentonii.nesiotes macleayii() : petrophilus.sodyi>, petrophilus.minutilla> { var x : petrophilus.sodyi>, petrophilus.minutilla>; () => { var y = this; }; return x; } @@ -3847,8 +3847,8 @@ module argurus { >macrorhinos : any >petrophilus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dauricus +>this : dauricus >x : petrophilus.sodyi>, petrophilus.minutilla> darienensis() : trivirgatus.oconnelli { var x : trivirgatus.oconnelli; () => { var y = this; }; return x; } @@ -3857,8 +3857,8 @@ module argurus { >x : trivirgatus.oconnelli >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dauricus +>this : dauricus >x : trivirgatus.oconnelli hardwickii() : macrorhinos.daphaenodon { var x : macrorhinos.daphaenodon; () => { var y = this; }; return x; } @@ -3867,8 +3867,8 @@ module argurus { >x : macrorhinos.daphaenodon >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dauricus +>this : dauricus >x : macrorhinos.daphaenodon albifrons() : rionegrensis.veraecrucis { var x : rionegrensis.veraecrucis; () => { var y = this; }; return x; } @@ -3881,8 +3881,8 @@ module argurus { >lavali : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dauricus +>this : dauricus >x : rionegrensis.veraecrucis jacobitus() : caurinus.johorensis>> { var x : caurinus.johorensis>>; () => { var y = this; }; return x; } @@ -3903,8 +3903,8 @@ module argurus { >argurus : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dauricus +>this : dauricus >x : caurinus.johorensis>> guentheri() : rendalli.moojeni { var x : rendalli.moojeni; () => { var y = this; }; return x; } @@ -3917,8 +3917,8 @@ module argurus { >lutreolus : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dauricus +>this : dauricus >x : rendalli.moojeni mahomet() : imperfecta.ciliolabrum { var x : imperfecta.ciliolabrum; () => { var y = this; }; return x; } @@ -3931,8 +3931,8 @@ module argurus { >argurus : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dauricus +>this : dauricus >x : imperfecta.ciliolabrum misionensis() : macrorhinos.marmosurus, gabriellae.echinatus> { var x : macrorhinos.marmosurus, gabriellae.echinatus>; () => { var y = this; }; return x; } @@ -3949,8 +3949,8 @@ module argurus { >rionegrensis : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dauricus +>this : dauricus >x : macrorhinos.marmosurus, gabriellae.echinatus> } } @@ -3990,8 +3990,8 @@ module nigra { >lavali : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dolichurus +>this : dolichurus >x : panglima.abidi, argurus.netscheri, julianae.oralis>>> alfredi() : caurinus.psilurus { var x : caurinus.psilurus; () => { var y = this; }; return x; } @@ -4000,8 +4000,8 @@ module nigra { >x : caurinus.psilurus >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dolichurus +>this : dolichurus >x : caurinus.psilurus morrisi() : ruatanica.hector, quasiater.wattsi>>> { var x : ruatanica.hector, quasiater.wattsi>>>; () => { var y = this; }; return x; } @@ -4030,8 +4030,8 @@ module nigra { >lavali : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dolichurus +>this : dolichurus >x : ruatanica.hector, quasiater.wattsi>>> lekaguli() : Lanthanum.nitidus { var x : Lanthanum.nitidus; () => { var y = this; }; return x; } @@ -4044,8 +4044,8 @@ module nigra { >dammermani : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dolichurus +>this : dolichurus >x : Lanthanum.nitidus dimissus() : imperfecta.subspinosus { var x : imperfecta.subspinosus; () => { var y = this; }; return x; } @@ -4054,8 +4054,8 @@ module nigra { >x : imperfecta.subspinosus >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dolichurus +>this : dolichurus >x : imperfecta.subspinosus phaeotis() : julianae.sumatrana { var x : julianae.sumatrana; () => { var y = this; }; return x; } @@ -4064,8 +4064,8 @@ module nigra { >x : julianae.sumatrana >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dolichurus +>this : dolichurus >x : julianae.sumatrana ustus() : julianae.acariensis { var x : julianae.acariensis; () => { var y = this; }; return x; } @@ -4074,8 +4074,8 @@ module nigra { >x : julianae.acariensis >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dolichurus +>this : dolichurus >x : julianae.acariensis sagei() : howi.marcanoi { var x : howi.marcanoi; () => { var y = this; }; return x; } @@ -4084,8 +4084,8 @@ module nigra { >x : howi.marcanoi >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : dolichurus +>this : dolichurus >x : howi.marcanoi } } @@ -4118,8 +4118,8 @@ module panglima { >gabriellae : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amphibius +>this : amphibius >x : macrorhinos.marmosurus, gabriellae.echinatus>, sagitta.stolzmanni> jerdoni(): macrorhinos.daphaenodon { var x: macrorhinos.daphaenodon; () => { var y = this; }; return x; } @@ -4128,8 +4128,8 @@ module panglima { >x : macrorhinos.daphaenodon >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amphibius +>this : amphibius >x : macrorhinos.daphaenodon camtschatica(): samarensis.pallidus { var x: samarensis.pallidus; () => { var y = this; }; return x; } @@ -4138,8 +4138,8 @@ module panglima { >x : samarensis.pallidus >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amphibius +>this : amphibius >x : samarensis.pallidus spadix(): petrophilus.sodyi { var x: petrophilus.sodyi; () => { var y = this; }; return x; } @@ -4152,8 +4152,8 @@ module panglima { >macrorhinos : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amphibius +>this : amphibius >x : petrophilus.sodyi luismanueli(): rendalli.moojeni { var x: rendalli.moojeni; () => { var y = this; }; return x; } @@ -4166,8 +4166,8 @@ module panglima { >julianae : any >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amphibius +>this : amphibius >x : rendalli.moojeni aceramarcae(): daubentonii.arboreus { var x: daubentonii.arboreus; () => { var y = this; }; return x; } @@ -4180,8 +4180,8 @@ module panglima { >julianae : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amphibius +>this : amphibius >x : daubentonii.arboreus } export class fundatus extends lutreolus.schlegeli { @@ -4200,8 +4200,8 @@ module panglima { >provocax : any >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fundatus +>this : fundatus >x : nigra.gracilis flamarioni(): imperfecta.lasiurus>, sagitta.leptoceros>> { var x: imperfecta.lasiurus>, sagitta.leptoceros>>; () => { var y = this; }; return x; } @@ -4228,8 +4228,8 @@ module panglima { >quasiater : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fundatus +>this : fundatus >x : imperfecta.lasiurus>, sagitta.leptoceros>> mirabilis(): macrorhinos.marmosurus, lavali.lepturus> { var x: macrorhinos.marmosurus, lavali.lepturus>; () => { var y = this; }; return x; } @@ -4246,8 +4246,8 @@ module panglima { >lavali : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fundatus +>this : fundatus >x : macrorhinos.marmosurus, lavali.lepturus> } export class abidi extends argurus.dauricus { @@ -4264,8 +4264,8 @@ module panglima { >x : trivirgatus.oconnelli >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : abidi +>this : abidi >x : trivirgatus.oconnelli macedonicus(): petrophilus.minutilla { var x: petrophilus.minutilla; () => { var y = this; }; return x; } @@ -4274,8 +4274,8 @@ module panglima { >x : petrophilus.minutilla >petrophilus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : abidi +>this : abidi >x : petrophilus.minutilla galili(): samarensis.cahirinus { var x: samarensis.cahirinus; () => { var y = this; }; return x; } @@ -4288,8 +4288,8 @@ module panglima { >dammermani : any >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : abidi +>this : abidi >x : samarensis.cahirinus thierryi(): dogramacii.robustulus { var x: dogramacii.robustulus; () => { var y = this; }; return x; } @@ -4298,8 +4298,8 @@ module panglima { >x : dogramacii.robustulus >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : abidi +>this : abidi >x : dogramacii.robustulus ega(): imperfecta.lasiurus> { var x: imperfecta.lasiurus>; () => { var y = this; }; return x; } @@ -4316,8 +4316,8 @@ module panglima { >argurus : any >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : abidi +>this : abidi >x : imperfecta.lasiurus> } } @@ -4333,8 +4333,8 @@ module quasiater { >x : rendalli.zuluensis >rendalli : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : carolinensis +>this : carolinensis >x : rendalli.zuluensis aeneus(): howi.marcanoi { var x: howi.marcanoi; () => { var y = this; }; return x; } @@ -4343,8 +4343,8 @@ module quasiater { >x : howi.marcanoi >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : carolinensis +>this : carolinensis >x : howi.marcanoi aloysiisabaudiae(): argurus.netscheri, lavali.lepturus> { var x: argurus.netscheri, lavali.lepturus>; () => { var y = this; }; return x; } @@ -4361,8 +4361,8 @@ module quasiater { >lavali : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : carolinensis +>this : carolinensis >x : argurus.netscheri, lavali.lepturus> tenellus(): julianae.nudicaudus { var x: julianae.nudicaudus; () => { var y = this; }; return x; } @@ -4371,8 +4371,8 @@ module quasiater { >x : julianae.nudicaudus >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : carolinensis +>this : carolinensis >x : julianae.nudicaudus andium(): lavali.beisa { var x: lavali.beisa; () => { var y = this; }; return x; } @@ -4381,8 +4381,8 @@ module quasiater { >x : lavali.beisa >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : carolinensis +>this : carolinensis >x : lavali.beisa persephone(): panglima.fundatus { var x: panglima.fundatus; () => { var y = this; }; return x; } @@ -4395,8 +4395,8 @@ module quasiater { >samarensis : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : carolinensis +>this : carolinensis >x : panglima.fundatus patrizii(): Lanthanum.megalonyx { var x: Lanthanum.megalonyx; () => { var y = this; }; return x; } @@ -4405,8 +4405,8 @@ module quasiater { >x : Lanthanum.megalonyx >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : carolinensis +>this : carolinensis >x : Lanthanum.megalonyx } } @@ -4433,8 +4433,8 @@ module minutus { >argurus : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : argurus.netscheri> lobata(): samarensis.pallidus { var x: samarensis.pallidus; () => { var y = this; }; return x; } @@ -4443,8 +4443,8 @@ module minutus { >x : samarensis.pallidus >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : samarensis.pallidus rusticus(): dogramacii.aurata { var x: dogramacii.aurata; () => { var y = this; }; return x; } @@ -4453,8 +4453,8 @@ module minutus { >x : dogramacii.aurata >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : dogramacii.aurata latona(): daubentonii.nesiotes { var x: daubentonii.nesiotes; () => { var y = this; }; return x; } @@ -4467,8 +4467,8 @@ module minutus { >dammermani : any >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : daubentonii.nesiotes famulus(): patas.uralensis { var x: patas.uralensis; () => { var y = this; }; return x; } @@ -4477,8 +4477,8 @@ module minutus { >x : patas.uralensis >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : patas.uralensis flaviceps(): minutus.inez> { var x: minutus.inez>; () => { var y = this; }; return x; } @@ -4495,8 +4495,8 @@ module minutus { >gabriellae : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : inez> paradoxolophus(): nigra.dolichurus> { var x: nigra.dolichurus>; () => { var y = this; }; return x; } @@ -4513,8 +4513,8 @@ module minutus { >Lanthanum : any >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : nigra.dolichurus> Osmium(): lavali.wilsoni { var x: lavali.wilsoni; () => { var y = this; }; return x; } @@ -4523,8 +4523,8 @@ module minutus { >x : lavali.wilsoni >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : lavali.wilsoni vulgaris(): Lanthanum.nitidus { var x: Lanthanum.nitidus; () => { var y = this; }; return x; } @@ -4537,8 +4537,8 @@ module minutus { >lavali : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : Lanthanum.nitidus betsileoensis(): panglima.amphibius { var x: panglima.amphibius; () => { var y = this; }; return x; } @@ -4551,8 +4551,8 @@ module minutus { >caurinus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : panglima.amphibius vespuccii(): argurus.gilbertii, provocax.melanoleuca> { var x: argurus.gilbertii, provocax.melanoleuca>; () => { var y = this; }; return x; } @@ -4569,8 +4569,8 @@ module minutus { >quasiater : any >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : argurus.gilbertii, provocax.melanoleuca> olympus(): Lanthanum.megalonyx { var x: Lanthanum.megalonyx; () => { var y = this; }; return x; } @@ -4579,8 +4579,8 @@ module minutus { >x : Lanthanum.megalonyx >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : himalayana +>this : himalayana >x : Lanthanum.megalonyx } } @@ -4613,8 +4613,8 @@ module caurinus { >julianae : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mahaganus +>this : mahaganus >x : ruatanica.hector>> devius(): samarensis.pelurus, trivirgatus.falconeri>> { var x: samarensis.pelurus, trivirgatus.falconeri>>; () => { var y = this; }; return x; } @@ -4635,8 +4635,8 @@ module caurinus { >dammermani : any >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mahaganus +>this : mahaganus >x : samarensis.pelurus, trivirgatus.falconeri>> masalai(): argurus.oreas { var x: argurus.oreas; () => { var y = this; }; return x; } @@ -4645,8 +4645,8 @@ module caurinus { >x : argurus.oreas >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mahaganus +>this : mahaganus >x : argurus.oreas kathleenae(): nigra.dolichurus { var x: nigra.dolichurus; () => { var y = this; }; return x; } @@ -4659,8 +4659,8 @@ module caurinus { >patas : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mahaganus +>this : mahaganus >x : nigra.dolichurus simulus(): gabriellae.echinatus { var x: gabriellae.echinatus; () => { var y = this; }; return x; } @@ -4669,8 +4669,8 @@ module caurinus { >x : gabriellae.echinatus >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mahaganus +>this : mahaganus >x : gabriellae.echinatus nigrovittatus(): caurinus.mahaganus>> { var x: caurinus.mahaganus>>; () => { var y = this; }; return x; } @@ -4691,8 +4691,8 @@ module caurinus { >dogramacii : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mahaganus +>this : mahaganus >x : mahaganus>> senegalensis(): gabriellae.klossii, dammermani.melanops> { var x: gabriellae.klossii, dammermani.melanops>; () => { var y = this; }; return x; } @@ -4709,8 +4709,8 @@ module caurinus { >lutreolus : any >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mahaganus +>this : mahaganus >x : gabriellae.klossii, dammermani.melanops> acticola(): argurus.luctuosa { var x: argurus.luctuosa; () => { var y = this; }; return x; } @@ -4719,8 +4719,8 @@ module caurinus { >x : argurus.luctuosa >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : mahaganus +>this : mahaganus >x : argurus.luctuosa } } @@ -4736,8 +4736,8 @@ module macrorhinos { >x : lutreolus.punicus >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marmosurus +>this : marmosurus >x : lutreolus.punicus } } @@ -4756,8 +4756,8 @@ module howi { >x : marcanoi >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : angulatus +>this : angulatus >x : marcanoi } } @@ -4780,8 +4780,8 @@ module nigra { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thalia +>this : thalia >x : quasiater.carolinensis arnuxii(): panamensis.linulus, lavali.beisa> { var x: panamensis.linulus, lavali.beisa>; () => { var y = this; }; return x; } @@ -4798,8 +4798,8 @@ module nigra { >lavali : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thalia +>this : thalia >x : panamensis.linulus, lavali.beisa> verheyeni(): lavali.xanthognathus { var x: lavali.xanthognathus; () => { var y = this; }; return x; } @@ -4808,8 +4808,8 @@ module nigra { >x : lavali.xanthognathus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thalia +>this : thalia >x : lavali.xanthognathus dauuricus(): gabriellae.amicus { var x: gabriellae.amicus; () => { var y = this; }; return x; } @@ -4818,8 +4818,8 @@ module nigra { >x : gabriellae.amicus >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thalia +>this : thalia >x : gabriellae.amicus tristriatus(): rionegrensis.veraecrucis> { var x: rionegrensis.veraecrucis>; () => { var y = this; }; return x; } @@ -4836,8 +4836,8 @@ module nigra { >Lanthanum : any >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thalia +>this : thalia >x : rionegrensis.veraecrucis> lasiura(): panglima.abidi>, Lanthanum.nitidus> { var x: panglima.abidi>, Lanthanum.nitidus>; () => { var y = this; }; return x; } @@ -4862,8 +4862,8 @@ module nigra { >lavali : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thalia +>this : thalia >x : panglima.abidi>, Lanthanum.nitidus> gangetica(): argurus.luctuosa { var x: argurus.luctuosa; () => { var y = this; }; return x; } @@ -4872,8 +4872,8 @@ module nigra { >x : argurus.luctuosa >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thalia +>this : thalia >x : argurus.luctuosa brucei(): chrysaeolus.sarasinorum { var x: chrysaeolus.sarasinorum; () => { var y = this; }; return x; } @@ -4886,8 +4886,8 @@ module nigra { >julianae : any >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : thalia +>this : thalia >x : chrysaeolus.sarasinorum } } @@ -4910,8 +4910,8 @@ module sagitta { >Lanthanum : any >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : walkeri +>this : walkeri >x : samarensis.cahirinus } } @@ -4936,8 +4936,8 @@ module minutus { >lavali : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : inez +>this : inez >x : samarensis.cahirinus } } @@ -4976,8 +4976,8 @@ module panamensis { >gabriellae : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : linulus +>this : linulus >x : daubentonii.arboreus taki(): patas.uralensis { var x: patas.uralensis; () => { var y = this; }; return x; } @@ -4986,8 +4986,8 @@ module panamensis { >x : patas.uralensis >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : linulus +>this : linulus >x : patas.uralensis fumosus(): rendalli.moojeni, lavali.beisa> { var x: rendalli.moojeni, lavali.beisa>; () => { var y = this; }; return x; } @@ -5004,8 +5004,8 @@ module panamensis { >dogramacii : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : linulus +>this : linulus >x : rendalli.moojeni, lavali.beisa> rufinus(): macrorhinos.konganensis { var x: macrorhinos.konganensis; () => { var y = this; }; return x; } @@ -5014,8 +5014,8 @@ module panamensis { >x : macrorhinos.konganensis >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : linulus +>this : linulus >x : macrorhinos.konganensis lami(): nigra.thalia { var x: nigra.thalia; () => { var y = this; }; return x; } @@ -5028,8 +5028,8 @@ module panamensis { >patas : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : linulus +>this : linulus >x : nigra.thalia regina(): trivirgatus.oconnelli { var x: trivirgatus.oconnelli; () => { var y = this; }; return x; } @@ -5038,8 +5038,8 @@ module panamensis { >x : trivirgatus.oconnelli >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : linulus +>this : linulus >x : trivirgatus.oconnelli nanilla(): dammermani.siberu { var x: dammermani.siberu; () => { var y = this; }; return x; } @@ -5052,8 +5052,8 @@ module panamensis { >lavali : any >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : linulus +>this : linulus >x : dammermani.siberu enganus(): petrophilus.sodyi { var x: petrophilus.sodyi; () => { var y = this; }; return x; } @@ -5066,8 +5066,8 @@ module panamensis { >dogramacii : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : linulus +>this : linulus >x : petrophilus.sodyi gomantongensis(): rionegrensis.veraecrucis> { var x: rionegrensis.veraecrucis>; () => { var y = this; }; return x; } @@ -5084,8 +5084,8 @@ module panamensis { >rendalli : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : linulus +>this : linulus >x : rionegrensis.veraecrucis> } } @@ -5105,8 +5105,8 @@ module nigra { >dogramacii : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : dolichurus echinothrix(): Lanthanum.nitidus, argurus.oreas> { var x: Lanthanum.nitidus, argurus.oreas>; () => { var y = this; }; return x; } @@ -5123,8 +5123,8 @@ module nigra { >lavali : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : Lanthanum.nitidus, argurus.oreas> garridoi(): dogramacii.koepckeae { var x: dogramacii.koepckeae; () => { var y = this; }; return x; } @@ -5133,8 +5133,8 @@ module nigra { >x : dogramacii.koepckeae >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : dogramacii.koepckeae rouxii(): nigra.gracilis, nigra.thalia> { var x: nigra.gracilis, nigra.thalia>; () => { var y = this; }; return x; } @@ -5155,8 +5155,8 @@ module nigra { >patas : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : gracilis, thalia> aurita(): sagitta.stolzmanni { var x: sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -5165,8 +5165,8 @@ module nigra { >x : sagitta.stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : sagitta.stolzmanni geoffrensis(): rionegrensis.caniventer { var x: rionegrensis.caniventer; () => { var y = this; }; return x; } @@ -5175,8 +5175,8 @@ module nigra { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : rionegrensis.caniventer theresa(): macrorhinos.marmosurus, argurus.luctuosa>, nigra.dolichurus> { var x: macrorhinos.marmosurus, argurus.luctuosa>, nigra.dolichurus>; () => { var y = this; }; return x; } @@ -5201,8 +5201,8 @@ module nigra { >lavali : any >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : macrorhinos.marmosurus, argurus.luctuosa>, dolichurus> melanocarpus(): julianae.albidens, julianae.sumatrana> { var x: julianae.albidens, julianae.sumatrana>; () => { var y = this; }; return x; } @@ -5219,8 +5219,8 @@ module nigra { >samarensis : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : julianae.albidens, julianae.sumatrana> dubiaquercus(): dogramacii.robustulus { var x: dogramacii.robustulus; () => { var y = this; }; return x; } @@ -5229,8 +5229,8 @@ module nigra { >x : dogramacii.robustulus >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : dogramacii.robustulus pectoralis(): julianae.sumatrana { var x: julianae.sumatrana; () => { var y = this; }; return x; } @@ -5239,8 +5239,8 @@ module nigra { >x : julianae.sumatrana >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : julianae.sumatrana apoensis(): caurinus.megaphyllus { var x: caurinus.megaphyllus; () => { var y = this; }; return x; } @@ -5249,8 +5249,8 @@ module nigra { >x : caurinus.megaphyllus >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : caurinus.megaphyllus grisescens(): Lanthanum.jugularis { var x: Lanthanum.jugularis; () => { var y = this; }; return x; } @@ -5259,8 +5259,8 @@ module nigra { >x : Lanthanum.jugularis >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : Lanthanum.jugularis ramirohitra(): panglima.amphibius { var x: panglima.amphibius; () => { var y = this; }; return x; } @@ -5273,8 +5273,8 @@ module nigra { >trivirgatus : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gracilis +>this : gracilis >x : panglima.amphibius } } @@ -5297,8 +5297,8 @@ module samarensis { >macrorhinos : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : panamensis.linulus castanea(): argurus.netscheri, julianae.oralis> { var x: argurus.netscheri, julianae.oralis>; () => { var y = this; }; return x; } @@ -5319,8 +5319,8 @@ module samarensis { >lavali : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : argurus.netscheri, julianae.oralis> chamek(): argurus.pygmaea { var x: argurus.pygmaea; () => { var y = this; }; return x; } @@ -5333,8 +5333,8 @@ module samarensis { >julianae : any >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : argurus.pygmaea nigriceps(): lutreolus.punicus { var x: lutreolus.punicus; () => { var y = this; }; return x; } @@ -5343,8 +5343,8 @@ module samarensis { >x : lutreolus.punicus >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : lutreolus.punicus lunatus(): pelurus { var x: pelurus; () => { var y = this; }; return x; } @@ -5355,8 +5355,8 @@ module samarensis { >Lanthanum : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : pelurus madurae(): rionegrensis.caniventer { var x: rionegrensis.caniventer; () => { var y = this; }; return x; } @@ -5365,8 +5365,8 @@ module samarensis { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : rionegrensis.caniventer chinchilla(): macrorhinos.daphaenodon { var x: macrorhinos.daphaenodon; () => { var y = this; }; return x; } @@ -5375,8 +5375,8 @@ module samarensis { >x : macrorhinos.daphaenodon >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : macrorhinos.daphaenodon eliasi(): petrophilus.rosalia { var x: petrophilus.rosalia; () => { var y = this; }; return x; } @@ -5389,8 +5389,8 @@ module samarensis { >julianae : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : petrophilus.rosalia proditor(): panamensis.setulosus { var x: panamensis.setulosus; () => { var y = this; }; return x; } @@ -5403,8 +5403,8 @@ module samarensis { >gabriellae : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : panamensis.setulosus gambianus(): quasiater.wattsi> { var x: quasiater.wattsi>; () => { var y = this; }; return x; } @@ -5421,8 +5421,8 @@ module samarensis { >lavali : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : quasiater.wattsi> petteri(): dogramacii.kaiseri { var x: dogramacii.kaiseri; () => { var y = this; }; return x; } @@ -5431,8 +5431,8 @@ module samarensis { >x : dogramacii.kaiseri >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : dogramacii.kaiseri nusatenggara(): panglima.amphibius { var x: panglima.amphibius; () => { var y = this; }; return x; } @@ -5445,8 +5445,8 @@ module samarensis { >lavali : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : panglima.amphibius olitor(): rionegrensis.veraecrucis { var x: rionegrensis.veraecrucis; () => { var y = this; }; return x; } @@ -5459,8 +5459,8 @@ module samarensis { >lavali : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pelurus +>this : pelurus >x : rionegrensis.veraecrucis } export class fuscus extends macrorhinos.daphaenodon { @@ -5479,8 +5479,8 @@ module samarensis { >julianae : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : nigra.gracilis badia(): julianae.sumatrana { var x: julianae.sumatrana; () => { var y = this; }; return x; } @@ -5489,8 +5489,8 @@ module samarensis { >x : julianae.sumatrana >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : julianae.sumatrana prymnolopha(): sagitta.walkeri { var x: sagitta.walkeri; () => { var y = this; }; return x; } @@ -5499,8 +5499,8 @@ module samarensis { >x : sagitta.walkeri >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : sagitta.walkeri natalensis(): trivirgatus.falconeri { var x: trivirgatus.falconeri; () => { var y = this; }; return x; } @@ -5509,8 +5509,8 @@ module samarensis { >x : trivirgatus.falconeri >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : trivirgatus.falconeri hunteri(): julianae.durangae { var x: julianae.durangae; () => { var y = this; }; return x; } @@ -5519,16 +5519,16 @@ module samarensis { >x : julianae.durangae >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : julianae.durangae sapiens(): pallidus { var x: pallidus; () => { var y = this; }; return x; } >sapiens : () => pallidus >x : pallidus >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : pallidus macrocercus(): panamensis.setulosus { var x: panamensis.setulosus; () => { var y = this; }; return x; } @@ -5541,8 +5541,8 @@ module samarensis { >dogramacii : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : panamensis.setulosus nimbae(): lutreolus.punicus { var x: lutreolus.punicus; () => { var y = this; }; return x; } @@ -5551,8 +5551,8 @@ module samarensis { >x : lutreolus.punicus >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : lutreolus.punicus suricatta(): daubentonii.nigricans { var x: daubentonii.nigricans; () => { var y = this; }; return x; } @@ -5565,8 +5565,8 @@ module samarensis { >dammermani : any >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : daubentonii.nigricans jagorii(): julianae.galapagoensis { var x: julianae.galapagoensis; () => { var y = this; }; return x; } @@ -5575,8 +5575,8 @@ module samarensis { >x : julianae.galapagoensis >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : julianae.galapagoensis beecrofti(): sagitta.stolzmanni { var x: sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -5585,8 +5585,8 @@ module samarensis { >x : sagitta.stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : sagitta.stolzmanni imaizumii(): minutus.inez, gabriellae.echinatus>, dogramacii.aurata>, lavali.otion>, macrorhinos.konganensis> { var x: minutus.inez, gabriellae.echinatus>, dogramacii.aurata>, lavali.otion>, macrorhinos.konganensis>; () => { var y = this; }; return x; } @@ -5615,8 +5615,8 @@ module samarensis { >lavali : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : minutus.inez, gabriellae.echinatus>, dogramacii.aurata>, lavali.otion>, macrorhinos.konganensis> colocolo(): quasiater.bobrinskoi { var x: quasiater.bobrinskoi; () => { var y = this; }; return x; } @@ -5625,8 +5625,8 @@ module samarensis { >x : quasiater.bobrinskoi >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : quasiater.bobrinskoi wolfi(): petrophilus.rosalia> { var x: petrophilus.rosalia>; () => { var y = this; }; return x; } @@ -5643,8 +5643,8 @@ module samarensis { >dogramacii : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : fuscus +>this : fuscus >x : petrophilus.rosalia> } export class pallidus { @@ -5656,8 +5656,8 @@ module samarensis { >x : trivirgatus.falconeri >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pallidus +>this : pallidus >x : trivirgatus.falconeri watersi(): lavali.wilsoni { var x: lavali.wilsoni; () => { var y = this; }; return x; } @@ -5666,8 +5666,8 @@ module samarensis { >x : lavali.wilsoni >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pallidus +>this : pallidus >x : lavali.wilsoni glacialis(): sagitta.cinereus, quasiater.wattsi>> { var x: sagitta.cinereus, quasiater.wattsi>>; () => { var y = this; }; return x; } @@ -5692,8 +5692,8 @@ module samarensis { >lavali : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pallidus +>this : pallidus >x : sagitta.cinereus, quasiater.wattsi>> viaria(): chrysaeolus.sarasinorum { var x: chrysaeolus.sarasinorum; () => { var y = this; }; return x; } @@ -5706,8 +5706,8 @@ module samarensis { >lavali : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pallidus +>this : pallidus >x : chrysaeolus.sarasinorum } export class cahirinus { @@ -5723,8 +5723,8 @@ module samarensis { >ruatanica : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cahirinus +>this : cahirinus >x : nigra.caucasica flaviventer(): trivirgatus.tumidifrons> { var x: trivirgatus.tumidifrons>; () => { var y = this; }; return x; } @@ -5741,8 +5741,8 @@ module samarensis { >petrophilus : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cahirinus +>this : cahirinus >x : trivirgatus.tumidifrons> bottai(): lutreolus.schlegeli { var x: lutreolus.schlegeli; () => { var y = this; }; return x; } @@ -5751,8 +5751,8 @@ module samarensis { >x : lutreolus.schlegeli >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cahirinus +>this : cahirinus >x : lutreolus.schlegeli pinetis(): argurus.oreas { var x: argurus.oreas; () => { var y = this; }; return x; } @@ -5761,8 +5761,8 @@ module samarensis { >x : argurus.oreas >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cahirinus +>this : cahirinus >x : argurus.oreas saussurei(): rendalli.crenulata, argurus.netscheri, julianae.oralis>> { var x: rendalli.crenulata, argurus.netscheri, julianae.oralis>>; () => { var y = this; }; return x; } @@ -5791,8 +5791,8 @@ module samarensis { >lavali : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cahirinus +>this : cahirinus >x : rendalli.crenulata, argurus.netscheri, julianae.oralis>> } } @@ -5815,8 +5815,8 @@ module sagitta { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : leptoceros +>this : leptoceros >x : rionegrensis.caniventer hoplomyoides(): panglima.fundatus, nigra.gracilis> { var x: panglima.fundatus, nigra.gracilis>; () => { var y = this; }; return x; } @@ -5837,8 +5837,8 @@ module sagitta { >argurus : any >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : leptoceros +>this : leptoceros >x : panglima.fundatus, nigra.gracilis> gratiosus(): lavali.lepturus { var x: lavali.lepturus; () => { var y = this; }; return x; } @@ -5847,8 +5847,8 @@ module sagitta { >x : lavali.lepturus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : leptoceros +>this : leptoceros >x : lavali.lepturus rex(): lavali.wilsoni { var x: lavali.wilsoni; () => { var y = this; }; return x; } @@ -5857,8 +5857,8 @@ module sagitta { >x : lavali.wilsoni >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : leptoceros +>this : leptoceros >x : lavali.wilsoni bolami(): trivirgatus.tumidifrons { var x: trivirgatus.tumidifrons; () => { var y = this; }; return x; } @@ -5871,8 +5871,8 @@ module sagitta { >lutreolus : any >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : leptoceros +>this : leptoceros >x : trivirgatus.tumidifrons } } @@ -5891,8 +5891,8 @@ module daubentonii { >x : dogramacii.robustulus >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : nigricans +>this : nigricans >x : dogramacii.robustulus } } @@ -5920,8 +5920,8 @@ module argurus { >x : gabriellae.echinatus >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pygmaea +>this : pygmaea >x : gabriellae.echinatus capucinus(): rendalli.zuluensis { var x: rendalli.zuluensis; () => { var y = this; }; return x; } @@ -5930,8 +5930,8 @@ module argurus { >x : rendalli.zuluensis >rendalli : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pygmaea +>this : pygmaea >x : rendalli.zuluensis cuvieri(): rionegrensis.caniventer { var x: rionegrensis.caniventer; () => { var y = this; }; return x; } @@ -5940,8 +5940,8 @@ module argurus { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : pygmaea +>this : pygmaea >x : rionegrensis.caniventer } } @@ -5960,8 +5960,8 @@ module chrysaeolus { >x : samarensis.pallidus >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sarasinorum +>this : sarasinorum >x : samarensis.pallidus hinpoon(): nigra.caucasica { var x: nigra.caucasica; () => { var y = this; }; return x; } @@ -5974,8 +5974,8 @@ module chrysaeolus { >julianae : any >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sarasinorum +>this : sarasinorum >x : nigra.caucasica kandti(): quasiater.wattsi { var x: quasiater.wattsi; () => { var y = this; }; return x; } @@ -5988,8 +5988,8 @@ module chrysaeolus { >Lanthanum : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sarasinorum +>this : sarasinorum >x : quasiater.wattsi cynosuros(): dammermani.melanops { var x: dammermani.melanops; () => { var y = this; }; return x; } @@ -5998,8 +5998,8 @@ module chrysaeolus { >x : dammermani.melanops >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sarasinorum +>this : sarasinorum >x : dammermani.melanops Germanium(): lavali.beisa { var x: lavali.beisa; () => { var y = this; }; return x; } @@ -6008,8 +6008,8 @@ module chrysaeolus { >x : lavali.beisa >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sarasinorum +>this : sarasinorum >x : lavali.beisa Ununoctium(): nigra.gracilis { var x: nigra.gracilis; () => { var y = this; }; return x; } @@ -6022,8 +6022,8 @@ module chrysaeolus { >lavali : any >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sarasinorum +>this : sarasinorum >x : nigra.gracilis princeps(): minutus.portoricensis { var x: minutus.portoricensis; () => { var y = this; }; return x; } @@ -6032,8 +6032,8 @@ module chrysaeolus { >x : minutus.portoricensis >minutus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sarasinorum +>this : sarasinorum >x : minutus.portoricensis } } @@ -6053,8 +6053,8 @@ module argurus { >dogramacii : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wetmorei +>this : wetmorei >x : petrophilus.rosalia ochraventer(): sagitta.walkeri { var x: sagitta.walkeri; () => { var y = this; }; return x; } @@ -6063,8 +6063,8 @@ module argurus { >x : sagitta.walkeri >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wetmorei +>this : wetmorei >x : sagitta.walkeri tephromelas(): Lanthanum.jugularis { var x: Lanthanum.jugularis; () => { var y = this; }; return x; } @@ -6073,8 +6073,8 @@ module argurus { >x : Lanthanum.jugularis >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wetmorei +>this : wetmorei >x : Lanthanum.jugularis cracens(): argurus.gilbertii { var x: argurus.gilbertii; () => { var y = this; }; return x; } @@ -6087,8 +6087,8 @@ module argurus { >lavali : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wetmorei +>this : wetmorei >x : gilbertii jamaicensis(): nigra.thalia> { var x: nigra.thalia>; () => { var y = this; }; return x; } @@ -6105,8 +6105,8 @@ module argurus { >trivirgatus : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wetmorei +>this : wetmorei >x : nigra.thalia> gymnocaudus(): dogramacii.aurata { var x: dogramacii.aurata; () => { var y = this; }; return x; } @@ -6115,8 +6115,8 @@ module argurus { >x : dogramacii.aurata >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wetmorei +>this : wetmorei >x : dogramacii.aurata mayori(): sagitta.stolzmanni { var x: sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -6125,8 +6125,8 @@ module argurus { >x : sagitta.stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wetmorei +>this : wetmorei >x : sagitta.stolzmanni } } @@ -6145,8 +6145,8 @@ module argurus { >x : lavali.xanthognathus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oreas +>this : oreas >x : lavali.xanthognathus paniscus(): ruatanica.Praseodymium { var x: ruatanica.Praseodymium; () => { var y = this; }; return x; } @@ -6159,8 +6159,8 @@ module argurus { >caurinus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oreas +>this : oreas >x : ruatanica.Praseodymium fagani(): trivirgatus.oconnelli { var x: trivirgatus.oconnelli; () => { var y = this; }; return x; } @@ -6169,8 +6169,8 @@ module argurus { >x : trivirgatus.oconnelli >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oreas +>this : oreas >x : trivirgatus.oconnelli papuanus(): panglima.fundatus { var x: panglima.fundatus; () => { var y = this; }; return x; } @@ -6183,8 +6183,8 @@ module argurus { >quasiater : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oreas +>this : oreas >x : panglima.fundatus timidus(): dammermani.melanops { var x: dammermani.melanops; () => { var y = this; }; return x; } @@ -6193,8 +6193,8 @@ module argurus { >x : dammermani.melanops >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oreas +>this : oreas >x : dammermani.melanops nghetinhensis(): gabriellae.klossii { var x: gabriellae.klossii; () => { var y = this; }; return x; } @@ -6207,8 +6207,8 @@ module argurus { >argurus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oreas +>this : oreas >x : gabriellae.klossii barbei(): samarensis.cahirinus { var x: samarensis.cahirinus; () => { var y = this; }; return x; } @@ -6221,8 +6221,8 @@ module argurus { >lavali : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oreas +>this : oreas >x : samarensis.cahirinus univittatus(): argurus.peninsulae { var x: argurus.peninsulae; () => { var y = this; }; return x; } @@ -6231,8 +6231,8 @@ module argurus { >x : peninsulae >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : oreas +>this : oreas >x : peninsulae } } @@ -6256,8 +6256,8 @@ module daubentonii { >ruatanica : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : rendalli.crenulata, lavali.wilsoni> moreni(): panglima.abidi { var x: panglima.abidi; () => { var y = this; }; return x; } @@ -6270,8 +6270,8 @@ module daubentonii { >julianae : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : panglima.abidi hypoleucos(): nigra.gracilis { var x: nigra.gracilis; () => { var y = this; }; return x; } @@ -6284,8 +6284,8 @@ module daubentonii { >trivirgatus : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : nigra.gracilis paedulcus(): minutus.portoricensis { var x: minutus.portoricensis; () => { var y = this; }; return x; } @@ -6294,8 +6294,8 @@ module daubentonii { >x : minutus.portoricensis >minutus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : minutus.portoricensis pucheranii(): samarensis.fuscus { var x: samarensis.fuscus; () => { var y = this; }; return x; } @@ -6308,8 +6308,8 @@ module daubentonii { >julianae : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : samarensis.fuscus stella(): julianae.oralis { var x: julianae.oralis; () => { var y = this; }; return x; } @@ -6322,8 +6322,8 @@ module daubentonii { >lutreolus : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : julianae.oralis brasiliensis(): imperfecta.subspinosus { var x: imperfecta.subspinosus; () => { var y = this; }; return x; } @@ -6332,8 +6332,8 @@ module daubentonii { >x : imperfecta.subspinosus >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : imperfecta.subspinosus brevicaudata(): trivirgatus.oconnelli { var x: trivirgatus.oconnelli; () => { var y = this; }; return x; } @@ -6342,8 +6342,8 @@ module daubentonii { >x : trivirgatus.oconnelli >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : trivirgatus.oconnelli vitticollis(): dogramacii.koepckeae { var x: dogramacii.koepckeae; () => { var y = this; }; return x; } @@ -6352,8 +6352,8 @@ module daubentonii { >x : dogramacii.koepckeae >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : dogramacii.koepckeae huangensis(): caurinus.psilurus { var x: caurinus.psilurus; () => { var y = this; }; return x; } @@ -6362,8 +6362,8 @@ module daubentonii { >x : caurinus.psilurus >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : caurinus.psilurus cameroni(): petrophilus.rosalia, imperfecta.ciliolabrum>, caurinus.psilurus> { var x: petrophilus.rosalia, imperfecta.ciliolabrum>, caurinus.psilurus>; () => { var y = this; }; return x; } @@ -6388,8 +6388,8 @@ module daubentonii { >petrophilus : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : petrophilus.rosalia, imperfecta.ciliolabrum>, caurinus.psilurus> tianshanica(): howi.marcanoi { var x: howi.marcanoi; () => { var y = this; }; return x; } @@ -6398,8 +6398,8 @@ module daubentonii { >x : howi.marcanoi >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : arboreus +>this : arboreus >x : howi.marcanoi } } @@ -6419,8 +6419,8 @@ module patas { >rionegrensis : any >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : Lanthanum.nitidus pyrrhinus(): lavali.beisa { var x: lavali.beisa; () => { var y = this; }; return x; } @@ -6429,8 +6429,8 @@ module patas { >x : lavali.beisa >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : lavali.beisa insulans(): Lanthanum.jugularis { var x: Lanthanum.jugularis; () => { var y = this; }; return x; } @@ -6439,8 +6439,8 @@ module patas { >x : Lanthanum.jugularis >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : Lanthanum.jugularis nigricauda(): caurinus.johorensis, Lanthanum.jugularis> { var x: caurinus.johorensis, Lanthanum.jugularis>; () => { var y = this; }; return x; } @@ -6457,8 +6457,8 @@ module patas { >julianae : any >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : caurinus.johorensis, Lanthanum.jugularis> muricauda(): panglima.fundatus> { var x: panglima.fundatus>; () => { var y = this; }; return x; } @@ -6475,8 +6475,8 @@ module patas { >lutreolus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : panglima.fundatus> albicaudus(): sagitta.stolzmanni { var x: sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -6485,8 +6485,8 @@ module patas { >x : sagitta.stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : sagitta.stolzmanni fallax(): ruatanica.hector { var x: ruatanica.hector; () => { var y = this; }; return x; } @@ -6499,8 +6499,8 @@ module patas { >lutreolus : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : ruatanica.hector attenuata(): macrorhinos.marmosurus> { var x: macrorhinos.marmosurus>; () => { var y = this; }; return x; } @@ -6517,8 +6517,8 @@ module patas { >quasiater : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : macrorhinos.marmosurus> megalura(): howi.marcanoi { var x: howi.marcanoi; () => { var y = this; }; return x; } @@ -6527,8 +6527,8 @@ module patas { >x : howi.marcanoi >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : howi.marcanoi neblina(): samarensis.pelurus { var x: samarensis.pelurus; () => { var y = this; }; return x; } @@ -6541,8 +6541,8 @@ module patas { >macrorhinos : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : samarensis.pelurus citellus(): daubentonii.arboreus { var x: daubentonii.arboreus; () => { var y = this; }; return x; } @@ -6555,8 +6555,8 @@ module patas { >quasiater : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : daubentonii.arboreus tanezumi(): imperfecta.lasiurus { var x: imperfecta.lasiurus; () => { var y = this; }; return x; } @@ -6569,8 +6569,8 @@ module patas { >dogramacii : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : imperfecta.lasiurus albiventer(): rendalli.crenulata { var x: rendalli.crenulata; () => { var y = this; }; return x; } @@ -6583,8 +6583,8 @@ module patas { >rendalli : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : uralensis +>this : uralensis >x : rendalli.crenulata } } @@ -6611,8 +6611,8 @@ module provocax { >quasiater : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanoleuca +>this : melanoleuca >x : macrorhinos.marmosurus, lutreolus.foina> baeri(): imperfecta.lasiurus { var x: imperfecta.lasiurus; () => { var y = this; }; return x; } @@ -6625,8 +6625,8 @@ module provocax { >lavali : any >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanoleuca +>this : melanoleuca >x : imperfecta.lasiurus } } @@ -6650,8 +6650,8 @@ module sagitta { >imperfecta : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sicarius +>this : sicarius >x : samarensis.cahirinus, dogramacii.robustulus> simulator(): macrorhinos.marmosurus, macrorhinos.marmosurus, gabriellae.echinatus>, sagitta.stolzmanni>> { var x: macrorhinos.marmosurus, macrorhinos.marmosurus, gabriellae.echinatus>, sagitta.stolzmanni>>; () => { var y = this; }; return x; } @@ -6680,8 +6680,8 @@ module sagitta { >gabriellae : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sicarius +>this : sicarius >x : macrorhinos.marmosurus, macrorhinos.marmosurus, gabriellae.echinatus>, stolzmanni>> } } @@ -6700,8 +6700,8 @@ module howi { >x : Lanthanum.megalonyx >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : Lanthanum.megalonyx dudui(): lutreolus.punicus { var x: lutreolus.punicus; () => { var y = this; }; return x; } @@ -6710,8 +6710,8 @@ module howi { >x : lutreolus.punicus >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : lutreolus.punicus leander(): daubentonii.nesiotes { var x: daubentonii.nesiotes; () => { var y = this; }; return x; } @@ -6724,8 +6724,8 @@ module howi { >Lanthanum : any >minutus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : daubentonii.nesiotes martinsi(): dogramacii.aurata { var x: dogramacii.aurata; () => { var y = this; }; return x; } @@ -6734,8 +6734,8 @@ module howi { >x : dogramacii.aurata >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : dogramacii.aurata beatrix(): imperfecta.ciliolabrum, gabriellae.echinatus>, dogramacii.aurata>, imperfecta.ciliolabrum>> { var x: imperfecta.ciliolabrum, gabriellae.echinatus>, dogramacii.aurata>, imperfecta.ciliolabrum>>; () => { var y = this; }; return x; } @@ -6768,8 +6768,8 @@ module howi { >quasiater : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : imperfecta.ciliolabrum, gabriellae.echinatus>, dogramacii.aurata>, imperfecta.ciliolabrum>> griseoventer(): argurus.oreas { var x: argurus.oreas; () => { var y = this; }; return x; } @@ -6778,8 +6778,8 @@ module howi { >x : argurus.oreas >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : argurus.oreas zerda(): quasiater.wattsi, howi.coludo>> { var x: quasiater.wattsi, howi.coludo>>; () => { var y = this; }; return x; } @@ -6804,8 +6804,8 @@ module howi { >lavali : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : quasiater.wattsi, coludo>> yucatanicus(): julianae.nudicaudus { var x: julianae.nudicaudus; () => { var y = this; }; return x; } @@ -6814,8 +6814,8 @@ module howi { >x : julianae.nudicaudus >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : julianae.nudicaudus nigrita(): argurus.peninsulae { var x: argurus.peninsulae; () => { var y = this; }; return x; } @@ -6824,8 +6824,8 @@ module howi { >x : argurus.peninsulae >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : argurus.peninsulae jouvenetae(): argurus.dauricus { var x: argurus.dauricus; () => { var y = this; }; return x; } @@ -6838,8 +6838,8 @@ module howi { >argurus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : argurus.dauricus indefessus(): sagitta.walkeri { var x: sagitta.walkeri; () => { var y = this; }; return x; } @@ -6848,8 +6848,8 @@ module howi { >x : sagitta.walkeri >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : sagitta.walkeri vuquangensis(): macrorhinos.daphaenodon { var x: macrorhinos.daphaenodon; () => { var y = this; }; return x; } @@ -6858,8 +6858,8 @@ module howi { >x : macrorhinos.daphaenodon >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : macrorhinos.daphaenodon Zirconium(): lavali.thaeleri { var x: lavali.thaeleri; () => { var y = this; }; return x; } @@ -6868,8 +6868,8 @@ module howi { >x : lavali.thaeleri >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : lavali.thaeleri hyaena(): julianae.oralis { var x: julianae.oralis; () => { var y = this; }; return x; } @@ -6882,8 +6882,8 @@ module howi { >lavali : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : marcanoi +>this : marcanoi >x : julianae.oralis } } @@ -6899,8 +6899,8 @@ module argurus { >x : lavali.lepturus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : lavali.lepturus poecilops(): julianae.steerii { var x: julianae.steerii; () => { var y = this; }; return x; } @@ -6909,8 +6909,8 @@ module argurus { >x : julianae.steerii >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : julianae.steerii sondaicus(): samarensis.fuscus { var x: samarensis.fuscus; () => { var y = this; }; return x; } @@ -6923,8 +6923,8 @@ module argurus { >argurus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : samarensis.fuscus auriventer(): petrophilus.rosalia { var x: petrophilus.rosalia; () => { var y = this; }; return x; } @@ -6937,8 +6937,8 @@ module argurus { >lavali : any >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : petrophilus.rosalia cherriei(): ruatanica.Praseodymium { var x: ruatanica.Praseodymium; () => { var y = this; }; return x; } @@ -6951,8 +6951,8 @@ module argurus { >Lanthanum : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : ruatanica.Praseodymium lindberghi(): minutus.inez { var x: minutus.inez; () => { var y = this; }; return x; } @@ -6965,8 +6965,8 @@ module argurus { >rendalli : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : minutus.inez pipistrellus(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; } @@ -6975,8 +6975,8 @@ module argurus { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : quasiater.carolinensis paranus(): lutreolus.punicus { var x: lutreolus.punicus; () => { var y = this; }; return x; } @@ -6985,8 +6985,8 @@ module argurus { >x : lutreolus.punicus >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : lutreolus.punicus dubosti(): nigra.thalia { var x: nigra.thalia; () => { var y = this; }; return x; } @@ -6999,8 +6999,8 @@ module argurus { >lutreolus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : nigra.thalia opossum(): nigra.dolichurus { var x: nigra.dolichurus; () => { var y = this; }; return x; } @@ -7013,8 +7013,8 @@ module argurus { >lavali : any >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : nigra.dolichurus oreopolus(): minutus.portoricensis { var x: minutus.portoricensis; () => { var y = this; }; return x; } @@ -7023,8 +7023,8 @@ module argurus { >x : minutus.portoricensis >minutus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : minutus.portoricensis amurensis(): daubentonii.arboreus { var x: daubentonii.arboreus; () => { var y = this; }; return x; } @@ -7037,8 +7037,8 @@ module argurus { >lavali : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : gilbertii +>this : gilbertii >x : daubentonii.arboreus } } @@ -7065,8 +7065,8 @@ module lutreolus { >Lanthanum : any >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : gabriellae.klossii lar(): caurinus.mahaganus { var x: caurinus.mahaganus; () => { var y = this; }; return x; } @@ -7079,8 +7079,8 @@ module lutreolus { >julianae : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : caurinus.mahaganus erica(): dogramacii.koepckeae { var x: dogramacii.koepckeae; () => { var y = this; }; return x; } @@ -7089,8 +7089,8 @@ module lutreolus { >x : dogramacii.koepckeae >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : dogramacii.koepckeae trichura(): macrorhinos.konganensis { var x: macrorhinos.konganensis; () => { var y = this; }; return x; } @@ -7099,8 +7099,8 @@ module lutreolus { >x : macrorhinos.konganensis >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : macrorhinos.konganensis lemniscatus(): panglima.fundatus { var x: panglima.fundatus; () => { var y = this; }; return x; } @@ -7113,8 +7113,8 @@ module lutreolus { >gabriellae : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : panglima.fundatus aspalax(): panamensis.linulus { var x: panamensis.linulus; () => { var y = this; }; return x; } @@ -7127,8 +7127,8 @@ module lutreolus { >lavali : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : panamensis.linulus marshalli(): julianae.nudicaudus { var x: julianae.nudicaudus; () => { var y = this; }; return x; } @@ -7137,8 +7137,8 @@ module lutreolus { >x : julianae.nudicaudus >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : julianae.nudicaudus Zinc(): julianae.galapagoensis { var x: julianae.galapagoensis; () => { var y = this; }; return x; } @@ -7147,8 +7147,8 @@ module lutreolus { >x : julianae.galapagoensis >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : julianae.galapagoensis monochromos(): howi.coludo { var x: howi.coludo; () => { var y = this; }; return x; } @@ -7161,8 +7161,8 @@ module lutreolus { >lavali : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : howi.coludo purinus(): ruatanica.hector { var x: ruatanica.hector; () => { var y = this; }; return x; } @@ -7175,8 +7175,8 @@ module lutreolus { >lutreolus : any >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : ruatanica.hector ischyrus(): lavali.lepturus { var x: lavali.lepturus; () => { var y = this; }; return x; } @@ -7185,8 +7185,8 @@ module lutreolus { >x : lavali.lepturus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : lavali.lepturus tenuis(): macrorhinos.daphaenodon { var x: macrorhinos.daphaenodon; () => { var y = this; }; return x; } @@ -7195,8 +7195,8 @@ module lutreolus { >x : macrorhinos.daphaenodon >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : macrorhinos.daphaenodon Helium(): julianae.acariensis { var x: julianae.acariensis; () => { var y = this; }; return x; } @@ -7205,8 +7205,8 @@ module lutreolus { >x : julianae.acariensis >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : punicus +>this : punicus >x : julianae.acariensis } } @@ -7222,8 +7222,8 @@ module macrorhinos { >x : julianae.sumatrana >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : daphaenodon +>this : daphaenodon >x : julianae.sumatrana othus(): howi.coludo { var x: howi.coludo; () => { var y = this; }; return x; } @@ -7236,8 +7236,8 @@ module macrorhinos { >argurus : any >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : daphaenodon +>this : daphaenodon >x : howi.coludo hammondi(): julianae.gerbillus, gabriellae.echinatus>, dogramacii.aurata>, lavali.otion> { var x: julianae.gerbillus, gabriellae.echinatus>, dogramacii.aurata>, lavali.otion>; () => { var y = this; }; return x; } @@ -7262,8 +7262,8 @@ module macrorhinos { >dogramacii : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : daphaenodon +>this : daphaenodon >x : julianae.gerbillus, gabriellae.echinatus>, dogramacii.aurata>, lavali.otion> aureocollaris(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; } @@ -7272,8 +7272,8 @@ module macrorhinos { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : daphaenodon +>this : daphaenodon >x : quasiater.carolinensis flavipes(): petrophilus.minutilla { var x: petrophilus.minutilla; () => { var y = this; }; return x; } @@ -7282,8 +7282,8 @@ module macrorhinos { >x : petrophilus.minutilla >petrophilus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : daphaenodon +>this : daphaenodon >x : petrophilus.minutilla callosus(): trivirgatus.lotor { var x: trivirgatus.lotor; () => { var y = this; }; return x; } @@ -7296,8 +7296,8 @@ module macrorhinos { >lutreolus : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : daphaenodon +>this : daphaenodon >x : trivirgatus.lotor } } @@ -7321,8 +7321,8 @@ module sagitta { >lavali : any >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : rendalli.crenulata> microps(): daubentonii.nigricans> { var x: daubentonii.nigricans>; () => { var y = this; }; return x; } @@ -7339,8 +7339,8 @@ module sagitta { >Lanthanum : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : daubentonii.nigricans> guaporensis(): daubentonii.arboreus { var x: daubentonii.arboreus; () => { var y = this; }; return x; } @@ -7353,8 +7353,8 @@ module sagitta { >gabriellae : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : daubentonii.arboreus tonkeana(): panglima.fundatus { var x: panglima.fundatus; () => { var y = this; }; return x; } @@ -7367,8 +7367,8 @@ module sagitta { >petrophilus : any >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : panglima.fundatus montensis(): dammermani.siberu { var x: dammermani.siberu; () => { var y = this; }; return x; } @@ -7381,8 +7381,8 @@ module sagitta { >dogramacii : any >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : dammermani.siberu sphinx(): minutus.portoricensis { var x: minutus.portoricensis; () => { var y = this; }; return x; } @@ -7391,8 +7391,8 @@ module sagitta { >x : minutus.portoricensis >minutus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : minutus.portoricensis glis(): argurus.wetmorei { var x: argurus.wetmorei; () => { var y = this; }; return x; } @@ -7405,8 +7405,8 @@ module sagitta { >argurus : any >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : argurus.wetmorei dorsalis(): petrophilus.sodyi { var x: petrophilus.sodyi; () => { var y = this; }; return x; } @@ -7419,8 +7419,8 @@ module sagitta { >argurus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : petrophilus.sodyi fimbriatus(): provocax.melanoleuca { var x: provocax.melanoleuca; () => { var y = this; }; return x; } @@ -7429,8 +7429,8 @@ module sagitta { >x : provocax.melanoleuca >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : provocax.melanoleuca sara(): nigra.gracilis { var x: nigra.gracilis; () => { var y = this; }; return x; } @@ -7443,8 +7443,8 @@ module sagitta { >argurus : any >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : nigra.gracilis epimelas(): sagitta.stolzmanni { var x: sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -7453,8 +7453,8 @@ module sagitta { >x : stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : stolzmanni pittieri(): samarensis.fuscus { var x: samarensis.fuscus; () => { var y = this; }; return x; } @@ -7467,8 +7467,8 @@ module sagitta { >quasiater : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cinereus +>this : cinereus >x : samarensis.fuscus } } @@ -7499,8 +7499,8 @@ module gabriellae { >x : argurus.luctuosa >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amicus +>this : amicus >x : argurus.luctuosa phaeura(): panglima.abidi { var x: panglima.abidi; () => { var y = this; }; return x; } @@ -7513,8 +7513,8 @@ module gabriellae { >lutreolus : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amicus +>this : amicus >x : panglima.abidi voratus(): lavali.thaeleri { var x: lavali.thaeleri; () => { var y = this; }; return x; } @@ -7523,8 +7523,8 @@ module gabriellae { >x : lavali.thaeleri >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amicus +>this : amicus >x : lavali.thaeleri satarae(): trivirgatus.lotor { var x: trivirgatus.lotor; () => { var y = this; }; return x; } @@ -7537,8 +7537,8 @@ module gabriellae { >argurus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amicus +>this : amicus >x : trivirgatus.lotor hooperi(): caurinus.psilurus { var x: caurinus.psilurus; () => { var y = this; }; return x; } @@ -7547,8 +7547,8 @@ module gabriellae { >x : caurinus.psilurus >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amicus +>this : amicus >x : caurinus.psilurus perrensi(): rendalli.crenulata { var x: rendalli.crenulata; () => { var y = this; }; return x; } @@ -7561,8 +7561,8 @@ module gabriellae { >trivirgatus : any >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amicus +>this : amicus >x : rendalli.crenulata ridei(): ruatanica.hector> { var x: ruatanica.hector>; () => { var y = this; }; return x; } @@ -7579,8 +7579,8 @@ module gabriellae { >Lanthanum : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amicus +>this : amicus >x : ruatanica.hector> audeberti(): daubentonii.arboreus { var x: daubentonii.arboreus; () => { var y = this; }; return x; } @@ -7593,8 +7593,8 @@ module gabriellae { >dogramacii : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amicus +>this : amicus >x : daubentonii.arboreus Lutetium(): macrorhinos.marmosurus { var x: macrorhinos.marmosurus; () => { var y = this; }; return x; } @@ -7607,8 +7607,8 @@ module gabriellae { >sagitta : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amicus +>this : amicus >x : macrorhinos.marmosurus atrox(): samarensis.fuscus, dogramacii.koepckeae> { var x: samarensis.fuscus, dogramacii.koepckeae>; () => { var y = this; }; return x; } @@ -7625,8 +7625,8 @@ module gabriellae { >lavali : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : amicus +>this : amicus >x : samarensis.fuscus, dogramacii.koepckeae> } export class echinatus { @@ -7646,8 +7646,8 @@ module gabriellae { >macrorhinos : any >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : echinatus +>this : echinatus >x : howi.coludo> } } @@ -7663,8 +7663,8 @@ module imperfecta { >x : lavali.thaeleri >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : lasiurus +>this : lasiurus >x : lavali.thaeleri fulvus(): argurus.germaini { var x: argurus.germaini; () => { var y = this; }; return x; } @@ -7673,8 +7673,8 @@ module imperfecta { >x : argurus.germaini >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : lasiurus +>this : lasiurus >x : argurus.germaini paranaensis(): dogramacii.koepckeae { var x: dogramacii.koepckeae; () => { var y = this; }; return x; } @@ -7683,8 +7683,8 @@ module imperfecta { >x : dogramacii.koepckeae >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : lasiurus +>this : lasiurus >x : dogramacii.koepckeae didactylus(): panglima.abidi> { var x: panglima.abidi>; () => { var y = this; }; return x; } @@ -7701,8 +7701,8 @@ module imperfecta { >caurinus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : lasiurus +>this : lasiurus >x : panglima.abidi> schreibersii(): nigra.gracilis { var x: nigra.gracilis; () => { var y = this; }; return x; } @@ -7715,8 +7715,8 @@ module imperfecta { >argurus : any >ruatanica : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : lasiurus +>this : lasiurus >x : nigra.gracilis orii(): dogramacii.kaiseri { var x: dogramacii.kaiseri; () => { var y = this; }; return x; } @@ -7725,8 +7725,8 @@ module imperfecta { >x : dogramacii.kaiseri >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : lasiurus +>this : lasiurus >x : dogramacii.kaiseri } export class subspinosus { @@ -7738,8 +7738,8 @@ module imperfecta { >x : macrorhinos.konganensis >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : subspinosus +>this : subspinosus >x : macrorhinos.konganensis Gadolinium(): nigra.caucasica { var x: nigra.caucasica; () => { var y = this; }; return x; } @@ -7752,8 +7752,8 @@ module imperfecta { >sagitta : any >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : subspinosus +>this : subspinosus >x : nigra.caucasica oasicus(): caurinus.johorensis> { var x: caurinus.johorensis>; () => { var y = this; }; return x; } @@ -7770,8 +7770,8 @@ module imperfecta { >argurus : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : subspinosus +>this : subspinosus >x : caurinus.johorensis> paterculus(): lutreolus.punicus { var x: lutreolus.punicus; () => { var y = this; }; return x; } @@ -7780,8 +7780,8 @@ module imperfecta { >x : lutreolus.punicus >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : subspinosus +>this : subspinosus >x : lutreolus.punicus punctata(): lavali.thaeleri { var x: lavali.thaeleri; () => { var y = this; }; return x; } @@ -7790,8 +7790,8 @@ module imperfecta { >x : lavali.thaeleri >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : subspinosus +>this : subspinosus >x : lavali.thaeleri invictus(): sagitta.stolzmanni { var x: sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -7800,8 +7800,8 @@ module imperfecta { >x : sagitta.stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : subspinosus +>this : subspinosus >x : sagitta.stolzmanni stangeri(): petrophilus.minutilla { var x: petrophilus.minutilla; () => { var y = this; }; return x; } @@ -7810,8 +7810,8 @@ module imperfecta { >x : petrophilus.minutilla >petrophilus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : subspinosus +>this : subspinosus >x : petrophilus.minutilla siskiyou(): minutus.inez { var x: minutus.inez; () => { var y = this; }; return x; } @@ -7824,8 +7824,8 @@ module imperfecta { >macrorhinos : any >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : subspinosus +>this : subspinosus >x : minutus.inez welwitschii(): rionegrensis.caniventer { var x: rionegrensis.caniventer; () => { var y = this; }; return x; } @@ -7834,8 +7834,8 @@ module imperfecta { >x : rionegrensis.caniventer >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : subspinosus +>this : subspinosus >x : rionegrensis.caniventer Polonium(): lavali.wilsoni { var x: lavali.wilsoni; () => { var y = this; }; return x; } @@ -7844,8 +7844,8 @@ module imperfecta { >x : lavali.wilsoni >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : subspinosus +>this : subspinosus >x : lavali.wilsoni harpia(): argurus.luctuosa { var x: argurus.luctuosa; () => { var y = this; }; return x; } @@ -7854,8 +7854,8 @@ module imperfecta { >x : argurus.luctuosa >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : subspinosus +>this : subspinosus >x : argurus.luctuosa } export class ciliolabrum extends dogramacii.robustulus { @@ -7878,8 +7878,8 @@ module imperfecta { >argurus : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : ciliolabrum +>this : ciliolabrum >x : argurus.dauricus> ludia(): caurinus.johorensis { var x: caurinus.johorensis; () => { var y = this; }; return x; } @@ -7892,8 +7892,8 @@ module imperfecta { >rionegrensis : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : ciliolabrum +>this : ciliolabrum >x : caurinus.johorensis sinicus(): macrorhinos.marmosurus { var x: macrorhinos.marmosurus; () => { var y = this; }; return x; } @@ -7906,8 +7906,8 @@ module imperfecta { >macrorhinos : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : ciliolabrum +>this : ciliolabrum >x : macrorhinos.marmosurus } } @@ -7923,8 +7923,8 @@ module quasiater { >x : lavali.xanthognathus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wattsi +>this : wattsi >x : lavali.xanthognathus hussoni(): lavali.wilsoni { var x: lavali.wilsoni; () => { var y = this; }; return x; } @@ -7933,8 +7933,8 @@ module quasiater { >x : lavali.wilsoni >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wattsi +>this : wattsi >x : lavali.wilsoni bilarni(): samarensis.cahirinus>, dogramacii.koepckeae> { var x: samarensis.cahirinus>, dogramacii.koepckeae>; () => { var y = this; }; return x; } @@ -7955,8 +7955,8 @@ module quasiater { >lutreolus : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wattsi +>this : wattsi >x : samarensis.cahirinus>, dogramacii.koepckeae> cabrerae(): lavali.lepturus { var x: lavali.lepturus; () => { var y = this; }; return x; } @@ -7965,8 +7965,8 @@ module quasiater { >x : lavali.lepturus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : wattsi +>this : wattsi >x : lavali.lepturus } } @@ -7987,8 +7987,8 @@ module petrophilus { >x : samarensis.pallidus >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sodyi +>this : sodyi >x : samarensis.pallidus imberbis(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; } @@ -7997,8 +7997,8 @@ module petrophilus { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sodyi +>this : sodyi >x : quasiater.carolinensis cansdalei(): dammermani.melanops { var x: dammermani.melanops; () => { var y = this; }; return x; } @@ -8007,8 +8007,8 @@ module petrophilus { >x : dammermani.melanops >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sodyi +>this : sodyi >x : dammermani.melanops Lawrencium(): nigra.dolichurus { var x: nigra.dolichurus; () => { var y = this; }; return x; } @@ -8021,8 +8021,8 @@ module petrophilus { >julianae : any >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sodyi +>this : sodyi >x : nigra.dolichurus catta(): argurus.oreas { var x: argurus.oreas; () => { var y = this; }; return x; } @@ -8031,8 +8031,8 @@ module petrophilus { >x : argurus.oreas >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sodyi +>this : sodyi >x : argurus.oreas breviceps(): argurus.dauricus { var x: argurus.dauricus; () => { var y = this; }; return x; } @@ -8045,8 +8045,8 @@ module petrophilus { >dogramacii : any >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sodyi +>this : sodyi >x : argurus.dauricus transitionalis(): rendalli.zuluensis { var x: rendalli.zuluensis; () => { var y = this; }; return x; } @@ -8055,8 +8055,8 @@ module petrophilus { >x : rendalli.zuluensis >rendalli : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sodyi +>this : sodyi >x : rendalli.zuluensis heptneri(): argurus.germaini { var x: argurus.germaini; () => { var y = this; }; return x; } @@ -8065,8 +8065,8 @@ module petrophilus { >x : argurus.germaini >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sodyi +>this : sodyi >x : argurus.germaini bairdii(): lavali.beisa { var x: lavali.beisa; () => { var y = this; }; return x; } @@ -8075,8 +8075,8 @@ module petrophilus { >x : lavali.beisa >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : sodyi +>this : sodyi >x : lavali.beisa } } @@ -8099,8 +8099,8 @@ module caurinus { >x : argurus.oreas >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megaphyllus +>this : megaphyllus >x : argurus.oreas amatus(): lutreolus.schlegeli { var x: lutreolus.schlegeli; () => { var y = this; }; return x; } @@ -8109,8 +8109,8 @@ module caurinus { >x : lutreolus.schlegeli >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megaphyllus +>this : megaphyllus >x : lutreolus.schlegeli bucculentus(): gabriellae.echinatus { var x: gabriellae.echinatus; () => { var y = this; }; return x; } @@ -8119,8 +8119,8 @@ module caurinus { >x : gabriellae.echinatus >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megaphyllus +>this : megaphyllus >x : gabriellae.echinatus lepida(): rendalli.crenulata> { var x: rendalli.crenulata>; () => { var y = this; }; return x; } @@ -8137,8 +8137,8 @@ module caurinus { >gabriellae : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megaphyllus +>this : megaphyllus >x : rendalli.crenulata> graecus(): dogramacii.kaiseri { var x: dogramacii.kaiseri; () => { var y = this; }; return x; } @@ -8147,8 +8147,8 @@ module caurinus { >x : dogramacii.kaiseri >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megaphyllus +>this : megaphyllus >x : dogramacii.kaiseri forsteri(): petrophilus.minutilla { var x: petrophilus.minutilla; () => { var y = this; }; return x; } @@ -8157,8 +8157,8 @@ module caurinus { >x : petrophilus.minutilla >petrophilus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megaphyllus +>this : megaphyllus >x : petrophilus.minutilla perotensis(): samarensis.cahirinus { var x: samarensis.cahirinus; () => { var y = this; }; return x; } @@ -8171,8 +8171,8 @@ module caurinus { >minutus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megaphyllus +>this : megaphyllus >x : samarensis.cahirinus cirrhosus(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; } @@ -8181,8 +8181,8 @@ module caurinus { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : megaphyllus +>this : megaphyllus >x : quasiater.carolinensis } } @@ -8198,8 +8198,8 @@ module minutus { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : portoricensis +>this : portoricensis >x : quasiater.carolinensis aequatorianus(): gabriellae.klossii { var x: gabriellae.klossii; () => { var y = this; }; return x; } @@ -8212,8 +8212,8 @@ module minutus { >julianae : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : portoricensis +>this : portoricensis >x : gabriellae.klossii rhinogradoides(): samarensis.cahirinus { var x: samarensis.cahirinus; () => { var y = this; }; return x; } @@ -8226,8 +8226,8 @@ module minutus { >quasiater : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : portoricensis +>this : portoricensis >x : samarensis.cahirinus } } @@ -8243,8 +8243,8 @@ module lutreolus { >x : punicus >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : punicus Promethium(): samarensis.pelurus { var x: samarensis.pelurus; () => { var y = this; }; return x; } @@ -8257,8 +8257,8 @@ module lutreolus { >argurus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : samarensis.pelurus salinae(): gabriellae.klossii { var x: gabriellae.klossii; () => { var y = this; }; return x; } @@ -8271,8 +8271,8 @@ module lutreolus { >macrorhinos : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : gabriellae.klossii kerri(): howi.coludo { var x: howi.coludo; () => { var y = this; }; return x; } @@ -8285,8 +8285,8 @@ module lutreolus { >quasiater : any >minutus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : howi.coludo scotti(): quasiater.wattsi { var x: quasiater.wattsi; () => { var y = this; }; return x; } @@ -8299,8 +8299,8 @@ module lutreolus { >macrorhinos : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : quasiater.wattsi camerunensis(): julianae.gerbillus { var x: julianae.gerbillus; () => { var y = this; }; return x; } @@ -8313,8 +8313,8 @@ module lutreolus { >imperfecta : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : julianae.gerbillus affinis(): argurus.germaini { var x: argurus.germaini; () => { var y = this; }; return x; } @@ -8323,8 +8323,8 @@ module lutreolus { >x : argurus.germaini >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : argurus.germaini siebersi(): trivirgatus.lotor> { var x: trivirgatus.lotor>; () => { var y = this; }; return x; } @@ -8341,8 +8341,8 @@ module lutreolus { >patas : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : trivirgatus.lotor> maquassiensis(): trivirgatus.oconnelli { var x: trivirgatus.oconnelli; () => { var y = this; }; return x; } @@ -8351,8 +8351,8 @@ module lutreolus { >x : trivirgatus.oconnelli >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : trivirgatus.oconnelli layardi(): julianae.albidens { var x: julianae.albidens; () => { var y = this; }; return x; } @@ -8365,8 +8365,8 @@ module lutreolus { >howi : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : julianae.albidens bishopi(): dogramacii.aurata { var x: dogramacii.aurata; () => { var y = this; }; return x; } @@ -8375,8 +8375,8 @@ module lutreolus { >x : dogramacii.aurata >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : dogramacii.aurata apodemoides(): caurinus.psilurus { var x: caurinus.psilurus; () => { var y = this; }; return x; } @@ -8385,8 +8385,8 @@ module lutreolus { >x : caurinus.psilurus >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : caurinus.psilurus argentiventer(): trivirgatus.mixtus { var x: trivirgatus.mixtus; () => { var y = this; }; return x; } @@ -8399,8 +8399,8 @@ module lutreolus { >gabriellae : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : foina +>this : foina >x : trivirgatus.mixtus } } @@ -8429,8 +8429,8 @@ module lutreolus { >quasiater : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cor +>this : cor >x : petrophilus.sodyi voi(): caurinus.johorensis { var x: caurinus.johorensis; () => { var y = this; }; return x; } @@ -8443,8 +8443,8 @@ module lutreolus { >dammermani : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cor +>this : cor >x : caurinus.johorensis mussoi(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; } @@ -8453,8 +8453,8 @@ module lutreolus { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cor +>this : cor >x : quasiater.carolinensis truncatus(): trivirgatus.lotor { var x: trivirgatus.lotor; () => { var y = this; }; return x; } @@ -8467,8 +8467,8 @@ module lutreolus { >sagitta : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cor +>this : cor >x : trivirgatus.lotor achates(): provocax.melanoleuca { var x: provocax.melanoleuca; () => { var y = this; }; return x; } @@ -8477,8 +8477,8 @@ module lutreolus { >x : provocax.melanoleuca >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cor +>this : cor >x : provocax.melanoleuca praedatrix(): howi.angulatus { var x: howi.angulatus; () => { var y = this; }; return x; } @@ -8491,8 +8491,8 @@ module lutreolus { >dogramacii : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cor +>this : cor >x : howi.angulatus mzabi(): quasiater.wattsi, minutus.inez> { var x: quasiater.wattsi, minutus.inez>; () => { var y = this; }; return x; } @@ -8513,8 +8513,8 @@ module lutreolus { >trivirgatus : any >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cor +>this : cor >x : quasiater.wattsi, minutus.inez> xanthinus(): nigra.gracilis, howi.marcanoi> { var x: nigra.gracilis, howi.marcanoi>; () => { var y = this; }; return x; } @@ -8531,8 +8531,8 @@ module lutreolus { >minutus : any >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cor +>this : cor >x : nigra.gracilis, howi.marcanoi> tapoatafa(): caurinus.megaphyllus { var x: caurinus.megaphyllus; () => { var y = this; }; return x; } @@ -8541,8 +8541,8 @@ module lutreolus { >x : caurinus.megaphyllus >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cor +>this : cor >x : caurinus.megaphyllus castroviejoi(): Lanthanum.jugularis { var x: Lanthanum.jugularis; () => { var y = this; }; return x; } @@ -8551,8 +8551,8 @@ module lutreolus { >x : Lanthanum.jugularis >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : cor +>this : cor >x : Lanthanum.jugularis } } @@ -8568,8 +8568,8 @@ module howi { >x : lutreolus.punicus >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : coludo +>this : coludo >x : lutreolus.punicus isseli(): argurus.germaini { var x: argurus.germaini; () => { var y = this; }; return x; } @@ -8578,8 +8578,8 @@ module howi { >x : argurus.germaini >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : coludo +>this : coludo >x : argurus.germaini } } @@ -8598,8 +8598,8 @@ module argurus { >x : lavali.wilsoni >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : germaini +>this : germaini >x : lavali.wilsoni palmarum(): macrorhinos.marmosurus { var x: macrorhinos.marmosurus; () => { var y = this; }; return x; } @@ -8612,8 +8612,8 @@ module argurus { >Lanthanum : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : germaini +>this : germaini >x : macrorhinos.marmosurus } } @@ -8633,8 +8633,8 @@ module sagitta { >dogramacii : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : stolzmanni +>this : stolzmanni >x : nigra.dolichurus dhofarensis(): lutreolus.foina { var x: lutreolus.foina; () => { var y = this; }; return x; } @@ -8643,8 +8643,8 @@ module sagitta { >x : lutreolus.foina >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : stolzmanni +>this : stolzmanni >x : lutreolus.foina tricolor(): argurus.germaini { var x: argurus.germaini; () => { var y = this; }; return x; } @@ -8653,8 +8653,8 @@ module sagitta { >x : argurus.germaini >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : stolzmanni +>this : stolzmanni >x : argurus.germaini gardneri(): lavali.xanthognathus { var x: lavali.xanthognathus; () => { var y = this; }; return x; } @@ -8663,8 +8663,8 @@ module sagitta { >x : lavali.xanthognathus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : stolzmanni +>this : stolzmanni >x : lavali.xanthognathus walleri(): rendalli.moojeni, gabriellae.echinatus> { var x: rendalli.moojeni, gabriellae.echinatus>; () => { var y = this; }; return x; } @@ -8681,8 +8681,8 @@ module sagitta { >lavali : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : stolzmanni +>this : stolzmanni >x : rendalli.moojeni, gabriellae.echinatus> talpoides(): gabriellae.echinatus { var x: gabriellae.echinatus; () => { var y = this; }; return x; } @@ -8691,8 +8691,8 @@ module sagitta { >x : gabriellae.echinatus >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : stolzmanni +>this : stolzmanni >x : gabriellae.echinatus pallipes(): dammermani.melanops { var x: dammermani.melanops; () => { var y = this; }; return x; } @@ -8701,8 +8701,8 @@ module sagitta { >x : dammermani.melanops >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : stolzmanni +>this : stolzmanni >x : dammermani.melanops lagurus(): lavali.beisa { var x: lavali.beisa; () => { var y = this; }; return x; } @@ -8711,8 +8711,8 @@ module sagitta { >x : lavali.beisa >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : stolzmanni +>this : stolzmanni >x : lavali.beisa hipposideros(): julianae.albidens { var x: julianae.albidens; () => { var y = this; }; return x; } @@ -8725,8 +8725,8 @@ module sagitta { >argurus : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : stolzmanni +>this : stolzmanni >x : julianae.albidens griselda(): caurinus.psilurus { var x: caurinus.psilurus; () => { var y = this; }; return x; } @@ -8735,8 +8735,8 @@ module sagitta { >x : caurinus.psilurus >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : stolzmanni +>this : stolzmanni >x : caurinus.psilurus florium(): rendalli.zuluensis { var x: rendalli.zuluensis; () => { var y = this; }; return x; } @@ -8745,8 +8745,8 @@ module sagitta { >x : rendalli.zuluensis >rendalli : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : stolzmanni +>this : stolzmanni >x : rendalli.zuluensis } } @@ -8767,8 +8767,8 @@ module dammermani { >x : melanops >dammermani : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : melanops harwoodi(): rionegrensis.veraecrucis, lavali.wilsoni> { var x: rionegrensis.veraecrucis, lavali.wilsoni>; () => { var y = this; }; return x; } @@ -8785,8 +8785,8 @@ module dammermani { >samarensis : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : rionegrensis.veraecrucis, lavali.wilsoni> ashaninka(): julianae.nudicaudus { var x: julianae.nudicaudus; () => { var y = this; }; return x; } @@ -8795,8 +8795,8 @@ module dammermani { >x : julianae.nudicaudus >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : julianae.nudicaudus wiedii(): julianae.steerii { var x: julianae.steerii; () => { var y = this; }; return x; } @@ -8805,8 +8805,8 @@ module dammermani { >x : julianae.steerii >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : julianae.steerii godmani(): imperfecta.subspinosus { var x: imperfecta.subspinosus; () => { var y = this; }; return x; } @@ -8815,8 +8815,8 @@ module dammermani { >x : imperfecta.subspinosus >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : imperfecta.subspinosus condorensis(): imperfecta.ciliolabrum { var x: imperfecta.ciliolabrum; () => { var y = this; }; return x; } @@ -8829,8 +8829,8 @@ module dammermani { >samarensis : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : imperfecta.ciliolabrum xerophila(): panglima.abidi { var x: panglima.abidi; () => { var y = this; }; return x; } @@ -8843,8 +8843,8 @@ module dammermani { >minutus : any >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : panglima.abidi laminatus(): panglima.fundatus>> { var x: panglima.fundatus>>; () => { var y = this; }; return x; } @@ -8865,8 +8865,8 @@ module dammermani { >Lanthanum : any >imperfecta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : panglima.fundatus>> archeri(): howi.marcanoi { var x: howi.marcanoi; () => { var y = this; }; return x; } @@ -8875,8 +8875,8 @@ module dammermani { >x : howi.marcanoi >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : howi.marcanoi hidalgo(): minutus.inez { var x: minutus.inez; () => { var y = this; }; return x; } @@ -8889,8 +8889,8 @@ module dammermani { >trivirgatus : any >Lanthanum : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : minutus.inez unicolor(): lutreolus.schlegeli { var x: lutreolus.schlegeli; () => { var y = this; }; return x; } @@ -8899,8 +8899,8 @@ module dammermani { >x : lutreolus.schlegeli >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : lutreolus.schlegeli philippii(): nigra.gracilis { var x: nigra.gracilis; () => { var y = this; }; return x; } @@ -8913,8 +8913,8 @@ module dammermani { >sagitta : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : nigra.gracilis bocagei(): julianae.albidens { var x: julianae.albidens; () => { var y = this; }; return x; } @@ -8927,8 +8927,8 @@ module dammermani { >lavali : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : melanops +>this : melanops >x : julianae.albidens } } @@ -8959,8 +8959,8 @@ module argurus { >lavali : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : peninsulae +>this : peninsulae >x : trivirgatus.mixtus, panglima.amphibius> novaeangliae(): lavali.xanthognathus { var x: lavali.xanthognathus; () => { var y = this; }; return x; } @@ -8969,8 +8969,8 @@ module argurus { >x : lavali.xanthognathus >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : peninsulae +>this : peninsulae >x : lavali.xanthognathus olallae(): julianae.sumatrana { var x: julianae.sumatrana; () => { var y = this; }; return x; } @@ -8979,8 +8979,8 @@ module argurus { >x : julianae.sumatrana >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : peninsulae +>this : peninsulae >x : julianae.sumatrana anselli(): dogramacii.aurata { var x: dogramacii.aurata; () => { var y = this; }; return x; } @@ -8989,8 +8989,8 @@ module argurus { >x : dogramacii.aurata >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : peninsulae +>this : peninsulae >x : dogramacii.aurata timminsi(): macrorhinos.konganensis { var x: macrorhinos.konganensis; () => { var y = this; }; return x; } @@ -8999,8 +8999,8 @@ module argurus { >x : macrorhinos.konganensis >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : peninsulae +>this : peninsulae >x : macrorhinos.konganensis sordidus(): rendalli.moojeni { var x: rendalli.moojeni; () => { var y = this; }; return x; } @@ -9013,8 +9013,8 @@ module argurus { >macrorhinos : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : peninsulae +>this : peninsulae >x : rendalli.moojeni telfordi(): trivirgatus.oconnelli { var x: trivirgatus.oconnelli; () => { var y = this; }; return x; } @@ -9023,8 +9023,8 @@ module argurus { >x : trivirgatus.oconnelli >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : peninsulae +>this : peninsulae >x : trivirgatus.oconnelli cavernarum(): minutus.inez { var x: minutus.inez; () => { var y = this; }; return x; } @@ -9037,8 +9037,8 @@ module argurus { >gabriellae : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : peninsulae +>this : peninsulae >x : minutus.inez } } @@ -9062,8 +9062,8 @@ module argurus { >howi : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : nigra.caucasica, dogramacii.kaiseri> ruschii(): imperfecta.lasiurus> { var x: imperfecta.lasiurus>; () => { var y = this; }; return x; } @@ -9080,8 +9080,8 @@ module argurus { >Lanthanum : any >petrophilus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : imperfecta.lasiurus> tricuspidatus(): lavali.wilsoni { var x: lavali.wilsoni; () => { var y = this; }; return x; } @@ -9090,8 +9090,8 @@ module argurus { >x : lavali.wilsoni >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : lavali.wilsoni fernandezi(): dammermani.siberu, panglima.abidi> { var x: dammermani.siberu, panglima.abidi>; () => { var y = this; }; return x; } @@ -9112,8 +9112,8 @@ module argurus { >lutreolus : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : dammermani.siberu, panglima.abidi> colletti(): samarensis.pallidus { var x: samarensis.pallidus; () => { var y = this; }; return x; } @@ -9122,8 +9122,8 @@ module argurus { >x : samarensis.pallidus >samarensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : samarensis.pallidus microbullatus(): lutreolus.schlegeli { var x: lutreolus.schlegeli; () => { var y = this; }; return x; } @@ -9132,8 +9132,8 @@ module argurus { >x : lutreolus.schlegeli >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : lutreolus.schlegeli eburneae(): chrysaeolus.sarasinorum { var x: chrysaeolus.sarasinorum; () => { var y = this; }; return x; } @@ -9146,8 +9146,8 @@ module argurus { >macrorhinos : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : chrysaeolus.sarasinorum tatei(): argurus.pygmaea> { var x: argurus.pygmaea>; () => { var y = this; }; return x; } @@ -9164,8 +9164,8 @@ module argurus { >quasiater : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : pygmaea> millardi(): sagitta.walkeri { var x: sagitta.walkeri; () => { var y = this; }; return x; } @@ -9174,8 +9174,8 @@ module argurus { >x : sagitta.walkeri >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : sagitta.walkeri pruinosus(): trivirgatus.falconeri { var x: trivirgatus.falconeri; () => { var y = this; }; return x; } @@ -9184,8 +9184,8 @@ module argurus { >x : trivirgatus.falconeri >trivirgatus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : trivirgatus.falconeri delator(): argurus.netscheri { var x: argurus.netscheri; () => { var y = this; }; return x; } @@ -9198,8 +9198,8 @@ module argurus { >dogramacii : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : netscheri nyikae(): trivirgatus.tumidifrons, petrophilus.minutilla>, julianae.acariensis> { var x: trivirgatus.tumidifrons, petrophilus.minutilla>, julianae.acariensis>; () => { var y = this; }; return x; } @@ -9220,8 +9220,8 @@ module argurus { >petrophilus : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : trivirgatus.tumidifrons, petrophilus.minutilla>, julianae.acariensis> ruemmleri(): panglima.amphibius, gabriellae.echinatus>, dogramacii.aurata>, imperfecta.ciliolabrum> { var x: panglima.amphibius, gabriellae.echinatus>, dogramacii.aurata>, imperfecta.ciliolabrum>; () => { var y = this; }; return x; } @@ -9250,8 +9250,8 @@ module argurus { >quasiater : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : netscheri +>this : netscheri >x : panglima.amphibius, gabriellae.echinatus>, dogramacii.aurata>, imperfecta.ciliolabrum> } } @@ -9284,8 +9284,8 @@ module ruatanica { >ruatanica : any >rionegrensis : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : panglima.amphibius, argurus.dauricus> spectabilis(): petrophilus.sodyi { var x: petrophilus.sodyi; () => { var y = this; }; return x; } @@ -9298,8 +9298,8 @@ module ruatanica { >rionegrensis : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : petrophilus.sodyi kamensis(): trivirgatus.lotor, lavali.lepturus> { var x: trivirgatus.lotor, lavali.lepturus>; () => { var y = this; }; return x; } @@ -9316,8 +9316,8 @@ module ruatanica { >minutus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : trivirgatus.lotor, lavali.lepturus> ruddi(): lutreolus.foina { var x: lutreolus.foina; () => { var y = this; }; return x; } @@ -9326,8 +9326,8 @@ module ruatanica { >x : lutreolus.foina >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : lutreolus.foina bartelsii(): julianae.sumatrana { var x: julianae.sumatrana; () => { var y = this; }; return x; } @@ -9336,8 +9336,8 @@ module ruatanica { >x : julianae.sumatrana >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : julianae.sumatrana yerbabuenae(): dammermani.siberu, imperfecta.ciliolabrum> { var x: dammermani.siberu, imperfecta.ciliolabrum>; () => { var y = this; }; return x; } @@ -9358,8 +9358,8 @@ module ruatanica { >Lanthanum : any >petrophilus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : dammermani.siberu, imperfecta.ciliolabrum> davidi(): trivirgatus.mixtus { var x: trivirgatus.mixtus; () => { var y = this; }; return x; } @@ -9372,8 +9372,8 @@ module ruatanica { >provocax : any >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : trivirgatus.mixtus pilirostris(): argurus.wetmorei>, sagitta.leptoceros>>, macrorhinos.konganensis> { var x: argurus.wetmorei>, sagitta.leptoceros>>, macrorhinos.konganensis>; () => { var y = this; }; return x; } @@ -9406,8 +9406,8 @@ module ruatanica { >rionegrensis : any >macrorhinos : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : argurus.wetmorei>, sagitta.leptoceros>>, macrorhinos.konganensis> catherinae(): imperfecta.lasiurus, petrophilus.sodyi> { var x: imperfecta.lasiurus, petrophilus.sodyi>; () => { var y = this; }; return x; } @@ -9428,8 +9428,8 @@ module ruatanica { >macrorhinos : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : imperfecta.lasiurus, petrophilus.sodyi> frontata(): argurus.oreas { var x: argurus.oreas; () => { var y = this; }; return x; } @@ -9438,8 +9438,8 @@ module ruatanica { >x : argurus.oreas >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : argurus.oreas Terbium(): caurinus.mahaganus { var x: caurinus.mahaganus; () => { var y = this; }; return x; } @@ -9452,8 +9452,8 @@ module ruatanica { >julianae : any >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : caurinus.mahaganus thomensis(): minutus.inez> { var x: minutus.inez>; () => { var y = this; }; return x; } @@ -9470,8 +9470,8 @@ module ruatanica { >argurus : any >gabriellae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : minutus.inez> soricinus(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; } @@ -9480,8 +9480,8 @@ module ruatanica { >x : quasiater.carolinensis >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : Praseodymium +>this : Praseodymium >x : quasiater.carolinensis } } @@ -9504,8 +9504,8 @@ module caurinus { >lavali : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : johorensis +>this : johorensis >x : ruatanica.Praseodymium } } @@ -9537,8 +9537,8 @@ module argurus { >sagitta : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : luctuosa +>this : luctuosa >x : rendalli.moojeni, gabriellae.echinatus>, sagitta.stolzmanni>, lutreolus.punicus> } } @@ -9562,8 +9562,8 @@ module panamensis { >howi : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : setulosus +>this : setulosus >x : caurinus.mahaganus, dogramacii.aurata> guereza(): howi.coludo { var x: howi.coludo; () => { var y = this; }; return x; } @@ -9576,8 +9576,8 @@ module panamensis { >sagitta : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : setulosus +>this : setulosus >x : howi.coludo buselaphus(): daubentonii.nesiotes, dogramacii.koepckeae>, trivirgatus.mixtus> { var x: daubentonii.nesiotes, dogramacii.koepckeae>, trivirgatus.mixtus>; () => { var y = this; }; return x; } @@ -9602,8 +9602,8 @@ module panamensis { >gabriellae : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : setulosus +>this : setulosus >x : daubentonii.nesiotes, dogramacii.koepckeae>, trivirgatus.mixtus> nuttalli(): sagitta.cinereus, chrysaeolus.sarasinorum> { var x: sagitta.cinereus, chrysaeolus.sarasinorum>; () => { var y = this; }; return x; } @@ -9624,8 +9624,8 @@ module panamensis { >caurinus : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : setulosus +>this : setulosus >x : sagitta.cinereus, chrysaeolus.sarasinorum> pelii(): rendalli.crenulata, julianae.steerii> { var x: rendalli.crenulata, julianae.steerii>; () => { var y = this; }; return x; } @@ -9642,8 +9642,8 @@ module panamensis { >Lanthanum : any >julianae : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : setulosus +>this : setulosus >x : rendalli.crenulata, julianae.steerii> tunneyi(): sagitta.stolzmanni { var x: sagitta.stolzmanni; () => { var y = this; }; return x; } @@ -9652,8 +9652,8 @@ module panamensis { >x : sagitta.stolzmanni >sagitta : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : setulosus +>this : setulosus >x : sagitta.stolzmanni lamula(): patas.uralensis { var x: patas.uralensis; () => { var y = this; }; return x; } @@ -9662,8 +9662,8 @@ module panamensis { >x : patas.uralensis >patas : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : setulosus +>this : setulosus >x : patas.uralensis vampyrus(): julianae.oralis { var x: julianae.oralis; () => { var y = this; }; return x; } @@ -9676,8 +9676,8 @@ module panamensis { >lutreolus : any >provocax : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : setulosus +>this : setulosus >x : julianae.oralis } } @@ -9717,8 +9717,8 @@ module petrophilus { >lavali : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : rosalia +>this : rosalia >x : panglima.amphibius>, trivirgatus.mixtus, panglima.amphibius>> baeops(): Lanthanum.nitidus { var x: Lanthanum.nitidus; () => { var y = this; }; return x; } @@ -9731,8 +9731,8 @@ module petrophilus { >lavali : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : rosalia +>this : rosalia >x : Lanthanum.nitidus ozensis(): imperfecta.lasiurus, lutreolus.foina> { var x: imperfecta.lasiurus, lutreolus.foina>; () => { var y = this; }; return x; } @@ -9749,8 +9749,8 @@ module petrophilus { >lutreolus : any >lutreolus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : rosalia +>this : rosalia >x : imperfecta.lasiurus, lutreolus.foina> creaghi(): argurus.luctuosa { var x: argurus.luctuosa; () => { var y = this; }; return x; } @@ -9759,8 +9759,8 @@ module petrophilus { >x : argurus.luctuosa >argurus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : rosalia +>this : rosalia >x : argurus.luctuosa montivaga(): panamensis.setulosus> { var x: panamensis.setulosus>; () => { var y = this; }; return x; } @@ -9777,8 +9777,8 @@ module petrophilus { >caurinus : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : rosalia +>this : rosalia >x : panamensis.setulosus> } } @@ -9801,8 +9801,8 @@ module caurinus { >trivirgatus : any >caurinus : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : psilurus +>this : psilurus >x : panglima.amphibius lundi(): petrophilus.sodyi { var x: petrophilus.sodyi; () => { var y = this; }; return x; } @@ -9815,8 +9815,8 @@ module caurinus { >trivirgatus : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : psilurus +>this : psilurus >x : petrophilus.sodyi araeum(): imperfecta.ciliolabrum { var x: imperfecta.ciliolabrum; () => { var y = this; }; return x; } @@ -9829,8 +9829,8 @@ module caurinus { >quasiater : any >lavali : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : psilurus +>this : psilurus >x : imperfecta.ciliolabrum calamianensis(): julianae.gerbillus { var x: julianae.gerbillus; () => { var y = this; }; return x; } @@ -9843,8 +9843,8 @@ module caurinus { >lavali : any >quasiater : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : psilurus +>this : psilurus >x : julianae.gerbillus petersoni(): panamensis.setulosus { var x: panamensis.setulosus; () => { var y = this; }; return x; } @@ -9857,8 +9857,8 @@ module caurinus { >sagitta : any >dogramacii : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : psilurus +>this : psilurus >x : panamensis.setulosus nitela(): panamensis.linulus { var x: panamensis.linulus; () => { var y = this; }; return x; } @@ -9871,8 +9871,8 @@ module caurinus { >Lanthanum : any >howi : any >() => { var y = this; } : () => void ->y : this ->this : this +>y : psilurus +>this : psilurus >x : panamensis.linulus } } diff --git a/tests/baselines/reference/returnInConstructor1.errors.txt b/tests/baselines/reference/returnInConstructor1.errors.txt index 787e39dc71c..fb53039322a 100644 --- a/tests/baselines/reference/returnInConstructor1.errors.txt +++ b/tests/baselines/reference/returnInConstructor1.errors.txt @@ -4,13 +4,15 @@ tests/cases/compiler/returnInConstructor1.ts(25,9): error TS2322: Type 'string' tests/cases/compiler/returnInConstructor1.ts(25,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class. tests/cases/compiler/returnInConstructor1.ts(39,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class. tests/cases/compiler/returnInConstructor1.ts(39,18): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/returnInConstructor1.ts(54,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'F'. tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2322: Type 'G' is not assignable to type 'H'. Types of property 'foo' are incompatible. Type '() => void' is not assignable to type 'string'. tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class. +tests/cases/compiler/returnInConstructor1.ts(61,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'G'. -==== tests/cases/compiler/returnInConstructor1.ts (8 errors) ==== +==== tests/cases/compiler/returnInConstructor1.ts (10 errors) ==== class A { foo() { } constructor() { @@ -78,6 +80,8 @@ tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of class H extends F { constructor() { super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'F'. return new G(); //error ~~~~~~~~~~~~~~~ !!! error TS2322: Type 'G' is not assignable to type 'H'. @@ -91,6 +95,8 @@ tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of class I extends G { constructor() { super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'G'. return new G(); } } diff --git a/tests/baselines/reference/returnInConstructor1.types b/tests/baselines/reference/returnInConstructor1.types index 007271ddf4b..070aa7e4ea2 100644 --- a/tests/baselines/reference/returnInConstructor1.types +++ b/tests/baselines/reference/returnInConstructor1.types @@ -30,7 +30,7 @@ class C { constructor() { return this; ->this : this +>this : C } } @@ -90,7 +90,7 @@ class G { this.test = 2; >this.test = 2 : 2 >this.test : number ->this : this +>this : G >test : number >2 : 2 } diff --git a/tests/baselines/reference/returnTagTypeGuard.errors.txt b/tests/baselines/reference/returnTagTypeGuard.errors.txt new file mode 100644 index 00000000000..d4003fc6370 --- /dev/null +++ b/tests/baselines/reference/returnTagTypeGuard.errors.txt @@ -0,0 +1,70 @@ +tests/cases/conformance/jsdoc/bug25127.js(27,13): error TS2684: The 'this' context of type 'Entry | Group' is not assignable to method's 'this' of type 'Entry'. + Property 'c' is missing in type 'Group' but required in type 'Entry'. + + +==== tests/cases/conformance/jsdoc/bug25127.js (1 errors) ==== + class Entry { + constructor() { + this.c = 1 + } + /** + * @param {any} x + * @return {this is Entry} + */ + isInit(x) { + return true + } + } + class Group { + constructor() { + this.d = 'no' + } + /** + * @param {any} x + * @return {false} + */ + isInit(x) { + return false + } + } + /** @param {Entry | Group} chunk */ + function f(chunk) { + let x = chunk.isInit(chunk) ? chunk.c : chunk.d + ~~~~~ +!!! error TS2684: The 'this' context of type 'Entry | Group' is not assignable to method's 'this' of type 'Entry'. +!!! error TS2684: Property 'c' is missing in type 'Group' but required in type 'Entry'. +!!! related TS2728 tests/cases/conformance/jsdoc/bug25127.js:3:9: 'c' is declared here. + return x + } + + /** + * @param {any} value + * @return {value is boolean} + */ + function isBoolean(value) { + return typeof value === "boolean"; + } + + /** @param {boolean | number} val */ + function foo(val) { + if (isBoolean(val)) { + val; + } + } + + /** + * @callback Cb + * @param {unknown} x + * @return {x is number} + */ + + /** @type {Cb} */ + function isNumber(x) { return typeof x === "number" } + + /** @param {unknown} x */ + function g(x) { + if (isNumber(x)) { + x * 2; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/returnTagTypeGuard.types b/tests/baselines/reference/returnTagTypeGuard.types index 7056faa1336..5f31f6de161 100644 --- a/tests/baselines/reference/returnTagTypeGuard.types +++ b/tests/baselines/reference/returnTagTypeGuard.types @@ -6,7 +6,7 @@ class Entry { this.c = 1 >this.c = 1 : 1 >this.c : any ->this : this +>this : Entry >c : any >1 : 1 } @@ -29,7 +29,7 @@ class Group { this.d = 'no' >this.d = 'no' : "no" >this.d : any ->this : this +>this : Group >d : any >'no' : "no" } diff --git a/tests/baselines/reference/scannerClass2.types b/tests/baselines/reference/scannerClass2.types index bc10bf8db4c..a95f4e2b2c4 100644 --- a/tests/baselines/reference/scannerClass2.types +++ b/tests/baselines/reference/scannerClass2.types @@ -8,12 +8,12 @@ this._information = this.logger.information(); >this._information = this.logger.information() : any >this._information : any ->this : this +>this : LoggerAdapter >_information : any >this.logger.information() : any >this.logger.information : any >this.logger : ILogger ->this : this +>this : LoggerAdapter >logger : ILogger >information : any } diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.types b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.types index c215589faf8..8ae834d36bc 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.types +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.types @@ -20,7 +20,7 @@ class D extends C { this.p = 1; >this.p = 1 : 1 >this.p : any ->this : this +>this : D >p : any >1 : 1 diff --git a/tests/baselines/reference/scopeResolutionIdentifiers.types b/tests/baselines/reference/scopeResolutionIdentifiers.types index f4db1749346..2e371c08873 100644 --- a/tests/baselines/reference/scopeResolutionIdentifiers.types +++ b/tests/baselines/reference/scopeResolutionIdentifiers.types @@ -64,7 +64,7 @@ class C { var p = this.n; >p : Date >this.n : Date ->this : this +>this : C >n : Date var p: Date; diff --git a/tests/baselines/reference/scopeTests.types b/tests/baselines/reference/scopeTests.types index 50ca8f2a68d..9e21393abf3 100644 --- a/tests/baselines/reference/scopeTests.types +++ b/tests/baselines/reference/scopeTests.types @@ -23,14 +23,14 @@ class D extends C { this.v = 1; >this.v = 1 : 1 >this.v : number ->this : this +>this : D >v : number >1 : 1 this.p = 1; >this.p = 1 : 1 >this.p : number ->this : this +>this : D >p : number >1 : 1 diff --git a/tests/baselines/reference/selfInCallback.types b/tests/baselines/reference/selfInCallback.types index 2d3385e3be6..04eb356a16c 100644 --- a/tests/baselines/reference/selfInCallback.types +++ b/tests/baselines/reference/selfInCallback.types @@ -18,12 +18,12 @@ class C { this.callback(()=>{this.p1+1}); >this.callback(()=>{this.p1+1}) : void >this.callback : (cb: () => void) => void ->this : this +>this : C >callback : (cb: () => void) => void >()=>{this.p1+1} : () => void >this.p1+1 : number >this.p1 : number ->this : this +>this : C >p1 : number >1 : 1 } diff --git a/tests/baselines/reference/selfInLambdas.types b/tests/baselines/reference/selfInLambdas.types index 625c997d4ac..9b79b3b6e57 100644 --- a/tests/baselines/reference/selfInLambdas.types +++ b/tests/baselines/reference/selfInLambdas.types @@ -73,7 +73,7 @@ class X { var x = this.value; >x : string >this.value : string ->this : this +>this : X >value : string var inner = () => { @@ -83,7 +83,7 @@ class X { var y = this.value; >y : string >this.value : string ->this : this +>this : X >value : string } diff --git a/tests/baselines/reference/setterBeforeGetter.types b/tests/baselines/reference/setterBeforeGetter.types index 9b3dd39f1cc..6810b3131eb 100644 --- a/tests/baselines/reference/setterBeforeGetter.types +++ b/tests/baselines/reference/setterBeforeGetter.types @@ -15,7 +15,7 @@ class Foo { this._bar = thing; >this._bar = thing : { a: string; } >this._bar : { a: string; } ->this : this +>this : Foo >_bar : { a: string; } >thing : { a: string; } } @@ -25,7 +25,7 @@ class Foo { return this._bar; >this._bar : { a: string; } ->this : this +>this : Foo >_bar : { a: string; } } } diff --git a/tests/baselines/reference/shadowPrivateMembers.errors.txt b/tests/baselines/reference/shadowPrivateMembers.errors.txt index 2196224b7c4..453214fc938 100644 --- a/tests/baselines/reference/shadowPrivateMembers.errors.txt +++ b/tests/baselines/reference/shadowPrivateMembers.errors.txt @@ -1,11 +1,17 @@ -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'. +tests/cases/compiler/shadowPrivateMembers.ts(2,38): error TS2416: Property 'n' in type 'derived' is not assignable to the same property in base type 'base'. + Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'base' is not assignable to type 'derived'. + Types have separate declarations of a private property 'n'. ==== tests/cases/compiler/shadowPrivateMembers.ts (1 errors) ==== class base { private n() {} } class derived extends base { private n() {} } - ~~~~~~~ -!!! error TS2415: Class 'derived' incorrectly extends base class 'base'. -!!! error TS2415: Types have separate declarations of a private property 'n'. + ~ +!!! error TS2416: Property 'n' in type 'derived' is not assignable to the same property in base type 'base'. +!!! error TS2416: Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'base' is not assignable to type 'derived'. +!!! error TS2416: Types have separate declarations of a private property 'n'. \ No newline at end of file diff --git a/tests/baselines/reference/shadowedReservedCompilerDeclarationsWithNoEmit.types b/tests/baselines/reference/shadowedReservedCompilerDeclarationsWithNoEmit.types index 2b6b63f0dcd..33e940dd0a6 100644 --- a/tests/baselines/reference/shadowedReservedCompilerDeclarationsWithNoEmit.types +++ b/tests/baselines/reference/shadowedReservedCompilerDeclarationsWithNoEmit.types @@ -17,14 +17,14 @@ class C extends Base { >foo : () => void let _this = this; ->_this : this ->this : this +>_this : C +>this : C () => { >() => { _this; } : () => void _this; ->_this : this +>_this : C }; } @@ -33,8 +33,8 @@ class C extends Base { >bar : () => void let _super = this; ->_super : this ->this : this +>_super : C +>this : C } } diff --git a/tests/baselines/reference/sourceMap-FileWithComments.types b/tests/baselines/reference/sourceMap-FileWithComments.types index 5a14b678bb1..88afb567113 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.types +++ b/tests/baselines/reference/sourceMap-FileWithComments.types @@ -28,17 +28,17 @@ module Shapes { >this.x * this.x + this.y * this.y : number >this.x * this.x : number >this.x : number ->this : this +>this : Point >x : number >this.x : number ->this : this +>this : Point >x : number >this.y * this.y : number >this.y : number ->this : this +>this : Point >y : number >this.y : number ->this : this +>this : Point >y : number // Static member diff --git a/tests/baselines/reference/sourceMapSample.types b/tests/baselines/reference/sourceMapSample.types index 90ed347b5f6..b341cc1d69b 100644 --- a/tests/baselines/reference/sourceMapSample.types +++ b/tests/baselines/reference/sourceMapSample.types @@ -21,7 +21,7 @@ module Foo.Bar { >"

" + this.greeting : string >"

" : "

" >this.greeting : string ->this : this +>this : Greeter >greeting : string >"

" : "" } diff --git a/tests/baselines/reference/sourceMapValidationClass.types b/tests/baselines/reference/sourceMapValidationClass.types index f6d80f39416..a53c12a7704 100644 --- a/tests/baselines/reference/sourceMapValidationClass.types +++ b/tests/baselines/reference/sourceMapValidationClass.types @@ -14,7 +14,7 @@ class Greeter { >"

" + this.greeting : string >"

" : "

" >this.greeting : string ->this : this +>this : Greeter >greeting : string >"

" : "" } @@ -30,7 +30,7 @@ class Greeter { return this.greeting; >this.greeting : string ->this : this +>this : Greeter >greeting : string } get greetings() { @@ -38,7 +38,7 @@ class Greeter { return this.greeting; >this.greeting : string ->this : this +>this : Greeter >greeting : string } set greetings(greetings: string) { @@ -48,7 +48,7 @@ class Greeter { this.greeting = greetings; >this.greeting = greetings : string >this.greeting : string ->this : this +>this : Greeter >greeting : string >greetings : string } diff --git a/tests/baselines/reference/sourceMapValidationClasses.types b/tests/baselines/reference/sourceMapValidationClasses.types index fedebdcfa33..1de7c1cabb5 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.types +++ b/tests/baselines/reference/sourceMapValidationClasses.types @@ -21,7 +21,7 @@ module Foo.Bar { >"

" + this.greeting : string >"

" : "

" >this.greeting : string ->this : this +>this : Greeter >greeting : string >"

" : "" } diff --git a/tests/baselines/reference/sourceMapValidationDecorators.types b/tests/baselines/reference/sourceMapValidationDecorators.types index 6c58e058921..55b0ea13c58 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.types +++ b/tests/baselines/reference/sourceMapValidationDecorators.types @@ -85,7 +85,7 @@ class Greeter { >"

" + this.greeting : string >"

" : "

" >this.greeting : string ->this : this +>this : Greeter >greeting : string >"

" : "" } @@ -129,7 +129,7 @@ class Greeter { return this.greeting; >this.greeting : string ->this : this +>this : Greeter >greeting : string } @@ -146,7 +146,7 @@ class Greeter { return this.greeting; >this.greeting : string ->this : this +>this : Greeter >greeting : string } @@ -167,7 +167,7 @@ class Greeter { this.greeting = greetings; >this.greeting = greetings : string >this.greeting : string ->this : this +>this : Greeter >greeting : string >greetings : string } diff --git a/tests/baselines/reference/spellingUncheckedJS.types b/tests/baselines/reference/spellingUncheckedJS.types index 61723e8da16..6e9fed1ec67 100644 --- a/tests/baselines/reference/spellingUncheckedJS.types +++ b/tests/baselines/reference/spellingUncheckedJS.types @@ -48,7 +48,7 @@ class Classe { // no error on 'this' references return this.none >this.none : error ->this : this +>this : Classe >none : any } } diff --git a/tests/baselines/reference/stackDepthLimitCastingType.types b/tests/baselines/reference/stackDepthLimitCastingType.types index 27d09998e30..2f390d112ed 100644 --- a/tests/baselines/reference/stackDepthLimitCastingType.types +++ b/tests/baselines/reference/stackDepthLimitCastingType.types @@ -66,7 +66,7 @@ import * as BackboneFetchCache from "backbone-fetch-cache"; const hoge = new Backbone.Model() as Backbone.ModelWithCache; >hoge : Backbone.ModelWithCache >new Backbone.Model() as Backbone.ModelWithCache : Backbone.ModelWithCache ->new Backbone.Model() : Backbone.Model> +>new Backbone.Model() : Backbone.Model >Backbone.Model : typeof Backbone.Model >Backbone : typeof Backbone >Model : typeof Backbone.Model diff --git a/tests/baselines/reference/staticIndexSignature6.errors.txt b/tests/baselines/reference/staticIndexSignature6.errors.txt new file mode 100644 index 00000000000..31389241ad5 --- /dev/null +++ b/tests/baselines/reference/staticIndexSignature6.errors.txt @@ -0,0 +1,27 @@ +tests/cases/conformance/classes/staticIndexSignature/staticIndexSignature6.ts(17,1): error TS2684: The 'this' context of type '(Anonymous class)' is not assignable to method's 'this' of type '(Anonymous class)'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + + +==== tests/cases/conformance/classes/staticIndexSignature/staticIndexSignature6.ts (1 errors) ==== + function foo () { + return class { + static [s: string]: number + static [s: number]: 42 + + foo(v: T) { return v } + } + } + + const C = foo() + C.a; + C.a = 1; + C[2]; + C[2] = 42; + + const c = new C(); + c.foo(1); + ~ +!!! error TS2684: The 'this' context of type '(Anonymous class)' is not assignable to method's 'this' of type '(Anonymous class)'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/staticOffOfInstance1.types b/tests/baselines/reference/staticOffOfInstance1.types index 99887e4736f..b03db7d7e21 100644 --- a/tests/baselines/reference/staticOffOfInstance1.types +++ b/tests/baselines/reference/staticOffOfInstance1.types @@ -8,7 +8,7 @@ class List { this.Foo(); >this.Foo() : any >this.Foo : any ->this : this +>this : List >Foo : any } public static Foo() {} diff --git a/tests/baselines/reference/staticOffOfInstance2.types b/tests/baselines/reference/staticOffOfInstance2.types index 1378a3b3d43..f37246e085a 100644 --- a/tests/baselines/reference/staticOffOfInstance2.types +++ b/tests/baselines/reference/staticOffOfInstance2.types @@ -8,7 +8,7 @@ class List { this.Foo(); // no error >this.Foo() : any >this.Foo : any ->this : this +>this : List >Foo : any List.Foo(); diff --git a/tests/baselines/reference/staticPropertyNotInClassType.errors.txt b/tests/baselines/reference/staticPropertyNotInClassType.errors.txt index 898dc2c187f..a70ffde9eb1 100644 --- a/tests/baselines/reference/staticPropertyNotInClassType.errors.txt +++ b/tests/baselines/reference/staticPropertyNotInClassType.errors.txt @@ -6,12 +6,15 @@ tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(24,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(25,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(27,21): error TS2302: Static members cannot reference class type parameters. +tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(35,13): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(36,16): error TS2576: Property 'foo' does not exist on type 'C'. Did you mean to access the static member 'C.foo' instead? tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(37,16): error TS2339: Property 'bar' does not exist on type 'C'. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(38,16): error TS2576: Property 'x' does not exist on type 'C'. Did you mean to access the static member 'C.x' instead? -==== tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts (11 errors) ==== +==== tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts (12 errors) ==== module NonGeneric { class C { fn() { return this; } @@ -63,6 +66,10 @@ tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType. var c = new C(1, ''); var r = c.fn(); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. var r4 = c.foo; // error ~~~ !!! error TS2576: Property 'foo' does not exist on type 'C'. Did you mean to access the static member 'C.foo' instead? diff --git a/tests/baselines/reference/staticPropertyNotInClassType.types b/tests/baselines/reference/staticPropertyNotInClassType.types index 772fd911967..d2fe7360251 100644 --- a/tests/baselines/reference/staticPropertyNotInClassType.types +++ b/tests/baselines/reference/staticPropertyNotInClassType.types @@ -6,8 +6,8 @@ module NonGeneric { >C : C fn() { return this; } ->fn : () => this ->this : this +>fn : () => C +>this : C static get x() { return 1; } >x : number @@ -73,8 +73,8 @@ module Generic { >C : C fn() { return this; } ->fn : () => this ->this : this +>fn : () => C +>this : C static get x() { return 1; } >x : number diff --git a/tests/baselines/reference/staticVisibility2.types b/tests/baselines/reference/staticVisibility2.types index 6243cd21a2f..9a17bb4dee0 100644 --- a/tests/baselines/reference/staticVisibility2.types +++ b/tests/baselines/reference/staticVisibility2.types @@ -11,7 +11,7 @@ class Square { this.sideLength = sideLength; >this.sideLength = sideLength : number >this.sideLength : any ->this : this +>this : Square >sideLength : any >sideLength : number } diff --git a/tests/baselines/reference/statics.types b/tests/baselines/reference/statics.types index ee2fbdbf887..470228e932b 100644 --- a/tests/baselines/reference/statics.types +++ b/tests/baselines/reference/statics.types @@ -16,7 +16,7 @@ module M { this.x = C.y+this.c1+this.c2+c3; >this.x = C.y+this.c1+this.c2+c3 : number >this.x : number ->this : this +>this : C >x : number >C.y+this.c1+this.c2+c3 : number >C.y+this.c1+this.c2 : number @@ -25,17 +25,17 @@ module M { >C : typeof C >y : number >this.c1 : number ->this : this +>this : C >c1 : number >this.c2 : number ->this : this +>this : C >c2 : number >c3 : number this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub); >this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub) : (v: number) => string >this.g : any ->this : this +>this : C >g : any >(v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub) : (v: number) => string >v : number @@ -49,17 +49,17 @@ module M { >this.x+C.y+v : number >this.x+C.y : number >this.x : number ->this : this +>this : C >x : number >C.y : number >C : typeof C >y : number >v : number >this.c1 : number ->this : this +>this : C >c1 : number >this.c2 : number ->this : this +>this : C >c2 : number >C.pub : number >C : typeof C diff --git a/tests/baselines/reference/strictBindCallApply1.types b/tests/baselines/reference/strictBindCallApply1.types index 80db68c3af4..97d486ff052 100644 --- a/tests/baselines/reference/strictBindCallApply1.types +++ b/tests/baselines/reference/strictBindCallApply1.types @@ -249,8 +249,8 @@ let f14 = c.foo.bind(undefined); // Error >undefined : undefined let f15 = c.overloaded.bind(c); // typeof C.prototype.overloaded ->f15 : { (s: string): number; (n: number): string; } ->c.overloaded.bind(c) : { (s: string): number; (n: number): string; } +>f15 : (n: number) => string +>c.overloaded.bind(c) : (n: number) => string >c.overloaded.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } >c.overloaded : { (s: string): number; (n: number): string; } >c : C @@ -259,8 +259,8 @@ let f15 = c.overloaded.bind(c); // typeof C.prototype.overloaded >c : C let f16 = c.generic.bind(c); // typeof C.prototype.generic ->f16 : (x: T) => T ->c.generic.bind(c) : (x: T) => T +>f16 : (x: unknown) => unknown +>c.generic.bind(c) : (x: unknown) => unknown >c.generic.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } >c.generic : (x: T) => T >c : C diff --git a/tests/baselines/reference/strictBooleanMemberAssignability.types b/tests/baselines/reference/strictBooleanMemberAssignability.types index 694f44f2695..d5ffa77fc52 100644 --- a/tests/baselines/reference/strictBooleanMemberAssignability.types +++ b/tests/baselines/reference/strictBooleanMemberAssignability.types @@ -9,7 +9,7 @@ class Abc { this.def = true >this.def = true : true >this.def : boolean ->this : this +>this : Abc >def : boolean >true : true } diff --git a/tests/baselines/reference/strictNullNotNullIndexTypeNoLib.types b/tests/baselines/reference/strictNullNotNullIndexTypeNoLib.types index 773b37039db..ec402074d21 100644 --- a/tests/baselines/reference/strictNullNotNullIndexTypeNoLib.types +++ b/tests/baselines/reference/strictNullNotNullIndexTypeNoLib.types @@ -22,7 +22,7 @@ class Test { >this.attrs.params! : T["params"] >this.attrs.params : T["params"] | undefined >this.attrs : Readonly ->this : this +>this : Test >attrs : Readonly >params : T["params"] | undefined >name : any @@ -47,7 +47,7 @@ class FooClass

{ >foo : number >42 : 42 >this.properties : Readonly

->this : this +>this : FooClass

>properties : Readonly

return foo; @@ -68,7 +68,7 @@ class Test2 { >this.attrs.params! : T["params"] >this.attrs.params : T["params"] | undefined >this.attrs : Readonly ->this : this +>this : Test2 >attrs : Readonly >params : T["params"] | undefined } diff --git a/tests/baselines/reference/strictNullNotNullIndexTypeShouldWork.types b/tests/baselines/reference/strictNullNotNullIndexTypeShouldWork.types index 102b345109c..12b4823c24b 100644 --- a/tests/baselines/reference/strictNullNotNullIndexTypeShouldWork.types +++ b/tests/baselines/reference/strictNullNotNullIndexTypeShouldWork.types @@ -19,7 +19,7 @@ class Test { >this.attrs.params! : NonNullable >this.attrs.params : T["params"] | undefined >this.attrs : Readonly ->this : this +>this : Test >attrs : Readonly >params : T["params"] | undefined >name : string @@ -44,7 +44,7 @@ class FooClass

{ >foo : number >42 : 42 >this.properties : Readonly

->this : this +>this : FooClass

>properties : Readonly

return foo; @@ -65,7 +65,7 @@ class Test2 { >this.attrs.params! : NonNullable >this.attrs.params : T["params"] | undefined >this.attrs : Readonly ->this : this +>this : Test2 >attrs : Readonly >params : T["params"] | undefined } diff --git a/tests/baselines/reference/strictPropertyInitialization.types b/tests/baselines/reference/strictPropertyInitialization.types index 8c7c20e6130..40cca29e0ad 100644 --- a/tests/baselines/reference/strictPropertyInitialization.types +++ b/tests/baselines/reference/strictPropertyInitialization.types @@ -127,14 +127,14 @@ class C5 { this.a = 0; >this.a = 0 : 0 >this.a : number ->this : this +>this : C5 >a : number >0 : 0 this.#b = 0; >this.#b = 0 : 0 >this.#b : number ->this : this +>this : C5 >0 : 0 } } @@ -161,14 +161,14 @@ class C6 { this.a = 0; >this.a = 0 : 0 >this.a : number ->this : this +>this : C6 >a : number >0 : 0 this.#b = 0; >this.#b = 0 : 0 >this.#b : number ->this : this +>this : C6 >0 : 0 } } @@ -191,14 +191,14 @@ class C7 { this.a = 1; >this.a = 1 : 1 >this.a : number ->this : this +>this : C7 >a : number >1 : 1 this.#b = 1; >this.#b = 1 : 1 >this.#b : number ->this : this +>this : C7 >1 : 1 return; @@ -206,14 +206,14 @@ class C7 { this.a = 0; >this.a = 0 : 0 >this.a : number ->this : this +>this : C7 >a : number >0 : 0 this.#b = 1; >this.#b = 1 : 1 >this.#b : number ->this : this +>this : C7 >1 : 1 } } @@ -274,43 +274,43 @@ class C10 { let x = this.a; // Error >x : number >this.a : number ->this : this +>this : C10 >a : number this.a = this.b; // Error >this.a = this.b : number >this.a : number ->this : this +>this : C10 >a : number >this.b : number ->this : this +>this : C10 >b : number this.b = this.#d //Error >this.b = this.#d : number >this.b : number ->this : this +>this : C10 >b : number >this.#d : number ->this : this +>this : C10 this.b = x; >this.b = x : number >this.b : number ->this : this +>this : C10 >b : number >x : number this.#d = x; >this.#d = x : number >this.#d : number ->this : this +>this : C10 >x : number let y = this.c; >y : number | undefined >this.c : number | undefined ->this : this +>this : C10 >c : number | undefined } } @@ -333,7 +333,7 @@ class C11 { this.a = someValue(); >this.a = someValue() : any >this.a : number ->this : this +>this : C11 >a : number >someValue() : any >someValue : () => any @@ -341,7 +341,7 @@ class C11 { this.#b = someValue(); >this.#b = someValue() : any >this.#b : number ->this : this +>this : C11 >someValue() : any >someValue : () => any } diff --git a/tests/baselines/reference/subclassWithPolymorphicThisIsAssignable.types b/tests/baselines/reference/subclassWithPolymorphicThisIsAssignable.types index 5924ccd1ba0..7478aca9d70 100644 --- a/tests/baselines/reference/subclassWithPolymorphicThisIsAssignable.types +++ b/tests/baselines/reference/subclassWithPolymorphicThisIsAssignable.types @@ -16,7 +16,7 @@ export class Example { this.test(); >this.test() : void >this.test : () => void ->this : this +>this : Example >test : () => void } diff --git a/tests/baselines/reference/superAccessCastedCall.types b/tests/baselines/reference/superAccessCastedCall.types index 429d7111c93..5e0579b0091 100644 --- a/tests/baselines/reference/superAccessCastedCall.types +++ b/tests/baselines/reference/superAccessCastedCall.types @@ -21,7 +21,7 @@ class Bar extends Foo { this.x = 2; >this.x = 2 : 2 >this.x : Number ->this : this +>this : Bar >x : Number >2 : 2 } diff --git a/tests/baselines/reference/superAccessInFatArrow1.types b/tests/baselines/reference/superAccessInFatArrow1.types index 95f0d769655..0c50015c051 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.types +++ b/tests/baselines/reference/superAccessInFatArrow1.types @@ -23,7 +23,7 @@ module test { this.bar(() => { >this.bar(() => { super.foo(); }) : void >this.bar : (callback: () => void) => void ->this : this +>this : B >bar : (callback: () => void) => void >() => { super.foo(); } : () => void diff --git a/tests/baselines/reference/superCallArgsMustMatch.errors.txt b/tests/baselines/reference/superCallArgsMustMatch.errors.txt index 06758b44fe6..691864da9b3 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.errors.txt +++ b/tests/baselines/reference/superCallArgsMustMatch.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/superCallArgsMustMatch.ts(17,15): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/compiler/superCallArgsMustMatch.ts(17,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'T5'. ==== tests/cases/compiler/superCallArgsMustMatch.ts (1 errors) ==== @@ -19,8 +19,8 @@ tests/cases/compiler/superCallArgsMustMatch.ts(17,15): error TS2345: Argument of // Should error; base constructor has type T for first arg, // which is instantiated with 'number' in the extends clause super("hi"); - ~~~~ -!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'T5'. var x: number = this.foo; diff --git a/tests/baselines/reference/superCallArgsMustMatch.types b/tests/baselines/reference/superCallArgsMustMatch.types index 9df1e0493bb..f62e20b6215 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.types +++ b/tests/baselines/reference/superCallArgsMustMatch.types @@ -28,7 +28,7 @@ class T6 extends T5{ var x: number = this.foo; >x : number >this.foo : number ->this : this +>this : T6 >foo : number } diff --git a/tests/baselines/reference/superCallAssignResult.errors.txt b/tests/baselines/reference/superCallAssignResult.errors.txt index bc9e2a0dc55..a3bcd329210 100644 --- a/tests/baselines/reference/superCallAssignResult.errors.txt +++ b/tests/baselines/reference/superCallAssignResult.errors.txt @@ -1,7 +1,8 @@ +tests/cases/compiler/superCallAssignResult.ts(7,17): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'E'. tests/cases/compiler/superCallAssignResult.ts(8,9): error TS2322: Type 'number' is not assignable to type 'void'. -==== tests/cases/compiler/superCallAssignResult.ts (1 errors) ==== +==== tests/cases/compiler/superCallAssignResult.ts (2 errors) ==== class E { constructor(arg: any) { } } @@ -9,6 +10,8 @@ tests/cases/compiler/superCallAssignResult.ts(8,9): error TS2322: Type 'number' class H extends E { constructor() { var x = super(5); // Should be of type void, not E. + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'E'. x = 5; ~ !!! error TS2322: Type 'number' is not assignable to type 'void'. diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.errors.txt b/tests/baselines/reference/superCallBeforeThisAccessing1.errors.txt new file mode 100644 index 00000000000..44b3fbba00d --- /dev/null +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.errors.txt @@ -0,0 +1,22 @@ +tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts(9,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + + +==== tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts (1 errors) ==== + declare var Factory: any + + class Base { + constructor(c) { } + } + class D extends Base { + private _t; + constructor() { + super(i); + ~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + var s = { + t: this._t + } + var i = Factory.create(s); + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.types b/tests/baselines/reference/superCallBeforeThisAccessing1.types index e947653584a..2eeaca024ff 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.types +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.types @@ -28,7 +28,7 @@ class D extends Base { t: this._t >t : any >this._t : any ->this : this +>this : D >_t : any } var i = Factory.create(s); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.errors.txt b/tests/baselines/reference/superCallBeforeThisAccessing2.errors.txt new file mode 100644 index 00000000000..06f18a3e191 --- /dev/null +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.errors.txt @@ -0,0 +1,16 @@ +tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts(7,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + + +==== tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts (1 errors) ==== + class Base { + constructor(c) { } + } + class D extends Base { + private _t; + constructor() { + super(() => { this._t }); // no error. only check when this is directly accessing in constructor + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.types b/tests/baselines/reference/superCallBeforeThisAccessing2.types index cf0f54b6246..2b819cd698d 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.types +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.types @@ -18,7 +18,7 @@ class D extends Base { >super : typeof Base >() => { this._t } : () => void >this._t : any ->this : this +>this : D >_t : any } } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.errors.txt b/tests/baselines/reference/superCallBeforeThisAccessing3.errors.txt index 90b9b034263..466f69928de 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.errors.txt +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.errors.txt @@ -1,7 +1,8 @@ tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing3.ts(9,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing3.ts(10,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. -==== tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing3.ts (1 errors) ==== +==== tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing3.ts (2 errors) ==== class Base { constructor(c) { } } @@ -14,6 +15,8 @@ tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing3.ts(9, ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. super(undefined); + ~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } } \ No newline at end of file diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.types b/tests/baselines/reference/superCallBeforeThisAccessing3.types index 9f9482f2f76..ed50cbf8be9 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.types +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.types @@ -17,7 +17,7 @@ class D extends Base { >x : () => void >() => { this._t } : () => void >this._t : any ->this : this +>this : D >_t : any x(); // no error; we only check super is called before this when the container is a constructor @@ -26,7 +26,7 @@ class D extends Base { this._t; // error >this._t : any ->this : this +>this : D >_t : any super(undefined); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.types b/tests/baselines/reference/superCallBeforeThisAccessing4.types index 3a6748816ac..53dfcc56ab8 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.types +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.types @@ -9,7 +9,7 @@ class D extends null { constructor() { this._t; >this._t : any ->this : this +>this : D >_t : any super(); @@ -32,7 +32,7 @@ class E extends null { this._t; >this._t : any ->this : this +>this : E >_t : any } } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.types b/tests/baselines/reference/superCallBeforeThisAccessing5.types index 2c0fc33c4dc..a31eb45730c 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.types +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.types @@ -9,7 +9,7 @@ class D extends null { constructor() { this._t; // No error >this._t : any ->this : this +>this : D >_t : any } } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.errors.txt b/tests/baselines/reference/superCallBeforeThisAccessing6.errors.txt index 346b2d58bec..d103b8a1046 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.errors.txt +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.errors.txt @@ -1,7 +1,8 @@ +tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing6.ts(7,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing6.ts(7,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing6.ts (1 errors) ==== +==== tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing6.ts (2 errors) ==== class Base { constructor(c) { } } @@ -9,6 +10,8 @@ tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing6.ts(7, private _t; constructor() { super(this); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.types b/tests/baselines/reference/superCallBeforeThisAccessing6.types index e28ef293a73..fd5cce4a64c 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.types +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.types @@ -16,7 +16,7 @@ class D extends Base { super(this); >super(this) : void >super : typeof Base ->this : this +>this : D } } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.errors.txt b/tests/baselines/reference/superCallBeforeThisAccessing7.errors.txt index 4e374fd96ea..4841c277a55 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.errors.txt +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.errors.txt @@ -1,7 +1,8 @@ tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing7.ts(8,16): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing7.ts(10,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. -==== tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing7.ts (1 errors) ==== +==== tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing7.ts (2 errors) ==== class Base { constructor(c) { } } @@ -14,6 +15,8 @@ tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing7.ts(8, !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } super(undefined); + ~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. } } \ No newline at end of file diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.types b/tests/baselines/reference/superCallBeforeThisAccessing7.types index fa17991a2bf..8270359e9e2 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.types +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.types @@ -20,7 +20,7 @@ class D extends Base { j: this._t, >j : any >this._t : any ->this : this +>this : D >_t : any } super(undefined); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.errors.txt b/tests/baselines/reference/superCallBeforeThisAccessing8.errors.txt new file mode 100644 index 00000000000..d10ced6ddf1 --- /dev/null +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.errors.txt @@ -0,0 +1,19 @@ +tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts(8,16): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + + +==== tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts (1 errors) ==== + class Base { + constructor(c) { } + } + class D extends Base { + private _t; + constructor() { + let x = { + k: super(undefined), + ~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + j: this._t, // no error + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.types b/tests/baselines/reference/superCallBeforeThisAccessing8.types index dd92d924ceb..c7828ee6028 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.types +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.types @@ -26,7 +26,7 @@ class D extends Base { j: this._t, // no error >j : any >this._t : any ->this : this +>this : D >_t : any } } diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.errors.txt b/tests/baselines/reference/superCallParameterContextualTyping1.errors.txt new file mode 100644 index 00000000000..a85d93e68ef --- /dev/null +++ b/tests/baselines/reference/superCallParameterContextualTyping1.errors.txt @@ -0,0 +1,17 @@ +tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping1.ts(9,21): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping1.ts (1 errors) ==== + class A { + constructor(private map: (value: T1) => T2) { + + } + } + + class B extends A { + // Ensure 'value' is of type 'number (and not '{}') by using its 'toExponential()' method. + constructor() { super(value => String(value.toExponential())); } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.errors.txt b/tests/baselines/reference/superCallParameterContextualTyping2.errors.txt index fb4e88881f9..f27785bb295 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.errors.txt +++ b/tests/baselines/reference/superCallParameterContextualTyping2.errors.txt @@ -1,8 +1,9 @@ +tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping2.ts(9,21): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping2.ts(9,43): error TS2349: This expression is not callable. Type 'Number' has no call signatures. -==== tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping2.ts (1 errors) ==== +==== tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping2.ts (2 errors) ==== class A { constructor(private map: (value: T1) => T2) { @@ -12,6 +13,8 @@ tests/cases/conformance/expressions/contextualTyping/superCallParameterContextua class C extends A { // Ensure 'value' is not of type 'any' by invoking it with type arguments. constructor() { super(value => String(value())); } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. ~~~~~ !!! error TS2349: This expression is not callable. !!! error TS2349: Type 'Number' has no call signatures. diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.errors.txt b/tests/baselines/reference/superCallParameterContextualTyping3.errors.txt new file mode 100644 index 00000000000..4aa22e96abe --- /dev/null +++ b/tests/baselines/reference/superCallParameterContextualTyping3.errors.txt @@ -0,0 +1,48 @@ +tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping3.ts(17,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'CBase'. +tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping3.ts(25,9): error TS2684: The 'this' context of type 'CBase' is not assignable to method's 'this' of type 'CBase'. + Type 'string' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. + + +==== tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping3.ts (2 errors) ==== + interface ContextualType { + method(parameter: T): void; + } + + class CBase { + constructor(param: ContextualType) { + } + + foo(param: ContextualType) { + } + } + + class C extends CBase { + constructor() { + // Should be okay. + // 'p' should have type 'string'. + super({ + ~~~~~~~ + method(p) { + ~~~~~~~~~~~~~~~~~~~~~~~ + p.length; + ~~~~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + }); + ~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'CBase'. + + // Should be okay. + // 'p' should have type 'string'. + super.foo({ + ~~~~~ +!!! error TS2684: The 'this' context of type 'CBase' is not assignable to method's 'this' of type 'CBase'. +!!! error TS2684: Type 'string' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. + method(p) { + p.length; + } + }); + } + } \ No newline at end of file diff --git a/tests/baselines/reference/superCallWithCommentEmit01.errors.txt b/tests/baselines/reference/superCallWithCommentEmit01.errors.txt new file mode 100644 index 00000000000..cb808516a20 --- /dev/null +++ b/tests/baselines/reference/superCallWithCommentEmit01.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/superCallWithCommentEmit01.ts(8,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/compiler/superCallWithCommentEmit01.ts (1 errors) ==== + class A { + constructor(public text: string) { } + } + + class B extends A { + constructor(text: string) { + // this is subclass constructor + super(text) + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/superCalls.errors.txt b/tests/baselines/reference/superCalls.errors.txt new file mode 100644 index 00000000000..e4df5394ee5 --- /dev/null +++ b/tests/baselines/reference/superCalls.errors.txt @@ -0,0 +1,39 @@ +tests/cases/conformance/expressions/superCalls/superCalls.ts(13,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. +tests/cases/conformance/expressions/superCalls/superCalls.ts(15,17): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + + +==== tests/cases/conformance/expressions/superCalls/superCalls.ts (2 errors) ==== + class Base { + x = 43; + constructor(n: string) { + + } + } + + function v(): void { } + + class Derived extends Base { + //super call in class constructor of derived type + constructor(public q: number) { + super(''); + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + //type of super call expression is void + var p = super(''); + ~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + var p = v(); + } + } + + class OtherBase { + + } + + class OtherDerived extends OtherBase { + constructor() { + var p = ''; + super(); + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/superElementAccess.types b/tests/baselines/reference/superElementAccess.types index 9fa75ec6bc4..db9d6cf2699 100644 --- a/tests/baselines/reference/superElementAccess.types +++ b/tests/baselines/reference/superElementAccess.types @@ -54,7 +54,7 @@ class MyDerived extends MyBase { >super : MyBase >"m1" : "m1" >bind : (this: Function, thisArg: any, ...argArray: any[]) => any ->this : this +>this : MyDerived var x: (a: string) => string = super["m1"]; // Should be allowed, can assign to var with compatible signature >x : (a: string) => string @@ -70,7 +70,7 @@ class MyDerived extends MyBase { >super : MyBase >"m2" : "m2" >bind : (this: Function, thisArg: any, ...argArray: any[]) => any ->this : this +>this : MyDerived super["p1"](); // Should error, private not public instance member function >super["p1"]() : void diff --git a/tests/baselines/reference/superNoModifiersCrash.types b/tests/baselines/reference/superNoModifiersCrash.types index aad2d31eb2a..9625fe9330c 100644 --- a/tests/baselines/reference/superNoModifiersCrash.types +++ b/tests/baselines/reference/superNoModifiersCrash.types @@ -16,7 +16,7 @@ class Parent { return this.asdf = '' >this.asdf = '' : "" >this.asdf : string ->this : this +>this : Parent >asdf : string >'' : "" } diff --git a/tests/baselines/reference/superPropertyAccess.types b/tests/baselines/reference/superPropertyAccess.types index 3d1161355a3..3d319e6b59a 100644 --- a/tests/baselines/reference/superPropertyAccess.types +++ b/tests/baselines/reference/superPropertyAccess.types @@ -54,7 +54,7 @@ class MyDerived extends MyBase { >super : MyBase >m1 : (a: string) => string >bind : (this: Function, thisArg: any, ...argArray: any[]) => any ->this : this +>this : MyDerived var x: (a: string) => string = super.m1; // Should be allowed, can assign to var with compatible signature >x : (a: string) => string @@ -70,7 +70,7 @@ class MyDerived extends MyBase { >super : MyBase >m2 : () => void >bind : (this: Function, thisArg: any, ...argArray: any[]) => any ->this : this +>this : MyDerived super.p1(); // Should error, private not public instance member function >super.p1() : void diff --git a/tests/baselines/reference/superPropertyAccessInSuperCall01.errors.txt b/tests/baselines/reference/superPropertyAccessInSuperCall01.errors.txt index f7449a26d5a..1ddd8bf36d0 100644 --- a/tests/baselines/reference/superPropertyAccessInSuperCall01.errors.txt +++ b/tests/baselines/reference/superPropertyAccessInSuperCall01.errors.txt @@ -1,7 +1,8 @@ +tests/cases/compiler/superPropertyAccessInSuperCall01.ts(9,3): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. tests/cases/compiler/superPropertyAccessInSuperCall01.ts(9,9): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class. -==== tests/cases/compiler/superPropertyAccessInSuperCall01.ts (1 errors) ==== +==== tests/cases/compiler/superPropertyAccessInSuperCall01.ts (2 errors) ==== class A { constructor(f: string) { } @@ -11,6 +12,8 @@ tests/cases/compiler/superPropertyAccessInSuperCall01.ts(9,9): error TS17011: 's class B extends A { constructor() { super(super.blah()) + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. ~~~~~ !!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class. } diff --git a/tests/baselines/reference/superPropertyAccessNoError.errors.txt b/tests/baselines/reference/superPropertyAccessNoError.errors.txt new file mode 100644 index 00000000000..5054751ca22 --- /dev/null +++ b/tests/baselines/reference/superPropertyAccessNoError.errors.txt @@ -0,0 +1,76 @@ +tests/cases/conformance/expressions/superPropertyAccess/superPropertyAccessNoError.ts(69,23): error TS2339: Property 'fn' does not exist on type 'SomeBaseClass'. + + +==== tests/cases/conformance/expressions/superPropertyAccess/superPropertyAccessNoError.ts (1 errors) ==== + //super.publicInstanceMemberFunction in constructor of derived class + //super.publicInstanceMemberFunction in instance member function of derived class + //super.publicInstanceMemberFunction in instance member accessor(get and set) of derived class + //super.publicInstanceMemberFunction in lambda in member function + //super.publicStaticMemberFunction in static member function of derived class + //super.publicStaticMemberFunction in static member accessor(get and set) of derived class + + + class SomeBaseClass { + public func() { + return ''; + } + + static func() { + return 3; + } + + returnThis() { + return this; + } + } + + class SomeDerivedClass extends SomeBaseClass { + constructor() { + super(); + var x = super.func(); + var x: string; + } + + fn() { + var x = super.func(); + var x: string; + var y = () => super.func(); + } + + get a() { + var x = super.func(); + var x: string; + return null; + } + + set a(n) { + var x = super.func(); + var x: string; + } + + static fn() { + var x = super.func(); + var x: number; + } + + static get a() { + var x = super.func(); + var x: number; + return null; + } + + static set a(n) { + var x = super.func(); + var x: number; + } + + returnThis() { + return super.returnThis(); + } + } + + let instance = new SomeDerivedClass(); + instance.returnThis().fn(); + ~~ +!!! error TS2339: Property 'fn' does not exist on type 'SomeBaseClass'. + \ No newline at end of file diff --git a/tests/baselines/reference/superPropertyAccessNoError.symbols b/tests/baselines/reference/superPropertyAccessNoError.symbols index 4ef033b24bf..2c1bac3dda1 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.symbols +++ b/tests/baselines/reference/superPropertyAccessNoError.symbols @@ -153,9 +153,7 @@ let instance = new SomeDerivedClass(); >SomeDerivedClass : Symbol(SomeDerivedClass, Decl(superPropertyAccessNoError.ts, 20, 1)) instance.returnThis().fn(); ->instance.returnThis().fn : Symbol(SomeDerivedClass.fn, Decl(superPropertyAccessNoError.ts, 27, 5)) >instance.returnThis : Symbol(SomeDerivedClass.returnThis, Decl(superPropertyAccessNoError.ts, 60, 5)) >instance : Symbol(instance, Decl(superPropertyAccessNoError.ts, 67, 3)) >returnThis : Symbol(SomeDerivedClass.returnThis, Decl(superPropertyAccessNoError.ts, 60, 5)) ->fn : Symbol(SomeDerivedClass.fn, Decl(superPropertyAccessNoError.ts, 27, 5)) diff --git a/tests/baselines/reference/superPropertyAccessNoError.types b/tests/baselines/reference/superPropertyAccessNoError.types index f1e6101c421..ae632da0696 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.types +++ b/tests/baselines/reference/superPropertyAccessNoError.types @@ -25,10 +25,10 @@ class SomeBaseClass { } returnThis() { ->returnThis : () => this +>returnThis : () => SomeBaseClass return this; ->this : this +>this : SomeBaseClass } } @@ -153,13 +153,13 @@ class SomeDerivedClass extends SomeBaseClass { } returnThis() { ->returnThis : () => this +>returnThis : () => SomeBaseClass return super.returnThis(); ->super.returnThis() : this ->super.returnThis : () => this +>super.returnThis() : SomeBaseClass +>super.returnThis : () => SomeBaseClass >super : SomeBaseClass ->returnThis : () => this +>returnThis : () => SomeBaseClass } } @@ -169,11 +169,11 @@ let instance = new SomeDerivedClass(); >SomeDerivedClass : typeof SomeDerivedClass instance.returnThis().fn(); ->instance.returnThis().fn() : void ->instance.returnThis().fn : () => void ->instance.returnThis() : SomeDerivedClass ->instance.returnThis : () => SomeDerivedClass +>instance.returnThis().fn() : any +>instance.returnThis().fn : any +>instance.returnThis() : SomeBaseClass +>instance.returnThis : () => SomeBaseClass >instance : SomeDerivedClass ->returnThis : () => SomeDerivedClass ->fn : () => void +>returnThis : () => SomeBaseClass +>fn : any diff --git a/tests/baselines/reference/superPropertyAccess_ES5.types b/tests/baselines/reference/superPropertyAccess_ES5.types index a7315c371a4..f51b6189746 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.types +++ b/tests/baselines/reference/superPropertyAccess_ES5.types @@ -55,7 +55,7 @@ class A { get property() { return this._property; } >property : string >this._property : string ->this : this +>this : A >_property : string set property(value: string) { this._property = value } @@ -63,7 +63,7 @@ class A { >value : string >this._property = value : string >this._property : string ->this : this +>this : A >_property : string >value : string } diff --git a/tests/baselines/reference/superPropertyAccess_ES6.types b/tests/baselines/reference/superPropertyAccess_ES6.types index c2457270ab8..7f57d891753 100644 --- a/tests/baselines/reference/superPropertyAccess_ES6.types +++ b/tests/baselines/reference/superPropertyAccess_ES6.types @@ -55,7 +55,7 @@ class A { get property() { return this._property; } >property : string >this._property : string ->this : this +>this : A >_property : string set property(value: string) { this._property = value } @@ -63,7 +63,7 @@ class A { >value : string >this._property = value : string >this._property : string ->this : this +>this : A >_property : string >value : string } diff --git a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.errors.txt b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.errors.txt index 407e984c5d1..1d94f0292fe 100644 --- a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.errors.txt +++ b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.errors.txt @@ -1,8 +1,10 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/superPropertyInConstructorBeforeSuperCall.ts(7,9): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class. +tests/cases/conformance/classes/constructorDeclarations/superCalls/superPropertyInConstructorBeforeSuperCall.ts(8,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. +tests/cases/conformance/classes/constructorDeclarations/superCalls/superPropertyInConstructorBeforeSuperCall.ts(13,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. tests/cases/conformance/classes/constructorDeclarations/superCalls/superPropertyInConstructorBeforeSuperCall.ts(13,15): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class. -==== tests/cases/conformance/classes/constructorDeclarations/superCalls/superPropertyInConstructorBeforeSuperCall.ts (2 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/superCalls/superPropertyInConstructorBeforeSuperCall.ts (4 errors) ==== class B { constructor(x?: string) {} x(): string { return ""; } @@ -13,11 +15,15 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/superProperty ~~~~~ !!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class. super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. } } class C2 extends B { constructor() { super(super.x()); + ~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'B'. ~~~~~ !!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class. } diff --git a/tests/baselines/reference/superWithTypeArgument3.errors.txt b/tests/baselines/reference/superWithTypeArgument3.errors.txt index fc6d10fd80c..1675aa450c6 100644 --- a/tests/baselines/reference/superWithTypeArgument3.errors.txt +++ b/tests/baselines/reference/superWithTypeArgument3.errors.txt @@ -1,7 +1,16 @@ tests/cases/compiler/superWithTypeArgument3.ts(8,14): error TS2754: 'super' may not use type arguments. +tests/cases/compiler/superWithTypeArgument3.ts(10,5): error TS2416: Property 'bar' in type 'D' is not assignable to the same property in base type 'C'. + Type '() => void' is not assignable to type '(x: U) => void'. + The 'this' types of each signature are incompatible. + Type 'C' is not assignable to type 'D'. + Types of property 'bar' are incompatible. + Type '(x: U) => void' is not assignable to type '() => void'. +tests/cases/compiler/superWithTypeArgument3.ts(11,9): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -==== tests/cases/compiler/superWithTypeArgument3.ts (1 errors) ==== +==== tests/cases/compiler/superWithTypeArgument3.ts (3 errors) ==== class C { foo: T; bar(x: U) { } @@ -14,6 +23,17 @@ tests/cases/compiler/superWithTypeArgument3.ts(8,14): error TS2754: 'super' may !!! error TS2754: 'super' may not use type arguments. } bar() { + ~~~ +!!! error TS2416: Property 'bar' in type 'D' is not assignable to the same property in base type 'C'. +!!! error TS2416: Type '() => void' is not assignable to type '(x: U) => void'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'C' is not assignable to type 'D'. +!!! error TS2416: Types of property 'bar' are incompatible. +!!! error TS2416: Type '(x: U) => void' is not assignable to type '() => void'. super.bar(null); + ~~~~~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. } } \ No newline at end of file diff --git a/tests/baselines/reference/targetEs6DecoratorMetadataImportNotElided.types b/tests/baselines/reference/targetEs6DecoratorMetadataImportNotElided.types index 809012c49e0..09fbc192e74 100644 --- a/tests/baselines/reference/targetEs6DecoratorMetadataImportNotElided.types +++ b/tests/baselines/reference/targetEs6DecoratorMetadataImportNotElided.types @@ -23,7 +23,7 @@ export class MyComponent { get ref() { return this._ref; } >ref : TemplateRef >this._ref : TemplateRef ->this : this +>this : MyComponent >_ref : TemplateRef set ref(value: TemplateRef) { this._ref = value; } @@ -31,7 +31,7 @@ export class MyComponent { >value : TemplateRef >this._ref = value : TemplateRef >this._ref : TemplateRef ->this : this +>this : MyComponent >_ref : TemplateRef >value : TemplateRef } diff --git a/tests/baselines/reference/targetTypeBaseCalls.errors.txt b/tests/baselines/reference/targetTypeBaseCalls.errors.txt index 37a00c9798d..60f097c8f5d 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.errors.txt +++ b/tests/baselines/reference/targetTypeBaseCalls.errors.txt @@ -1,9 +1,10 @@ tests/cases/compiler/targetTypeBaseCalls.ts(9,19): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/compiler/targetTypeBaseCalls.ts(13,23): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/targetTypeBaseCalls.ts(17,41): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. tests/cases/compiler/targetTypeBaseCalls.ts(17,61): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/compiler/targetTypeBaseCalls.ts (3 errors) ==== +==== tests/cases/compiler/targetTypeBaseCalls.ts (4 errors) ==== function foo(x: (s: string) => void) { } @@ -25,6 +26,8 @@ tests/cases/compiler/targetTypeBaseCalls.ts(17,61): error TS2322: Type 'number' class Bar extends Foo { constructor() { super(function(s) { s = 5 }) } } // error, if types are applied correctly + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Foo'. ~ !!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/templateLiteralTypesPatterns.types b/tests/baselines/reference/templateLiteralTypesPatterns.types index c8cb9320ac4..97a588bd052 100644 --- a/tests/baselines/reference/templateLiteralTypesPatterns.types +++ b/tests/baselines/reference/templateLiteralTypesPatterns.types @@ -630,7 +630,7 @@ export abstract class BB { this.get(id!); >this.get(id!) : void >this.get : (id: `${string}-${string}`) => void ->this : this +>this : BB >get : (id: `${string}-${string}`) => void >id! : `${string}-${string}` >id : `${string}-${string}` diff --git a/tests/baselines/reference/thisBinding.errors.txt b/tests/baselines/reference/thisBinding.errors.txt index d9f30b19068..ee14acec551 100644 --- a/tests/baselines/reference/thisBinding.errors.txt +++ b/tests/baselines/reference/thisBinding.errors.txt @@ -1,7 +1,9 @@ tests/cases/compiler/thisBinding.ts(9,8): error TS2339: Property 'e' does not exist on type 'I'. +tests/cases/compiler/thisBinding.ts(13,4): error TS2684: The 'this' context of type '{ z: number; f: (x: I) => void; }' is not assignable to method's 'this' of type 'C'. + Object literal may only specify known properties, and 'z' does not exist in type 'C'. -==== tests/cases/compiler/thisBinding.ts (1 errors) ==== +==== tests/cases/compiler/thisBinding.ts (2 errors) ==== module M { export interface I { z; @@ -17,6 +19,9 @@ tests/cases/compiler/thisBinding.ts(9,8): error TS2339: Property 'e' does not ex } constructor() { ({z:10,f:this.f}).f(({})); + ~~~~ +!!! error TS2684: The 'this' context of type '{ z: number; f: (x: I) => void; }' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Object literal may only specify known properties, and 'z' does not exist in type 'C'. } } } diff --git a/tests/baselines/reference/thisBinding.types b/tests/baselines/reference/thisBinding.types index 8fa8495e724..8f2d7b17902 100644 --- a/tests/baselines/reference/thisBinding.types +++ b/tests/baselines/reference/thisBinding.types @@ -38,7 +38,7 @@ module M { >10 : 10 >f : (x: I) => void >this.f : (x: I) => void ->this : this +>this : C >f : (x: I) => void >f : (x: I) => void >({}) : I diff --git a/tests/baselines/reference/thisBinding2.types b/tests/baselines/reference/thisBinding2.types index bb0c2f72314..2be13a6cda5 100644 --- a/tests/baselines/reference/thisBinding2.types +++ b/tests/baselines/reference/thisBinding2.types @@ -9,7 +9,7 @@ class C { this.x = (() => { >this.x = (() => { var x = 1; return this.x; })() : number >this.x : number ->this : this +>this : C >x : number >(() => { var x = 1; return this.x; })() : number >(() => { var x = 1; return this.x; }) : () => number @@ -21,14 +21,14 @@ class C { return this.x; >this.x : number ->this : this +>this : C >x : number })(); this.x = function() { >this.x = function() { var x = 1; return this.x; }() : any >this.x : number ->this : this +>this : C >x : number >function() { var x = 1; return this.x; }() : any >function() { var x = 1; return this.x; } : () => any diff --git a/tests/baselines/reference/thisCapture1.types b/tests/baselines/reference/thisCapture1.types index ff9e9e3b9fe..cfd61fe5f19 100644 --- a/tests/baselines/reference/thisCapture1.types +++ b/tests/baselines/reference/thisCapture1.types @@ -25,7 +25,7 @@ class X { this.y = 0; >this.y = 0 : 0 >this.y : number ->this : this +>this : X >y : number >0 : 0 diff --git a/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.errors.txt b/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.errors.txt new file mode 100644 index 00000000000..b908fe81cec --- /dev/null +++ b/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.errors.txt @@ -0,0 +1,30 @@ +tests/cases/compiler/thisConditionalOnMethodReturnOfGenericInstance.ts(17,11): error TS2684: The 'this' context of type 'C<{}>' is not assignable to method's 'this' of type 'B'. + The types returned by 'method()' are incompatible between these types. + Type 'string | undefined' is not assignable to type 'string | null'. + Type 'undefined' is not assignable to type 'string | null'. + + +==== tests/cases/compiler/thisConditionalOnMethodReturnOfGenericInstance.ts (1 errors) ==== + class A { + unmeasurableUsage!: {[K in keyof T]-?: T[K]}; + } + + class B extends A { + method(): string | (this extends C ? undefined : null) { + return ""; + } + } + + class C extends B { + marker!: string; + } + + const x = new C<{}>(); + + const y = x.method(); // usage flags `method` in `B` as circular and marks `y` as the error-any type + ~ +!!! error TS2684: The 'this' context of type 'C<{}>' is not assignable to method's 'this' of type 'B'. +!!! error TS2684: The types returned by 'method()' are incompatible between these types. +!!! error TS2684: Type 'string | undefined' is not assignable to type 'string | null'. +!!! error TS2684: Type 'undefined' is not assignable to type 'string | null'. + \ No newline at end of file diff --git a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types index 2d807f4ec7d..7644011747b 100644 --- a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types +++ b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types @@ -11,8 +11,8 @@ class C { >2 : 2 >3 : 3 >map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] ->(x) => { return this; } : (x: number) => this +>(x) => { return this; } : (x: number) => C >x : number ->this : this +>this : C } diff --git a/tests/baselines/reference/thisExpressionOfGenericObject.types b/tests/baselines/reference/thisExpressionOfGenericObject.types index 4bfdc90a3ac..1003bd2b0fb 100644 --- a/tests/baselines/reference/thisExpressionOfGenericObject.types +++ b/tests/baselines/reference/thisExpressionOfGenericObject.types @@ -7,8 +7,8 @@ class MyClass1 { constructor() { () => this; ->() => this : () => this ->this : this +>() => this : () => MyClass1 +>this : MyClass1 } } diff --git a/tests/baselines/reference/thisInAccessors.types b/tests/baselines/reference/thisInAccessors.types index 79f8a5c985c..b5c7cb98a36 100644 --- a/tests/baselines/reference/thisInAccessors.types +++ b/tests/baselines/reference/thisInAccessors.types @@ -7,9 +7,9 @@ class GetterOnly { >Value : string var fn = () => this; ->fn : () => this ->() => this : () => this ->this : this +>fn : () => GetterOnly +>() => this : () => GetterOnly +>this : GetterOnly return ''; >'' : "" @@ -35,9 +35,9 @@ class SetterOnly { >val : string var fn = () => this; ->fn : () => this ->() => this : () => this ->this : this +>fn : () => SetterOnly +>() => this : () => SetterOnly +>this : SetterOnly } } @@ -49,9 +49,9 @@ class GetterAndSetter { >Value : string var fn = () => this; ->fn : () => this ->() => this : () => this ->this : this +>fn : () => GetterAndSetter +>() => this : () => GetterAndSetter +>this : GetterAndSetter return ''; >'' : "" @@ -61,8 +61,8 @@ class GetterAndSetter { >val : string var fn = () => this; ->fn : () => this ->() => this : () => this ->this : this +>fn : () => GetterAndSetter +>() => this : () => GetterAndSetter +>this : GetterAndSetter } } diff --git a/tests/baselines/reference/thisInConstructorParameter2.types b/tests/baselines/reference/thisInConstructorParameter2.types index 69198bafa5f..cfb8026c291 100644 --- a/tests/baselines/reference/thisInConstructorParameter2.types +++ b/tests/baselines/reference/thisInConstructorParameter2.types @@ -15,19 +15,19 @@ class P { >this : this >zz : this >this : this ->zzz : (p?: this) => this ->(p = this) => this : (p?: this) => this +>zzz : (p?: this) => P +>(p = this) => this : (p?: this) => P >p : this >this : this ->this : this +>this : P zzz = (p = this) => this; ->zzz = (p = this) => this : (p?: this) => this ->zzz : (p?: this) => this ->(p = this) => this : (p?: this) => this +>zzz = (p = this) => this : (p?: this) => P +>zzz : (p?: this) => P +>(p = this) => this : (p?: this) => P >p : this >this : this ->this : this +>this : P } foo(zz = this) { zz.x; } diff --git a/tests/baselines/reference/thisInInvalidContexts.errors.txt b/tests/baselines/reference/thisInInvalidContexts.errors.txt index 64f2f0d8c21..f4745b91559 100644 --- a/tests/baselines/reference/thisInInvalidContexts.errors.txt +++ b/tests/baselines/reference/thisInInvalidContexts.errors.txt @@ -1,4 +1,6 @@ +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(9,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseErrClass'. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(17,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseErrClass'. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -7,7 +9,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(39,9): tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(40,9): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (7 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (9 errors) ==== class BaseErrClass { constructor(t: any) { } } @@ -17,6 +19,8 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(40,9): //'this' in optional super call constructor() { super(this); // Error + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseErrClass'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } @@ -27,6 +31,8 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(40,9): //'this' in required super call constructor() { super(this); // Error + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseErrClass'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } diff --git a/tests/baselines/reference/thisInInvalidContexts.types b/tests/baselines/reference/thisInInvalidContexts.types index e247e4678d7..c0f573dbc1c 100644 --- a/tests/baselines/reference/thisInInvalidContexts.types +++ b/tests/baselines/reference/thisInInvalidContexts.types @@ -18,7 +18,7 @@ class ClassWithNoInitializer extends BaseErrClass { super(this); // Error >super(this) : void >super : typeof BaseErrClass ->this : this +>this : ClassWithNoInitializer } } @@ -35,7 +35,7 @@ class ClassWithInitializer extends BaseErrClass { super(this); // Error >super(this) : void >super : typeof BaseErrClass ->this : this +>this : ClassWithInitializer } } diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt index c4f90b417a4..49a48946462 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt @@ -1,4 +1,6 @@ +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(9,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseErrClass'. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(17,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseErrClass'. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -7,7 +9,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(40,9): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (7 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (9 errors) ==== class BaseErrClass { constructor(t: any) { } } @@ -17,6 +19,8 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod //'this' in optional super call constructor() { super(this); // error: "super" has to be called before "this" accessing + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseErrClass'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } @@ -27,6 +31,8 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod //'this' in required super call constructor() { super(this); // Error + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'BaseErrClass'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.types b/tests/baselines/reference/thisInInvalidContextsExternalModule.types index ddd2e105f60..d5290436221 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.types +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.types @@ -18,7 +18,7 @@ class ClassWithNoInitializer extends BaseErrClass { super(this); // error: "super" has to be called before "this" accessing >super(this) : void >super : typeof BaseErrClass ->this : this +>this : ClassWithNoInitializer } } @@ -35,7 +35,7 @@ class ClassWithInitializer extends BaseErrClass { super(this); // Error >super(this) : void >super : typeof BaseErrClass ->this : this +>this : ClassWithInitializer } } diff --git a/tests/baselines/reference/thisInLambda.types b/tests/baselines/reference/thisInLambda.types index a9d5b695750..890b1e6d08c 100644 --- a/tests/baselines/reference/thisInLambda.types +++ b/tests/baselines/reference/thisInLambda.types @@ -11,14 +11,14 @@ class Foo { this.x; // 'this' is type 'Foo' >this.x : string ->this : this +>this : Foo >x : string var f = () => this.x; // 'this' should be type 'Foo' as well >f : () => string >() => this.x : () => string >this.x : string ->this : this +>this : Foo >x : string } } @@ -42,8 +42,8 @@ class myCls { >() => { var x = this; } : () => void var x = this; ->x : this ->this : this +>x : myCls +>this : myCls }); }); diff --git a/tests/baselines/reference/thisInObjectLiterals.errors.txt b/tests/baselines/reference/thisInObjectLiterals.errors.txt index 50c10465ee8..23be1ab20c6 100644 --- a/tests/baselines/reference/thisInObjectLiterals.errors.txt +++ b/tests/baselines/reference/thisInObjectLiterals.errors.txt @@ -1,8 +1,9 @@ +tests/cases/conformance/expressions/thisKeyword/thisInObjectLiterals.ts(8,13): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '{ x: MyClass; y: number; }', but here has type '{ x: this; y: number; }'. tests/cases/conformance/expressions/thisKeyword/thisInObjectLiterals.ts(14,5): error TS7023: 'f' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. tests/cases/conformance/expressions/thisKeyword/thisInObjectLiterals.ts(15,21): error TS2339: Property 'spaaace' does not exist on type '{ f(): any; }'. -==== tests/cases/conformance/expressions/thisKeyword/thisInObjectLiterals.ts (2 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/thisInObjectLiterals.ts (3 errors) ==== class MyClass { t: number; @@ -11,6 +12,9 @@ tests/cases/conformance/expressions/thisKeyword/thisInObjectLiterals.ts(15,21): //type of 'this' in an object literal is the containing scope's this var t = { x: this, y: this.t }; var t: { x: ContainingThis; y: number }; + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '{ x: MyClass; y: number; }', but here has type '{ x: this; y: number; }'. +!!! related TS6203 tests/cases/conformance/expressions/thisKeyword/thisInObjectLiterals.ts:7:13: 't' was also declared here. } } diff --git a/tests/baselines/reference/thisInObjectLiterals.types b/tests/baselines/reference/thisInObjectLiterals.types index 49cd7d3cf07..d1131a41e7b 100644 --- a/tests/baselines/reference/thisInObjectLiterals.types +++ b/tests/baselines/reference/thisInObjectLiterals.types @@ -13,17 +13,17 @@ class MyClass { //type of 'this' in an object literal is the containing scope's this var t = { x: this, y: this.t }; ->t : { x: this; y: number; } ->{ x: this, y: this.t } : { x: this; y: number; } ->x : this ->this : this +>t : { x: MyClass; y: number; } +>{ x: this, y: this.t } : { x: MyClass; y: number; } +>x : MyClass +>this : MyClass >y : number >this.t : number ->this : this +>this : MyClass >t : number var t: { x: ContainingThis; y: number }; ->t : { x: this; y: number; } +>t : { x: MyClass; y: number; } >x : this >y : number } diff --git a/tests/baselines/reference/thisInOuterClassBody.types b/tests/baselines/reference/thisInOuterClassBody.types index 5992df2e5ff..bd82af29602 100644 --- a/tests/baselines/reference/thisInOuterClassBody.types +++ b/tests/baselines/reference/thisInOuterClassBody.types @@ -11,28 +11,28 @@ class Foo { >this : typeof Foo bar() { ->bar : () => this +>bar : () => Foo this.x; // 'this' is type 'Foo' ->this.x : this ->this : this ->x : this +>this.x : Foo +>this : Foo +>x : Foo var f = () => this.x; // 'this' should be type 'Foo' as well ->f : () => this ->() => this.x : () => this ->this.x : this ->this : this ->x : this +>f : () => Foo +>() => this.x : () => Foo +>this.x : Foo +>this : Foo +>x : Foo var p = this.y; >p : any >this.y : any ->this : this +>this : Foo >y : any return this; ->this : this +>this : Foo } static bar2() { diff --git a/tests/baselines/reference/thisInPropertyBoundDeclarations.types b/tests/baselines/reference/thisInPropertyBoundDeclarations.types index db38b529e7b..f0058158b58 100644 --- a/tests/baselines/reference/thisInPropertyBoundDeclarations.types +++ b/tests/baselines/reference/thisInPropertyBoundDeclarations.types @@ -30,7 +30,7 @@ class Bug { this.name = name; >this.name = name : string >this.name : string ->this : this +>this : Bug >name : string >name : string } diff --git a/tests/baselines/reference/thisInSuperCall.errors.txt b/tests/baselines/reference/thisInSuperCall.errors.txt index d1eeb1d2b2b..031385c3351 100644 --- a/tests/baselines/reference/thisInSuperCall.errors.txt +++ b/tests/baselines/reference/thisInSuperCall.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/thisInSuperCall.ts(7,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/compiler/thisInSuperCall.ts(7,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/thisInSuperCall.ts(14,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/compiler/thisInSuperCall.ts(14,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/thisInSuperCall.ts(20,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall.ts (3 errors) ==== +==== tests/cases/compiler/thisInSuperCall.ts (6 errors) ==== class Base { constructor(x: any) {} } @@ -11,6 +14,8 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17009: 'super' must be c class Foo extends Base { constructor() { super(this); // error: "super" has to be called before "this" accessing + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } @@ -20,6 +25,8 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17009: 'super' must be c public p = 0; constructor() { super(this); // error + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } @@ -28,6 +35,8 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17009: 'super' must be c class Foo3 extends Base { constructor(public p) { super(this); // error + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } diff --git a/tests/baselines/reference/thisInSuperCall.types b/tests/baselines/reference/thisInSuperCall.types index ce53d7e4609..ce20c4c8f5b 100644 --- a/tests/baselines/reference/thisInSuperCall.types +++ b/tests/baselines/reference/thisInSuperCall.types @@ -14,7 +14,7 @@ class Foo extends Base { super(this); // error: "super" has to be called before "this" accessing >super(this) : void >super : typeof Base ->this : this +>this : Foo } } @@ -30,7 +30,7 @@ class Foo2 extends Base { super(this); // error >super(this) : void >super : typeof Base ->this : this +>this : Foo2 } } @@ -44,6 +44,6 @@ class Foo3 extends Base { super(this); // error >super(this) : void >super : typeof Base ->this : this +>this : Foo3 } } diff --git a/tests/baselines/reference/thisInSuperCall1.errors.txt b/tests/baselines/reference/thisInSuperCall1.errors.txt index 20bc502ab79..66d32b9eb7b 100644 --- a/tests/baselines/reference/thisInSuperCall1.errors.txt +++ b/tests/baselines/reference/thisInSuperCall1.errors.txt @@ -1,7 +1,8 @@ +tests/cases/compiler/thisInSuperCall1.ts(7,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall1.ts (1 errors) ==== +==== tests/cases/compiler/thisInSuperCall1.ts (2 errors) ==== class Base { constructor(a: any) {} } @@ -9,6 +10,8 @@ tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS17009: 'super' must be c class Foo extends Base { constructor(public x: number) { super(this); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } diff --git a/tests/baselines/reference/thisInSuperCall1.types b/tests/baselines/reference/thisInSuperCall1.types index 9816bf03a28..dc975d83591 100644 --- a/tests/baselines/reference/thisInSuperCall1.types +++ b/tests/baselines/reference/thisInSuperCall1.types @@ -16,7 +16,7 @@ class Foo extends Base { super(this); >super(this) : void >super : typeof Base ->this : this +>this : Foo } } diff --git a/tests/baselines/reference/thisInSuperCall2.errors.txt b/tests/baselines/reference/thisInSuperCall2.errors.txt index 4e4e9b50a8e..25c49e4c974 100644 --- a/tests/baselines/reference/thisInSuperCall2.errors.txt +++ b/tests/baselines/reference/thisInSuperCall2.errors.txt @@ -1,8 +1,10 @@ +tests/cases/compiler/thisInSuperCall2.ts(8,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/compiler/thisInSuperCall2.ts(8,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/thisInSuperCall2.ts(16,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall2.ts (2 errors) ==== +==== tests/cases/compiler/thisInSuperCall2.ts (4 errors) ==== class Base { constructor(a: any) {} } @@ -11,6 +13,8 @@ tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS17009: 'super' must be public x: number; constructor() { super(this); // error: "super" has to be called before "this" accessing + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } @@ -21,6 +25,8 @@ tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS17009: 'super' must be public x: number = 0; constructor() { super(this); // error + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } diff --git a/tests/baselines/reference/thisInSuperCall2.types b/tests/baselines/reference/thisInSuperCall2.types index e319efcf567..8f2b2579148 100644 --- a/tests/baselines/reference/thisInSuperCall2.types +++ b/tests/baselines/reference/thisInSuperCall2.types @@ -17,7 +17,7 @@ class Foo extends Base { super(this); // error: "super" has to be called before "this" accessing >super(this) : void >super : typeof Base ->this : this +>this : Foo } } @@ -34,7 +34,7 @@ class Foo2 extends Base { super(this); // error >super(this) : void >super : typeof Base ->this : this +>this : Foo2 } } diff --git a/tests/baselines/reference/thisInSuperCall3.errors.txt b/tests/baselines/reference/thisInSuperCall3.errors.txt index 27a7dc8b25d..32302cff7c0 100644 --- a/tests/baselines/reference/thisInSuperCall3.errors.txt +++ b/tests/baselines/reference/thisInSuperCall3.errors.txt @@ -1,7 +1,8 @@ +tests/cases/compiler/thisInSuperCall3.ts(9,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall3.ts (1 errors) ==== +==== tests/cases/compiler/thisInSuperCall3.ts (2 errors) ==== class Base { constructor(a: any) {} } @@ -11,6 +12,8 @@ tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS17009: 'super' must be c constructor() { super(this); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } diff --git a/tests/baselines/reference/thisInSuperCall3.types b/tests/baselines/reference/thisInSuperCall3.types index 904e43fee50..956a1340e85 100644 --- a/tests/baselines/reference/thisInSuperCall3.types +++ b/tests/baselines/reference/thisInSuperCall3.types @@ -18,7 +18,7 @@ class Foo extends Base { super(this); >super(this) : void >super : typeof Base ->this : this +>this : Foo } } diff --git a/tests/baselines/reference/thisMethodCall.types b/tests/baselines/reference/thisMethodCall.types index 08e023a44d2..0ee63b25499 100644 --- a/tests/baselines/reference/thisMethodCall.types +++ b/tests/baselines/reference/thisMethodCall.types @@ -11,7 +11,7 @@ class C { this.method?.(); >this.method?.() : void | undefined >this.method : (() => void) | undefined ->this : this +>this : C >method : (() => void) | undefined } } diff --git a/tests/baselines/reference/thisPropertyAssignmentCircular.types b/tests/baselines/reference/thisPropertyAssignmentCircular.types index bdeba6dfeba..a2bc395954d 100644 --- a/tests/baselines/reference/thisPropertyAssignmentCircular.types +++ b/tests/baselines/reference/thisPropertyAssignmentCircular.types @@ -6,7 +6,7 @@ export class Foo { this.foo = "Hello"; >this.foo = "Hello" : "Hello" >this.foo : any ->this : this +>this : Foo >foo : any >"Hello" : "Hello" } @@ -16,12 +16,12 @@ export class Foo { this.foo = this.foo.slice(); >this.foo = this.foo.slice() : string >this.foo : string ->this : this +>this : Foo >foo : string >this.foo.slice() : string >this.foo.slice : (start?: number, end?: number) => string >this.foo : string ->this : this +>this : Foo >foo : string >slice : (start?: number, end?: number) => string } @@ -30,7 +30,7 @@ export class Foo { this.foo >this.foo : string ->this : this +>this : Foo >foo : string } } diff --git a/tests/baselines/reference/thisPropertyOverridesAccessors.types b/tests/baselines/reference/thisPropertyOverridesAccessors.types index 84da977ac12..f5c83ecb445 100644 --- a/tests/baselines/reference/thisPropertyOverridesAccessors.types +++ b/tests/baselines/reference/thisPropertyOverridesAccessors.types @@ -24,7 +24,7 @@ class Bar extends Foo { this.p = 2 >this.p = 2 : 2 >this.p : any ->this : this +>this : Bar >p : any >2 : 2 } diff --git a/tests/baselines/reference/thisShadowingErrorSpans.types b/tests/baselines/reference/thisShadowingErrorSpans.types index 2efd099400d..425a930820b 100644 --- a/tests/baselines/reference/thisShadowingErrorSpans.types +++ b/tests/baselines/reference/thisShadowingErrorSpans.types @@ -8,7 +8,7 @@ class C { this.m(); >this.m() : void >this.m : () => void ->this : this +>this : C >m : () => void function f() { diff --git a/tests/baselines/reference/thisTypeAndConstraints.errors.txt b/tests/baselines/reference/thisTypeAndConstraints.errors.txt new file mode 100644 index 00000000000..33fae78d3c9 --- /dev/null +++ b/tests/baselines/reference/thisTypeAndConstraints.errors.txt @@ -0,0 +1,45 @@ +tests/cases/conformance/types/thisType/thisTypeAndConstraints.ts(9,9): error TS2322: Type 'A' is not assignable to type 'U'. + 'A' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'A'. +tests/cases/conformance/types/thisType/thisTypeAndConstraints.ts(11,5): error TS2322: Type 'A' is not assignable to type 'T'. + 'A' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +tests/cases/conformance/types/thisType/thisTypeAndConstraints.ts(16,9): error TS2322: Type 'A' is not assignable to type 'T'. + 'A' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +tests/cases/conformance/types/thisType/thisTypeAndConstraints.ts(19,9): error TS2322: Type 'A' is not assignable to type 'U'. + 'A' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'A'. + + +==== tests/cases/conformance/types/thisType/thisTypeAndConstraints.ts (4 errors) ==== + class A { + self() { + return this; + } + } + + function f(x: T) { + function g(x: U) { + x = x.self(); + ~ +!!! error TS2322: Type 'A' is not assignable to type 'U'. +!!! error TS2322: 'A' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'A'. + } + x = x.self(); + ~ +!!! error TS2322: Type 'A' is not assignable to type 'T'. +!!! error TS2322: 'A' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. + } + + class B { + foo(x: T) { + x = x.self(); + ~ +!!! error TS2322: Type 'A' is not assignable to type 'T'. +!!! error TS2322: 'A' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. + } + bar(x: U) { + x = x.self(); + ~ +!!! error TS2322: Type 'A' is not assignable to type 'U'. +!!! error TS2322: 'A' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'A'. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/thisTypeAndConstraints.types b/tests/baselines/reference/thisTypeAndConstraints.types index ca7cfcead82..2ba973a6f42 100644 --- a/tests/baselines/reference/thisTypeAndConstraints.types +++ b/tests/baselines/reference/thisTypeAndConstraints.types @@ -3,10 +3,10 @@ class A { >A : A self() { ->self : () => this +>self : () => A return this; ->this : this +>this : A } } @@ -19,20 +19,20 @@ function f(x: T) { >x : U x = x.self(); ->x = x.self() : U +>x = x.self() : A >x : U ->x.self() : U ->x.self : () => U +>x.self() : A +>x.self : () => A >x : U ->self : () => U +>self : () => A } x = x.self(); ->x = x.self() : T +>x = x.self() : A >x : T ->x.self() : T ->x.self : () => T +>x.self() : A +>x.self : () => A >x : T ->self : () => T +>self : () => A } class B { @@ -43,24 +43,24 @@ class B { >x : T x = x.self(); ->x = x.self() : T +>x = x.self() : A >x : T ->x.self() : T ->x.self : () => T +>x.self() : A +>x.self : () => A >x : T ->self : () => T +>self : () => A } bar(x: U) { >bar : (x: U) => void >x : U x = x.self(); ->x = x.self() : U +>x = x.self() : A >x : U ->x.self() : U ->x.self : () => U +>x.self() : A +>x.self : () => A >x : U ->self : () => U +>self : () => A } } diff --git a/tests/baselines/reference/thisTypeErrors2.errors.txt b/tests/baselines/reference/thisTypeErrors2.errors.txt index 783325f4ef3..b92efc61889 100644 --- a/tests/baselines/reference/thisTypeErrors2.errors.txt +++ b/tests/baselines/reference/thisTypeErrors2.errors.txt @@ -1,8 +1,10 @@ tests/cases/conformance/types/thisType/thisTypeErrors2.ts(2,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. tests/cases/conformance/types/thisType/thisTypeErrors2.ts(9,38): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +tests/cases/conformance/types/thisType/thisTypeErrors2.ts(10,13): error TS2322: Type 'Derived' is not assignable to type 'this'. + 'Derived' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Derived'. -==== tests/cases/conformance/types/thisType/thisTypeErrors2.ts (2 errors) ==== +==== tests/cases/conformance/types/thisType/thisTypeErrors2.ts (3 errors) ==== class Base { constructor(a: this) { ~~~~ @@ -17,6 +19,9 @@ tests/cases/conformance/types/thisType/thisTypeErrors2.ts(9,38): error TS2526: A ~~~~ !!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. let self: this = this; + ~~~~ +!!! error TS2322: Type 'Derived' is not assignable to type 'this'. +!!! error TS2322: 'Derived' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Derived'. this.n = 12; } } diff --git a/tests/baselines/reference/thisTypeErrors2.types b/tests/baselines/reference/thisTypeErrors2.types index ab4e0c17a42..f6354f4b12d 100644 --- a/tests/baselines/reference/thisTypeErrors2.types +++ b/tests/baselines/reference/thisTypeErrors2.types @@ -20,12 +20,12 @@ class Derived { let self: this = this; >self : this ->this : this +>this : Derived this.n = 12; >this.n = 12 : 12 >this.n : number ->this : this +>this : Derived >n : number >12 : 12 } diff --git a/tests/baselines/reference/thisTypeInAccessors.types b/tests/baselines/reference/thisTypeInAccessors.types index 48c87cedc53..6abe14e0940 100644 --- a/tests/baselines/reference/thisTypeInAccessors.types +++ b/tests/baselines/reference/thisTypeInAccessors.types @@ -140,7 +140,7 @@ class Contextual { get x() { return this.n } // inside a class, so already correct >x : number >this.n : number ->this : this +>this : Contextual >n : number } diff --git a/tests/baselines/reference/thisTypeInClasses.errors.txt b/tests/baselines/reference/thisTypeInClasses.errors.txt new file mode 100644 index 00000000000..2b68962e1f9 --- /dev/null +++ b/tests/baselines/reference/thisTypeInClasses.errors.txt @@ -0,0 +1,63 @@ +tests/cases/conformance/types/thisType/thisTypeInClasses.ts(35,37): error TS2322: Type 'C5' is not assignable to type 'this'. + 'C5' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'C5'. +tests/cases/conformance/types/thisType/thisTypeInClasses.ts(42,22): error TS2345: Argument of type 'C5' is not assignable to parameter of type 'this'. + 'C5' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'C5'. + + +==== tests/cases/conformance/types/thisType/thisTypeInClasses.ts (2 errors) ==== + class C1 { + x: this; + f(x: this): this { return undefined; } + } + + class C2 { + [x: string]: this; + } + + interface Foo { + x: T; + y: this; + } + + class C3 { + a: this[]; + b: [this, this]; + c: this | Date; + d: this & Date; + e: (((this))); + f: (x: this) => this; + g: new (x: this) => this; + h: Foo; + i: Foo this)>; + j: (x: any) => x is this; + } + + declare class C4 { + x: this; + f(x: this): this; + } + + class C5 { + foo() { + let f1 = (x: this): this => this; + ~~~~ +!!! error TS2322: Type 'C5' is not assignable to type 'this'. +!!! error TS2322: 'C5' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'C5'. + let f2 = (x: this) => this; + let f3 = (x: this) => (y: this) => this; + let f4 = (x: this) => { + let g = (y: this) => { + return () => this; + } + return g(this); + ~~~~ +!!! error TS2345: Argument of type 'C5' is not assignable to parameter of type 'this'. +!!! error TS2345: 'C5' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'C5'. + } + } + bar() { + let x1 = undefined; + let x2 = undefined as this; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/thisTypeInClasses.types b/tests/baselines/reference/thisTypeInClasses.types index e6317efe0b0..a04d0ebd764 100644 --- a/tests/baselines/reference/thisTypeInClasses.types +++ b/tests/baselines/reference/thisTypeInClasses.types @@ -84,40 +84,40 @@ class C5 { >f1 : (x: this) => this >(x: this): this => this : (x: this) => this >x : this ->this : this +>this : C5 let f2 = (x: this) => this; ->f2 : (x: this) => this ->(x: this) => this : (x: this) => this +>f2 : (x: this) => C5 +>(x: this) => this : (x: this) => C5 >x : this ->this : this +>this : C5 let f3 = (x: this) => (y: this) => this; ->f3 : (x: this) => (y: this) => this ->(x: this) => (y: this) => this : (x: this) => (y: this) => this +>f3 : (x: this) => (y: this) => C5 +>(x: this) => (y: this) => this : (x: this) => (y: this) => C5 >x : this ->(y: this) => this : (y: this) => this +>(y: this) => this : (y: this) => C5 >y : this ->this : this +>this : C5 let f4 = (x: this) => { ->f4 : (x: this) => () => this ->(x: this) => { let g = (y: this) => { return () => this; } return g(this); } : (x: this) => () => this +>f4 : (x: this) => () => C5 +>(x: this) => { let g = (y: this) => { return () => this; } return g(this); } : (x: this) => () => C5 >x : this let g = (y: this) => { ->g : (y: this) => () => this ->(y: this) => { return () => this; } : (y: this) => () => this +>g : (y: this) => () => C5 +>(y: this) => { return () => this; } : (y: this) => () => C5 >y : this return () => this; ->() => this : () => this ->this : this +>() => this : () => C5 +>this : C5 } return g(this); ->g(this) : () => this ->g : (y: this) => () => this ->this : this +>g(this) : () => C5 +>g : (y: this) => () => C5 +>this : C5 } } bar() { diff --git a/tests/baselines/reference/thisTypeInFunctions3.types b/tests/baselines/reference/thisTypeInFunctions3.types index 579f8dec639..9a1656ba132 100644 --- a/tests/baselines/reference/thisTypeInFunctions3.types +++ b/tests/baselines/reference/thisTypeInFunctions3.types @@ -16,10 +16,10 @@ class Test extends Base { this.check(this); >this.check(this) : boolean ->this.check : (prop: TProp) => boolean ->this : this ->check : (prop: TProp) => boolean ->this : this +>this.check : (prop: TProp) => boolean +>this : Test +>check : (prop: TProp) => boolean +>this : Test } } diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.types b/tests/baselines/reference/thisTypeInFunctionsNegative.types index 36837e31089..f67ac6971ba 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.types +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.types @@ -24,7 +24,7 @@ class C { return this.n + m; >this.n + m : number >this.n : number ->this : this +>this : C >n : number >m : number } diff --git a/tests/baselines/reference/thisWhenTypeCheckFails.types b/tests/baselines/reference/thisWhenTypeCheckFails.types index 6319748a05e..fb83a609fc5 100644 --- a/tests/baselines/reference/thisWhenTypeCheckFails.types +++ b/tests/baselines/reference/thisWhenTypeCheckFails.types @@ -13,7 +13,7 @@ class c { >s : string >this.n() : void >this.n : () => void ->this : this +>this : c >n : () => void } } diff --git a/tests/baselines/reference/throwInEnclosingStatements.types b/tests/baselines/reference/throwInEnclosingStatements.types index 0dd4384c4fc..7c2d265c397 100644 --- a/tests/baselines/reference/throwInEnclosingStatements.types +++ b/tests/baselines/reference/throwInEnclosingStatements.types @@ -77,13 +77,13 @@ class C { throw this.value; >this.value : T ->this : this +>this : C >value : T } constructor() { throw this; ->this : this +>this : C } } diff --git a/tests/baselines/reference/topLevel.types b/tests/baselines/reference/topLevel.types index 77bcb2f38a7..9b6f89cca04 100644 --- a/tests/baselines/reference/topLevel.types +++ b/tests/baselines/reference/topLevel.types @@ -15,26 +15,26 @@ class Point implements IPoint { >y : any public move(xo:number,yo:number) { ->move : (xo: number, yo: number) => this +>move : (xo: number, yo: number) => Point >xo : number >yo : number this.x+=xo; >this.x+=xo : any >this.x : any ->this : this +>this : Point >x : any >xo : number this.y+=yo; >this.y+=yo : any >this.y : any ->this : this +>this : Point >y : any >yo : number return this; ->this : this +>this : Point } public toString() { >toString : () => string @@ -47,11 +47,11 @@ class Point implements IPoint { >"("+this.x : string >"(" : "(" >this.x : any ->this : this +>this : Point >x : any >"," : "," >this.y : any ->this : this +>this : Point >y : any >")" : ")" } diff --git a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.types b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.types index 741bfda4767..57dd7f4909e 100644 --- a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.types +++ b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.types @@ -13,7 +13,7 @@ class arrTest { this.test([1, 2, "hi", 5, ]); >this.test([1, 2, "hi", 5, ]) : void >this.test : (arg1: number[]) => void ->this : this +>this : arrTest >test : (arg1: number[]) => void >[1, 2, "hi", 5, ] : (string | number)[] >1 : 1 @@ -24,7 +24,7 @@ class arrTest { this.test([1, 2, "hi", 5]); >this.test([1, 2, "hi", 5]) : void >this.test : (arg1: number[]) => void ->this : this +>this : arrTest >test : (arg1: number[]) => void >[1, 2, "hi", 5] : (string | number)[] >1 : 1 diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion.types b/tests/baselines/reference/truthinessCallExpressionCoercion.types index 21c2328455c..88532ad1a21 100644 --- a/tests/baselines/reference/truthinessCallExpressionCoercion.types +++ b/tests/baselines/reference/truthinessCallExpressionCoercion.types @@ -165,13 +165,13 @@ class Foo { if (this.isUser) { // error >this.isUser : () => boolean ->this : this +>this : Foo >isUser : () => boolean } if (this.maybeIsUser) { // ok >this.maybeIsUser : (() => boolean) | undefined ->this : this +>this : Foo >maybeIsUser : (() => boolean) | undefined } } diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion1.types b/tests/baselines/reference/truthinessCallExpressionCoercion1.types index cd9f357a5ed..d80cda2c5be 100644 --- a/tests/baselines/reference/truthinessCallExpressionCoercion1.types +++ b/tests/baselines/reference/truthinessCallExpressionCoercion1.types @@ -248,7 +248,7 @@ class Foo { this.isUser ? console.log('this.isUser') : undefined; >this.isUser ? console.log('this.isUser') : undefined : void >this.isUser : () => boolean ->this : this +>this : Foo >isUser : () => boolean >console.log('this.isUser') : void >console.log : (...data: any[]) => void @@ -261,7 +261,7 @@ class Foo { this.maybeIsUser ? console.log('this.maybeIsUser') : undefined; >this.maybeIsUser ? console.log('this.maybeIsUser') : undefined : void >this.maybeIsUser : (() => boolean) | undefined ->this : this +>this : Foo >maybeIsUser : (() => boolean) | undefined >console.log('this.maybeIsUser') : void >console.log : (...data: any[]) => void @@ -273,13 +273,13 @@ class Foo { // ok if (this.isUser) { >this.isUser : () => boolean ->this : this +>this : Foo >isUser : () => boolean this.isUser(); >this.isUser() : boolean >this.isUser : () => boolean ->this : this +>this : Foo >isUser : () => boolean } } diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion2.types b/tests/baselines/reference/truthinessCallExpressionCoercion2.types index 85eeacc46f7..8c3a9b36aa8 100644 --- a/tests/baselines/reference/truthinessCallExpressionCoercion2.types +++ b/tests/baselines/reference/truthinessCallExpressionCoercion2.types @@ -393,7 +393,7 @@ class Foo { this.required && console.log('required'); >this.required && console.log('required') : void >this.required : () => boolean ->this : this +>this : Foo >required : () => boolean >console.log('required') : void >console.log : (...data: any[]) => void @@ -407,7 +407,7 @@ class Foo { >1 && this.required : () => boolean >1 : 1 >this.required : () => boolean ->this : this +>this : Foo >required : () => boolean >console.log('required') : void >console.log : (...data: any[]) => void @@ -419,11 +419,11 @@ class Foo { this.required && this.required(); >this.required && this.required() : boolean >this.required : () => boolean ->this : this +>this : Foo >required : () => boolean >this.required() : boolean >this.required : () => boolean ->this : this +>this : Foo >required : () => boolean // ok @@ -431,12 +431,12 @@ class Foo { >this.required && 1 && this.required() : boolean >this.required && 1 : 1 >this.required : () => boolean ->this : this +>this : Foo >required : () => boolean >1 : 1 >this.required() : boolean >this.required : () => boolean ->this : this +>this : Foo >required : () => boolean // ok @@ -445,7 +445,7 @@ class Foo { >1 && this.optional : (() => boolean) | undefined >1 : 1 >this.optional : (() => boolean) | undefined ->this : this +>this : Foo >optional : (() => boolean) | undefined >console.log('optional') : void >console.log : (...data: any[]) => void diff --git a/tests/baselines/reference/tsxAttributeResolution15.errors.txt b/tests/baselines/reference/tsxAttributeResolution15.errors.txt index ad4cee701ec..8b798f7c83f 100644 --- a/tests/baselines/reference/tsxAttributeResolution15.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution15.errors.txt @@ -1,13 +1,23 @@ +tests/cases/conformance/jsx/file.tsx(4,5): error TS2416: Property 'render' in type 'BigGreeter' is not assignable to the same property in base type 'Component<{}, {}>'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Property 'greeting' is missing in type 'Component' but required in type 'BigGreeter'. tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. tests/cases/conformance/jsx/file.tsx(14,39): error TS2532: Object is possibly 'undefined'. -==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== import React = require('react'); class BigGreeter extends React.Component<{ }, {}> { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'BigGreeter' is not assignable to the same property in base type 'Component<{}, {}>'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Property 'greeting' is missing in type 'Component' but required in type 'BigGreeter'. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:7:5: 'greeting' is declared here. return

Default hi
; } greeting: string; diff --git a/tests/baselines/reference/tsxAttributeResolution16.errors.txt b/tests/baselines/reference/tsxAttributeResolution16.errors.txt new file mode 100644 index 00000000000..1d7eaee7cd6 --- /dev/null +++ b/tests/baselines/reference/tsxAttributeResolution16.errors.txt @@ -0,0 +1,56 @@ +tests/cases/conformance/jsx/file.tsx(19,10): error TS2416: Property 'render' in type 'AddressComp' is not assignable to the same property in base type 'Component'. + Type '() => any' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'AddressComp'. + Types of property 'render' are incompatible. + Type '() => Element' is not assignable to type '() => any'. + The 'this' types of each signature are incompatible. + Type 'AddressComp' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: void, props: Properties) => void, callback?: () => any): void; (state: void, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type 'void' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to 'void'. + + +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== + import React = require('react'); + + interface Address { + street: string; + country: string; + } + + interface CanadianAddress extends Address { + postalCode: string; + } + + interface AmericanAddress extends Address { + zipCode: string; + } + + type Properties = CanadianAddress | AmericanAddress; + + export class AddressComp extends React.Component { + public render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'AddressComp' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => any' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'AddressComp'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => Element' is not assignable to type '() => any'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'AddressComp' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: void, props: Properties) => void, callback?: () => any): void; (state: void, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type 'void' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to 'void'. + return null; + } + } + + let a = \ No newline at end of file diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.types b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.types index dfb764693d6..c87844519ff 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.types +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.types @@ -35,7 +35,7 @@ export class ShortDetails extends React.Component<{ id: number }, {}> { >this.props.id < 1 : boolean >this.props.id : number >this.props : { id: number; } ->this : this +>this : ShortDetails >props : { id: number; } >id : number >1 : 1 diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution1.errors.txt b/tests/baselines/reference/tsxDefaultAttributesResolution1.errors.txt new file mode 100644 index 00000000000..437bd6c173a --- /dev/null +++ b/tests/baselines/reference/tsxDefaultAttributesResolution1.errors.txt @@ -0,0 +1,45 @@ +tests/cases/conformance/jsx/file.tsx(7,5): error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'Poisoned'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Poisoned' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + + +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== + import React = require('react'); + + interface Prop { + x: boolean; + } + class Poisoned extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'Poisoned'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Poisoned' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return
Hello
; + } + } + + // OK + let p = ; \ No newline at end of file diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution2.errors.txt b/tests/baselines/reference/tsxDefaultAttributesResolution2.errors.txt new file mode 100644 index 00000000000..a458f172b35 --- /dev/null +++ b/tests/baselines/reference/tsxDefaultAttributesResolution2.errors.txt @@ -0,0 +1,45 @@ +tests/cases/conformance/jsx/file.tsx(7,5): error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'Poisoned'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Poisoned' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + + +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== + import React = require('react'); + + interface Prop { + x: true; + } + class Poisoned extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'Poisoned'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Poisoned' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return
Hello
; + } + } + + // OK + let p = ; \ No newline at end of file diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution3.errors.txt b/tests/baselines/reference/tsxDefaultAttributesResolution3.errors.txt index ebeaa538486..fc4de9fedbc 100644 --- a/tests/baselines/reference/tsxDefaultAttributesResolution3.errors.txt +++ b/tests/baselines/reference/tsxDefaultAttributesResolution3.errors.txt @@ -1,7 +1,21 @@ +tests/cases/conformance/jsx/file.tsx(7,5): error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'Poisoned'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Poisoned' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. tests/cases/conformance/jsx/file.tsx(13,19): error TS2322: Type 'true' is not assignable to type 'false'. -==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== import React = require('react'); interface Prop { @@ -9,6 +23,21 @@ tests/cases/conformance/jsx/file.tsx(13,19): error TS2322: Type 'true' is not as } class Poisoned extends React.Component { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'Poisoned'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Poisoned' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. return
Hello
; } } diff --git a/tests/baselines/reference/tsxDynamicTagName5.types b/tests/baselines/reference/tsxDynamicTagName5.types index ea57c600a4f..477691b6f1a 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.types +++ b/tests/baselines/reference/tsxDynamicTagName5.types @@ -29,7 +29,7 @@ export class Text extends React.Component<{}, {}> { > : error >this._tagName : string ->this : this +>this : Text >_tagName : string ); diff --git a/tests/baselines/reference/tsxDynamicTagName7.types b/tests/baselines/reference/tsxDynamicTagName7.types index ab27a9df6de..307dcc0c2d4 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.types +++ b/tests/baselines/reference/tsxDynamicTagName7.types @@ -28,7 +28,7 @@ export class Text extends React.Component<{}, {}> { // this should be an error > : any ->this : this +>this : Text ); } diff --git a/tests/baselines/reference/tsxDynamicTagName8.types b/tests/baselines/reference/tsxDynamicTagName8.types index cb3b50f1c24..da2b9cb53d7 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.types +++ b/tests/baselines/reference/tsxDynamicTagName8.types @@ -29,10 +29,10 @@ export class Text extends React.Component<{}, {}> { Hello world > Hello world : error >this._tagName : string ->this : this +>this : Text >_tagName : string >this._tagName : string ->this : this +>this : Text >_tagName : string ); diff --git a/tests/baselines/reference/tsxDynamicTagName9.types b/tests/baselines/reference/tsxDynamicTagName9.types index 978f0a926cc..63377c72f96 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.types +++ b/tests/baselines/reference/tsxDynamicTagName9.types @@ -29,10 +29,10 @@ export class Text extends React.Component<{}, {}> { Hello world > Hello world : error >this._tagName : "div" ->this : this +>this : Text >_tagName : "div" >this._tagName : "div" ->this : this +>this : Text >_tagName : "div" ); diff --git a/tests/baselines/reference/tsxEmit1.types b/tests/baselines/reference/tsxEmit1.types index 24e47142a65..4db4eb4502f 100644 --- a/tests/baselines/reference/tsxEmit1.types +++ b/tests/baselines/reference/tsxEmit1.types @@ -109,8 +109,8 @@ class SomeClass { >rewrites1 : JSX.Element >
{() => this}
: JSX.Element >div : any ->() => this : () => this ->this : this +>() => this : () => SomeClass +>this : SomeClass >div : any var rewrites2 =
{[p, ...p, p]}
; @@ -136,9 +136,9 @@ class SomeClass { >rewrites4 : JSX.Element >
this}>
: JSX.Element >div : any ->a : () => this ->() => this : () => this ->this : this +>a : () => SomeClass +>() => this : () => SomeClass +>this : SomeClass >div : any var rewrites5 =
; diff --git a/tests/baselines/reference/tsxGenericAttributesType3.errors.txt b/tests/baselines/reference/tsxGenericAttributesType3.errors.txt new file mode 100644 index 00000000000..f13b090af74 --- /dev/null +++ b/tests/baselines/reference/tsxGenericAttributesType3.errors.txt @@ -0,0 +1,73 @@ +tests/cases/conformance/jsx/file.tsx(4,5): error TS2416: Property 'render' in type 'B1' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'B1'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'B1' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: T) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. +tests/cases/conformance/jsx/file.tsx(9,5): error TS2416: Property 'render' in type 'B' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'B'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'B' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: U) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + + +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== + import React = require('react'); + + class B1 extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'B1' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'B1'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'B1' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: T) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return
hi
; + } + } + class B extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'B' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'B'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'B' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: U) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return ; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsxGenericAttributesType3.types b/tests/baselines/reference/tsxGenericAttributesType3.types index b86ac86b4c8..26d7700e335 100644 --- a/tests/baselines/reference/tsxGenericAttributesType3.types +++ b/tests/baselines/reference/tsxGenericAttributesType3.types @@ -32,7 +32,7 @@ class B extends React.Component { > : JSX.Element >B1 : typeof B1 >this.props : U & { children?: React.ReactNode; } ->this : this +>this : B >props : U & { children?: React.ReactNode; } >x : string } diff --git a/tests/baselines/reference/tsxGenericAttributesType4.errors.txt b/tests/baselines/reference/tsxGenericAttributesType4.errors.txt new file mode 100644 index 00000000000..83228eb43d2 --- /dev/null +++ b/tests/baselines/reference/tsxGenericAttributesType4.errors.txt @@ -0,0 +1,73 @@ +tests/cases/conformance/jsx/file.tsx(4,5): error TS2416: Property 'render' in type 'B1' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'B1'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'B1' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: T) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. +tests/cases/conformance/jsx/file.tsx(9,5): error TS2416: Property 'render' in type 'B' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'B'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'B' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: U) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + + +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== + import React = require('react'); + + class B1 extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'B1' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'B1'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'B1' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: T) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return
hi
; + } + } + class B extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'B' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'B'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'B' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: U) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return ; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsxGenericAttributesType4.types b/tests/baselines/reference/tsxGenericAttributesType4.types index a572a73d796..29e0f3b560e 100644 --- a/tests/baselines/reference/tsxGenericAttributesType4.types +++ b/tests/baselines/reference/tsxGenericAttributesType4.types @@ -31,7 +31,7 @@ class B extends React.Component { > : JSX.Element >B1 : typeof B1 >this.props : U & { children?: React.ReactNode; } ->this : this +>this : B >props : U & { children?: React.ReactNode; } >x : string } diff --git a/tests/baselines/reference/tsxGenericAttributesType5.errors.txt b/tests/baselines/reference/tsxGenericAttributesType5.errors.txt new file mode 100644 index 00000000000..b65644b7c7a --- /dev/null +++ b/tests/baselines/reference/tsxGenericAttributesType5.errors.txt @@ -0,0 +1,60 @@ +tests/cases/conformance/jsx/file.tsx(4,5): error TS2416: Property 'render' in type 'B1' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'B1'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'B1' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: T) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. +tests/cases/conformance/jsx/file.tsx(10,5): error TS2416: Property 'render' in type 'B' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'B'. + Types of property 'props' are incompatible. + Type 'P & { children?: ReactNode; }' is not assignable to type 'U'. + 'U' could be instantiated with an arbitrary type which could be unrelated to 'P & { children?: ReactNode; }'. + + +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== + import React = require('react'); + + class B1 extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'B1' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'B1'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'B1' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: T) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return
hi
; + } + } + class B extends React.Component { + props: U; + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'B' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'B'. +!!! error TS2416: Types of property 'props' are incompatible. +!!! error TS2416: Type 'P & { children?: ReactNode; }' is not assignable to type 'U'. +!!! error TS2416: 'U' could be instantiated with an arbitrary type which could be unrelated to 'P & { children?: ReactNode; }'. + return ; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsxGenericAttributesType5.types b/tests/baselines/reference/tsxGenericAttributesType5.types index 61d26982083..103b5958775 100644 --- a/tests/baselines/reference/tsxGenericAttributesType5.types +++ b/tests/baselines/reference/tsxGenericAttributesType5.types @@ -34,7 +34,7 @@ class B extends React.Component { > : JSX.Element >B1 : typeof B1 >this.props : U ->this : this +>this : B >props : U >x : string } diff --git a/tests/baselines/reference/tsxGenericAttributesType6.errors.txt b/tests/baselines/reference/tsxGenericAttributesType6.errors.txt new file mode 100644 index 00000000000..36cfc2d47f7 --- /dev/null +++ b/tests/baselines/reference/tsxGenericAttributesType6.errors.txt @@ -0,0 +1,60 @@ +tests/cases/conformance/jsx/file.tsx(4,5): error TS2416: Property 'render' in type 'B1' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'B1'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'B1' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: T) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. +tests/cases/conformance/jsx/file.tsx(10,5): error TS2416: Property 'render' in type 'B' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'B'. + Types of property 'props' are incompatible. + Type 'P & { children?: ReactNode; }' is not assignable to type 'U'. + 'U' could be instantiated with an arbitrary type which could be unrelated to 'P & { children?: ReactNode; }'. + + +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== + import React = require('react'); + + class B1 extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'B1' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'B1'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'B1' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: T) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return
hi
; + } + } + class B extends React.Component { + props: U; + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'B' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'B'. +!!! error TS2416: Types of property 'props' are incompatible. +!!! error TS2416: Type 'P & { children?: ReactNode; }' is not assignable to type 'U'. +!!! error TS2416: 'U' could be instantiated with an arbitrary type which could be unrelated to 'P & { children?: ReactNode; }'. + return ; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsxGenericAttributesType6.types b/tests/baselines/reference/tsxGenericAttributesType6.types index 41d5585b2f0..3f3a753c96e 100644 --- a/tests/baselines/reference/tsxGenericAttributesType6.types +++ b/tests/baselines/reference/tsxGenericAttributesType6.types @@ -35,7 +35,7 @@ class B extends React.Component { > : JSX.Element >B1 : typeof B1 >this.props : U ->this : this +>this : B >props : U >x : string } diff --git a/tests/baselines/reference/tsxGenericAttributesType9.errors.txt b/tests/baselines/reference/tsxGenericAttributesType9.errors.txt new file mode 100644 index 00000000000..2205dc399ab --- /dev/null +++ b/tests/baselines/reference/tsxGenericAttributesType9.errors.txt @@ -0,0 +1,45 @@ +tests/cases/conformance/jsx/file.tsx(5,10): error TS2416: Property 'render' in type '(Anonymous class)' is not assignable to the same property in base type 'PureComponent'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type '(Anonymous class)'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type '(Anonymous class)' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: void, props: P) => void, callback?: () => any): void; (state: void, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type 'void' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to 'void'. + + +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== + import React = require('react'); + + export function makeP

(Ctor: React.ComponentClass

) { + return class extends React.PureComponent { + public render(): JSX.Element { + ~~~~~~ +!!! error TS2416: Property 'render' in type '(Anonymous class)' is not assignable to the same property in base type 'PureComponent'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type '(Anonymous class)'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type '(Anonymous class)' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: void, props: P) => void, callback?: () => any): void; (state: void, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type 'void' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to 'void'. + return ( + + ); + } + }; + } + + \ No newline at end of file diff --git a/tests/baselines/reference/tsxGenericAttributesType9.types b/tests/baselines/reference/tsxGenericAttributesType9.types index 9747f7c3d17..ddbbfe17215 100644 --- a/tests/baselines/reference/tsxGenericAttributesType9.types +++ b/tests/baselines/reference/tsxGenericAttributesType9.types @@ -24,7 +24,7 @@ export function makeP

(Ctor: React.ComponentClass

) { > : JSX.Element >Ctor : React.ComponentClass

>this.props : P & { children?: React.ReactNode; } ->this : this +>this : (Anonymous class) >props : P & { children?: React.ReactNode; } ); diff --git a/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt b/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt index 81231a34562..0be65b28fce 100644 --- a/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt +++ b/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt @@ -1,3 +1,14 @@ +tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(10,9): error TS2416: Property 'render' in type 'MyComponent' is not assignable to the same property in base type 'Component'. + Type '() => Element' is not assignable to type '() => ReactNode'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'MyComponent'. + Types of property 'render' are incompatible. + Type '() => ReactNode' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'MyComponent' is not assignable to type 'Component'. + Types of property 'props' are incompatible. + Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

'. Two different types with this name exist, but they are unrelated. + Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(14,14): error TS2322: Type '{}' is not assignable to type 'P'. 'P' could be instantiated with an arbitrary type which could be unrelated to '{}'. tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(15,14): error TS2769: No overload matches this call. @@ -7,7 +18,7 @@ tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(15,14): error TS2769: No o Type '{}' is not assignable to type 'Readonly

'. -==== tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx (2 errors) ==== +==== tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx (3 errors) ==== /// import React from 'react'; @@ -18,6 +29,18 @@ tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(15,14): error TS2769: No o }; class MyComponent extends React.Component

{ render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'MyComponent' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => Element' is not assignable to type '() => ReactNode'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'MyComponent'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => ReactNode' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'MyComponent' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'props' are incompatible. +!!! error TS2416: Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly

'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly

' is not assignable to type 'Readonly

'. return <>hello; } } diff --git a/tests/baselines/reference/tsxReactEmit1.types b/tests/baselines/reference/tsxReactEmit1.types index 3917b833d68..759e95969a8 100644 --- a/tests/baselines/reference/tsxReactEmit1.types +++ b/tests/baselines/reference/tsxReactEmit1.types @@ -113,8 +113,8 @@ class SomeClass { >rewrites1 : JSX.Element >

{() => this}
: JSX.Element >div : any ->() => this : () => this ->this : this +>() => this : () => SomeClass +>this : SomeClass >div : any var rewrites2 =
{[p, ...p, p]}
; @@ -140,9 +140,9 @@ class SomeClass { >rewrites4 : JSX.Element >
this}>
: JSX.Element >div : any ->a : () => this ->() => this : () => this ->this : this +>a : () => SomeClass +>() => this : () => SomeClass +>this : SomeClass >div : any var rewrites5 =
; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution11.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution11.errors.txt new file mode 100644 index 00000000000..96a2c5ae5f5 --- /dev/null +++ b/tests/baselines/reference/tsxSpreadAttributesResolution11.errors.txt @@ -0,0 +1,63 @@ +tests/cases/conformance/jsx/file.tsx(19,5): error TS2416: Property 'render' in type 'OverWriteAttr' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'OverWriteAttr'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'OverWriteAttr' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + + +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== + import React = require('react'); + + const obj = {}; + const obj1: { x: 2 } = { + x: 2 + } + const obj3: {y: true, overwrite: string } = { + y: true, + overwrite: "hi" + } + + interface Prop { + x: 2 + y: true + overwrite: string + } + + class OverWriteAttr extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'OverWriteAttr' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'OverWriteAttr'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'OverWriteAttr' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return
Hello
; + } + } + + let anyobj: any; + // OK + let x = + let x1 = + let x2 = + let x3 = + let x4 = + let x5 = \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt index 36b86e8aaf2..afe20814887 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt @@ -1,3 +1,17 @@ +tests/cases/conformance/jsx/file.tsx(19,5): error TS2416: Property 'render' in type 'OverWriteAttr' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'OverWriteAttr'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'OverWriteAttr' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. tests/cases/conformance/jsx/file.tsx(27,33): error TS2322: Type 'true' is not assignable to type 'false'. tests/cases/conformance/jsx/file.tsx(28,50): error TS2322: Type '3' is not assignable to type '2'. tests/cases/conformance/jsx/file.tsx(30,11): error TS2322: Type '{ y: true; x: 2; overwrite: string; }' is not assignable to type 'Prop'. @@ -5,7 +19,7 @@ tests/cases/conformance/jsx/file.tsx(30,11): error TS2322: Type '{ y: true; x: 2 Type 'true' is not assignable to type 'false'. -==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (4 errors) ==== import React = require('react'); const obj = {}; @@ -25,6 +39,21 @@ tests/cases/conformance/jsx/file.tsx(30,11): error TS2322: Type '{ y: true; x: 2 class OverWriteAttr extends React.Component { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'OverWriteAttr' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'OverWriteAttr'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'OverWriteAttr' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. return
Hello
; } } diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt index ebaa798cbaa..cdd7b39504c 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt @@ -1,3 +1,17 @@ +tests/cases/conformance/jsx/file.tsx(9,5): error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'Poisoned'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Poisoned' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: PoisonedProp) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. tests/cases/conformance/jsx/file.tsx(20,10): error TS2739: Type '{}' is missing the following properties from type 'PoisonedProp': x, y tests/cases/conformance/jsx/file.tsx(21,10): error TS2739: Type '{}' is missing the following properties from type 'PoisonedProp': x, y tests/cases/conformance/jsx/file.tsx(22,19): error TS2322: Type 'boolean' is not assignable to type 'string'. @@ -9,7 +23,7 @@ tests/cases/conformance/jsx/file.tsx(24,40): error TS2322: Type '{ X: string; x: Property 'X' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }'. Did you mean 'x'? -==== tests/cases/conformance/jsx/file.tsx (6 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (7 errors) ==== import React = require('react'); interface PoisonedProp { @@ -19,6 +33,21 @@ tests/cases/conformance/jsx/file.tsx(24,40): error TS2322: Type '{ X: string; x: class Poisoned extends React.Component { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'Poisoned'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Poisoned' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: PoisonedProp) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. return
Hello
; } } diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution3.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution3.errors.txt new file mode 100644 index 00000000000..a9d5ac0edee --- /dev/null +++ b/tests/baselines/reference/tsxSpreadAttributesResolution3.errors.txt @@ -0,0 +1,53 @@ +tests/cases/conformance/jsx/file.tsx(9,5): error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'Poisoned'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Poisoned' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: PoisonedProp) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + + +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== + import React = require('react'); + + interface PoisonedProp { + x: string; + y: number; + } + + class Poisoned extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'Poisoned'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Poisoned' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: PoisonedProp) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return
Hello
; + } + } + + const obj = { + x: "hello world", + y: 2 + }; + + // OK + let p = ; + let y = ; \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution4.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution4.errors.txt index d0540d88494..a10eb5b068b 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution4.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution4.errors.txt @@ -1,7 +1,21 @@ +tests/cases/conformance/jsx/file.tsx(9,5): error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'Poisoned'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Poisoned' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: PoisonedProp) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. tests/cases/conformance/jsx/file.tsx(32,45): error TS2532: Object is possibly 'undefined'. -==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== import React = require('react'); interface PoisonedProp { @@ -11,6 +25,21 @@ tests/cases/conformance/jsx/file.tsx(32,45): error TS2532: Object is possibly 'u class Poisoned extends React.Component { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'Poisoned'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Poisoned' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: PoisonedProp) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. return
Hello
; } } diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt index 22fa2022bad..ac0f5df254d 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt @@ -1,10 +1,28 @@ +tests/cases/conformance/jsx/file.tsx(9,5): error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'Poisoned'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Poisoned' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: PoisonedProp) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. tests/cases/conformance/jsx/file.tsx(20,10): error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'PoisonedProp'. Types of property 'y' are incompatible. Type 'number' is not assignable to type '2'. +tests/cases/conformance/jsx/file.tsx(23,5): error TS2416: Property 'render' in type 'EmptyProp' is not assignable to the same property in base type 'Component<{}, {}>'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Property 'greeting' is missing in type 'Component' but required in type 'EmptyProp'. tests/cases/conformance/jsx/file.tsx(33,10): error TS2559: Type '{ prop1: boolean; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. -==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (4 errors) ==== import React = require('react'); interface PoisonedProp { @@ -14,6 +32,21 @@ tests/cases/conformance/jsx/file.tsx(33,10): error TS2559: Type '{ prop1: boolea class Poisoned extends React.Component { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'Poisoned' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'Poisoned'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Poisoned' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: PoisonedProp) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. return
Hello
; } } @@ -32,6 +65,12 @@ tests/cases/conformance/jsx/file.tsx(33,10): error TS2559: Type '{ prop1: boolea class EmptyProp extends React.Component<{}, {}> { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'EmptyProp' is not assignable to the same property in base type 'Component<{}, {}>'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Property 'greeting' is missing in type 'Component' but required in type 'EmptyProp'. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:26:5: 'greeting' is declared here. return
Default hi
; } greeting: string; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt index 360f8a72ada..a14a633b9e0 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt @@ -1,8 +1,22 @@ +tests/cases/conformance/jsx/file.tsx(7,5): error TS2416: Property 'render' in type 'TextComponent' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'TextComponent'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'TextComponent' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: TextProps) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. tests/cases/conformance/jsx/file.tsx(13,10): error TS2322: Type '{ editable: true; }' is not assignable to type 'IntrinsicAttributes & (IntrinsicClassAttributes & (TextProps & { children?: ReactNode; }))'. Property 'onEdit' is missing in type '{ editable: true; }' but required in type '{ editable: true; onEdit: (newText: string) => void; }'. -==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== import React = require('react'); type TextProps = { editable: false } @@ -10,6 +24,21 @@ tests/cases/conformance/jsx/file.tsx(13,10): error TS2322: Type '{ editable: tru class TextComponent extends React.Component { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'TextComponent' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'TextComponent'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'TextComponent' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: TextProps) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. return Some Text..; } } diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution7.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution7.errors.txt new file mode 100644 index 00000000000..a9f10353fc3 --- /dev/null +++ b/tests/baselines/reference/tsxSpreadAttributesResolution7.errors.txt @@ -0,0 +1,56 @@ +tests/cases/conformance/jsx/file.tsx(7,5): error TS2416: Property 'render' in type 'TextComponent' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'TextComponent'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'TextComponent' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: TextProps) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + + +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== + import React = require('react'); + + type TextProps = { editable: false } + | { editable: true, onEdit: (newText: string) => void }; + + class TextComponent extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'TextComponent' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'TextComponent'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'TextComponent' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: TextProps) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return Some Text..; + } + } + + // OK + const textPropsFalse: TextProps = { + editable: false + }; + + let y1 = + + const textPropsTrue: TextProps = { + editable: true, + onEdit: () => {} + }; + + let y2 = \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution8.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution8.errors.txt new file mode 100644 index 00000000000..1f9c24745f9 --- /dev/null +++ b/tests/baselines/reference/tsxSpreadAttributesResolution8.errors.txt @@ -0,0 +1,58 @@ +tests/cases/conformance/jsx/file.tsx(19,5): error TS2416: Property 'render' in type 'OverWriteAttr' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'OverWriteAttr'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'OverWriteAttr' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + + +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== + import React = require('react'); + + const obj = {}; + const obj1 = { + x: 2 + } + const obj3 = { + y: true, + overwrite: "hi" + } + + interface Prop { + x: number + y: boolean + overwrite: string + } + + class OverWriteAttr extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'OverWriteAttr' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'OverWriteAttr'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'OverWriteAttr' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: Prop) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + return
Hello
; + } + } + + // OK + let x = + let x1 = \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.errors.txt b/tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.errors.txt new file mode 100644 index 00000000000..fc98d4a7d47 --- /dev/null +++ b/tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.errors.txt @@ -0,0 +1,36 @@ +tests/cases/compiler/tsxSpreadDoesNotReportExcessProps.tsx(6,5): error TS2416: Property 'render' in type 'MyComponent' is not assignable to the same property in base type 'Component<{ dataSource: number[]; onClick?: any; }, {}, any>'. + Type '() => Element' is not assignable to type '() => ReactNode'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'MyComponent'. + Types of property 'render' are incompatible. + Type '() => ReactNode' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'MyComponent' is not assignable to type 'Component'. + Types of property 'props' are incompatible. + Type 'Readonly<{ children?: ReactNode; }> & Readonly<{ dataSource: number[]; onClick?: any; }>' is not assignable to type 'Readonly<{ children?: ReactNode; }> & Readonly

'. + Type 'Readonly<{ children?: ReactNode; }> & Readonly<{ dataSource: number[]; onClick?: any; }>' is not assignable to type 'Readonly

'. + + +==== tests/cases/compiler/tsxSpreadDoesNotReportExcessProps.tsx (1 errors) ==== + /// + + import React from "react"; + + class MyComponent extends React.Component<{dataSource: number[], onClick?: any}, {}> { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'MyComponent' is not assignable to the same property in base type 'Component<{ dataSource: number[]; onClick?: any; }, {}, any>'. +!!! error TS2416: Type '() => Element' is not assignable to type '() => ReactNode'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'MyComponent'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => ReactNode' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'MyComponent' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'props' are incompatible. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly<{ dataSource: number[]; onClick?: any; }>' is not assignable to type 'Readonly<{ children?: ReactNode; }> & Readonly

'. +!!! error TS2416: Type 'Readonly<{ children?: ReactNode; }> & Readonly<{ dataSource: number[]; onClick?: any; }>' is not assignable to type 'Readonly

'. + return (

); + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.types b/tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.types index a10dc4c4065..d546706c554 100644 --- a/tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.types +++ b/tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.types @@ -20,7 +20,7 @@ class MyComponent extends React.Component<{dataSource: number[], onClick?: any}, >
: JSX.Element >div : any >this.props : Readonly<{ children?: React.ReactNode; }> & Readonly<{ dataSource: number[]; onClick?: any; }> ->this : this +>this : MyComponent >props : Readonly<{ children?: React.ReactNode; }> & Readonly<{ dataSource: number[]; onClick?: any; }> >className : string >div : any diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt index b6727eb5ca8..4d478981f47 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/jsx/file.tsx(8,2): error TS2416: Property 'render' in type 'BigGreeter' is not assignable to the same property in base type 'Component<{ name?: string; }, {}>'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Property 'greeting' is missing in type 'Component' but required in type 'BigGreeter'. tests/cases/conformance/jsx/file.tsx(19,16): error TS2322: Type '{ ref: string; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'. Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'. tests/cases/conformance/jsx/file.tsx(25,42): error TS2551: Property 'subtr' does not exist on type 'string'. Did you mean 'substr'? @@ -5,7 +9,7 @@ tests/cases/conformance/jsx/file.tsx(27,33): error TS2339: Property 'notARealPro tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNotOnHtmlDivElement' does not exist on type 'HTMLDivElement'. -==== tests/cases/conformance/jsx/file.tsx (4 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (5 errors) ==== import React = require('react'); function Greet(x: {name?: string}) { @@ -14,6 +18,12 @@ tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNot class BigGreeter extends React.Component<{ name?: string }, {}> { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'BigGreeter' is not assignable to the same property in base type 'Component<{ name?: string; }, {}>'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Property 'greeting' is missing in type 'Component' but required in type 'BigGreeter'. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:11:2: 'greeting' is declared here. return
; } greeting: string; diff --git a/tests/baselines/reference/tsxUnionElementType3.errors.txt b/tests/baselines/reference/tsxUnionElementType3.errors.txt index 73d8ccb0ce2..ba5024c1f63 100644 --- a/tests/baselines/reference/tsxUnionElementType3.errors.txt +++ b/tests/baselines/reference/tsxUnionElementType3.errors.txt @@ -1,17 +1,56 @@ +tests/cases/conformance/jsx/file.tsx(4,5): error TS2416: Property 'render' in type 'RC1' is not assignable to the same property in base type 'Component<{ x: number; }, {}>'. + Type '() => any' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'RC1'. + Types of property 'render' are incompatible. + Type '() => Element' is not assignable to type '() => any'. + The 'this' types of each signature are incompatible. + Type 'RC1' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: { x: number; }) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. +tests/cases/conformance/jsx/file.tsx(10,5): error TS2416: Property 'render' in type 'RC2' is not assignable to the same property in base type 'Component<{ x: string; }, {}>'. + Type '() => any' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Property 'method' is missing in type 'Component' but required in type 'RC2'. tests/cases/conformance/jsx/file.tsx(32,17): error TS2322: Type 'string' is not assignable to type 'never'. -==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== import React = require('react'); class RC1 extends React.Component<{x : number}, {}> { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'RC1' is not assignable to the same property in base type 'Component<{ x: number; }, {}>'. +!!! error TS2416: Type '() => any' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'RC1'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => Element' is not assignable to type '() => any'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'RC1' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: { x: number; }) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. return null; } } class RC2 extends React.Component<{ x: string }, {}> { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'RC2' is not assignable to the same property in base type 'Component<{ x: string; }, {}>'. +!!! error TS2416: Type '() => any' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Property 'method' is missing in type 'Component' but required in type 'RC2'. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:13:13: 'method' is declared here. return null; } private method() { } diff --git a/tests/baselines/reference/tsxUnionElementType4.errors.txt b/tests/baselines/reference/tsxUnionElementType4.errors.txt index 03cb6c62a52..217da338fd7 100644 --- a/tests/baselines/reference/tsxUnionElementType4.errors.txt +++ b/tests/baselines/reference/tsxUnionElementType4.errors.txt @@ -1,3 +1,21 @@ +tests/cases/conformance/jsx/file.tsx(4,5): error TS2416: Property 'render' in type 'RC1' is not assignable to the same property in base type 'Component<{ x: number; }, {}>'. + Type '() => any' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'RC1'. + Types of property 'render' are incompatible. + Type '() => Element' is not assignable to type '() => any'. + The 'this' types of each signature are incompatible. + Type 'RC1' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: { x: number; }) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. +tests/cases/conformance/jsx/file.tsx(10,5): error TS2416: Property 'render' in type 'RC2' is not assignable to the same property in base type 'Component<{ x: string; }, {}>'. + Type '() => any' is not assignable to type '() => Element'. + The 'this' types of each signature are incompatible. + Property 'method' is missing in type 'Component' but required in type 'RC2'. tests/cases/conformance/jsx/file.tsx(32,17): error TS2322: Type 'boolean' is not assignable to type 'never'. tests/cases/conformance/jsx/file.tsx(33,21): error TS2322: Type '{ x: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. @@ -5,17 +23,38 @@ tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; } Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. -==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (5 errors) ==== import React = require('react'); class RC1 extends React.Component<{x : number}, {}> { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'RC1' is not assignable to the same property in base type 'Component<{ x: number; }, {}>'. +!!! error TS2416: Type '() => any' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'RC1'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => Element' is not assignable to type '() => any'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'RC1' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: { x: number; }) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. return null; } } class RC2 extends React.Component<{ x: string }, {}> { render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'RC2' is not assignable to the same property in base type 'Component<{ x: string; }, {}>'. +!!! error TS2416: Type '() => any' is not assignable to type '() => Element'. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Property 'method' is missing in type 'Component' but required in type 'RC2'. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:13:13: 'method' is declared here. return null; } private method() { } diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.errors.txt b/tests/baselines/reference/tsxUnionTypeComponent1.errors.txt new file mode 100644 index 00000000000..9b313dd934d --- /dev/null +++ b/tests/baselines/reference/tsxUnionTypeComponent1.errors.txt @@ -0,0 +1,55 @@ +tests/cases/conformance/jsx/file.tsx(8,5): error TS2416: Property 'render' in type 'MyComponent' is not assignable to the same property in base type 'Component'. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Component' is not assignable to type 'MyComponent'. + Types of property 'render' are incompatible. + Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'MyComponent' is not assignable to type 'Component'. + Types of property 'setState' are incompatible. + Type '{ (f: (prevState: {}, props: ComponentProps) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'prevState' and 'prevState' are incompatible. + Type '{}' is not assignable to type 'S'. + 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + + +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== + import React = require('react'); + + interface ComponentProps { + AnyComponent: React.StatelessComponent | React.ComponentClass; + } + + class MyComponent extends React.Component { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'MyComponent' is not assignable to the same property in base type 'Component'. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Component' is not assignable to type 'MyComponent'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'MyComponent' is not assignable to type 'Component'. +!!! error TS2416: Types of property 'setState' are incompatible. +!!! error TS2416: Type '{ (f: (prevState: {}, props: ComponentProps) => {}, callback?: () => any): void; (state: {}, callback?: () => any): void; }' is not assignable to type '{ (f: (prevState: S, props: P) => S, callback?: () => any): void; (state: S, callback?: () => any): void; }'. +!!! error TS2416: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2416: Types of parameters 'prevState' and 'prevState' are incompatible. +!!! error TS2416: Type '{}' is not assignable to type 'S'. +!!! error TS2416: 'S' could be instantiated with an arbitrary type which could be unrelated to '{}'. + const { AnyComponent } = this.props; + return (); + } + } + + // Stateless Component As Props + }/> + + // Component Class as Props + class MyButtonComponent extends React.Component<{},{}> { + } + + + + \ No newline at end of file diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.types b/tests/baselines/reference/tsxUnionTypeComponent1.types index 858eb6242aa..6b7808c8faf 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.types +++ b/tests/baselines/reference/tsxUnionTypeComponent1.types @@ -21,7 +21,7 @@ class MyComponent extends React.Component { const { AnyComponent } = this.props; >AnyComponent : React.StatelessComponent | React.ComponentClass >this.props : ComponentProps & { children?: React.ReactNode; } ->this : this +>this : MyComponent >props : ComponentProps & { children?: React.ReactNode; } return (); diff --git a/tests/baselines/reference/typeConstraintsWithConstructSignatures.types b/tests/baselines/reference/typeConstraintsWithConstructSignatures.types index 58a9b8f5f7a..b316840da52 100644 --- a/tests/baselines/reference/typeConstraintsWithConstructSignatures.types +++ b/tests/baselines/reference/typeConstraintsWithConstructSignatures.types @@ -17,14 +17,14 @@ class C { >x : any >new this.data() : any >this.data : T ->this : this +>this : C >data : T var x2 = new this.data2(); // should not error >x2 : any >new this.data2() : any >this.data2 : Constructable ->this : this +>this : C >data2 : Constructable } } diff --git a/tests/baselines/reference/typeFromParamTagForFunction.types b/tests/baselines/reference/typeFromParamTagForFunction.types index f36bca8748c..1cd29ec8f5a 100644 --- a/tests/baselines/reference/typeFromParamTagForFunction.types +++ b/tests/baselines/reference/typeFromParamTagForFunction.types @@ -51,7 +51,7 @@ exports.B = class { this.x = 1; >this.x = 1 : 1 >this.x : any ->this : this +>this : B >x : any >1 : 1 } @@ -136,7 +136,7 @@ export class E { this.x = 1; >this.x = 1 : 1 >this.x : any ->this : this +>this : E >x : any >1 : 1 } @@ -207,7 +207,7 @@ class H { this.x = 1; >this.x = 1 : 1 >this.x : any ->this : this +>this : H >x : any >1 : 1 } diff --git a/tests/baselines/reference/typeFromPropertyAssignment10.types b/tests/baselines/reference/typeFromPropertyAssignment10.types index cbb99b9bc2d..b41d035e165 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment10.types +++ b/tests/baselines/reference/typeFromPropertyAssignment10.types @@ -54,7 +54,7 @@ Outer.app.Inner = class { this.y = 12; >this.y = 12 : 12 >this.y : number ->this : this +>this : Inner >y : number >12 : 12 } diff --git a/tests/baselines/reference/typeFromPropertyAssignment10_1.types b/tests/baselines/reference/typeFromPropertyAssignment10_1.types index 8331137b110..d63e93c9a8e 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment10_1.types +++ b/tests/baselines/reference/typeFromPropertyAssignment10_1.types @@ -54,7 +54,7 @@ Outer.app.Inner = class { this.y = 12; >this.y = 12 : 12 >this.y : number ->this : this +>this : Inner >y : number >12 : 12 } diff --git a/tests/baselines/reference/typeFromPropertyAssignment15.types b/tests/baselines/reference/typeFromPropertyAssignment15.types index c82b777396e..fc9f5b11f44 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment15.types +++ b/tests/baselines/reference/typeFromPropertyAssignment15.types @@ -14,7 +14,7 @@ Outer.Inner = class { this.x = 1 >this.x = 1 : 1 >this.x : any ->this : this +>this : Inner >x : any >1 : 1 } diff --git a/tests/baselines/reference/typeFromPropertyAssignment2.types b/tests/baselines/reference/typeFromPropertyAssignment2.types index bd1b69ea668..9b90c1bcfad 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment2.types +++ b/tests/baselines/reference/typeFromPropertyAssignment2.types @@ -21,7 +21,7 @@ Outer.Inner = class I { this.x = 1 >this.x = 1 : 1 >this.x : any ->this : this +>this : I >x : any >1 : 1 } diff --git a/tests/baselines/reference/typeFromPropertyAssignment23.types b/tests/baselines/reference/typeFromPropertyAssignment23.types index d100f718840..26bc5ea5400 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment23.types +++ b/tests/baselines/reference/typeFromPropertyAssignment23.types @@ -6,7 +6,7 @@ class B { this.n = 1 >this.n = 1 : 1 >this.n : any ->this : this +>this : B >n : any >1 : 1 } diff --git a/tests/baselines/reference/typeFromPropertyAssignment25.errors.txt b/tests/baselines/reference/typeFromPropertyAssignment25.errors.txt new file mode 100644 index 00000000000..ac6372ea20b --- /dev/null +++ b/tests/baselines/reference/typeFromPropertyAssignment25.errors.txt @@ -0,0 +1,25 @@ +tests/cases/conformance/salsa/bug24703.js(9,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'I'. + + +==== tests/cases/conformance/salsa/bug24703.js (1 errors) ==== + var Common = {}; + Common.I = class { + constructor() { + this.i = 1 + } + } + Common.O = class extends Common.I { + constructor() { + super() + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'I'. + this.o = 2 + } + } + var o = new Common.O() + var i = new Common.I() + o.i + o.o + i.i + + \ No newline at end of file diff --git a/tests/baselines/reference/typeFromPropertyAssignment25.types b/tests/baselines/reference/typeFromPropertyAssignment25.types index e5ec6cf6f04..9180b4d59ae 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment25.types +++ b/tests/baselines/reference/typeFromPropertyAssignment25.types @@ -14,7 +14,7 @@ Common.I = class { this.i = 1 >this.i = 1 : 1 >this.i : any ->this : this +>this : I >i : any >1 : 1 } @@ -37,7 +37,7 @@ Common.O = class extends Common.I { this.o = 2 >this.o = 2 : 2 >this.o : any ->this : this +>this : O >o : any >2 : 2 } diff --git a/tests/baselines/reference/typeFromPropertyAssignment26.types b/tests/baselines/reference/typeFromPropertyAssignment26.types index dc01eed98d8..65f09b7f288 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment26.types +++ b/tests/baselines/reference/typeFromPropertyAssignment26.types @@ -14,7 +14,7 @@ UI.TreeElement = class { this.treeOutline = 12 >this.treeOutline = 12 : 12 >this.treeOutline : any ->this : this +>this : TreeElement >treeOutline : any >12 : 12 } @@ -40,14 +40,14 @@ class C extends UI.TreeElement { this.doesNotExist >this.doesNotExist : any ->this : this +>this : C >doesNotExist : any this.treeOutline.doesntExistEither() >this.treeOutline.doesntExistEither() : any >this.treeOutline.doesntExistEither : any >this.treeOutline : number ->this : this +>this : C >treeOutline : number >doesntExistEither : any } diff --git a/tests/baselines/reference/typeFromPropertyAssignment28.types b/tests/baselines/reference/typeFromPropertyAssignment28.types index a84ea102a87..2f32d3af4da 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment28.types +++ b/tests/baselines/reference/typeFromPropertyAssignment28.types @@ -4,7 +4,7 @@ class C { constructor() { this.p = 1; } } >C : C >this.p = 1 : 1 >this.p : any ->this : this +>this : C >p : any >1 : 1 diff --git a/tests/baselines/reference/typeFromPropertyAssignment3.types b/tests/baselines/reference/typeFromPropertyAssignment3.types index 500c290adcf..3ead76f55bd 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment3.types +++ b/tests/baselines/reference/typeFromPropertyAssignment3.types @@ -23,7 +23,7 @@ Outer.Inner = class I { this.x = 1 >this.x = 1 : 1 >this.x : any ->this : this +>this : I >x : any >1 : 1 } diff --git a/tests/baselines/reference/typeFromPropertyAssignment35.types b/tests/baselines/reference/typeFromPropertyAssignment35.types index df9db2d8a5e..8dab67f6f98 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment35.types +++ b/tests/baselines/reference/typeFromPropertyAssignment35.types @@ -35,7 +35,7 @@ Emu.D = class { this._model = 1 >this._model = 1 : 1 >this._model : any ->this : this +>this : D >_model : any >1 : 1 } diff --git a/tests/baselines/reference/typeFromPropertyAssignment4.types b/tests/baselines/reference/typeFromPropertyAssignment4.types index d4ad58f296e..1458e7cf5bd 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment4.types +++ b/tests/baselines/reference/typeFromPropertyAssignment4.types @@ -16,7 +16,7 @@ Outer.Inner = class { this.y = 12 >this.y = 12 : 12 >this.y : number ->this : this +>this : Inner >y : number >12 : 12 } diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.types b/tests/baselines/reference/typeGuardFunctionOfFormThis.types index 4778266ecfe..7bd8a5d6967 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.types +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.types @@ -7,7 +7,7 @@ class RoyalGuard { return this instanceof LeadGuard; >this instanceof LeadGuard : boolean ->this : this +>this : RoyalGuard >LeadGuard : typeof LeadGuard } isFollower(): this is FollowerGuard { @@ -15,7 +15,7 @@ class RoyalGuard { return this instanceof FollowerGuard; >this instanceof FollowerGuard : boolean ->this : this +>this : RoyalGuard >FollowerGuard : typeof FollowerGuard } } @@ -288,13 +288,13 @@ class MimicGuard { isLeader(): this is MimicLeader { return this instanceof MimicLeader; }; >isLeader : () => this is MimicLeader >this instanceof MimicLeader : boolean ->this : this +>this : MimicGuard >MimicLeader : typeof MimicLeader isFollower(): this is MimicFollower { return this instanceof MimicFollower; }; >isFollower : () => this is MimicFollower >this instanceof MimicFollower : boolean ->this : this +>this : MimicGuard >MimicFollower : typeof MimicFollower } diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt index 4e6e842e39a..e814315f826 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt @@ -11,11 +11,12 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors Type predicate 'this is FollowerGuard' is not assignable to 'this is LeadGuard'. Type 'FollowerGuard' is not assignable to type 'LeadGuard'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts(29,32): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts(54,5): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'RoyalGuard'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts(55,7): error TS2339: Property 'follow' does not exist on type 'RoyalGuard'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts(58,7): error TS2339: Property 'lead' does not exist on type 'RoyalGuard'. -==== tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts (7 errors) ==== +==== tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts (8 errors) ==== class RoyalGuard { isLeader(): this is LeadGuard { return this instanceof LeadGuard; @@ -90,6 +91,8 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors let detached = a.isFollower; if (detached()) { + ~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'RoyalGuard'. a.follow(); ~~~~~~ !!! error TS2339: Property 'follow' does not exist on type 'RoyalGuard'. diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types index a2824385238..8e3ff434194 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types @@ -7,7 +7,7 @@ class RoyalGuard { return this instanceof LeadGuard; >this instanceof LeadGuard : boolean ->this : this +>this : RoyalGuard >LeadGuard : typeof LeadGuard } isFollower(): this is FollowerGuard { @@ -15,7 +15,7 @@ class RoyalGuard { return this instanceof FollowerGuard; >this instanceof FollowerGuard : boolean ->this : this +>this : RoyalGuard >FollowerGuard : typeof FollowerGuard } } diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.errors.txt b/tests/baselines/reference/typeGuardOfFormThisMember.errors.txt index 21dc896fbd9..c0092eecd54 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormThisMember.errors.txt @@ -2,6 +2,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts(4,10 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts(5,17): error TS1228: A type predicate is only allowed in return type position for functions and methods. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts(11,22): error TS1228: A type predicate is only allowed in return type position for functions and methods. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts(14,16): error TS1228: A type predicate is only allowed in return type position for functions and methods. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts(19,55): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'FileSystemObject'. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts(34,8): error TS2339: Property 'content' does not exist on type 'FileSystemObject'. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts(36,9): error TS2339: Property 'host' does not exist on type 'FileSystemObject'. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts(37,9): error TS2339: Property 'content' does not exist on type 'FileSystemObject'. @@ -15,7 +16,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts(70,1 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts(79,11): error TS2339: Property 'do' does not exist on type 'SpecificGuard'. -==== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts (15 errors) ==== +==== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts (16 errors) ==== // There's a 'File' class in the stdlib, wrap with a namespace to avoid collision namespace Test { export class FileSystemObject { @@ -43,6 +44,8 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts(79,1 export class File extends FileSystemObject { constructor(path: string, public content: string) { super(path); } + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'FileSystemObject'. } export class Directory extends FileSystemObject { children: FileSystemObject[]; diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.types b/tests/baselines/reference/typeGuardOfFormThisMember.types index d887f434781..a267a599bc9 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.types +++ b/tests/baselines/reference/typeGuardOfFormThisMember.types @@ -14,7 +14,7 @@ namespace Test { return this instanceof File; >this instanceof File : boolean ->this : this +>this : FileSystemObject >File : typeof File } set isFile(param) { @@ -28,7 +28,7 @@ namespace Test { return this instanceof Directory; >this instanceof Directory : boolean ->this : this +>this : FileSystemObject >Directory : typeof Directory } isNetworked: this is (Networked & this); diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.errors.txt b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.errors.txt index 88e9d41cc7b..319ebbd0d9c 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.errors.txt @@ -2,9 +2,10 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMemberErrors.t tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMemberErrors.ts(5,17): error TS1228: A type predicate is only allowed in return type position for functions and methods. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMemberErrors.ts(11,22): error TS1228: A type predicate is only allowed in return type position for functions and methods. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMemberErrors.ts(14,16): error TS1228: A type predicate is only allowed in return type position for functions and methods. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMemberErrors.ts(19,55): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'FileSystemObject'. -==== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMemberErrors.ts (4 errors) ==== +==== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMemberErrors.ts (5 errors) ==== // There's a 'File' class in the stdlib, wrap with a namespace to avoid collision namespace Test { export class FileSystemObject { @@ -32,6 +33,8 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMemberErrors.t export class File extends FileSystemObject { constructor(path: string, public content: string) { super(path); } + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'FileSystemObject'. } export class Directory extends FileSystemObject { children: FileSystemObject[]; diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.types b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.types index fc739a83b30..3920411c49b 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.types +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.types @@ -14,7 +14,7 @@ namespace Test { return this instanceof File; >this instanceof File : boolean ->this : this +>this : FileSystemObject >File : typeof File } set isFile(param) { @@ -28,7 +28,7 @@ namespace Test { return this instanceof Directory; >this instanceof Directory : boolean ->this : this +>this : FileSystemObject >Directory : typeof Directory } isNetworked: this is (Networked & this); diff --git a/tests/baselines/reference/typeGuardOfFromPropNameInUnionType.types b/tests/baselines/reference/typeGuardOfFromPropNameInUnionType.types index f2c8a0f3498..eba16cb8a4f 100644 --- a/tests/baselines/reference/typeGuardOfFromPropNameInUnionType.types +++ b/tests/baselines/reference/typeGuardOfFromPropNameInUnionType.types @@ -247,14 +247,14 @@ class InMemberOfClass { >"a" in this.prop : boolean >"a" : "a" >this.prop : A | B ->this : this +>this : InMemberOfClass >prop : A | B let y: string = this.prop.a; >y : string >this.prop.a : string >this.prop : A ->this : this +>this : InMemberOfClass >prop : A >a : string @@ -263,7 +263,7 @@ class InMemberOfClass { >z : number >this.prop.b : number >this.prop : B ->this : this +>this : InMemberOfClass >prop : B >b : number } @@ -283,12 +283,12 @@ class SelfAssert { if ("a" in this) { >"a" in this : boolean >"a" : "a" ->this : this +>this : SelfAssert let y: string = this.a; >y : string >this.a : string ->this : this +>this : SelfAssert >a : string } else { diff --git a/tests/baselines/reference/typeGuardsInProperties.types b/tests/baselines/reference/typeGuardsInProperties.types index 1bf3ee62a41..e6b74f122be 100644 --- a/tests/baselines/reference/typeGuardsInProperties.types +++ b/tests/baselines/reference/typeGuardsInProperties.types @@ -34,11 +34,11 @@ class C1 { >typeof this.pp1 === "string" : boolean >typeof this.pp1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >this.pp1 : string | number ->this : this +>this : C1 >pp1 : string | number >"string" : "string" >this.pp1 : string ->this : this +>this : C1 >pp1 : string strOrNum = typeof this.pp2 === "string" && this.pp2; // string | number @@ -48,11 +48,11 @@ class C1 { >typeof this.pp2 === "string" : boolean >typeof this.pp2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >this.pp2 : string | number ->this : this +>this : C1 >pp2 : string | number >"string" : "string" >this.pp2 : string ->this : this +>this : C1 >pp2 : string strOrNum = typeof this.pp3 === "string" && this.pp3; // string | number @@ -62,11 +62,11 @@ class C1 { >typeof this.pp3 === "string" : boolean >typeof this.pp3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >this.pp3 : string | number ->this : this +>this : C1 >pp3 : string | number >"string" : "string" >this.pp3 : string ->this : this +>this : C1 >pp3 : string } } diff --git a/tests/baselines/reference/typeGuardsOnClassProperty.types b/tests/baselines/reference/typeGuardsOnClassProperty.types index b0c354c8a27..1386f55cbbf 100644 --- a/tests/baselines/reference/typeGuardsOnClassProperty.types +++ b/tests/baselines/reference/typeGuardsOnClassProperty.types @@ -16,7 +16,7 @@ class D { var data = this.data; >data : string | string[] >this.data : string | string[] ->this : this +>this : D >data : string | string[] return typeof data === "string" ? data : data.join(" "); @@ -41,16 +41,16 @@ class D { >typeof this.data === "string" : boolean >typeof this.data : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >this.data : string | string[] ->this : this +>this : D >data : string | string[] >"string" : "string" >this.data : string ->this : this +>this : D >data : string >this.data.join(" ") : string >this.data.join : (separator?: string) => string >this.data : string[] ->this : this +>this : D >data : string[] >join : (separator?: string) => string >" " : " " diff --git a/tests/baselines/reference/typeInferenceLiteralUnion.types b/tests/baselines/reference/typeInferenceLiteralUnion.types index c8718f7515e..5a7611aad54 100644 --- a/tests/baselines/reference/typeInferenceLiteralUnion.types +++ b/tests/baselines/reference/typeInferenceLiteralUnion.types @@ -27,7 +27,7 @@ class NumCoercible { this.a = a; >this.a = a : number >this.a : number ->this : this +>this : NumCoercible >a : number >a : number } @@ -36,7 +36,7 @@ class NumCoercible { return this.a; >this.a : number ->this : this +>this : NumCoercible >a : number } } diff --git a/tests/baselines/reference/typeInferenceReturnTypeCallback.errors.txt b/tests/baselines/reference/typeInferenceReturnTypeCallback.errors.txt new file mode 100644 index 00000000000..b3dc666ef04 --- /dev/null +++ b/tests/baselines/reference/typeInferenceReturnTypeCallback.errors.txt @@ -0,0 +1,38 @@ +tests/cases/compiler/typeInferenceReturnTypeCallback.ts(13,45): error TS2345: Argument of type '(t: T, acc: Nil) => Cons' is not assignable to parameter of type '(t: T, acc: Nil) => Nil'. + Call signature return types 'Cons' and 'Nil' are incompatible. + The types of 'map' are incompatible between these types. + Type '(f: (t: U) => U) => IList' is not assignable to type '(f: (t: U) => D) => IList'. + The 'this' types of each signature are incompatible. + Property 'foldRight' is missing in type 'Nil' but required in type 'Cons'. + + +==== tests/cases/compiler/typeInferenceReturnTypeCallback.ts (1 errors) ==== + interface IList
{ + map(f: (t: A) => B): IList; + } + + class Nil implements IList{ + map(f: (t: C) => D): IList { + return null; + } + } + + class Cons implements IList{ + map(f: (t: T) => U): IList { + return this.foldRight(new Nil(), (t, acc) => { + ~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '(t: T, acc: Nil) => Cons' is not assignable to parameter of type '(t: T, acc: Nil) => Nil'. +!!! error TS2345: Call signature return types 'Cons' and 'Nil' are incompatible. +!!! error TS2345: The types of 'map' are incompatible between these types. +!!! error TS2345: Type '(f: (t: U) => U) => IList' is not assignable to type '(f: (t: U) => D) => IList'. +!!! error TS2345: The 'this' types of each signature are incompatible. +!!! error TS2345: Property 'foldRight' is missing in type 'Nil' but required in type 'Cons'. +!!! related TS2728 tests/cases/compiler/typeInferenceReturnTypeCallback.ts:18:5: 'foldRight' is declared here. + return new Cons(); + }); + } + + foldRight(z: E, f: (t: T, acc: E) => E): E { + return null; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/typeInferenceReturnTypeCallback.types b/tests/baselines/reference/typeInferenceReturnTypeCallback.types index ef43630fed0..5afaba400ae 100644 --- a/tests/baselines/reference/typeInferenceReturnTypeCallback.types +++ b/tests/baselines/reference/typeInferenceReturnTypeCallback.types @@ -30,7 +30,7 @@ class Cons implements IList{ return this.foldRight(new Nil(), (t, acc) => { >this.foldRight(new Nil(), (t, acc) => { return new Cons(); }) : Nil >this.foldRight : (z: E, f: (t: T, acc: E) => E) => E ->this : this +>this : Cons >foldRight : (z: E, f: (t: T, acc: E) => E) => E >new Nil() : Nil >Nil : typeof Nil diff --git a/tests/baselines/reference/typeOfThisGeneral.errors.txt b/tests/baselines/reference/typeOfThisGeneral.errors.txt index 1bbdab42550..e76c15e9b93 100644 --- a/tests/baselines/reference/typeOfThisGeneral.errors.txt +++ b/tests/baselines/reference/typeOfThisGeneral.errors.txt @@ -1,16 +1,10 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(14,13): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(18,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(24,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(29,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(37,13): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyTestClass'. tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(83,13): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyGenericTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(87,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(93,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(98,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyGenericTestClass'. -==== tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts (10 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts (4 errors) ==== class MyTestClass { private canary: number; static staticCanary: number; @@ -32,26 +26,17 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(106,13): er //type of 'this' in member function body is the class instance type var p = this; var p: MyTestClass; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. -!!! related TS6203 tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts:17:13: 'p' was also declared here. } //type of 'this' in member accessor(get and set) body is the class instance type get prop() { var p = this; var p: MyTestClass; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. -!!! related TS6203 tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts:23:13: 'p' was also declared here. return this; } set prop(v) { var p = this; var p: MyTestClass; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. -!!! related TS6203 tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts:28:13: 'p' was also declared here. p = v; v = p; } @@ -116,26 +101,17 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts(106,13): er //type of 'this' in member function body is the class instance type var p = this; var p: MyGenericTestClass; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. -!!! related TS6203 tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts:86:13: 'p' was also declared here. } //type of 'this' in member accessor(get and set) body is the class instance type get prop() { var p = this; var p: MyGenericTestClass; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. -!!! related TS6203 tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts:92:13: 'p' was also declared here. return this; } set prop(v) { var p = this; var p: MyGenericTestClass; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. -!!! related TS6203 tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts:97:13: 'p' was also declared here. p = v; v = p; } diff --git a/tests/baselines/reference/typeOfThisGeneral.types b/tests/baselines/reference/typeOfThisGeneral.types index 2edfb61676c..30f7dc57634 100644 --- a/tests/baselines/reference/typeOfThisGeneral.types +++ b/tests/baselines/reference/typeOfThisGeneral.types @@ -13,7 +13,7 @@ class MyTestClass { var p = this.canary; >p : number >this.canary : number ->this : this +>this : MyTestClass >canary : number var p: number; @@ -22,7 +22,7 @@ class MyTestClass { this.canary = 3; >this.canary = 3 : 3 >this.canary : number ->this : this +>this : MyTestClass >canary : number >3 : 3 } @@ -38,47 +38,47 @@ class MyTestClass { //type of 'this' in member function body is the class instance type var p = this; ->p : this ->this : this +>p : MyTestClass +>this : MyTestClass var p: MyTestClass; ->p : this +>p : MyTestClass } //type of 'this' in member accessor(get and set) body is the class instance type get prop() { ->prop : this +>prop : MyTestClass var p = this; ->p : this ->this : this +>p : MyTestClass +>this : MyTestClass var p: MyTestClass; ->p : this +>p : MyTestClass return this; ->this : this +>this : MyTestClass } set prop(v) { ->prop : this ->v : this +>prop : MyTestClass +>v : MyTestClass var p = this; ->p : this ->this : this +>p : MyTestClass +>this : MyTestClass var p: MyTestClass; ->p : this +>p : MyTestClass p = v; ->p = v : this ->p : this ->v : this +>p = v : MyTestClass +>p : MyTestClass +>v : MyTestClass v = p; ->v = p : this ->v : this ->p : this +>v = p : MyTestClass +>v : MyTestClass +>p : MyTestClass } someFunc = () => { @@ -196,7 +196,7 @@ class MyGenericTestClass { var p = this.canary; >p : number >this.canary : number ->this : this +>this : MyGenericTestClass >canary : number var p: number; @@ -205,7 +205,7 @@ class MyGenericTestClass { this.canary = 3; >this.canary = 3 : 3 >this.canary : number ->this : this +>this : MyGenericTestClass >canary : number >3 : 3 } @@ -221,47 +221,47 @@ class MyGenericTestClass { //type of 'this' in member function body is the class instance type var p = this; ->p : this ->this : this +>p : MyGenericTestClass +>this : MyGenericTestClass var p: MyGenericTestClass; ->p : this +>p : MyGenericTestClass } //type of 'this' in member accessor(get and set) body is the class instance type get prop() { ->prop : this +>prop : MyGenericTestClass var p = this; ->p : this ->this : this +>p : MyGenericTestClass +>this : MyGenericTestClass var p: MyGenericTestClass; ->p : this +>p : MyGenericTestClass return this; ->this : this +>this : MyGenericTestClass } set prop(v) { ->prop : this ->v : this +>prop : MyGenericTestClass +>v : MyGenericTestClass var p = this; ->p : this ->this : this +>p : MyGenericTestClass +>this : MyGenericTestClass var p: MyGenericTestClass; ->p : this +>p : MyGenericTestClass p = v; ->p = v : this ->p : this ->v : this +>p = v : MyGenericTestClass +>p : MyGenericTestClass +>v : MyGenericTestClass v = p; ->v = p : this ->v : this ->p : this +>v = p : MyGenericTestClass +>v : MyGenericTestClass +>p : MyGenericTestClass } someFunc = () => { diff --git a/tests/baselines/reference/typeOfThisInAccessor.types b/tests/baselines/reference/typeOfThisInAccessor.types index 4113e1a562f..e6f60bae8d6 100644 --- a/tests/baselines/reference/typeOfThisInAccessor.types +++ b/tests/baselines/reference/typeOfThisInAccessor.types @@ -6,8 +6,8 @@ class C { >x : number var r = this; // C ->r : this ->this : this +>r : C +>this : C return 1; >1 : 1 @@ -35,8 +35,8 @@ class D { >x : number var r = this; // D ->r : this ->this : this +>r : D +>this : D return 1; >1 : 1 diff --git a/tests/baselines/reference/typeOfThisInInstanceMember.types b/tests/baselines/reference/typeOfThisInInstanceMember.types index f54bc385a9d..754a00039a2 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember.types +++ b/tests/baselines/reference/typeOfThisInInstanceMember.types @@ -7,46 +7,46 @@ class C { >this : this foo() { ->foo : () => this +>foo : () => C return this; ->this : this +>this : C } constructor(x: number) { >x : number var t = this; ->t : this ->this : this +>t : C +>this : C t.x; ->t.x : this ->t : this ->x : this +>t.x : C +>t : C +>x : C t.y; ->t.y : this ->t : this ->y : this +>t.y : C +>t : C +>y : C t.z; >t.z : any ->t : this +>t : C >z : any var r = t.foo(); ->r : this ->t.foo() : this ->t.foo : () => this ->t : this ->foo : () => this +>r : C +>t.foo() : C +>t.foo : () => C +>t : C +>foo : () => C } get y() { ->y : this +>y : C return this; ->this : this +>this : C } } diff --git a/tests/baselines/reference/typeOfThisInInstanceMember2.errors.txt b/tests/baselines/reference/typeOfThisInInstanceMember2.errors.txt index 5544a80ee7d..9d66f0f42f9 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember2.errors.txt +++ b/tests/baselines/reference/typeOfThisInInstanceMember2.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember2.ts(14,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember2.ts(26,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'string' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. -==== tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember2.ts (1 errors) ==== +==== tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember2.ts (2 errors) ==== class C { x = this; foo() { @@ -30,6 +33,10 @@ tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInIns var ra = c.x.x.x; var r2 = c.y; var r3 = c.foo(); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'string' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. var r4 = c.z; var rs = [r, r2, r3]; diff --git a/tests/baselines/reference/typeOfThisInInstanceMember2.types b/tests/baselines/reference/typeOfThisInInstanceMember2.types index 1d6f6ffe1d1..336686a4f79 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember2.types +++ b/tests/baselines/reference/typeOfThisInInstanceMember2.types @@ -7,46 +7,46 @@ class C { >this : this foo() { ->foo : () => this +>foo : () => C return this; ->this : this +>this : C } constructor(x: T) { >x : T var t = this; ->t : this ->this : this +>t : C +>this : C t.x; ->t.x : this ->t : this ->x : this +>t.x : C +>t : C +>x : C t.y; ->t.y : this ->t : this ->y : this +>t.y : C +>t : C +>y : C t.z; >t.z : T ->t : this +>t : C >z : T var r = t.foo(); ->r : this ->t.foo() : this ->t.foo : () => this ->t : this ->foo : () => this +>r : C +>t.foo() : C +>t.foo : () => C +>t : C +>foo : () => C } get y() { ->y : this +>y : C return this; ->this : this +>this : C } z: T; diff --git a/tests/baselines/reference/typeOfThisInMemberFunctions.types b/tests/baselines/reference/typeOfThisInMemberFunctions.types index cedaa34c60e..ace3ed0be35 100644 --- a/tests/baselines/reference/typeOfThisInMemberFunctions.types +++ b/tests/baselines/reference/typeOfThisInMemberFunctions.types @@ -6,8 +6,8 @@ class C { >foo : () => void var r = this; ->r : this ->this : this +>r : C +>this : C } static bar() { @@ -29,8 +29,8 @@ class D { >foo : () => void var r = this; ->r : this ->this : this +>r : D +>this : D } static bar() { @@ -52,8 +52,8 @@ class E { >foo : () => void var r = this; ->r : this ->this : this +>r : E +>this : E } static bar() { diff --git a/tests/baselines/reference/typeOfThisInStaticMembers8(target=es5).types b/tests/baselines/reference/typeOfThisInStaticMembers8(target=es5).types index 08873785a92..3530928b7b0 100644 --- a/tests/baselines/reference/typeOfThisInStaticMembers8(target=es5).types +++ b/tests/baselines/reference/typeOfThisInStaticMembers8(target=es5).types @@ -67,7 +67,7 @@ class C { return this.f + 6 >this.f + 6 : any >this.f : any ->this : this +>this : CC >f : any >6 : 6 } diff --git a/tests/baselines/reference/typeOfThisInStaticMembers8(target=es6).types b/tests/baselines/reference/typeOfThisInStaticMembers8(target=es6).types index 08873785a92..3530928b7b0 100644 --- a/tests/baselines/reference/typeOfThisInStaticMembers8(target=es6).types +++ b/tests/baselines/reference/typeOfThisInStaticMembers8(target=es6).types @@ -67,7 +67,7 @@ class C { return this.f + 6 >this.f + 6 : any >this.f : any ->this : this +>this : CC >f : any >6 : 6 } diff --git a/tests/baselines/reference/typeOfThisInStaticMembers8(target=esnext).types b/tests/baselines/reference/typeOfThisInStaticMembers8(target=esnext).types index 08873785a92..3530928b7b0 100644 --- a/tests/baselines/reference/typeOfThisInStaticMembers8(target=esnext).types +++ b/tests/baselines/reference/typeOfThisInStaticMembers8(target=esnext).types @@ -67,7 +67,7 @@ class C { return this.f + 6 >this.f + 6 : any >this.f : any ->this : this +>this : CC >f : any >6 : 6 } diff --git a/tests/baselines/reference/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.types b/tests/baselines/reference/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.types index 7938c5ec6e1..5915987096b 100644 --- a/tests/baselines/reference/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.types +++ b/tests/baselines/reference/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.types @@ -33,7 +33,7 @@ class SomeClass { this.state.data; >this.state.data : string | number >this.state : State ->this : this +>this : SomeClass >state : State >data : string | number @@ -41,7 +41,7 @@ class SomeClass { >this.state.type === "stringVariant" : boolean >this.state.type : "numberVariant" | "stringVariant" >this.state : State ->this : this +>this : SomeClass >state : State >type : "numberVariant" | "stringVariant" >"stringVariant" : "stringVariant" @@ -50,7 +50,7 @@ class SomeClass { >s : string >this.state.data : string >this.state : { type: "stringVariant"; data: string; } ->this : this +>this : SomeClass >state : { type: "stringVariant"; data: string; } >data : string } @@ -77,7 +77,7 @@ class SomeClass2 { >this.state.type === "numberVariant" : boolean >this.state.type : "numberVariant" | "stringVariant" >this.state : State ->this : this +>this : SomeClass2 >state : State >type : "numberVariant" | "stringVariant" >"numberVariant" : "numberVariant" @@ -85,7 +85,7 @@ class SomeClass2 { this.state.data; >this.state.data : number >this.state : { type: "numberVariant"; data: number; } ->this : this +>this : SomeClass2 >state : { type: "numberVariant"; data: number; } >data : number } @@ -93,7 +93,7 @@ class SomeClass2 { >n : number >this.state?.data : string | number >this.state : State ->this : this +>this : SomeClass2 >state : State >data : string | number } diff --git a/tests/baselines/reference/typeParametersAvailableInNestedScope.errors.txt b/tests/baselines/reference/typeParametersAvailableInNestedScope.errors.txt new file mode 100644 index 00000000000..c29e8ac3476 --- /dev/null +++ b/tests/baselines/reference/typeParametersAvailableInNestedScope.errors.txt @@ -0,0 +1,31 @@ +tests/cases/conformance/types/typeParameters/typeParameterLists/typeParametersAvailableInNestedScope.ts(20,10): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'number' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + + +==== tests/cases/conformance/types/typeParameters/typeParameterLists/typeParametersAvailableInNestedScope.ts (1 errors) ==== + class C { + data: T; + + x = (a: U) => { + var y: T; + return y; + } + + foo() { + function temp(a: U) { + var y: T; + return y; + } + return temp(null); + } + } + + var c = new C(); + c.data = c.x(null); + c.data = c.foo(); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'number' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + \ No newline at end of file diff --git a/tests/baselines/reference/typePartameterConstraintInstantiatedWithDefaultWhenCheckingDefault.types b/tests/baselines/reference/typePartameterConstraintInstantiatedWithDefaultWhenCheckingDefault.types index 1b03288beea..b2e3387be87 100644 --- a/tests/baselines/reference/typePartameterConstraintInstantiatedWithDefaultWhenCheckingDefault.types +++ b/tests/baselines/reference/typePartameterConstraintInstantiatedWithDefaultWhenCheckingDefault.types @@ -19,7 +19,7 @@ class Identity implements Settable, V> { this.item = value; >this.item = value : V >this.item : V ->this : this +>this : Identity >item : V >value : V } diff --git a/tests/baselines/reference/typeRelationships.errors.txt b/tests/baselines/reference/typeRelationships.errors.txt index 6176fc84d2c..359a5bbcf31 100644 --- a/tests/baselines/reference/typeRelationships.errors.txt +++ b/tests/baselines/reference/typeRelationships.errors.txt @@ -1,8 +1,6 @@ -tests/cases/conformance/types/thisType/typeRelationships.ts(9,9): error TS2322: Type 'C' is not assignable to type 'this'. - 'C' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'C'. -tests/cases/conformance/types/thisType/typeRelationships.ts(35,9): error TS2739: Type 'C' is missing the following properties from type 'D': self1, self2, self3, d, bar -tests/cases/conformance/types/thisType/typeRelationships.ts(36,9): error TS2322: Type 'D' is not assignable to type 'this'. - 'D' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'D'. +tests/cases/conformance/types/thisType/typeRelationships.ts(15,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'this[]', but here has type 'C[]'. +tests/cases/conformance/types/thisType/typeRelationships.ts(30,9): error TS2739: Type 'C' is missing the following properties from type 'D': self1, self2, self3, d, bar +tests/cases/conformance/types/thisType/typeRelationships.ts(35,9): error TS2322: Type 'C' is not assignable to type 'D'. ==== tests/cases/conformance/types/thisType/typeRelationships.ts (3 errors) ==== @@ -15,15 +13,15 @@ tests/cases/conformance/types/thisType/typeRelationships.ts(36,9): error TS2322: f1() { this.c = this.self; this.self = this.c; // Error - ~~~~~~~~~ -!!! error TS2322: Type 'C' is not assignable to type 'this'. -!!! error TS2322: 'C' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'C'. } f2() { var a: C[]; var a = [this, this.c]; // C[] since this is subtype of C var b: this[]; var b = [this, this.self, null, undefined]; + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'this[]', but here has type 'C[]'. +!!! related TS6203 tests/cases/conformance/types/thisType/typeRelationships.ts:14:13: 'b' was also declared here. } f3(b: boolean) { return b ? this.c : this.self; // Should be C @@ -39,17 +37,16 @@ tests/cases/conformance/types/thisType/typeRelationships.ts(36,9): error TS2322: this.self = this.self1; this.self = this.self2; this.self = this.self3; + ~~~~~~~~~ +!!! error TS2739: Type 'C' is missing the following properties from type 'D': self1, self2, self3, d, bar this.self1 = this.self; this.self2 = this.self; this.self3 = this.self; this.d = this.self; this.d = this.c; // Error ~~~~~~ -!!! error TS2739: Type 'C' is missing the following properties from type 'D': self1, self2, self3, d, bar +!!! error TS2322: Type 'C' is not assignable to type 'D'. this.self = this.d; // Error - ~~~~~~~~~ -!!! error TS2322: Type 'D' is not assignable to type 'this'. -!!! error TS2322: 'D' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'D'. this.c = this.d; } } diff --git a/tests/baselines/reference/typeRelationships.types b/tests/baselines/reference/typeRelationships.types index 748de8693c9..ff9f8b25599 100644 --- a/tests/baselines/reference/typeRelationships.types +++ b/tests/baselines/reference/typeRelationships.types @@ -12,30 +12,30 @@ class C { >C : typeof C foo() { ->foo : () => this +>foo : () => C return this; ->this : this +>this : C } f1() { >f1 : () => void this.c = this.self; ->this.c = this.self : this +>this.c = this.self : C >this.c : C ->this : this +>this : C >c : C ->this.self : this ->this : this ->self : this +>this.self : C +>this : C +>self : C this.self = this.c; // Error >this.self = this.c : C ->this.self : this ->this : this ->self : this +>this.self : C +>this : C +>self : C >this.c : C ->this : this +>this : C >c : C } f2() { @@ -47,9 +47,9 @@ class C { var a = [this, this.c]; // C[] since this is subtype of C >a : C[] >[this, this.c] : C[] ->this : this +>this : C >this.c : C ->this : this +>this : C >c : C var b: this[]; @@ -57,11 +57,11 @@ class C { var b = [this, this.self, null, undefined]; >b : this[] ->[this, this.self, null, undefined] : this[] ->this : this ->this.self : this ->this : this ->self : this +>[this, this.self, null, undefined] : C[] +>this : C +>this.self : C +>this : C +>self : C >null : null >undefined : undefined } @@ -73,11 +73,11 @@ class C { >b ? this.c : this.self : C >b : boolean >this.c : C ->this : this +>this : C >c : C ->this.self : this ->this : this ->self : this +>this.self : C +>this : C +>self : C } } @@ -96,11 +96,11 @@ class D extends C { >self : this self3 = this.foo(); ->self3 : this ->this.foo() : this ->this.foo : () => this +>self3 : C +>this.foo() : C +>this.foo : () => C >this : this ->foo : () => this +>foo : () => C d = new D(); >d : D @@ -111,93 +111,93 @@ class D extends C { >bar : () => void this.self = this.self1; ->this.self = this.self1 : this ->this.self : this ->this : this ->self : this ->this.self1 : this ->this : this ->self1 : this +>this.self = this.self1 : D +>this.self : D +>this : D +>self : D +>this.self1 : D +>this : D +>self1 : D this.self = this.self2; ->this.self = this.self2 : this ->this.self : this ->this : this ->self : this ->this.self2 : this ->this : this ->self2 : this +>this.self = this.self2 : D +>this.self : D +>this : D +>self : D +>this.self2 : D +>this : D +>self2 : D this.self = this.self3; ->this.self = this.self3 : this ->this.self : this ->this : this ->self : this ->this.self3 : this ->this : this ->self3 : this +>this.self = this.self3 : C +>this.self : D +>this : D +>self : D +>this.self3 : C +>this : D +>self3 : C this.self1 = this.self; ->this.self1 = this.self : this ->this.self1 : this ->this : this ->self1 : this ->this.self : this ->this : this ->self : this +>this.self1 = this.self : D +>this.self1 : D +>this : D +>self1 : D +>this.self : D +>this : D +>self : D this.self2 = this.self; ->this.self2 = this.self : this ->this.self2 : this ->this : this ->self2 : this ->this.self : this ->this : this ->self : this +>this.self2 = this.self : D +>this.self2 : D +>this : D +>self2 : D +>this.self : D +>this : D +>self : D this.self3 = this.self; ->this.self3 = this.self : this ->this.self3 : this ->this : this ->self3 : this ->this.self : this ->this : this ->self : this +>this.self3 = this.self : D +>this.self3 : C +>this : D +>self3 : C +>this.self : D +>this : D +>self : D this.d = this.self; ->this.d = this.self : this +>this.d = this.self : D >this.d : D ->this : this +>this : D >d : D ->this.self : this ->this : this ->self : this +>this.self : D +>this : D +>self : D this.d = this.c; // Error >this.d = this.c : C >this.d : D ->this : this +>this : D >d : D >this.c : C ->this : this +>this : D >c : C this.self = this.d; // Error >this.self = this.d : D ->this.self : this ->this : this ->self : this +>this.self : D +>this : D +>self : D >this.d : D ->this : this +>this : D >d : D this.c = this.d; >this.c = this.d : D >this.c : C ->this : this +>this : D >c : C >this.d : D ->this : this +>this : D >d : D } } diff --git a/tests/baselines/reference/typeVariableTypeGuards.errors.txt b/tests/baselines/reference/typeVariableTypeGuards.errors.txt new file mode 100644 index 00000000000..566ba65c4be --- /dev/null +++ b/tests/baselines/reference/typeVariableTypeGuards.errors.txt @@ -0,0 +1,108 @@ +tests/cases/compiler/typeVariableTypeGuards.ts(33,5): error TS2416: Property 'render' in type 'BigMonkey' is not assignable to the same property in base type 'Monkey'. + Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'Monkey' is not assignable to type 'BigMonkey'. + Types of property 'render' are incompatible. + Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. + The 'this' types of each signature are incompatible. + Type 'BigMonkey' is not assignable to type 'Monkey'. + Types of property 'a' are incompatible. + Type 'BigBanana' is not assignable to type 'T'. + 'BigBanana' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Banana | undefined'. + + +==== tests/cases/compiler/typeVariableTypeGuards.ts (1 errors) ==== + // Repro from #14091 + + interface Foo { + foo(): void + } + + class A

> { + constructor(public props: Readonly

) {} + doSomething() { + this.props.foo && this.props.foo() + } + } + + // Repro from #14415 + + interface Banana { + color: 'yellow'; + } + + class Monkey { + constructor(public a: T) {} + render() { + if (this.a) { + this.a.color; + } + } + } + + interface BigBanana extends Banana { + } + + class BigMonkey extends Monkey { + render() { + ~~~~~~ +!!! error TS2416: Property 'render' in type 'BigMonkey' is not assignable to the same property in base type 'Monkey'. +!!! error TS2416: Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'Monkey' is not assignable to type 'BigMonkey'. +!!! error TS2416: Types of property 'render' are incompatible. +!!! error TS2416: Type '() => void' is not assignable to type '() => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: The 'this' types of each signature are incompatible. +!!! error TS2416: Type 'BigMonkey' is not assignable to type 'Monkey'. +!!! error TS2416: Types of property 'a' are incompatible. +!!! error TS2416: Type 'BigBanana' is not assignable to type 'T'. +!!! error TS2416: 'BigBanana' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Banana | undefined'. + if (this.a) { + this.a.color; + } + } + } + + // Another repro + + type Item = { + (): string; + x: string; + } + + function f1(obj: T) { + if (obj) { + obj.x; + obj["x"]; + obj(); + } + } + + function f2(obj: T | undefined) { + if (obj) { + obj.x; + obj["x"]; + obj(); + } + } + + function f3(obj: T | null) { + if (obj) { + obj.x; + obj["x"]; + obj(); + } + } + + function f4(obj: T | undefined, x: number) { + if (obj) { + obj[x].length; + } + } + + function f5(obj: T | undefined, key: K) { + if (obj) { + obj[key]; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/typeVariableTypeGuards.types b/tests/baselines/reference/typeVariableTypeGuards.types index 063f6bbc96d..3616ec036d4 100644 --- a/tests/baselines/reference/typeVariableTypeGuards.types +++ b/tests/baselines/reference/typeVariableTypeGuards.types @@ -19,13 +19,13 @@ class A

> { >this.props.foo && this.props.foo() : void | undefined >this.props.foo : P["foo"] | undefined >this.props : Readonly

->this : this +>this : A

>props : Readonly

>foo : P["foo"] | undefined >this.props.foo() : void >this.props.foo : () => void >this.props : Readonly

->this : this +>this : A

>props : Readonly

>foo : () => void } @@ -49,13 +49,13 @@ class Monkey { if (this.a) { >this.a : T ->this : this +>this : Monkey >a : T this.a.color; >this.a.color : "yellow" >this.a : Banana ->this : this +>this : Monkey >a : Banana >color : "yellow" } @@ -74,13 +74,13 @@ class BigMonkey extends Monkey { if (this.a) { >this.a : BigBanana ->this : this +>this : BigMonkey >a : BigBanana this.a.color; >this.a.color : "yellow" >this.a : BigBanana ->this : this +>this : BigMonkey >a : BigBanana >color : "yellow" } diff --git a/tests/baselines/reference/typeofThis.types b/tests/baselines/reference/typeofThis.types index 5234d97282c..95ccb40b5eb 100644 --- a/tests/baselines/reference/typeofThis.types +++ b/tests/baselines/reference/typeofThis.types @@ -50,13 +50,13 @@ class Test1 { >'' : "" var self: typeof this = this; ->self : this +>self : Test1 >this : any ->this : this +>this : Test1 self.data; >self.data : { foo: string; } ->self : this +>self : Test1 >data : { foo: string; } var str: typeof this.this = ''; @@ -187,35 +187,35 @@ class Test9 { if (this instanceof Test9D1) { >this instanceof Test9D1 : boolean ->this : this +>this : Test9 >Test9D1 : typeof Test9D1 const d1: typeof this = this; ->d1 : this & Test9D1 +>d1 : Test9 & Test9D1 >this : any ->this : this & Test9D1 +>this : Test9 & Test9D1 d1.f1(); >d1.f1() : void >d1.f1 : () => void ->d1 : this & Test9D1 +>d1 : Test9 & Test9D1 >f1 : () => void } if (this instanceof Test9D2) { >this instanceof Test9D2 : boolean ->this : this +>this : Test9 >Test9D2 : typeof Test9D2 const d2: typeof this = this; ->d2 : this & Test9D2 +>d2 : Test9 & Test9D2 >this : any ->this : this & Test9D2 +>this : Test9 & Test9D2 d2.f2(); >d2.f2() : void >d2.f2 : () => void ->d2 : this & Test9D2 +>d2 : Test9 & Test9D2 >f2 : () => void } } @@ -226,7 +226,7 @@ class Test9 { if (this.no === 1) { >this.no === 1 : boolean >this.no : number ->this : this +>this : Test9 >no : number >1 : 1 @@ -236,14 +236,14 @@ class Test9 { >this : any >no : 1 >this.no : 1 ->this : this +>this : Test9 >no : 1 } if (this.this === 1) { >this.this === 1 : boolean >this.this : number ->this : this +>this : Test9 >this : number >1 : 1 @@ -253,7 +253,7 @@ class Test9 { >this : any >this : 1 >this.this : 1 ->this : this +>this : Test9 >this : 1 } } @@ -293,7 +293,7 @@ class Test10 { if (this.a) { >this.a : { b?: string | undefined; } | undefined ->this : this +>this : Test10 >a : { b?: string | undefined; } | undefined let a: typeof this.a = undefined as any; // should narrow to { b?: string } @@ -317,7 +317,7 @@ class Test10 { if (this.a.b) { >this.a.b : string | undefined >this.a : { b?: string | undefined; } ->this : this +>this : Test10 >a : { b?: string | undefined; } >b : string | undefined @@ -346,24 +346,24 @@ class Test11 { >foo : () => void const o = this; ->o : this ->this : this +>o : Test11 +>this : Test11 let bar: typeof o.this = {}; >bar : { x?: string | undefined; } | undefined >o.this : { x?: string | undefined; } | undefined ->o : this +>o : Test11 >this : { x?: string | undefined; } | undefined >{} : {} if (o.this && o.this.x) { >o.this && o.this.x : string | undefined >o.this : { x?: string | undefined; } | undefined ->o : this +>o : Test11 >this : { x?: string | undefined; } | undefined >o.this.x : string | undefined >o.this : { x?: string | undefined; } ->o : this +>o : Test11 >this : { x?: string | undefined; } >x : string | undefined @@ -371,7 +371,7 @@ class Test11 { >y : string >o.this.x : string >o.this : { x?: string | undefined; } ->o : this +>o : Test11 >this : { x?: string | undefined; } >x : string } @@ -385,7 +385,7 @@ class Tests12 { >test1 : () => void type Test = typeof this; ->Test : this +>Test : Tests12 >this : any } @@ -394,7 +394,7 @@ class Tests12 { for (;;) {} type Test = typeof this; ->Test : this +>Test : Tests12 >this : any } @@ -406,7 +406,7 @@ class Tests12 { >[] : never[] type Test = typeof this; ->Test : this +>Test : Tests12 >this : any } @@ -418,7 +418,7 @@ class Tests12 { >[] : never[] type Test = typeof this; ->Test : this +>Test : Tests12 >this : any } } diff --git a/tests/baselines/reference/underscoreMapFirst.types b/tests/baselines/reference/underscoreMapFirst.types index 91b9d8b8c43..ef7f290a230 100644 --- a/tests/baselines/reference/underscoreMapFirst.types +++ b/tests/baselines/reference/underscoreMapFirst.types @@ -80,7 +80,7 @@ class MyView extends View { >this.model.get("data") : any >this.model.get : any >this.model : any ->this : this +>this : MyView >model : any >get : any >"data" : "data" diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.errors.txt b/tests/baselines/reference/underscoreThisInDerivedClass01.errors.txt new file mode 100644 index 00000000000..b32b74c708d --- /dev/null +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/underscoreThisInDerivedClass01.ts(21,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + + +==== tests/cases/compiler/underscoreThisInDerivedClass01.ts (1 errors) ==== + // @target es5 + + // Original test intent: + // When arrow functions capture 'this', the lexical 'this' owner + // currently captures 'this' using a variable named '_this'. + // That means that '_this' becomes a reserved identifier in certain places. + // + // Constructors have adopted the same identifier name ('_this') + // for capturing any potential return values from super calls, + // so we expect the same behavior. + + class C { + constructor() { + return {}; + } + } + + class D extends C { + constructor() { + var _this = "uh-oh?"; + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt b/tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt new file mode 100644 index 00000000000..a7cd540a3a3 --- /dev/null +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt @@ -0,0 +1,24 @@ +tests/cases/compiler/underscoreThisInDerivedClass02.ts(15,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + + +==== tests/cases/compiler/underscoreThisInDerivedClass02.ts (1 errors) ==== + // @target es5 + + // Original test intent: + // Errors on '_this' should be reported in derived constructors, + // even if 'super()' is not called. + + class C { + constructor() { + return {}; + } + } + + class D extends C { + constructor() { + super(); + ~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C'. + var _this = "uh-oh?"; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/unionOfClassCalls.errors.txt b/tests/baselines/reference/unionOfClassCalls.errors.txt index 386d34414bb..8e271695944 100644 --- a/tests/baselines/reference/unionOfClassCalls.errors.txt +++ b/tests/baselines/reference/unionOfClassCalls.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/unionOfClassCalls.ts(12,9): error TS2684: The 'this' context of type 'Test | Test' is not assignable to method's 'this' of type 'Test'. + Type 'Test' is not assignable to type 'Test'. + Type 'A' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'A'. tests/cases/compiler/unionOfClassCalls.ts(28,5): error TS2349: This expression is not callable. Each member of the union type '{ (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } | { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }' has signatures, but none of those signatures are compatible with each other. -==== tests/cases/compiler/unionOfClassCalls.ts (1 errors) ==== +==== tests/cases/compiler/unionOfClassCalls.ts (2 errors) ==== // from https://github.com/microsoft/TypeScript/issues/30717 declare class Test { obj: T; @@ -15,6 +19,11 @@ tests/cases/compiler/unionOfClassCalls.ts(28,5): error TS2349: This expression i declare const tmp: Test | Test; switch (tmp.get('t')) { + ~~~ +!!! error TS2684: The 'this' context of type 'Test | Test' is not assignable to method's 'this' of type 'Test'. +!!! error TS2684: Type 'Test' is not assignable to type 'Test'. +!!! error TS2684: Type 'A' is not assignable to type 'T'. +!!! error TS2684: 'T' could be instantiated with an arbitrary type which could be unrelated to 'A'. case 'A': break; case 'B': break; } diff --git a/tests/baselines/reference/unknownSymbols1.errors.txt b/tests/baselines/reference/unknownSymbols1.errors.txt index a757ab9613b..3d5888c93e0 100644 --- a/tests/baselines/reference/unknownSymbols1.errors.txt +++ b/tests/baselines/reference/unknownSymbols1.errors.txt @@ -8,12 +8,13 @@ tests/cases/compiler/unknownSymbols1.ts(12,10): error TS2304: Cannot find name ' tests/cases/compiler/unknownSymbols1.ts(13,12): error TS2304: Cannot find name 'asdf'. tests/cases/compiler/unknownSymbols1.ts(16,21): error TS2304: Cannot find name 'asdf'. tests/cases/compiler/unknownSymbols1.ts(17,21): error TS2304: Cannot find name 'adsf'. +tests/cases/compiler/unknownSymbols1.ts(22,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C3'. tests/cases/compiler/unknownSymbols1.ts(22,15): error TS2304: Cannot find name 'asdf'. tests/cases/compiler/unknownSymbols1.ts(30,14): error TS2339: Property 'asdf' does not exist on type 'C5'. tests/cases/compiler/unknownSymbols1.ts(30,21): error TS2304: Cannot find name 'asdf'. -==== tests/cases/compiler/unknownSymbols1.ts (13 errors) ==== +==== tests/cases/compiler/unknownSymbols1.ts (14 errors) ==== var x = asdf; ~~~~ !!! error TS2304: Cannot find name 'asdf'. @@ -56,6 +57,8 @@ tests/cases/compiler/unknownSymbols1.ts(30,21): error TS2304: Cannot find name ' class C4 extends C3 { constructor() { super(asdf); + ~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'C3'. ~~~~ !!! error TS2304: Cannot find name 'asdf'. } diff --git a/tests/baselines/reference/unknownSymbols1.types b/tests/baselines/reference/unknownSymbols1.types index 068ed219dcd..4a27c42d0e5 100644 --- a/tests/baselines/reference/unknownSymbols1.types +++ b/tests/baselines/reference/unknownSymbols1.types @@ -67,7 +67,7 @@ class C5 { this.asdf = asdf; >this.asdf = asdf : any >this.asdf : any ->this : this +>this : C5 >asdf : any >asdf : any } diff --git a/tests/baselines/reference/unspecializedConstraints.types b/tests/baselines/reference/unspecializedConstraints.types index d46bf23287a..ae288023038 100644 --- a/tests/baselines/reference/unspecializedConstraints.types +++ b/tests/baselines/reference/unspecializedConstraints.types @@ -27,7 +27,7 @@ module ts { if (this === that) return true; >this === that : boolean ->this : this +>this : Type >that : Type >true : true @@ -37,7 +37,7 @@ module ts { >this.isObjectType() && that.isObjectType() : boolean >this.isObjectType() : boolean >this.isObjectType : () => boolean ->this : this +>this : Type >isObjectType : () => boolean >that.isObjectType() : boolean >that.isObjectType : () => boolean @@ -57,7 +57,7 @@ module ts { >propCount : number >this.getPropertyCount() : number >this.getPropertyCount : () => number ->this : this +>this : Type >getPropertyCount : () => number >false : false @@ -73,7 +73,7 @@ module ts { >sigCount : number >this.getSignatureCount() : number >this.getSignatureCount : () => number ->this : this +>this : Type >getSignatureCount : () => number >false : false @@ -93,7 +93,7 @@ module ts { >thisProp : Property >this.getProperty(i) : Property >this.getProperty : (index: number) => Property ->this : this +>this : Type >getProperty : (index: number) => Property >i : number @@ -141,7 +141,7 @@ module ts { >setEquals : >(a: T[], b: T[]) => boolean >this.getSignatures() : Signature[] >this.getSignatures : () => Signature[] ->this : this +>this : Type >getSignatures : () => Signature[] >that.getSignatures() : Signature[] >that.getSignatures : () => Signature[] @@ -243,7 +243,7 @@ module ts { >this.name === other.name && this.flags === other.flags : boolean >this.name === other.name : boolean >this.name : string ->this : this +>this : Property >name : string >other.name : string >other : Property @@ -252,7 +252,7 @@ module ts { this.flags === other.flags && >this.flags === other.flags : boolean >this.flags : PropertyFlags ->this : this +>this : Property >flags : PropertyFlags >other.flags : PropertyFlags >other : Property @@ -262,7 +262,7 @@ module ts { >this.type.equals(other.type) : boolean >this.type.equals : (that: Type) => boolean >this.type : Type ->this : this +>this : Property >type : Type >equals : (that: Type) => boolean >other.type : Type @@ -307,7 +307,7 @@ module ts { >this.parameters.length === other.parameters.length : boolean >this.parameters.length : number >this.parameters : Parameter[] ->this : this +>this : Signature >parameters : Parameter[] >length : number >other.parameters.length : number @@ -320,7 +320,7 @@ module ts { >this.typeParameters.length === other.typeParameters.length : boolean >this.typeParameters.length : number >this.typeParameters : TypeParameter[] ->this : this +>this : Signature >typeParameters : TypeParameter[] >length : number >other.typeParameters.length : number @@ -333,7 +333,7 @@ module ts { >arrayEquals(this.parameters, other.parameters) : boolean >arrayEquals : >(a: T[], b: T[]) => boolean >this.parameters : Parameter[] ->this : this +>this : Signature >parameters : Parameter[] >other.parameters : Parameter[] >other : Signature @@ -343,7 +343,7 @@ module ts { >arrayEquals(this.typeParameters, other.typeParameters) : boolean >arrayEquals : >(a: T[], b: T[]) => boolean >this.typeParameters : TypeParameter[] ->this : this +>this : Signature >typeParameters : TypeParameter[] >other.typeParameters : TypeParameter[] >other : Signature @@ -357,7 +357,7 @@ module ts { >this.equalsNoReturn(other) && this.returnType.equals(other.returnType) : boolean >this.equalsNoReturn(other) : boolean >this.equalsNoReturn : (other: Signature) => boolean ->this : this +>this : Signature >equalsNoReturn : (other: Signature) => boolean >other : Signature @@ -365,7 +365,7 @@ module ts { >this.returnType.equals(other.returnType) : boolean >this.returnType.equals : (that: Type) => boolean >this.returnType : Type ->this : this +>this : Signature >returnType : Type >equals : (that: Type) => boolean >other.returnType : Type @@ -396,7 +396,7 @@ module ts { >this.name === other.name && this.flags === other.flags : boolean >this.name === other.name : boolean >this.name : string ->this : this +>this : Parameter >name : string >other.name : string >other : Parameter @@ -405,7 +405,7 @@ module ts { this.flags === other.flags && >this.flags === other.flags : boolean >this.flags : ParameterFlags ->this : this +>this : Parameter >flags : ParameterFlags >other.flags : ParameterFlags >other : Parameter @@ -415,7 +415,7 @@ module ts { >this.type.equals(other.type) : boolean >this.type.equals : (that: Type) => boolean >this.type : Type ->this : this +>this : Parameter >type : Type >equals : (that: Type) => boolean >other.type : Type diff --git a/tests/baselines/reference/unusedGetterInClass.types b/tests/baselines/reference/unusedGetterInClass.types index 822d47e6952..c2455a97a07 100644 --- a/tests/baselines/reference/unusedGetterInClass.types +++ b/tests/baselines/reference/unusedGetterInClass.types @@ -10,7 +10,7 @@ class Employee { return this._fullName; >this._fullName : string ->this : this +>this : Employee >_fullName : string } // Will not also error on the setter diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.types b/tests/baselines/reference/unusedIdentifiersConsolidated1.types index 8fddce9efef..699e620fd7c 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.types +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.types @@ -33,7 +33,7 @@ class Dummy { this.greeting = "Dummy Message"; >this.greeting = "Dummy Message" : "Dummy Message" >this.greeting : string ->this : this +>this : Dummy >greeting : string >"Dummy Message" : "Dummy Message" } @@ -49,7 +49,7 @@ class Dummy { this.usedPrivateFunction(); >this.usedPrivateFunction() : void >this.usedPrivateFunction : () => void ->this : this +>this : Dummy >usedPrivateFunction : () => void } diff --git a/tests/baselines/reference/unusedLocalProperty.types b/tests/baselines/reference/unusedLocalProperty.types index 3cb8747957d..36dd1d969ce 100644 --- a/tests/baselines/reference/unusedLocalProperty.types +++ b/tests/baselines/reference/unusedLocalProperty.types @@ -16,7 +16,7 @@ class Animal { let { species } = this; >species : string ->this : this +>this : Animal console.log(species); >console.log(species) : void diff --git a/tests/baselines/reference/unusedPrivateMethodInClass4.types b/tests/baselines/reference/unusedPrivateMethodInClass4.types index 0fd21477d5b..5ac3fe302a8 100644 --- a/tests/baselines/reference/unusedPrivateMethodInClass4.types +++ b/tests/baselines/reference/unusedPrivateMethodInClass4.types @@ -40,7 +40,7 @@ class greeter { this.function2(); >this.function2() : void >this.function2 : () => void ->this : this +>this : greeter >function2 : () => void } } diff --git a/tests/baselines/reference/unusedPrivateVariableInClass4.types b/tests/baselines/reference/unusedPrivateVariableInClass4.types index 28990d7bc89..012680c3bd4 100644 --- a/tests/baselines/reference/unusedPrivateVariableInClass4.types +++ b/tests/baselines/reference/unusedPrivateVariableInClass4.types @@ -16,7 +16,7 @@ class greeter { this.x; >this.x : string ->this : this +>this : greeter >x : string } } diff --git a/tests/baselines/reference/unusedPrivateVariableInClass5.types b/tests/baselines/reference/unusedPrivateVariableInClass5.types index 9c35a68e86f..14c327c4c93 100644 --- a/tests/baselines/reference/unusedPrivateVariableInClass5.types +++ b/tests/baselines/reference/unusedPrivateVariableInClass5.types @@ -14,7 +14,7 @@ class greeter { constructor() { this.x; >this.x : string ->this : this +>this : greeter >x : string } } diff --git a/tests/baselines/reference/unusedSetterInClass.types b/tests/baselines/reference/unusedSetterInClass.types index 1a4c5c8a76c..61e6c228aa5 100644 --- a/tests/baselines/reference/unusedSetterInClass.types +++ b/tests/baselines/reference/unusedSetterInClass.types @@ -12,7 +12,7 @@ class Employee { this._fullName = newName; >this._fullName = newName : string >this._fullName : string ->this : this +>this : Employee >_fullName : string >newName : string } diff --git a/tests/baselines/reference/unusedSetterInClass2.types b/tests/baselines/reference/unusedSetterInClass2.types index 0237db7ce8c..a6c0512ec15 100644 --- a/tests/baselines/reference/unusedSetterInClass2.types +++ b/tests/baselines/reference/unusedSetterInClass2.types @@ -13,7 +13,7 @@ class Employee { this.p = 0; >this.p = 0 : 0 >this.p : number ->this : this +>this : Employee >p : number >0 : 0 } diff --git a/tests/baselines/reference/unusedTypeParameters2.types b/tests/baselines/reference/unusedTypeParameters2.types index 4aa49c0e017..8964e9534ad 100644 --- a/tests/baselines/reference/unusedTypeParameters2.types +++ b/tests/baselines/reference/unusedTypeParameters2.types @@ -10,7 +10,7 @@ class greeter { this.x; >this.x : typeparameter2 ->this : this +>this : greeter >x : typeparameter2 } } diff --git a/tests/baselines/reference/unusedTypeParameters3.types b/tests/baselines/reference/unusedTypeParameters3.types index e06be55a082..6dc9cc6bd1a 100644 --- a/tests/baselines/reference/unusedTypeParameters3.types +++ b/tests/baselines/reference/unusedTypeParameters3.types @@ -10,7 +10,7 @@ class greeter { this.x; >this.x : typeparameter2 ->this : this +>this : greeter >x : typeparameter2 } } diff --git a/tests/baselines/reference/unusedTypeParameters_templateTag2.types b/tests/baselines/reference/unusedTypeParameters_templateTag2.types index 45e33a5e379..b1a61214956 100644 --- a/tests/baselines/reference/unusedTypeParameters_templateTag2.types +++ b/tests/baselines/reference/unusedTypeParameters_templateTag2.types @@ -10,7 +10,7 @@ class C1 { /** @type {T} */ this.p; >this.p : T ->this : this +>this : C1 >p : T } } @@ -34,7 +34,7 @@ class C3 { /** @type {T} */ this.p; >this.p : T ->this : this +>this : C3 >p : T } } diff --git a/tests/baselines/reference/validUseOfThisInSuper.errors.txt b/tests/baselines/reference/validUseOfThisInSuper.errors.txt new file mode 100644 index 00000000000..e0fc7d706d6 --- /dev/null +++ b/tests/baselines/reference/validUseOfThisInSuper.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/validUseOfThisInSuper.ts(7,9): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + + +==== tests/cases/compiler/validUseOfThisInSuper.ts (1 errors) ==== + class Base { + constructor(public b: Base) { + } + } + class Super extends Base { + constructor() { + super((() => this)()); // ok since this is not the case: The constructor declares parameter properties or the containing class declares instance member variables with initializers. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/validUseOfThisInSuper.types b/tests/baselines/reference/validUseOfThisInSuper.types index 6b1bf5f64a9..be9f311ce36 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.types +++ b/tests/baselines/reference/validUseOfThisInSuper.types @@ -14,9 +14,9 @@ class Super extends Base { super((() => this)()); // ok since this is not the case: The constructor declares parameter properties or the containing class declares instance member variables with initializers. >super((() => this)()) : void >super : typeof Base ->(() => this)() : this ->(() => this) : () => this ->() => this : () => this ->this : this +>(() => this)() : Super +>(() => this) : () => Super +>() => this : () => Super +>this : Super } } diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.errors.txt b/tests/baselines/reference/varArgsOnConstructorTypes.errors.txt new file mode 100644 index 00000000000..584f6c689a7 --- /dev/null +++ b/tests/baselines/reference/varArgsOnConstructorTypes.errors.txt @@ -0,0 +1,30 @@ +tests/cases/compiler/varArgsOnConstructorTypes.ts(10,8): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + + +==== tests/cases/compiler/varArgsOnConstructorTypes.ts (1 errors) ==== + export class A { + constructor(ctor) { } + } + + export class B extends A { + private p1: number; + private p2: string; + + constructor(element: any, url: string) { + super(element); + ~~~~~~~~~~~~~~ +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'A'. + this.p1 = element; + this.p2 = url; + } + } + + export interface I1 { + register(inputClass: new(...params: any[]) => A); + register(inputClass: { new (...params: any[]): A; }[]); + } + + + var reg: I1; + reg.register(B); + \ No newline at end of file diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.types b/tests/baselines/reference/varArgsOnConstructorTypes.types index dd2183da252..98ada5cf8ac 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.types +++ b/tests/baselines/reference/varArgsOnConstructorTypes.types @@ -28,14 +28,14 @@ export class B extends A { this.p1 = element; >this.p1 = element : any >this.p1 : number ->this : this +>this : B >p1 : number >element : any this.p2 = url; >this.p2 = url : string >this.p2 : string ->this : this +>this : B >p2 : string >url : string } diff --git a/tests/baselines/reference/varRequireFromJavascript.types b/tests/baselines/reference/varRequireFromJavascript.types index f304eb6a1a1..1b38b3687a3 100644 --- a/tests/baselines/reference/varRequireFromJavascript.types +++ b/tests/baselines/reference/varRequireFromJavascript.types @@ -45,7 +45,7 @@ export class Crunch { this.n = n >this.n = n : number >this.n : any ->this : this +>this : Crunch >n : any >n : number } @@ -54,7 +54,7 @@ export class Crunch { return this.n >this.n : number ->this : this +>this : Crunch >n : number } } diff --git a/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types b/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types index e2b00665918..0c47e51aee5 100644 --- a/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types +++ b/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types @@ -272,7 +272,7 @@ class FileService { >this.requestService.makeRequest({ url: this.requestService.getRequestUrl('root', path), type: 'POST', headers: {}, data: "someData" }) : WinJS.Promise >this.requestService.makeRequest : (options: WinJS.IXHROptions) => WinJS.Promise >this.requestService : Services.IRequestService ->this : this +>this : FileService >requestService : Services.IRequestService >makeRequest : (options: WinJS.IXHROptions) => WinJS.Promise >{ url: this.requestService.getRequestUrl('root', path), type: 'POST', headers: {}, data: "someData" } : { url: string; type: string; headers: {}; data: string; } @@ -282,7 +282,7 @@ class FileService { >this.requestService.getRequestUrl('root', path) : string >this.requestService.getRequestUrl : { (service: string, path?: string): string; (service: string, path?: string, absolute?: boolean): string; } >this.requestService : Services.IRequestService ->this : this +>this : FileService >requestService : Services.IRequestService >getRequestUrl : { (service: string, path?: string): string; (service: string, path?: string, absolute?: boolean): string; } >'root' : "root" @@ -313,7 +313,7 @@ class FileService { >stat : any >this.jsonToStat(newFilePath, "someString") : any >this.jsonToStat : any ->this : this +>this : FileService >jsonToStat : any >newFilePath : any >"someString" : "someString" diff --git a/tests/baselines/reference/variance.types b/tests/baselines/reference/variance.types index 2f7267aca5d..3f62545b1e7 100644 --- a/tests/baselines/reference/variance.types +++ b/tests/baselines/reference/variance.types @@ -53,7 +53,7 @@ class Bar { >Bar : typeof Bar >instance : Bar[] >push : (...items: Bar[]) => number ->this : this +>this : Bar } } diff --git a/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign.types b/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign.types index c46df5c0f5a..e8c481b079a 100644 --- a/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign.types +++ b/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign.types @@ -26,7 +26,7 @@ class Left { return this as any >this as any : any ->this : this +>this : Left } ap(fab: Either B>): Either { >ap : (fab: Either B>) => Either @@ -66,7 +66,7 @@ class Right { >f(this.value) : B >f : (a: A) => B >this.value : A ->this : this +>this : Right >value : A } ap(fab: Either B>): Either { diff --git a/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign2.types b/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign2.types index 8218ca02dd5..30a82a1ef20 100644 --- a/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign2.types +++ b/tests/baselines/reference/varianceProblingAndZeroOrderIndexSignatureRelationsAlign2.types @@ -26,7 +26,7 @@ class Left { return this as any >this as any : any ->this : this +>this : Left } ap(fab: Either B>): Either { >ap : (fab: Either B>) => Either @@ -66,7 +66,7 @@ class Right { >f(this.value) : B >f : (a: A) => B >this.value : A ->this : this +>this : Right >value : A } ap(fab: Either B>): Either { diff --git a/tests/baselines/reference/witness.types b/tests/baselines/reference/witness.types index 69f318e8758..0f3366f8fa9 100644 --- a/tests/baselines/reference/witness.types +++ b/tests/baselines/reference/witness.types @@ -30,7 +30,7 @@ class InitClass { var y = this.x; >y : any >this.x : any ->this : this +>this : InitClass >x : any var y: any; @@ -285,7 +285,7 @@ class C { >(this.fn1()) : any >this.fn1() : any >this.fn1 : () => any ->this : this +>this : C >fn1 : () => any } fn2() { @@ -296,7 +296,7 @@ class C { >(this.fn2()) : any >this.fn2() : any >this.fn2 : () => any ->this : this +>this : C >fn2 : () => any } fn3() { @@ -310,7 +310,7 @@ class C { >new a(this.fn3) : number >a : new (x: any) => number >this.fn3 : () => number ->this : this +>this : C >fn3 : () => number } } diff --git a/tests/baselines/reference/wrappedAndRecursiveConstraints.errors.txt b/tests/baselines/reference/wrappedAndRecursiveConstraints.errors.txt new file mode 100644 index 00000000000..e59c036ca7b --- /dev/null +++ b/tests/baselines/reference/wrappedAndRecursiveConstraints.errors.txt @@ -0,0 +1,26 @@ +tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints.ts(16,9): error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. + Type 'Foo' is not assignable to type 'T'. + 'Foo' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. + + +==== tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints.ts (1 errors) ==== + // no errors expected + + class C { + constructor(public data: T) { } + foo(x: U) { + return x; + } + } + + interface Foo extends Date { + foo: string; + } + + var y: Foo = null; + var c = new C(y); + var r = c.foo(y); + ~ +!!! error TS2684: The 'this' context of type 'C' is not assignable to method's 'this' of type 'C'. +!!! error TS2684: Type 'Foo' is not assignable to type 'T'. +!!! error TS2684: 'Foo' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. \ No newline at end of file