From b9570d0158f13d89ec72022af5b5bbd656beaa6b Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Fri, 9 May 2025 09:02:15 -0700 Subject: [PATCH 1/8] Add this.p expandos, first draft Doesn't do control flow inference or respect type tags yet. Plus there are couple of known bugs. --- internal/ast/utilities.go | 59 ++-- internal/binder/binder.go | 38 ++- internal/checker/checker.go | 67 +++-- internal/parser/reparser.go | 39 +-- .../abstractPropertyInConstructor.symbols | 50 ++-- ...abstractPropertyInConstructor.symbols.diff | 50 ++-- ...allowJscheckJsTypeParameterNoCrash.symbols | 2 +- ...JscheckJsTypeParameterNoCrash.symbols.diff | 6 +- .../allowJscheckJsTypeParameterNoCrash.types | 8 +- .../ambientPropertyDeclarationInJs.symbols | 10 +- ...mbientPropertyDeclarationInJs.symbols.diff | 10 +- ...mentsReferenceInConstructor1_Js.errors.txt | 20 -- ...rgumentsReferenceInConstructor1_Js.symbols | 2 + ...ntsReferenceInConstructor1_Js.symbols.diff | 2 + .../argumentsReferenceInConstructor1_Js.types | 4 +- ...rgumentsReferenceInConstructor2_Js.symbols | 1 + ...ntsReferenceInConstructor2_Js.symbols.diff | 1 + .../argumentsReferenceInConstructor2_Js.types | 2 +- ...mentsReferenceInConstructor3_Js.errors.txt | 8 +- ...rgumentsReferenceInConstructor3_Js.symbols | 4 + ...ntsReferenceInConstructor3_Js.symbols.diff | 4 + .../argumentsReferenceInConstructor3_Js.types | 4 +- ...mentsReferenceInConstructor4_Js.errors.txt | 14 +- ...rgumentsReferenceInConstructor4_Js.symbols | 8 + ...ntsReferenceInConstructor4_Js.symbols.diff | 12 +- .../argumentsReferenceInConstructor4_Js.types | 8 +- ...mentsReferenceInConstructor5_Js.errors.txt | 32 --- ...rgumentsReferenceInConstructor5_Js.symbols | 4 + ...ntsReferenceInConstructor5_Js.symbols.diff | 4 + .../argumentsReferenceInConstructor5_Js.types | 8 +- ...mentsReferenceInConstructor6_Js.errors.txt | 15 - ...rgumentsReferenceInConstructor6_Js.symbols | 2 + ...ntsReferenceInConstructor6_Js.symbols.diff | 2 + .../argumentsReferenceInConstructor6_Js.types | 4 +- ...mentsReferenceInConstructor7_Js.errors.txt | 15 - ...rgumentsReferenceInConstructor7_Js.symbols | 2 + ...ntsReferenceInConstructor7_Js.symbols.diff | 2 + .../argumentsReferenceInConstructor7_Js.types | 4 +- .../argumentsReferenceInMethod1_Js.errors.txt | 18 -- .../argumentsReferenceInMethod1_Js.symbols | 2 + ...rgumentsReferenceInMethod1_Js.symbols.diff | 2 + .../argumentsReferenceInMethod1_Js.types | 4 +- .../argumentsReferenceInMethod2_Js.symbols | 1 + ...rgumentsReferenceInMethod2_Js.symbols.diff | 1 + .../argumentsReferenceInMethod2_Js.types | 2 +- .../argumentsReferenceInMethod3_Js.errors.txt | 8 +- .../argumentsReferenceInMethod3_Js.symbols | 4 + ...rgumentsReferenceInMethod3_Js.symbols.diff | 4 + .../argumentsReferenceInMethod3_Js.types | 8 +- .../argumentsReferenceInMethod4_Js.errors.txt | 14 +- .../argumentsReferenceInMethod4_Js.symbols | 8 + ...rgumentsReferenceInMethod4_Js.symbols.diff | 12 +- .../argumentsReferenceInMethod4_Js.types | 8 +- .../argumentsReferenceInMethod5_Js.errors.txt | 30 -- .../argumentsReferenceInMethod5_Js.symbols | 4 + ...rgumentsReferenceInMethod5_Js.symbols.diff | 4 + .../argumentsReferenceInMethod5_Js.types | 8 +- .../argumentsReferenceInMethod6_Js.errors.txt | 15 - .../argumentsReferenceInMethod6_Js.symbols | 2 + ...rgumentsReferenceInMethod6_Js.symbols.diff | 2 + .../argumentsReferenceInMethod6_Js.types | 4 +- .../argumentsReferenceInMethod7_Js.errors.txt | 15 - .../argumentsReferenceInMethod7_Js.symbols | 2 + ...rgumentsReferenceInMethod7_Js.symbols.diff | 2 + .../argumentsReferenceInMethod7_Js.types | 4 +- .../submodule/compiler/autoLift2.errors.txt | 20 +- .../compiler/autoLift2.errors.txt.diff | 55 ++++ .../submodule/compiler/autoLift2.symbols | 12 + .../submodule/compiler/autoLift2.symbols.diff | 29 +- .../submodule/compiler/autoLift2.types | 28 +- .../submodule/compiler/autoLift2.types.diff | 73 +++++ ...straintOfJavascriptClassExpression.symbols | 2 + ...ntOfJavascriptClassExpression.symbols.diff | 2 + ...onstraintOfJavascriptClassExpression.types | 4 +- .../compiler/checkJsFiles7.errors.txt | 14 +- .../submodule/compiler/checkJsFiles7.symbols | 6 + .../compiler/checkJsFiles7.symbols.diff | 6 + .../checkJsFiles_noErrorLocation.symbols | 8 +- .../checkJsFiles_noErrorLocation.symbols.diff | 8 +- ...ckSuperCallBeforeThisAccessing9.errors.txt | 5 +- ...checkSuperCallBeforeThisAccessing9.symbols | 2 + ...SuperCallBeforeThisAccessing9.symbols.diff | 2 + .../checkSuperCallBeforeThisAccessing9.types | 4 +- .../compiler/classExtendingAny.symbols | 4 + .../compiler/classExtendingAny.symbols.diff | 4 + .../compiler/classExtendingAny.types | 8 +- .../classFieldSuperNotAccessibleJs.errors.txt | 14 +- .../classFieldSuperNotAccessibleJs.symbols | 8 + ...lassFieldSuperNotAccessibleJs.symbols.diff | 10 +- .../classFieldSuperNotAccessibleJs.types | 20 +- ...ationInferenceWithElementAccess.errors.txt | 31 ++ ...InferenceWithElementAccess.errors.txt.diff | 36 +++ ...ializationInferenceWithElementAccess.types | 16 +- ...ationInferenceWithElementAccess.types.diff | 58 ++++ .../compiler/constructorPropertyJs.symbols | 4 +- .../constructorPropertyJs.symbols.diff | 4 +- .../compiler/constructorPropertyJs.types | 4 +- .../divergentAccessorsVisibility1.errors.txt | 88 +----- ...ergentAccessorsVisibility1.errors.txt.diff | 175 ++++++++++++ .../divergentAccessorsVisibility1.symbols | 216 +++++++------- ...divergentAccessorsVisibility1.symbols.diff | 216 +++++++------- .../compiler/es6DeclOrdering.errors.txt | 25 -- .../compiler/es6DeclOrdering.errors.txt.diff | 30 ++ .../compiler/es6DeclOrdering.symbols | 6 + .../compiler/es6DeclOrdering.symbols.diff | 17 ++ .../submodule/compiler/es6DeclOrdering.types | 14 +- .../compiler/es6DeclOrdering.types.diff | 34 +++ ...nstructorPropertyContextualType.errors.txt | 22 ++ ...ctorPropertyContextualType.errors.txt.diff | 27 ++ ...dConstructorPropertyContextualType.symbols | 4 +- ...tructorPropertyContextualType.symbols.diff | 4 +- ...tedConstructorPropertyContextualType.types | 10 +- ...nstructorPropertyContextualType.types.diff | 20 ++ ...riptThisAssignmentInStaticBlock.errors.txt | 27 -- ...ascriptThisAssignmentInStaticBlock.symbols | 12 +- ...ptThisAssignmentInStaticBlock.symbols.diff | 14 +- ...avascriptThisAssignmentInStaticBlock.types | 10 +- ...larationEmitDoesNotRenameImport.errors.txt | 35 --- ...DeclarationEmitDoesNotRenameImport.symbols | 2 + ...rationEmitDoesNotRenameImport.symbols.diff | 2 + .../jsFileClassPropertyType.errors.txt | 11 +- .../compiler/jsFileClassPropertyType.symbols | 4 + .../jsFileClassPropertyType.symbols.diff | 4 + .../compiler/jsFileClassPropertyType.types | 8 +- .../jsFileClassPropertyType2.errors.txt | 19 -- .../compiler/jsFileClassPropertyType2.symbols | 6 + .../jsFileClassPropertyType2.symbols.diff | 6 + .../compiler/jsFileClassPropertyType2.types | 14 +- .../jsFileClassPropertyType3.errors.txt | 14 +- .../compiler/jsFileClassPropertyType3.symbols | 6 + .../jsFileClassPropertyType3.symbols.diff | 6 + .../compiler/jsFileClassPropertyType3.types | 12 +- ...FileClassSelfReferencedProperty.errors.txt | 15 - .../jsFileClassSelfReferencedProperty.symbols | 4 + ...leClassSelfReferencedProperty.symbols.diff | 4 + .../compiler/jsFileMethodOverloads.errors.txt | 62 ---- .../compiler/jsFileMethodOverloads.symbols | 8 + .../jsFileMethodOverloads.symbols.diff | 12 +- .../compiler/jsFileMethodOverloads.types | 18 +- .../jsFileMethodOverloads2.errors.txt | 59 ---- .../compiler/jsFileMethodOverloads2.symbols | 8 + .../jsFileMethodOverloads2.symbols.diff | 12 +- .../compiler/jsFileMethodOverloads2.types | 18 +- .../compiler/propertyOrdering.errors.txt | 8 +- .../compiler/propertyOrdering.errors.txt.diff | 29 ++ .../compiler/propertyOrdering.symbols | 6 + .../compiler/propertyOrdering.symbols.diff | 16 ++ .../submodule/compiler/propertyOrdering.types | 14 +- .../compiler/propertyOrdering.types.diff | 34 +++ .../submodule/compiler/protoInIndexer.symbols | 1 + .../compiler/protoInIndexer.symbols.diff | 9 + ...mentInSubclassOfClassExpression.errors.txt | 13 - ...nSubclassOfClassExpression.errors.txt.diff | 18 ++ ...ignmentInSubclassOfClassExpression.symbols | 4 +- ...ntInSubclassOfClassExpression.symbols.diff | 9 +- ...ssignmentInSubclassOfClassExpression.types | 4 +- ...mentInSubclassOfClassExpression.types.diff | 14 + ...ckExtendedClassInsidePublicMethod2.symbols | 4 +- ...endedClassInsidePublicMethod2.symbols.diff | 4 +- ...heckExtendedClassInsidePublicMethod2.types | 4 +- ...xtendedClassInsidePublicMethod2.types.diff | 14 + ...xtendedClassInsideStaticMethod1.errors.txt | 5 +- ...edClassInsideStaticMethod1.errors.txt.diff | 22 ++ ...ckExtendedClassInsideStaticMethod1.symbols | 2 + ...endedClassInsideStaticMethod1.symbols.diff | 6 + ...heckExtendedClassInsideStaticMethod1.types | 4 +- ...xtendedClassInsideStaticMethod1.types.diff | 14 + .../scopeCheckInsideStaticMethod1.errors.txt | 5 +- ...peCheckInsideStaticMethod1.errors.txt.diff | 20 ++ .../scopeCheckInsideStaticMethod1.symbols | 2 + ...scopeCheckInsideStaticMethod1.symbols.diff | 4 + .../scopeCheckInsideStaticMethod1.types | 4 +- .../scopeCheckInsideStaticMethod1.types.diff | 14 + .../compiler/staticVisibility.errors.txt | 5 +- .../compiler/staticVisibility.errors.txt.diff | 24 ++ .../compiler/staticVisibility.symbols | 2 + .../compiler/staticVisibility.symbols.diff | 4 +- .../submodule/compiler/staticVisibility.types | 4 +- .../compiler/staticVisibility.types.diff | 14 + .../compiler/staticVisibility2.errors.txt | 5 +- .../staticVisibility2.errors.txt.diff | 19 ++ .../compiler/staticVisibility2.symbols | 2 + .../compiler/staticVisibility2.symbols.diff | 8 + .../compiler/staticVisibility2.types | 4 +- .../compiler/staticVisibility2.types.diff | 14 + .../submodule/compiler/statics.errors.txt | 40 --- .../compiler/statics.errors.txt.diff | 45 +++ .../submodule/compiler/statics.symbols | 4 + .../submodule/compiler/statics.symbols.diff | 8 +- .../submodule/compiler/statics.types | 12 +- .../submodule/compiler/statics.types.diff | 34 +++ .../compiler/superNoModifiersCrash.errors.txt | 5 +- .../compiler/superNoModifiersCrash.symbols | 2 + .../superNoModifiersCrash.symbols.diff | 4 +- .../compiler/superNoModifiersCrash.types | 4 +- .../compiler/thisInFunctionCallJs.errors.txt | 17 +- .../compiler/thisInFunctionCallJs.symbols | 18 ++ .../thisInFunctionCallJs.symbols.diff | 22 +- .../compiler/thisInFunctionCallJs.types | 68 ++--- .../compiler/unknownSymbols1.errors.txt | 9 +- .../compiler/unknownSymbols1.errors.txt.diff | 27 ++ .../compiler/unknownSymbols1.symbols | 2 + .../compiler/unknownSymbols1.symbols.diff | 9 + ...AndModuleWithSameNameAndCommonRoot.symbols | 12 +- ...duleWithSameNameAndCommonRoot.symbols.diff | 12 +- ...ModuleWithSameNameAndCommonRootES6.symbols | 12 +- ...eWithSameNameAndCommonRootES6.symbols.diff | 12 +- ...eAndClassWithSameNameAndCommonRoot.symbols | 12 +- ...lassWithSameNameAndCommonRoot.symbols.diff | 12 +- ...PropertyInitializerDoesntNarrow.errors.txt | 23 -- ...hisPropertyInitializerDoesntNarrow.symbols | 4 + ...opertyInitializerDoesntNarrow.symbols.diff | 4 + ...dThisPropertyInitializerDoesntNarrow.types | 8 +- ...assCanExtendConstructorFunction.errors.txt | 8 +- .../classCanExtendConstructorFunction.symbols | 4 + ...sCanExtendConstructorFunction.symbols.diff | 8 +- .../classCanExtendConstructorFunction.types | 10 +- .../classExtendingClassLikeType.symbols | 24 +- .../classExtendingClassLikeType.symbols.diff | 24 +- ...cBlockUseBeforeDef2(target=es2022).symbols | 6 +- ...kUseBeforeDef2(target=es2022).symbols.diff | 6 +- ...cBlockUseBeforeDef2(target=esnext).symbols | 6 +- ...kUseBeforeDef2(target=esnext).symbols.diff | 6 +- ...ontextualTypedSpecialAssignment.errors.txt | 8 +- .../contextualTypedSpecialAssignment.symbols | 4 + ...textualTypedSpecialAssignment.symbols.diff | 8 +- .../contextualTypedSpecialAssignment.types | 8 +- ...structuringParameterProperties2.errors.txt | 8 +- ...turingParameterProperties2.errors.txt.diff | 34 +++ .../destructuringParameterProperties2.symbols | 4 + ...ructuringParameterProperties2.symbols.diff | 15 +- .../destructuringParameterProperties2.types | 40 +-- ...structuringParameterProperties2.types.diff | 90 ++++++ ...structuringParameterProperties3.errors.txt | 8 +- ...turingParameterProperties3.errors.txt.diff | 33 +++ .../destructuringParameterProperties3.symbols | 4 + ...ructuringParameterProperties3.symbols.diff | 15 +- .../destructuringParameterProperties3.types | 50 ++-- ...structuringParameterProperties3.types.diff | 110 +++++++ ...structuringParameterProperties4.errors.txt | 11 +- ...turingParameterProperties4.errors.txt.diff | 45 +++ .../destructuringParameterProperties4.symbols | 6 + ...ructuringParameterProperties4.symbols.diff | 20 +- .../destructuringParameterProperties4.types | 14 +- ...structuringParameterProperties4.types.diff | 42 +++ .../exportNestedNamespaces.errors.txt | 5 +- .../exportNestedNamespaces.symbols | 2 + .../exportNestedNamespaces.symbols.diff | 4 +- .../conformance/exportNestedNamespaces.types | 4 +- ...ringClassMembersFromAssignments.errors.txt | 188 ++++-------- ...ferringClassMembersFromAssignments.symbols | 86 ++++++ ...ngClassMembersFromAssignments.symbols.diff | 90 +++++- ...inferringClassMembersFromAssignments.types | 172 +++++------ ...ingClassMembersFromAssignments3.errors.txt | 20 -- ...erringClassMembersFromAssignments3.symbols | 4 + ...gClassMembersFromAssignments3.symbols.diff | 6 +- ...nferringClassMembersFromAssignments3.types | 8 +- ...ingClassMembersFromAssignments4.errors.txt | 21 -- ...erringClassMembersFromAssignments4.symbols | 4 + ...gClassMembersFromAssignments4.symbols.diff | 6 +- ...nferringClassMembersFromAssignments4.types | 8 +- ...ingClassMembersFromAssignments5.errors.txt | 28 -- ...erringClassMembersFromAssignments5.symbols | 6 + ...gClassMembersFromAssignments5.symbols.diff | 8 +- ...nferringClassMembersFromAssignments5.types | 14 +- .../jsDeclarationsClasses.errors.txt | 20 +- .../conformance/jsDeclarationsClasses.symbols | 12 + .../jsDeclarationsClasses.symbols.diff | 20 +- .../conformance/jsDeclarationsClasses.types | 26 +- ...nsExportAssignedClassExpression.errors.txt | 14 - ...tionsExportAssignedClassExpression.symbols | 2 + ...ExportAssignedClassExpression.symbols.diff | 2 + ...rationsExportAssignedClassExpression.types | 4 +- ...ssignedClassExpressionAnonymous.errors.txt | 14 - ...rtAssignedClassExpressionAnonymous.symbols | 2 + ...ignedClassExpressionAnonymous.symbols.diff | 2 + ...portAssignedClassExpressionAnonymous.types | 4 +- ...ClassExpressionAnonymousWithSub.errors.txt | 8 +- ...nedClassExpressionAnonymousWithSub.symbols | 4 + ...assExpressionAnonymousWithSub.symbols.diff | 4 + ...ignedClassExpressionAnonymousWithSub.types | 8 +- ...ssignedClassExpressionShadowing.errors.txt | 5 +- ...rtAssignedClassExpressionShadowing.symbols | 2 + ...ignedClassExpressionShadowing.symbols.diff | 2 + ...portAssignedClassExpressionShadowing.types | 4 +- ...rationsExportAssignedVisibility.errors.txt | 24 -- ...clarationsExportAssignedVisibility.symbols | 4 + ...tionsExportAssignedVisibility.symbols.diff | 4 + ...DeclarationsExportAssignedVisibility.types | 8 +- .../jsDeclarationsFunctionJSDoc.errors.txt | 41 --- .../jsDeclarationsFunctionJSDoc.symbols | 2 + .../jsDeclarationsFunctionJSDoc.symbols.diff | 4 +- .../jsDeclarationsFunctionJSDoc.types | 4 +- ...ferenceToClassInstanceCrossFile.errors.txt | 13 +- ...sReferenceToClassInstanceCrossFile.symbols | 8 + ...renceToClassInstanceCrossFile.symbols.diff | 14 +- ...onsReferenceToClassInstanceCrossFile.types | 18 +- ...clarationsTypedefAndImportTypes.errors.txt | 8 +- ...sDeclarationsTypedefAndImportTypes.symbols | 4 + ...arationsTypedefAndImportTypes.symbols.diff | 4 + .../jsDeclarationsTypedefAndImportTypes.types | 8 +- .../jsObjectsMarkedAsOpenEnded.errors.txt | 17 +- .../jsObjectsMarkedAsOpenEnded.symbols | 6 + .../jsObjectsMarkedAsOpenEnded.symbols.diff | 8 +- .../jsObjectsMarkedAsOpenEnded.types | 12 +- .../jsdocAccessibilityTags.errors.txt | 104 ------- .../jsdocAccessibilityTags.symbols | 26 ++ .../jsdocAccessibilityTags.symbols.diff | 32 ++- .../conformance/jsdocAccessibilityTags.types | 66 ++--- ...ocAccessibilityTagsDeclarations.errors.txt | 65 ----- ...jsdocAccessibilityTagsDeclarations.symbols | 16 ++ ...AccessibilityTagsDeclarations.symbols.diff | 18 +- .../jsdocAugmentsMissingType.errors.txt | 17 -- .../jsdocAugmentsMissingType.symbols | 4 + .../jsdocAugmentsMissingType.symbols.diff | 9 +- .../jsdocAugmentsMissingType.types | 8 +- .../jsdocAugments_noExtends.errors.txt | 5 +- .../jsdocAugments_noExtends.symbols | 2 + .../jsdocAugments_noExtends.symbols.diff | 2 + .../conformance/jsdocAugments_noExtends.types | 4 +- .../conformance/jsdocFunctionType.errors.txt | 5 +- .../conformance/jsdocFunctionType.symbols | 2 + .../jsdocFunctionType.symbols.diff | 4 +- .../conformance/jsdocFunctionType.types | 4 +- .../jsdocImplements_missingType.errors.txt | 11 - .../jsdocImplements_missingType.symbols | 2 + .../jsdocImplements_missingType.symbols.diff | 2 + .../jsdocImplements_missingType.types | 4 +- .../jsdocImplements_properties.errors.txt | 23 -- .../jsdocImplements_properties.symbols | 4 + .../jsdocImplements_properties.symbols.diff | 6 +- .../jsdocImplements_properties.types | 8 +- .../conformance/jsdocImportType.errors.txt | 36 --- .../conformance/jsdocImportType.symbols | 6 + .../conformance/jsdocImportType.symbols.diff | 10 +- .../conformance/jsdocImportType.types | 12 +- .../conformance/jsdocImportType2.errors.txt | 35 --- .../conformance/jsdocImportType2.symbols | 6 + .../conformance/jsdocImportType2.symbols.diff | 10 +- .../conformance/jsdocImportType2.types | 12 +- .../conformance/jsdocReadonly.errors.txt | 30 -- .../conformance/jsdocReadonly.symbols | 2 + .../conformance/jsdocReadonly.symbols.diff | 2 + .../submodule/conformance/jsdocReadonly.types | 4 +- .../jsdocReadonlyDeclarations.errors.txt | 5 +- .../jsdocReadonlyDeclarations.symbols | 2 + .../jsdocReadonlyDeclarations.symbols.diff | 2 + .../conformance/jsdocTemplateClass.errors.txt | 14 +- .../conformance/jsdocTemplateClass.symbols | 6 + .../jsdocTemplateClass.symbols.diff | 8 +- .../conformance/jsdocTemplateClass.types | 14 +- ...erenceToImportOfClassExpression.errors.txt | 5 +- ...ReferenceToImportOfClassExpression.symbols | 2 + ...enceToImportOfClassExpression.symbols.diff | 2 + ...peReferenceToImportOfClassExpression.types | 4 +- ...nceToImportOfFunctionExpression.errors.txt | 5 +- ...erenceToImportOfFunctionExpression.symbols | 2 + ...eToImportOfFunctionExpression.symbols.diff | 2 + .../conformance/jsdocTypeTagCast.errors.txt | 26 +- .../conformance/jsdocTypeTagCast.symbols | 6 + .../conformance/jsdocTypeTagCast.symbols.diff | 12 +- .../conformance/jsdocTypeTagCast.types | 12 +- .../keyofAndIndexedAccess2.symbols | 3 + .../keyofAndIndexedAccess2.symbols.diff | 14 + .../conformance/mixinClassesAnnotated.symbols | 4 +- .../mixinClassesAnnotated.symbols.diff | 4 +- .../conformance/mixinClassesAnonymous.symbols | 4 +- .../mixinClassesAnonymous.symbols.diff | 4 +- .../moduleExportAssignment6.errors.txt | 42 --- .../moduleExportAssignment6.symbols | 10 + .../moduleExportAssignment6.symbols.diff | 14 +- .../conformance/moduleExportAssignment6.types | 30 +- .../moduleExportNestedNamespaces.errors.txt | 5 +- .../moduleExportNestedNamespaces.symbols | 2 + .../moduleExportNestedNamespaces.symbols.diff | 4 +- .../moduleExportNestedNamespaces.types | 4 +- .../conformance/parserAstSpans1.symbols | 6 +- .../conformance/parserAstSpans1.symbols.diff | 6 +- .../conformance/parserClass2.errors.txt | 5 +- .../conformance/parserClass2.errors.txt.diff | 21 ++ .../conformance/parserClass2.symbols | 2 + .../conformance/parserClass2.symbols.diff | 2 + .../conformance/parserRealSource11.symbols | 84 +++--- .../parserRealSource11.symbols.diff | 84 +++--- .../conformance/parserRealSource11.types | 74 ++--- .../conformance/parserRealSource11.types.diff | 225 +++++++++++++++ .../conformance/parserRealSource4.symbols | 2 +- .../parserRealSource4.symbols.diff | 2 +- .../conformance/parserRealSource4.types | 2 +- .../conformance/parserRealSource4.types.diff | 11 + .../privateNameAndIndexSignature.symbols | 1 + .../privateNameAndIndexSignature.symbols.diff | 8 + .../privateNameAndIndexSignature.types | 2 +- .../privateNameAndIndexSignature.types.diff | 11 + .../privateNameMethodCallExpression.symbols | 6 +- ...ivateNameMethodCallExpression.symbols.diff | 6 +- ...vateNameStaticMethodCallExpression.symbols | 6 +- ...ameStaticMethodCallExpression.symbols.diff | 6 +- .../readonlyConstructorAssignment.errors.txt | 5 +- ...donlyConstructorAssignment.errors.txt.diff | 22 ++ .../readonlyConstructorAssignment.symbols | 4 +- ...readonlyConstructorAssignment.symbols.diff | 4 +- .../readonlyConstructorAssignment.types | 4 +- .../readonlyConstructorAssignment.types.diff | 14 + .../conformance/returnTagTypeGuard.errors.txt | 76 ----- .../conformance/returnTagTypeGuard.symbols | 8 + .../returnTagTypeGuard.symbols.diff | 12 +- .../conformance/returnTagTypeGuard.types | 24 +- .../conformance/scannerClass2.errors.txt | 5 +- .../conformance/scannerClass2.errors.txt.diff | 21 ++ .../conformance/scannerClass2.symbols | 2 + .../conformance/scannerClass2.symbols.diff | 2 + .../thisPropertyAssignmentCircular.errors.txt | 33 --- .../thisPropertyAssignmentCircular.symbols | 8 + ...hisPropertyAssignmentCircular.symbols.diff | 10 +- ...thisPropertyAssignmentInherited.errors.txt | 28 ++ .../thisPropertyAssignmentInherited.symbols | 8 +- ...isPropertyAssignmentInherited.symbols.diff | 8 +- .../thisPropertyAssignmentInherited.types | 18 +- .../thisPropertyOverridesAccessors.symbols | 4 +- ...hisPropertyOverridesAccessors.symbols.diff | 4 +- .../typeFromContextualThisType.errors.txt | 24 ++ .../typeFromContextualThisType.types | 20 +- .../typeFromParamTagForFunction.errors.txt | 25 +- .../typeFromParamTagForFunction.symbols | 10 + .../typeFromParamTagForFunction.symbols.diff | 18 +- .../typeFromParamTagForFunction.types | 20 +- .../typeFromPropertyAssignment10.errors.txt | 5 +- .../typeFromPropertyAssignment10.symbols | 2 + .../typeFromPropertyAssignment10.symbols.diff | 4 +- .../typeFromPropertyAssignment10.types | 4 +- .../typeFromPropertyAssignment10_1.errors.txt | 5 +- .../typeFromPropertyAssignment10_1.symbols | 2 + ...ypeFromPropertyAssignment10_1.symbols.diff | 4 +- .../typeFromPropertyAssignment10_1.types | 4 +- .../typeFromPropertyAssignment15.errors.txt | 5 +- .../typeFromPropertyAssignment15.symbols | 2 + .../typeFromPropertyAssignment15.symbols.diff | 4 +- .../typeFromPropertyAssignment15.types | 4 +- .../typeFromPropertyAssignment2.errors.txt | 5 +- .../typeFromPropertyAssignment2.symbols | 2 + .../typeFromPropertyAssignment2.symbols.diff | 4 +- .../typeFromPropertyAssignment2.types | 4 +- .../typeFromPropertyAssignment23.errors.txt | 5 +- .../typeFromPropertyAssignment23.symbols | 2 + .../typeFromPropertyAssignment23.symbols.diff | 4 +- .../typeFromPropertyAssignment23.types | 4 +- .../typeFromPropertyAssignment25.errors.txt | 8 +- .../typeFromPropertyAssignment25.symbols | 4 + .../typeFromPropertyAssignment25.symbols.diff | 4 + .../typeFromPropertyAssignment25.types | 8 +- .../typeFromPropertyAssignment26.errors.txt | 5 +- .../typeFromPropertyAssignment26.symbols | 2 + .../typeFromPropertyAssignment26.symbols.diff | 2 + .../typeFromPropertyAssignment26.types | 4 +- .../typeFromPropertyAssignment28.errors.txt | 11 +- .../typeFromPropertyAssignment28.symbols | 4 + .../typeFromPropertyAssignment28.symbols.diff | 4 + .../typeFromPropertyAssignment28.types | 8 +- .../typeFromPropertyAssignment3.errors.txt | 5 +- .../typeFromPropertyAssignment3.symbols | 2 + .../typeFromPropertyAssignment3.symbols.diff | 4 +- .../typeFromPropertyAssignment3.types | 4 +- .../typeFromPropertyAssignment35.errors.txt | 5 +- .../typeFromPropertyAssignment35.symbols | 2 + .../typeFromPropertyAssignment35.symbols.diff | 2 + .../typeFromPropertyAssignment35.types | 4 +- .../typeFromPropertyAssignment4.errors.txt | 5 +- .../typeFromPropertyAssignment4.symbols | 2 + .../typeFromPropertyAssignment4.symbols.diff | 4 +- .../typeFromPropertyAssignment4.types | 4 +- .../conformance/typeRelationships.errors.txt | 10 +- .../typeRelationships.errors.txt.diff | 28 ++ .../conformance/typeRelationships.symbols | 44 +-- .../typeRelationships.symbols.diff | 44 +-- .../conformance/typeRelationships.types | 66 ++--- .../conformance/typeRelationships.types.diff | 137 +++++++++ .../varRequireFromJavascript.errors.txt | 41 --- .../varRequireFromJavascript.symbols | 8 + .../varRequireFromJavascript.symbols.diff | 12 +- .../varRequireFromJavascript.types | 18 +- ...owJscheckJsTypeParameterNoCrash.types.diff | 12 +- ...ReferenceInConstructor1_Js.errors.txt.diff | 25 -- ...mentsReferenceInConstructor1_Js.types.diff | 6 +- ...mentsReferenceInConstructor2_Js.types.diff | 3 +- ...ReferenceInConstructor3_Js.errors.txt.diff | 8 +- ...mentsReferenceInConstructor3_Js.types.diff | 6 +- ...ReferenceInConstructor4_Js.errors.txt.diff | 33 +-- ...mentsReferenceInConstructor4_Js.types.diff | 12 +- ...ReferenceInConstructor5_Js.errors.txt.diff | 37 --- ...mentsReferenceInConstructor5_Js.types.diff | 17 +- ...ReferenceInConstructor6_Js.errors.txt.diff | 20 -- ...mentsReferenceInConstructor6_Js.types.diff | 14 + ...ReferenceInConstructor7_Js.errors.txt.diff | 20 -- ...mentsReferenceInConstructor7_Js.types.diff | 14 - ...mentsReferenceInMethod1_Js.errors.txt.diff | 23 -- .../argumentsReferenceInMethod1_Js.types.diff | 6 +- .../argumentsReferenceInMethod2_Js.types.diff | 3 +- ...mentsReferenceInMethod3_Js.errors.txt.diff | 8 +- .../argumentsReferenceInMethod3_Js.types.diff | 17 +- ...mentsReferenceInMethod4_Js.errors.txt.diff | 33 +-- .../argumentsReferenceInMethod4_Js.types.diff | 12 +- ...mentsReferenceInMethod5_Js.errors.txt.diff | 35 --- .../argumentsReferenceInMethod5_Js.types.diff | 17 +- ...mentsReferenceInMethod6_Js.errors.txt.diff | 20 -- .../argumentsReferenceInMethod6_Js.types.diff | 11 + ...mentsReferenceInMethod7_Js.errors.txt.diff | 20 -- .../argumentsReferenceInMethod7_Js.types.diff | 11 - ...aintOfJavascriptClassExpression.types.diff | 14 + .../compiler/checkJsFiles7.errors.txt.diff | 14 +- ...erCallBeforeThisAccessing9.errors.txt.diff | 20 -- ...ckSuperCallBeforeThisAccessing9.types.diff | 14 + .../compiler/classExtendingAny.types.diff | 20 +- ...sFieldSuperNotAccessibleJs.errors.txt.diff | 30 +- .../classFieldSuperNotAccessibleJs.types.diff | 38 ++- .../compiler/constructorPropertyJs.types.diff | 14 - ...hisAssignmentInStaticBlock.errors.txt.diff | 32 --- ...riptThisAssignmentInStaticBlock.types.diff | 26 -- ...ionEmitDoesNotRenameImport.errors.txt.diff | 40 --- .../jsFileClassPropertyType.errors.txt.diff | 25 -- .../jsFileClassPropertyType.types.diff | 25 +- .../jsFileClassPropertyType2.errors.txt.diff | 35 +-- .../jsFileClassPropertyType2.types.diff | 17 +- .../jsFileClassPropertyType3.errors.txt.diff | 23 +- .../jsFileClassPropertyType3.types.diff | 32 ++- ...lassSelfReferencedProperty.errors.txt.diff | 20 -- .../jsFileMethodOverloads.errors.txt.diff | 67 ----- .../compiler/jsFileMethodOverloads.types.diff | 41 +-- .../jsFileMethodOverloads2.errors.txt.diff | 64 ----- .../jsFileMethodOverloads2.types.diff | 41 +-- .../superNoModifiersCrash.errors.txt.diff | 5 +- .../compiler/superNoModifiersCrash.types.diff | 12 - .../thisInFunctionCallJs.errors.txt.diff | 40 +-- .../compiler/thisInFunctionCallJs.types.diff | 122 +------- ...rtyInitializerDoesntNarrow.errors.txt.diff | 28 -- ...PropertyInitializerDoesntNarrow.types.diff | 8 +- ...nExtendConstructorFunction.errors.txt.diff | 14 +- ...assCanExtendConstructorFunction.types.diff | 25 +- ...tualTypedSpecialAssignment.errors.txt.diff | 8 +- ...ontextualTypedSpecialAssignment.types.diff | 8 +- .../exportNestedNamespaces.errors.txt.diff | 5 +- .../exportNestedNamespaces.types.diff | 13 +- ...lassMembersFromAssignments.errors.txt.diff | 270 ++++-------------- ...ringClassMembersFromAssignments.types.diff | 220 ++++++++------ ...assMembersFromAssignments3.errors.txt.diff | 25 -- ...ingClassMembersFromAssignments3.types.diff | 12 +- ...assMembersFromAssignments4.errors.txt.diff | 26 -- ...ingClassMembersFromAssignments4.types.diff | 8 +- ...assMembersFromAssignments5.errors.txt.diff | 33 --- ...ingClassMembersFromAssignments5.types.diff | 26 +- .../jsDeclarationsClasses.errors.txt.diff | 20 +- .../jsDeclarationsClasses.types.diff | 60 +++- ...ortAssignedClassExpression.errors.txt.diff | 19 -- ...nsExportAssignedClassExpression.types.diff | 12 + ...edClassExpressionAnonymous.errors.txt.diff | 19 -- ...ssignedClassExpressionAnonymous.types.diff | 12 + ...ExpressionAnonymousWithSub.errors.txt.diff | 8 +- ...ClassExpressionAnonymousWithSub.types.diff | 20 +- ...edClassExpressionShadowing.errors.txt.diff | 5 +- ...ssignedClassExpressionShadowing.types.diff | 10 +- ...nsExportAssignedVisibility.errors.txt.diff | 29 -- ...rationsExportAssignedVisibility.types.diff | 23 +- ...sDeclarationsFunctionJSDoc.errors.txt.diff | 46 --- .../jsDeclarationsFunctionJSDoc.types.diff | 14 + ...ceToClassInstanceCrossFile.errors.txt.diff | 13 +- ...ferenceToClassInstanceCrossFile.types.diff | 24 +- ...tionsTypedefAndImportTypes.errors.txt.diff | 8 +- ...clarationsTypedefAndImportTypes.types.diff | 10 +- ...jsObjectsMarkedAsOpenEnded.errors.txt.diff | 17 +- .../jsObjectsMarkedAsOpenEnded.types.diff | 34 +-- .../jsdocAccessibilityTags.errors.txt.diff | 152 +++++----- .../jsdocAccessibilityTags.types.diff | 117 ++------ ...essibilityTagsDeclarations.errors.txt.diff | 70 ----- .../jsdocAugmentsMissingType.errors.txt.diff | 29 +- .../jsdocAugmentsMissingType.types.diff | 22 +- .../jsdocAugments_noExtends.errors.txt.diff | 15 - .../jsdocAugments_noExtends.types.diff | 14 + .../jsdocFunctionType.errors.txt.diff | 14 +- .../conformance/jsdocFunctionType.types.diff | 14 +- ...sdocImplements_missingType.errors.txt.diff | 23 +- .../jsdocImplements_missingType.types.diff | 14 + ...jsdocImplements_properties.errors.txt.diff | 41 ++- .../jsdocImplements_properties.types.diff | 26 ++ .../jsdocImportType.errors.txt.diff | 41 --- .../conformance/jsdocImportType.types.diff | 26 +- .../jsdocImportType2.errors.txt.diff | 40 --- .../conformance/jsdocImportType2.types.diff | 22 +- .../conformance/jsdocReadonly.errors.txt.diff | 47 +-- .../conformance/jsdocReadonly.types.diff | 10 + .../jsdocReadonlyDeclarations.errors.txt.diff | 5 +- .../jsdocTemplateClass.errors.txt.diff | 34 --- .../conformance/jsdocTemplateClass.types.diff | 31 +- ...eToImportOfClassExpression.errors.txt.diff | 5 +- ...erenceToImportOfClassExpression.types.diff | 6 +- ...ImportOfFunctionExpression.errors.txt.diff | 5 +- .../jsdocTypeTagCast.errors.txt.diff | 53 ++-- .../conformance/jsdocTypeTagCast.types.diff | 38 ++- .../moduleExportAssignment6.errors.txt.diff | 47 --- .../moduleExportAssignment6.types.diff | 73 ++--- ...duleExportNestedNamespaces.errors.txt.diff | 5 +- .../moduleExportNestedNamespaces.types.diff | 12 +- .../returnTagTypeGuard.errors.txt.diff | 81 ------ .../conformance/returnTagTypeGuard.types.diff | 61 ++-- ...PropertyAssignmentCircular.errors.txt.diff | 38 --- ...ropertyAssignmentInherited.errors.txt.diff | 33 +++ ...thisPropertyAssignmentInherited.types.diff | 18 +- ...typeFromContextualThisType.errors.txt.diff | 29 ++ .../typeFromContextualThisType.types.diff | 38 ++- ...ypeFromParamTagForFunction.errors.txt.diff | 23 +- .../typeFromParamTagForFunction.types.diff | 60 ++-- ...peFromPropertyAssignment10.errors.txt.diff | 5 +- .../typeFromPropertyAssignment10.types.diff | 10 +- ...FromPropertyAssignment10_1.errors.txt.diff | 5 +- .../typeFromPropertyAssignment10_1.types.diff | 10 +- ...peFromPropertyAssignment15.errors.txt.diff | 5 +- .../typeFromPropertyAssignment15.types.diff | 10 + ...ypeFromPropertyAssignment2.errors.txt.diff | 5 +- .../typeFromPropertyAssignment2.types.diff | 14 +- ...peFromPropertyAssignment23.errors.txt.diff | 5 +- .../typeFromPropertyAssignment23.types.diff | 14 + ...peFromPropertyAssignment25.errors.txt.diff | 8 +- .../typeFromPropertyAssignment25.types.diff | 17 +- ...peFromPropertyAssignment26.errors.txt.diff | 5 +- .../typeFromPropertyAssignment26.types.diff | 11 +- ...peFromPropertyAssignment28.errors.txt.diff | 30 -- .../typeFromPropertyAssignment28.types.diff | 22 +- ...ypeFromPropertyAssignment3.errors.txt.diff | 5 +- .../typeFromPropertyAssignment3.types.diff | 11 +- ...peFromPropertyAssignment35.errors.txt.diff | 5 +- .../typeFromPropertyAssignment35.types.diff | 11 +- ...ypeFromPropertyAssignment4.errors.txt.diff | 5 +- .../typeFromPropertyAssignment4.types.diff | 11 - .../varRequireFromJavascript.errors.txt.diff | 46 --- .../varRequireFromJavascript.types.diff | 37 +-- 634 files changed, 5907 insertions(+), 5874 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/autoLift2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/propertyOrdering.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticVisibility.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticVisibility2.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/statics.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/statics.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/statics.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsdocImportType.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsdocImportType2.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/jsdocReadonly.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource11.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource4.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/typeFromContextualThisType.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeRelationships.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.errors.txt delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/checkIndexConstraintOfJavascriptClassExpression.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/checkSuperCallBeforeThisAccessing9.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/checkSuperCallBeforeThisAccessing9.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/constructorPropertyJs.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/javascriptThisAssignmentInStaticBlock.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/javascriptThisAssignmentInStaticBlock.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/jsDeclarationEmitDoesNotRenameImport.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassSelfReferencedProperty.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments3.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpression.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedVisibility.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTagsDeclarations.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugments_noExtends.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugments_noExtends.types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_missingType.types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_properties.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateClass.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAssignment6.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/returnTagTypeGuard.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentCircular.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/typeFromContextualThisType.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment23.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment28.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/varRequireFromJavascript.errors.txt.diff diff --git a/internal/ast/utilities.go b/internal/ast/utilities.go index ffe9baee60..7379ef999b 100644 --- a/internal/ast/utilities.go +++ b/internal/ast/utilities.go @@ -1351,8 +1351,10 @@ func GetNonAssignedNameOfDeclaration(declaration *Node) *Node { // !!! switch declaration.Kind { case KindBinaryExpression: - if IsFunctionPropertyAssignment(declaration) { - return GetElementOrPropertyAccessArgumentExpressionOrName(declaration.AsBinaryExpression().Left) + bin := declaration.AsBinaryExpression() + kind := GetAssignmentDeclarationKind(bin) + if kind == JSDeclarationKindProperty || kind == JSDeclarationKindThisProperty { + return GetElementOrPropertyAccessArgumentExpressionOrName(bin.Left) } return nil case KindExportAssignment, KindJSExportAssignment: @@ -1398,21 +1400,46 @@ func getAssignedName(node *Node) *Node { return nil } -func IsFunctionPropertyAssignment(node *Node) bool { - if node.Kind == KindBinaryExpression { - expr := node.AsBinaryExpression() - if expr.OperatorToken.Kind == KindEqualsToken { - switch expr.Left.Kind { - case KindPropertyAccessExpression: - // F.id = expr - return IsIdentifier(expr.Left.Expression()) && IsIdentifier(expr.Left.Name()) - case KindElementAccessExpression: - // F[xxx] = expr - return IsIdentifier(expr.Left.Expression()) - } - } +type JSDeclarationKind int + +const ( + JSDeclarationKindNone JSDeclarationKind = iota + /// module.exports = expr + JSDeclarationKindModuleExports + /// exports.name = expr + /// module.exports.name = expr + JSDeclarationKindExportsProperty + /// className.prototype.name = expr + JSDeclarationKindPrototypeProperty + /// this.name = expr + JSDeclarationKindThisProperty + /// F.name = expr, F[name] = expr + JSDeclarationKindProperty +) + +func GetAssignmentDeclarationKind(bin *BinaryExpression) JSDeclarationKind { + if bin.OperatorToken.Kind != KindEqualsToken || !IsAccessExpression(bin.Left) { + return JSDeclarationKindNone } - return false + if IsModuleExportsAccessExpression(bin.Left) { + return JSDeclarationKindModuleExports + } else if (IsModuleExportsAccessExpression(bin.Left.Expression()) || IsExportsIdentifier(bin.Left.Expression())) && + hasJSBindableName(bin.Left) { + return JSDeclarationKindExportsProperty + } + if bin.Left.Expression().Kind == KindThisKeyword { + return JSDeclarationKindThisProperty + } + if bin.Left.Kind == KindPropertyAccessExpression && IsIdentifier(bin.Left.Expression()) && hasJSBindableName(bin.Left) || + bin.Left.Kind == KindElementAccessExpression && IsIdentifier(bin.Left.Expression()) { + return JSDeclarationKindProperty + } + return JSDeclarationKindNone +} + +func hasJSBindableName(node *Node) bool { + name := GetElementOrPropertyAccessArgumentExpressionOrName(node) + return IsIdentifier(name) || IsStringLiteralLike(name) } /** diff --git a/internal/binder/binder.go b/internal/binder/binder.go index ca96bc4c37..69c3acb659 100644 --- a/internal/binder/binder.go +++ b/internal/binder/binder.go @@ -622,8 +622,11 @@ func (b *Binder) bind(node *ast.Node) bool { setFlowNode(node, b.currentFlow) } case ast.KindBinaryExpression: - if ast.IsFunctionPropertyAssignment(node) { + switch ast.GetAssignmentDeclarationKind(node.AsBinaryExpression()) { + case ast.JSDeclarationKindProperty: b.bindFunctionPropertyAssignment(node) + case ast.JSDeclarationKindThisProperty: + b.bindThisPropertyAssignment(node) } b.checkStrictModeBinaryExpression(node) case ast.KindCatchClause: @@ -1042,6 +1045,39 @@ func (b *Binder) bindFunctionPropertyAssignment(node *ast.Node) { } } +func (b *Binder) bindThisPropertyAssignment(node *ast.Node) { + expr := node.AsBinaryExpression() + if ast.IsPropertyAccessExpression(expr.Left) && ast.IsPrivateIdentifier(expr.Left.AsPropertyAccessExpression().Name()) { + return + } + thisContainer := ast.GetThisContainer(node /*includeArrowFunctions*/, false /*includeClassComputedPropertyName*/, false) + switch thisContainer.Kind { + case ast.KindFunctionDeclaration, ast.KindFunctionExpression: + // !!! constructor functions + case ast.KindConstructor, ast.KindPropertyDeclaration, ast.KindMethodDeclaration, ast.KindGetAccessor, ast.KindSetAccessor, ast.KindClassStaticBlockDeclaration: + // this.property assignment in class member -- bind to the containing class + containingClass := thisContainer.Parent + classSymbol := containingClass.Symbol() + var symbolTable ast.SymbolTable + if ast.IsStatic(thisContainer) { + symbolTable = ast.GetExports(containingClass.Symbol()) + } else { + symbolTable = ast.GetMembers(containingClass.Symbol()) + } + if ast.HasDynamicName(node) { + b.declareSymbolEx(symbolTable, containingClass.Symbol(), node, ast.SymbolFlagsProperty, ast.SymbolFlagsNone, true /*isReplaceableByMethod*/, true /*isComputedName*/) + addLateBoundAssignmentDeclarationToSymbol(node, classSymbol) + } else { + b.declareSymbolEx(symbolTable, containingClass.Symbol(), node, ast.SymbolFlagsProperty|ast.SymbolFlagsAssignment, ast.SymbolFlagsNone, true /*isReplaceableByMethod*/, false /*isComputedName*/) + } + case ast.KindSourceFile, ast.KindModuleDeclaration: + // top-level this.property as assignment to globals is no longer supported + break + default: + panic("Unhandled case in bindThisPropertyAssignment: " + thisContainer.Kind.String()) + } +} + func (b *Binder) bindEnumDeclaration(node *ast.Node) { if ast.IsEnumConst(node) { b.bindBlockScopedDeclaration(node, ast.SymbolFlagsConstEnum, ast.SymbolFlagsConstEnumExcludes) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 3383971d34..547ea8aecb 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -27572,8 +27572,8 @@ func (c *Checker) getContextualTypeForBinaryOperand(node *ast.Node, contextFlags case ast.KindEqualsToken, ast.KindAmpersandAmpersandEqualsToken, ast.KindBarBarEqualsToken, ast.KindQuestionQuestionEqualsToken: // In an assignment expression, the right operand is contextually typed by the type of the left operand // unless it's an assignment declaration. - if node == binary.Right && !c.isReferenceToModuleExports(binary.Left) && (binary.Symbol == nil || c.canGetContextualTypeForAssignmentDeclaration(binary.Left)) { - return c.getContextualTypeFromAssignmentTarget(binary.Left) + if node == binary.Right && !c.isReferenceToModuleExports(binary.Left) && (binary.Symbol == nil || c.canGetContextualTypeForAssignmentDeclaration(node.Parent)) { + return c.getTypeOfExpression(binary.Left) } case ast.KindBarBarToken, ast.KindQuestionQuestionToken: // When an || expression has a contextual type, the operands are contextually typed by that type, except @@ -27599,47 +27599,60 @@ func (c *Checker) canGetContextualTypeForAssignmentDeclaration(node *ast.Node) b // binder) of the form 'F.id = expr' or 'F[xxx] = expr'. If 'F' is declared as a variable with a type annotation, // we can obtain a contextual type from the annotated type without triggering a circularity. Otherwise, the // assignment declaration has no contextual type. - symbol := c.getExportSymbolOfValueSymbolIfExported(c.getResolvedSymbol(node.Expression())) - return symbol.ValueDeclaration != nil && ast.IsVariableDeclaration(symbol.ValueDeclaration) && symbol.ValueDeclaration.Type() != nil -} - -func (c *Checker) isReferenceToModuleExports(node *ast.Node) bool { - if ast.IsAccessExpression(node) { - expr := node.Expression() - if ast.IsIdentifier(expr) { - // Node is the left operand of an assignment expression of the form 'module.exports = expr'. - symbol := c.getExportSymbolOfValueSymbolIfExported(c.getResolvedSymbol(expr)) - return symbol.Flags&ast.SymbolFlagsModuleExports != 0 - } - } - return false -} - -func (c *Checker) getContextualTypeFromAssignmentTarget(node *ast.Node) *Type { - if ast.IsAccessExpression(node) && node.Expression().Kind == ast.KindThisKeyword { + left := node.AsBinaryExpression().Left + expr := left.Expression() + if ast.IsAccessExpression(left) && expr.Kind == ast.KindThisKeyword { var symbol *ast.Symbol - if ast.IsPropertyAccessExpression(node) { - name := node.Name() - thisType := c.getTypeOfExpression(node.Expression()) + if ast.IsPropertyAccessExpression(left) { + name := left.Name() + thisType := c.getTypeOfExpression(expr) if ast.IsPrivateIdentifier(name) { symbol = c.getPropertyOfType(thisType, binder.GetSymbolNameForPrivateIdentifier(thisType.symbol, name.Text())) } else { symbol = c.getPropertyOfType(thisType, name.Text()) } } else { - propType := c.checkExpressionCached(node.AsElementAccessExpression().ArgumentExpression) + propType := c.checkExpressionCached(left.AsElementAccessExpression().ArgumentExpression) if isTypeUsableAsPropertyName(propType) { - symbol = c.getPropertyOfType(c.getTypeOfExpression(node.Expression()), getPropertyNameFromType(propType)) + symbol = c.getPropertyOfType(c.getTypeOfExpression(expr), getPropertyNameFromType(propType)) } } if symbol != nil { d := symbol.ValueDeclaration if d != nil && (ast.IsPropertyDeclaration(d) || ast.IsPropertySignatureDeclaration(d)) && d.Type() == nil && d.Initializer() == nil { - return nil + return false } } + symbol = node.Symbol() + if symbol != nil && symbol.ValueDeclaration != nil && symbol.ValueDeclaration.Type() == nil { + if !ast.IsObjectLiteralMethod(c.getThisContainer(expr, false, false)) { + return false + } + // and now for one single case of object literal methods + name := ast.GetElementOrPropertyAccessArgumentExpressionOrName(left) + if name == nil { + return false + } else { + // !!! contextual typing for `this` in object literals + return false + } + } + return true + } + symbol := c.getExportSymbolOfValueSymbolIfExported(c.getResolvedSymbol(expr)) + return symbol.ValueDeclaration != nil && ast.IsVariableDeclaration(symbol.ValueDeclaration) && symbol.ValueDeclaration.Type() != nil +} + +func (c *Checker) isReferenceToModuleExports(node *ast.Node) bool { + if ast.IsAccessExpression(node) { + expr := node.Expression() + if ast.IsIdentifier(expr) { + // Node is the left operand of an assignment expression of the form 'module.exports = expr'. + symbol := c.getExportSymbolOfValueSymbolIfExported(c.getResolvedSymbol(expr)) + return symbol.Flags&ast.SymbolFlagsModuleExports != 0 + } } - return c.getTypeOfExpression(node) + return false } func (c *Checker) getContextualTypeForObjectLiteralElement(element *ast.Node, contextFlags ContextFlags) *Type { diff --git a/internal/parser/reparser.go b/internal/parser/reparser.go index 0292d43484..07b26ce987 100644 --- a/internal/parser/reparser.go +++ b/internal/parser/reparser.go @@ -5,23 +5,6 @@ import ( "github.com/microsoft/typescript-go/internal/core" ) -type jsDeclarationKind int - -const ( - jsDeclarationKindNone jsDeclarationKind = iota - /// module.exports = expr - jsDeclarationKindModuleExports - /// exports.name = expr - /// module.exports.name = expr - jsDeclarationKindExportsProperty - /// className.prototype.name = expr - jsDeclarationKindPrototypeProperty - /// this.name = expr - jsDeclarationKindThisProperty - // F.name = expr - jsDeclarationKindProperty -) - func (p *Parser) reparseCommonJS(node *ast.Node) { if p.scriptKind != core.ScriptKindJS && p.scriptKind != core.ScriptKindJSX { return @@ -30,12 +13,12 @@ func (p *Parser) reparseCommonJS(node *ast.Node) { return } bin := node.AsExpressionStatement().Expression.AsBinaryExpression() - kind := getAssignmentDeclarationKind(bin) + kind := ast.GetAssignmentDeclarationKind(bin) var export *ast.Node switch kind { - case jsDeclarationKindModuleExports: + case ast.JSDeclarationKindModuleExports: export = p.factory.NewJSExportAssignment(bin.Right) - case jsDeclarationKindExportsProperty: + case ast.JSDeclarationKindExportsProperty: nodes := p.nodeSlicePool.NewSlice(1) nodes[0] = p.factory.NewModifier(ast.KindExportKeyword) nodes[0].Flags = ast.NodeFlagsReparsed @@ -51,22 +34,6 @@ func (p *Parser) reparseCommonJS(node *ast.Node) { } } -func getAssignmentDeclarationKind(bin *ast.BinaryExpression) jsDeclarationKind { - if bin.OperatorToken.Kind != ast.KindEqualsToken || !ast.IsAccessExpression(bin.Left) { - return jsDeclarationKindNone - } - if ast.IsModuleExportsAccessExpression(bin.Left) { - return jsDeclarationKindModuleExports - } else if ast.IsAccessExpression(bin.Left) && - (ast.IsModuleExportsAccessExpression(bin.Left.Expression()) || ast.IsExportsIdentifier(bin.Left.Expression())) && - - (ast.IsIdentifier(ast.GetElementOrPropertyAccessArgumentExpressionOrName(bin.Left)) || ast.IsStringLiteralLike(ast.GetElementOrPropertyAccessArgumentExpressionOrName(bin.Left))) { - return jsDeclarationKindExportsProperty - } - // !!! module.exports property, this.property, expando.property - return jsDeclarationKindNone -} - // Hosted tags find a host and add their children to the correct location under the host. // Unhosted tags add synthetic nodes to the reparse list. func (p *Parser) reparseTags(parent *ast.Node, jsDoc []*ast.Node) { diff --git a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols index 8c6825c0b2..2e966a7147 100644 --- a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols +++ b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols @@ -19,18 +19,18 @@ abstract class AbstractClass { let val = this.prop.toLowerCase(); >val : Symbol(val, Decl(abstractPropertyInConstructor.ts, 3, 11)) >this.prop.toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) if (!str) { >str : Symbol(str, Decl(abstractPropertyInConstructor.ts, 1, 16)) this.prop = "Hello World"; ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) } this.cb(str); >this.cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) @@ -43,9 +43,9 @@ abstract class AbstractClass { >innerFunction : Symbol(innerFunction, Decl(abstractPropertyInConstructor.ts, 11, 13)) return this.prop; ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) } // OK, references are to another instance @@ -53,13 +53,13 @@ abstract class AbstractClass { >other.cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 1, 28)) >cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) ->other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 1, 28)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) } abstract prop: string; ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) abstract cb: (s: string) => void; >cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) @@ -71,26 +71,26 @@ abstract class AbstractClass { other = this.prop; >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 22, 39)) ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) fn = () => this.prop; >fn : Symbol(fn, Decl(abstractPropertyInConstructor.ts, 24, 22)) ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) method2() { >method2 : Symbol(method2, Decl(abstractPropertyInConstructor.ts, 25, 25)) this.prop = this.prop + "!"; ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) } } @@ -120,9 +120,9 @@ abstract class DerivedAbstractClass extends AbstractClass { >this : Symbol(DerivedAbstractClass, Decl(abstractPropertyInConstructor.ts, 30, 1)) >cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) >this.prop.toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(DerivedAbstractClass, Decl(abstractPropertyInConstructor.ts, 30, 1)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) this.method(1); @@ -135,17 +135,17 @@ abstract class DerivedAbstractClass extends AbstractClass { >other.cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 35, 28)) >cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) ->other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 35, 28)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) yetAnother.cb(yetAnother.prop); >yetAnother.cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) >yetAnother : Symbol(yetAnother, Decl(abstractPropertyInConstructor.ts, 35, 50)) >cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) ->yetAnother.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>yetAnother.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >yetAnother : Symbol(yetAnother, Decl(abstractPropertyInConstructor.ts, 35, 50)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) } } @@ -205,9 +205,9 @@ class User { >AbstractClass : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) a.prop; ->a.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>a.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >a : Symbol(a, Decl(abstractPropertyInConstructor.ts, 63, 16)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) a.cb("hi"); >a.cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) diff --git a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols.diff b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols.diff index 0576578ad6..894914f32e 100644 --- a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols.diff @@ -17,11 +17,11 @@ ->this.prop.toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --)) ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>this.prop.toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) if (!str) { @@ -29,10 +29,10 @@ this.prop = "Hello World"; ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) } this.cb(str); ->this.cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) @@ -48,10 +48,10 @@ return this.prop; ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) } // OK, references are to another instance @@ -62,15 +62,15 @@ ->cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) ->other.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) -+>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 1, 28)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) } abstract prop: string; ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) abstract cb: (s: string) => void; ->cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) @@ -86,19 +86,19 @@ ->other : Symbol(AbstractClass.other, Decl(abstractPropertyInConstructor.ts, 22, 39)) ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 22, 39)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) fn = () => this.prop; ->fn : Symbol(AbstractClass.fn, Decl(abstractPropertyInConstructor.ts, 24, 22)) ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>fn : Symbol(fn, Decl(abstractPropertyInConstructor.ts, 24, 22)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) method2() { ->method2 : Symbol(AbstractClass.method2, Decl(abstractPropertyInConstructor.ts, 25, 25)) @@ -106,15 +106,15 @@ this.prop = this.prop + "!"; ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) } } @@ -139,11 +139,11 @@ ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) +>this.prop.toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >this : Symbol(DerivedAbstractClass, Decl(abstractPropertyInConstructor.ts, 30, 1)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) this.method(1); @@ -161,10 +161,10 @@ ->cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) ->other.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) -+>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 35, 28)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) yetAnother.cb(yetAnother.prop); ->yetAnother.cb : Symbol(DerivedAbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) @@ -173,10 +173,10 @@ ->cb : Symbol(DerivedAbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) ->yetAnother.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) -+>yetAnother.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>yetAnother.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >yetAnother : Symbol(yetAnother, Decl(abstractPropertyInConstructor.ts, 35, 50)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) } } @@ -233,10 +233,10 @@ a.prop; ->a.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>a.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>a.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) >a : Symbol(a, Decl(abstractPropertyInConstructor.ts, 63, 16)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) a.cb("hi"); ->a.cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) diff --git a/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.symbols b/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.symbols index dcdf1e48cb..056f48ee5c 100644 --- a/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.symbols +++ b/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.symbols @@ -44,7 +44,7 @@ export var a = vextend({ this.data2 = 1; }, data2(val) { }, ->data2 : Symbol(data2, Decl(app.js, 6, 6)) +>data2 : Symbol(data2, Decl(app.js, 4, 16), Decl(app.js, 6, 6)) >val : Symbol(val, Decl(app.js, 7, 10)) } }); diff --git a/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.symbols.diff b/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.symbols.diff index 0c404d8a7f..6e96fd7b56 100644 --- a/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.symbols.diff @@ -18,8 +18,4 @@ - }, data2(val) { }, -->data2 : Symbol(data2, Decl(app.js, 4, 16), Decl(app.js, 6, 6)) -+>data2 : Symbol(data2, Decl(app.js, 6, 6)) - >val : Symbol(val, Decl(app.js, 7, 10)) - } - }); + >data2 : Symbol(data2, Decl(app.js, 4, 16), Decl(app.js, 6, 6)) diff --git a/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.types b/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.types index 5157bc79a2..c94999c166 100644 --- a/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.types +++ b/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.types @@ -26,11 +26,11 @@ export var a = vextend({ >a : void >vextend({ watch: { data1(val) { this.data2 = 1; }, data2(val) { }, }}) : void >vextend : (options: ComponentOptions<{}>) => void ->{ watch: { data1(val) { this.data2 = 1; }, data2(val) { }, }} : { watch: { data1: (val: any) => void; data2: (val: any) => void; }; } +>{ watch: { data1(val) { this.data2 = 1; }, data2(val) { }, }} : { watch: { data1: (val: any) => void; data2: any; }; } watch: { ->watch : { data1: (val: any) => void; data2: (val: any) => void; } ->{ data1(val) { this.data2 = 1; }, data2(val) { }, } : { data1: (val: any) => void; data2: (val: any) => void; } +>watch : { data1: (val: any) => void; data2: any; } +>{ data1(val) { this.data2 = 1; }, data2(val) { }, } : { data1: (val: any) => void; data2: any; } data1(val) { >data1 : (val: any) => void @@ -45,7 +45,7 @@ export var a = vextend({ }, data2(val) { }, ->data2 : (val: any) => void +>data2 : any >val : any } }); diff --git a/testdata/baselines/reference/submodule/compiler/ambientPropertyDeclarationInJs.symbols b/testdata/baselines/reference/submodule/compiler/ambientPropertyDeclarationInJs.symbols index c118c0123a..b129e5aa6e 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientPropertyDeclarationInJs.symbols +++ b/testdata/baselines/reference/submodule/compiler/ambientPropertyDeclarationInJs.symbols @@ -6,21 +6,21 @@ class Foo { constructor() { this.prop = {}; ->this.prop : Symbol(prop, Decl(test.js, 3, 5)) +>this.prop : Symbol(prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) >this : Symbol(Foo, Decl(test.js, 0, 0)) ->prop : Symbol(prop, Decl(test.js, 3, 5)) +>prop : Symbol(prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) } declare prop: string; ->prop : Symbol(prop, Decl(test.js, 3, 5)) +>prop : Symbol(prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) method() { >method : Symbol(method, Decl(test.js, 5, 25)) this.prop.foo ->this.prop : Symbol(prop, Decl(test.js, 3, 5)) +>this.prop : Symbol(prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) >this : Symbol(Foo, Decl(test.js, 0, 0)) ->prop : Symbol(prop, Decl(test.js, 3, 5)) +>prop : Symbol(prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) } } diff --git a/testdata/baselines/reference/submodule/compiler/ambientPropertyDeclarationInJs.symbols.diff b/testdata/baselines/reference/submodule/compiler/ambientPropertyDeclarationInJs.symbols.diff index bde70e71e5..0ca86ca48d 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientPropertyDeclarationInJs.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/ambientPropertyDeclarationInJs.symbols.diff @@ -5,15 +5,15 @@ constructor() { this.prop = {}; ->this.prop : Symbol(Foo.prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) -+>this.prop : Symbol(prop, Decl(test.js, 3, 5)) ++>this.prop : Symbol(prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) >this : Symbol(Foo, Decl(test.js, 0, 0)) ->prop : Symbol(Foo.prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) -+>prop : Symbol(prop, Decl(test.js, 3, 5)) ++>prop : Symbol(prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) } declare prop: string; ->prop : Symbol(Foo.prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) -+>prop : Symbol(prop, Decl(test.js, 3, 5)) ++>prop : Symbol(prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) method() { ->method : Symbol(Foo.method, Decl(test.js, 5, 25)) @@ -21,10 +21,10 @@ this.prop.foo ->this.prop : Symbol(Foo.prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) -+>this.prop : Symbol(prop, Decl(test.js, 3, 5)) ++>this.prop : Symbol(prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) >this : Symbol(Foo, Decl(test.js, 0, 0)) ->prop : Symbol(Foo.prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) -+>prop : Symbol(prop, Decl(test.js, 3, 5)) ++>prop : Symbol(prop, Decl(test.js, 1, 19), Decl(test.js, 3, 5)) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.errors.txt deleted file mode 100644 index 4d119f3cb8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -/a.js(11,8): error TS2339: Property 'arguments' does not exist on type 'A'. - - -==== /a.js (1 errors) ==== - class A { - /** - * Constructor - * - * @param {object} [foo={}] - */ - constructor(foo = {}) { - /** - * @type object - */ - this.arguments = foo; - ~~~~~~~~~ -!!! error TS2339: Property 'arguments' does not exist on type 'A'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.symbols index 05660fd2df..b67dc1061a 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.symbols @@ -16,7 +16,9 @@ class A { * @type object */ this.arguments = foo; +>this.arguments : Symbol(arguments, Decl(a.js, 6, 24)) >this : Symbol(A, Decl(a.js, 0, 0)) +>arguments : Symbol(arguments, Decl(a.js, 6, 24)) >foo : Symbol(foo, Decl(a.js, 6, 13)) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.symbols.diff index f9cb667ab2..314546711e 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.symbols.diff @@ -5,8 +5,10 @@ */ this.arguments = foo; ->this.arguments : Symbol(A.arguments, Decl(a.js, 6, 24)) ++>this.arguments : Symbol(arguments, Decl(a.js, 6, 24)) >this : Symbol(A, Decl(a.js, 0, 0)) ->arguments : Symbol(A.arguments, Decl(a.js, 6, 24)) ++>arguments : Symbol(arguments, Decl(a.js, 6, 24)) >foo : Symbol(foo, Decl(a.js, 6, 13)) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.types index 5ec6e757bb..b081eadf8c 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.types @@ -18,9 +18,9 @@ class A { */ this.arguments = foo; >this.arguments = foo : object ->this.arguments : any +>this.arguments : object >this : this ->arguments : any +>arguments : object >foo : object } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.symbols index 231cb2fd7d..3d15bb1903 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.symbols @@ -17,6 +17,7 @@ class A { */ this["arguments"] = foo; >this : Symbol(A, Decl(a.js, 0, 0)) +>"arguments" : Symbol(arguments, Decl(a.js, 6, 24)) >foo : Symbol(foo, Decl(a.js, 6, 13)) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.symbols.diff index b352dd1f70..b95664d83e 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.symbols.diff @@ -5,6 +5,7 @@ this["arguments"] = foo; >this : Symbol(A, Decl(a.js, 0, 0)) ->"arguments" : Symbol(A["arguments"], Decl(a.js, 6, 24)) ++>"arguments" : Symbol(arguments, Decl(a.js, 6, 24)) >foo : Symbol(foo, Decl(a.js, 6, 13)) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.types index 124673f048..7dd8e53d55 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.types @@ -18,7 +18,7 @@ class A { */ this["arguments"] = foo; >this["arguments"] = foo : object ->this["arguments"] : any +>this["arguments"] : object >this : this >"arguments" : "arguments" >foo : object diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.errors.txt index 026fd4feab..5d9354824f 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.errors.txt @@ -1,10 +1,8 @@ -/a.js(19,8): error TS2339: Property 'foo' does not exist on type 'B'. -/a.js(24,8): error TS2339: Property 'bar' does not exist on type 'B'. /a.js(24,20): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. /a.js(24,30): error TS2339: Property 'foo' does not exist on type '{ bar: {}; }'. -==== /a.js (4 errors) ==== +==== /a.js (2 errors) ==== class A { get arguments() { return { bar: {} }; @@ -24,15 +22,11 @@ * @type object */ this.foo = foo; - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'B'. /** * @type object */ this.bar = super.arguments.foo; - ~~~ -!!! error TS2339: Property 'bar' does not exist on type 'B'. ~~~~~~~~~ !!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. ~~~ diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.symbols index 3eb0444ea9..76cb4de6c4 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.symbols @@ -31,14 +31,18 @@ class B extends A { * @type object */ this.foo = foo; +>this.foo : Symbol(foo, Decl(a.js, 13, 10)) >this : Symbol(B, Decl(a.js, 4, 1)) +>foo : Symbol(foo, Decl(a.js, 13, 10)) >foo : Symbol(foo, Decl(a.js, 12, 13)) /** * @type object */ this.bar = super.arguments.foo; +>this.bar : Symbol(bar, Decl(a.js, 18, 17)) >this : Symbol(B, Decl(a.js, 4, 1)) +>bar : Symbol(bar, Decl(a.js, 18, 17)) >super.arguments : Symbol(arguments, Decl(a.js, 0, 9)) >super : Symbol(A, Decl(a.js, 0, 0)) >arguments : Symbol(arguments, Decl(a.js, 0, 9)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.symbols.diff index 1267e7a9c9..8ddc6db947 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.symbols.diff @@ -14,8 +14,10 @@ */ this.foo = foo; ->this.foo : Symbol(B.foo, Decl(a.js, 13, 10)) ++>this.foo : Symbol(foo, Decl(a.js, 13, 10)) >this : Symbol(B, Decl(a.js, 4, 1)) ->foo : Symbol(B.foo, Decl(a.js, 13, 10)) ++>foo : Symbol(foo, Decl(a.js, 13, 10)) >foo : Symbol(foo, Decl(a.js, 12, 13)) /** @@ -23,9 +25,11 @@ */ this.bar = super.arguments.foo; ->this.bar : Symbol(B.bar, Decl(a.js, 18, 17)) ++>this.bar : Symbol(bar, Decl(a.js, 18, 17)) >this : Symbol(B, Decl(a.js, 4, 1)) ->bar : Symbol(B.bar, Decl(a.js, 18, 17)) ->super.arguments : Symbol(A.arguments, Decl(a.js, 0, 9)) ++>bar : Symbol(bar, Decl(a.js, 18, 17)) +>super.arguments : Symbol(arguments, Decl(a.js, 0, 9)) >super : Symbol(A, Decl(a.js, 0, 0)) ->arguments : Symbol(A.arguments, Decl(a.js, 0, 9)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.types index 4c52d5ccde..e99e465644 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.types @@ -36,9 +36,9 @@ class B extends A { */ this.foo = foo; >this.foo = foo : object ->this.foo : any +>this.foo : object >this : this ->foo : any +>foo : object >foo : object /** diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.errors.txt index fad3097c1e..c2a5ee43e7 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.errors.txt @@ -1,12 +1,8 @@ -/a.js(13,8): error TS2339: Property 'foo' does not exist on type 'A'. /a.js(18,9): 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. -/a.js(23,8): error TS2339: Property 'bar' does not exist on type 'A'. /a.js(23,24): error TS2339: Property 'bar' does not exist on type 'object'. -/a.js(28,8): error TS2339: Property 'baz' does not exist on type 'A'. -/a.js(33,8): error TS2339: Property 'options' does not exist on type 'A'. -==== /a.js (6 errors) ==== +==== /a.js (2 errors) ==== class A { /** * Constructor @@ -20,8 +16,6 @@ * @type object */ this.foo = foo; - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'A'. /** * @type object @@ -34,8 +28,6 @@ * @type object */ this.bar = arguments.bar; - ~~~ -!!! error TS2339: Property 'bar' does not exist on type 'A'. ~~~ !!! error TS2339: Property 'bar' does not exist on type 'object'. @@ -43,15 +35,11 @@ * @type object */ this.baz = arguments[key]; - ~~~ -!!! error TS2339: Property 'baz' does not exist on type 'A'. /** * @type object */ this.options = arguments; - ~~~~~~~ -!!! error TS2339: Property 'options' does not exist on type 'A'. } get arguments() { diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.symbols index bfd81cc31b..667f8c501e 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.symbols @@ -19,7 +19,9 @@ class A { * @type object */ this.foo = foo; +>this.foo : Symbol(foo, Decl(a.js, 7, 20)) >this : Symbol(A, Decl(a.js, 0, 0)) +>foo : Symbol(foo, Decl(a.js, 7, 20)) >foo : Symbol(foo, Decl(a.js, 6, 13)) /** @@ -35,14 +37,18 @@ class A { * @type object */ this.bar = arguments.bar; +>this.bar : Symbol(bar, Decl(a.js, 17, 35)) >this : Symbol(A, Decl(a.js, 0, 0)) +>bar : Symbol(bar, Decl(a.js, 17, 35)) >arguments : Symbol(arguments, Decl(a.js, 17, 7)) /** * @type object */ this.baz = arguments[key]; +>this.baz : Symbol(baz, Decl(a.js, 22, 27)) >this : Symbol(A, Decl(a.js, 0, 0)) +>baz : Symbol(baz, Decl(a.js, 22, 27)) >arguments : Symbol(arguments, Decl(a.js, 17, 7)) >key : Symbol(key, Decl(a.js, 7, 7)) @@ -50,7 +56,9 @@ class A { * @type object */ this.options = arguments; +>this.options : Symbol(options, Decl(a.js, 27, 28)) >this : Symbol(A, Decl(a.js, 0, 0)) +>options : Symbol(options, Decl(a.js, 27, 28)) >arguments : Symbol(arguments, Decl(a.js, 17, 7)) } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.symbols.diff index 09538b33ee..b6b4183b9a 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.symbols.diff @@ -5,12 +5,14 @@ */ this.foo = foo; ->this.foo : Symbol(A.foo, Decl(a.js, 7, 20)) ++>this.foo : Symbol(foo, Decl(a.js, 7, 20)) >this : Symbol(A, Decl(a.js, 0, 0)) ->foo : Symbol(A.foo, Decl(a.js, 7, 20)) ++>foo : Symbol(foo, Decl(a.js, 7, 20)) >foo : Symbol(foo, Decl(a.js, 6, 13)) /** -@@= skipped -10, +8 lines =@@ +@@= skipped -10, +10 lines =@@ */ const arguments = this.arguments; >arguments : Symbol(arguments, Decl(a.js, 17, 7)) @@ -25,8 +27,10 @@ */ this.bar = arguments.bar; ->this.bar : Symbol(A.bar, Decl(a.js, 17, 35)) ++>this.bar : Symbol(bar, Decl(a.js, 17, 35)) >this : Symbol(A, Decl(a.js, 0, 0)) ->bar : Symbol(A.bar, Decl(a.js, 17, 35)) ++>bar : Symbol(bar, Decl(a.js, 17, 35)) >arguments : Symbol(arguments, Decl(a.js, 17, 7)) /** @@ -34,18 +38,22 @@ */ this.baz = arguments[key]; ->this.baz : Symbol(A.baz, Decl(a.js, 22, 27)) ++>this.baz : Symbol(baz, Decl(a.js, 22, 27)) >this : Symbol(A, Decl(a.js, 0, 0)) ->baz : Symbol(A.baz, Decl(a.js, 22, 27)) ++>baz : Symbol(baz, Decl(a.js, 22, 27)) >arguments : Symbol(arguments, Decl(a.js, 17, 7)) >key : Symbol(key, Decl(a.js, 7, 7)) -@@= skipped -27, +23 lines =@@ +@@= skipped -27, +27 lines =@@ * @type object */ this.options = arguments; ->this.options : Symbol(A.options, Decl(a.js, 27, 28)) ++>this.options : Symbol(options, Decl(a.js, 27, 28)) >this : Symbol(A, Decl(a.js, 0, 0)) ->options : Symbol(A.options, Decl(a.js, 27, 28)) ++>options : Symbol(options, Decl(a.js, 27, 28)) >arguments : Symbol(arguments, Decl(a.js, 17, 7)) } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.types index 849ed640e4..95caa1cbc1 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.types @@ -22,9 +22,9 @@ class A { */ this.foo = foo; >this.foo = foo : object ->this.foo : any +>this.foo : object >this : this ->foo : any +>foo : object >foo : object /** @@ -65,9 +65,9 @@ class A { */ this.options = arguments; >this.options = arguments : object ->this.options : any +>this.options : object >this : this ->options : any +>options : object >arguments : object } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.errors.txt deleted file mode 100644 index b098f359be..0000000000 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.errors.txt +++ /dev/null @@ -1,32 +0,0 @@ -/a.js(15,8): error TS2339: Property 'foo' does not exist on type 'A'. -/a.js(20,8): error TS2339: Property 'bar' does not exist on type 'A'. - - -==== /a.js (2 errors) ==== - const bar = { - arguments: {} - } - - class A { - /** - * Constructor - * - * @param {object} [foo={}] - */ - constructor(foo = {}) { - /** - * @type object - */ - this.foo = foo; - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'A'. - - /** - * @type object - */ - this.bar = bar.arguments; - ~~~ -!!! error TS2339: Property 'bar' does not exist on type 'A'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.symbols index 9a77b31c00..365cbd7952 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.symbols @@ -23,14 +23,18 @@ class A { * @type object */ this.foo = foo; +>this.foo : Symbol(foo, Decl(a.js, 10, 24)) >this : Symbol(A, Decl(a.js, 2, 1)) +>foo : Symbol(foo, Decl(a.js, 10, 24)) >foo : Symbol(foo, Decl(a.js, 10, 13)) /** * @type object */ this.bar = bar.arguments; +>this.bar : Symbol(bar, Decl(a.js, 14, 17)) >this : Symbol(A, Decl(a.js, 2, 1)) +>bar : Symbol(bar, Decl(a.js, 14, 17)) >bar.arguments : Symbol(arguments, Decl(a.js, 0, 13)) >bar : Symbol(bar, Decl(a.js, 0, 5)) >arguments : Symbol(arguments, Decl(a.js, 0, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.symbols.diff index f6ffaddf56..7c1b056c37 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.symbols.diff @@ -5,8 +5,10 @@ */ this.foo = foo; ->this.foo : Symbol(A.foo, Decl(a.js, 10, 24)) ++>this.foo : Symbol(foo, Decl(a.js, 10, 24)) >this : Symbol(A, Decl(a.js, 2, 1)) ->foo : Symbol(A.foo, Decl(a.js, 10, 24)) ++>foo : Symbol(foo, Decl(a.js, 10, 24)) >foo : Symbol(foo, Decl(a.js, 10, 13)) /** @@ -14,8 +16,10 @@ */ this.bar = bar.arguments; ->this.bar : Symbol(A.bar, Decl(a.js, 14, 17)) ++>this.bar : Symbol(bar, Decl(a.js, 14, 17)) >this : Symbol(A, Decl(a.js, 2, 1)) ->bar : Symbol(A.bar, Decl(a.js, 14, 17)) ++>bar : Symbol(bar, Decl(a.js, 14, 17)) >bar.arguments : Symbol(arguments, Decl(a.js, 0, 13)) >bar : Symbol(bar, Decl(a.js, 0, 5)) >arguments : Symbol(arguments, Decl(a.js, 0, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.types index e5e5a9b627..4ed2e98577 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.types @@ -27,9 +27,9 @@ class A { */ this.foo = foo; >this.foo = foo : object ->this.foo : any +>this.foo : object >this : this ->foo : any +>foo : object >foo : object /** @@ -37,9 +37,9 @@ class A { */ this.bar = bar.arguments; >this.bar = bar.arguments : {} ->this.bar : any +>this.bar : {} >this : this ->bar : any +>bar : {} >bar.arguments : {} >bar : { arguments: {}; } >arguments : {} diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.errors.txt deleted file mode 100644 index 2a541838f4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -/a.js(6,8): error TS2339: Property 'foo' does not exist on type 'A'. - - -==== /a.js (1 errors) ==== - class A { - constructor() { - /** - * @type object - */ - this.foo = arguments; - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'A'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.symbols index 772c1a6f1a..a50a3e9bd2 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.symbols @@ -9,7 +9,9 @@ class A { * @type object */ this.foo = arguments; +>this.foo : Symbol(foo, Decl(a.js, 1, 16)) >this : Symbol(A, Decl(a.js, 0, 0)) +>foo : Symbol(foo, Decl(a.js, 1, 16)) >arguments : Symbol(arguments) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.symbols.diff index 3198ab00ac..24f440c319 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.symbols.diff @@ -5,8 +5,10 @@ */ this.foo = arguments; ->this.foo : Symbol(A.foo, Decl(a.js, 1, 16)) ++>this.foo : Symbol(foo, Decl(a.js, 1, 16)) >this : Symbol(A, Decl(a.js, 0, 0)) ->foo : Symbol(A.foo, Decl(a.js, 1, 16)) ++>foo : Symbol(foo, Decl(a.js, 1, 16)) >arguments : Symbol(arguments) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.types index c8434f5995..202c3f0f73 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.types @@ -10,9 +10,9 @@ class A { */ this.foo = arguments; >this.foo = arguments : IArguments ->this.foo : any +>this.foo : IArguments >this : this ->foo : any +>foo : IArguments >arguments : IArguments } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.errors.txt deleted file mode 100644 index c90c495335..0000000000 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -/a.js(6,8): error TS2339: Property 'callee' does not exist on type 'A'. - - -==== /a.js (1 errors) ==== - class A { - constructor() { - /** - * @type Function - */ - this.callee = arguments.callee; - ~~~~~~ -!!! error TS2339: Property 'callee' does not exist on type 'A'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.symbols index 5f1eb608cb..f99aac22c4 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.symbols @@ -9,7 +9,9 @@ class A { * @type Function */ this.callee = arguments.callee; +>this.callee : Symbol(callee, Decl(a.js, 1, 16)) >this : Symbol(A, Decl(a.js, 0, 0)) +>callee : Symbol(callee, Decl(a.js, 1, 16)) >arguments.callee : Symbol(callee, Decl(lib.es5.d.ts, --, --)) >arguments : Symbol(arguments) >callee : Symbol(callee, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.symbols.diff index 810b98f5cb..6db3845158 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.symbols.diff @@ -5,9 +5,11 @@ */ this.callee = arguments.callee; ->this.callee : Symbol(A.callee, Decl(a.js, 1, 16)) ++>this.callee : Symbol(callee, Decl(a.js, 1, 16)) >this : Symbol(A, Decl(a.js, 0, 0)) ->callee : Symbol(A.callee, Decl(a.js, 1, 16)) ->arguments.callee : Symbol(IArguments.callee, Decl(lib.es5.d.ts, --, --)) ++>callee : Symbol(callee, Decl(a.js, 1, 16)) +>arguments.callee : Symbol(callee, Decl(lib.es5.d.ts, --, --)) >arguments : Symbol(arguments) ->callee : Symbol(IArguments.callee, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.types index bd53a71346..25f345353d 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.types @@ -10,9 +10,9 @@ class A { */ this.callee = arguments.callee; >this.callee = arguments.callee : Function ->this.callee : any +>this.callee : Function >this : this ->callee : any +>callee : Function >arguments.callee : Function >arguments : IArguments >callee : Function diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.errors.txt deleted file mode 100644 index 5064167e3a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -/a.js(9,8): error TS2339: Property 'arguments' does not exist on type 'A'. - - -==== /a.js (1 errors) ==== - class A { - /** - * @param {object} [foo={}] - */ - m(foo = {}) { - /** - * @type object - */ - this.arguments = foo; - ~~~~~~~~~ -!!! error TS2339: Property 'arguments' does not exist on type 'A'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.symbols index 0efba39311..01ae622aa2 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.symbols @@ -15,7 +15,9 @@ class A { * @type object */ this.arguments = foo; +>this.arguments : Symbol(arguments, Decl(a.js, 4, 14)) >this : Symbol(A, Decl(a.js, 0, 0)) +>arguments : Symbol(arguments, Decl(a.js, 4, 14)) >foo : Symbol(foo, Decl(a.js, 4, 3)) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.symbols.diff index 08f8bda5bd..de20c25dd2 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.symbols.diff @@ -13,8 +13,10 @@ */ this.arguments = foo; ->this.arguments : Symbol(A.arguments, Decl(a.js, 4, 14)) ++>this.arguments : Symbol(arguments, Decl(a.js, 4, 14)) >this : Symbol(A, Decl(a.js, 0, 0)) ->arguments : Symbol(A.arguments, Decl(a.js, 4, 14)) ++>arguments : Symbol(arguments, Decl(a.js, 4, 14)) >foo : Symbol(foo, Decl(a.js, 4, 3)) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.types index 354cf5c742..fe819f951d 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.types @@ -17,9 +17,9 @@ class A { */ this.arguments = foo; >this.arguments = foo : object ->this.arguments : any +>this.arguments : object >this : this ->arguments : any +>arguments : object >foo : object } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.symbols index 119ac0f453..0bc4dec675 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.symbols @@ -16,6 +16,7 @@ class A { */ this["arguments"] = foo; >this : Symbol(A, Decl(a.js, 0, 0)) +>"arguments" : Symbol(arguments, Decl(a.js, 4, 14)) >foo : Symbol(foo, Decl(a.js, 4, 3)) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.symbols.diff index 2bcfb1bd22..069d562add 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.symbols.diff @@ -14,6 +14,7 @@ this["arguments"] = foo; >this : Symbol(A, Decl(a.js, 0, 0)) ->"arguments" : Symbol(A["arguments"], Decl(a.js, 4, 14)) ++>"arguments" : Symbol(arguments, Decl(a.js, 4, 14)) >foo : Symbol(foo, Decl(a.js, 4, 3)) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.types index 456fc6fecf..e4750d6b42 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.types @@ -17,7 +17,7 @@ class A { */ this["arguments"] = foo; >this["arguments"] = foo : object ->this["arguments"] : any +>this["arguments"] : object >this : this >"arguments" : "arguments" >foo : object diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.errors.txt index 68a8c59206..15d923ccba 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.errors.txt @@ -1,9 +1,7 @@ -/a.js(15,8): error TS2339: Property 'x' does not exist on type 'B'. -/a.js(20,8): error TS2339: Property 'y' does not exist on type 'B'. /a.js(20,18): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -==== /a.js (3 errors) ==== +==== /a.js (1 errors) ==== class A { get arguments() { return { bar: {} }; @@ -19,15 +17,11 @@ * @type object */ this.x = foo; - ~ -!!! error TS2339: Property 'x' does not exist on type 'B'. /** * @type object */ this.y = super.arguments.bar; - ~ -!!! error TS2339: Property 'y' does not exist on type 'B'. ~~~~~~~~~ !!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.symbols index ca3d6613bd..97f0e8dd40 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.symbols @@ -27,14 +27,18 @@ class B extends A { * @type object */ this.x = foo; +>this.x : Symbol(x, Decl(a.js, 10, 14)) >this : Symbol(B, Decl(a.js, 4, 1)) +>x : Symbol(x, Decl(a.js, 10, 14)) >foo : Symbol(foo, Decl(a.js, 10, 3)) /** * @type object */ this.y = super.arguments.bar; +>this.y : Symbol(y, Decl(a.js, 14, 15)) >this : Symbol(B, Decl(a.js, 4, 1)) +>y : Symbol(y, Decl(a.js, 14, 15)) >super.arguments.bar : Symbol(bar, Decl(a.js, 2, 10)) >super.arguments : Symbol(arguments, Decl(a.js, 0, 9)) >super : Symbol(A, Decl(a.js, 0, 0)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.symbols.diff index 862402b2b6..fee7d7e17b 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.symbols.diff @@ -22,8 +22,10 @@ */ this.x = foo; ->this.x : Symbol(B.x, Decl(a.js, 10, 14)) ++>this.x : Symbol(x, Decl(a.js, 10, 14)) >this : Symbol(B, Decl(a.js, 4, 1)) ->x : Symbol(B.x, Decl(a.js, 10, 14)) ++>x : Symbol(x, Decl(a.js, 10, 14)) >foo : Symbol(foo, Decl(a.js, 10, 3)) /** @@ -31,8 +33,10 @@ */ this.y = super.arguments.bar; ->this.y : Symbol(B.y, Decl(a.js, 14, 15)) ++>this.y : Symbol(y, Decl(a.js, 14, 15)) >this : Symbol(B, Decl(a.js, 4, 1)) ->y : Symbol(B.y, Decl(a.js, 14, 15)) ++>y : Symbol(y, Decl(a.js, 14, 15)) >super.arguments.bar : Symbol(bar, Decl(a.js, 2, 10)) ->super.arguments : Symbol(A.arguments, Decl(a.js, 0, 9)) +>super.arguments : Symbol(arguments, Decl(a.js, 0, 9)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.types index d7f5de01af..88ae2938f3 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.types @@ -31,9 +31,9 @@ class B extends A { */ this.x = foo; >this.x = foo : object ->this.x : any +>this.x : object >this : this ->x : any +>x : object >foo : object /** @@ -41,9 +41,9 @@ class B extends A { */ this.y = super.arguments.bar; >this.y = super.arguments.bar : {} ->this.y : any +>this.y : {} >this : this ->y : any +>y : {} >super.arguments.bar : {} >super.arguments : { bar: {}; } >super : A diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.errors.txt index 9dd493e140..f2636e3772 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.errors.txt @@ -1,12 +1,8 @@ -/a.js(11,8): error TS2339: Property 'foo' does not exist on type 'A'. /a.js(16,9): 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. -/a.js(21,8): error TS2339: Property 'bar' does not exist on type 'A'. /a.js(21,24): error TS2339: Property 'bar' does not exist on type 'object'. -/a.js(26,8): error TS2339: Property 'baz' does not exist on type 'A'. -/a.js(31,8): error TS2339: Property 'options' does not exist on type 'A'. -==== /a.js (6 errors) ==== +==== /a.js (2 errors) ==== class A { /** * @param {object} [foo={}] @@ -18,8 +14,6 @@ * @type object */ this.foo = foo; - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'A'. /** * @type object @@ -32,8 +26,6 @@ * @type object */ this.bar = arguments.bar; - ~~~ -!!! error TS2339: Property 'bar' does not exist on type 'A'. ~~~ !!! error TS2339: Property 'bar' does not exist on type 'object'. @@ -41,15 +33,11 @@ * @type object */ this.baz = arguments[key]; - ~~~ -!!! error TS2339: Property 'baz' does not exist on type 'A'. /** * @type object */ this.options = arguments; - ~~~~~~~ -!!! error TS2339: Property 'options' does not exist on type 'A'. } get arguments() { diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.symbols index 1598196cb0..61eebbbf87 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.symbols @@ -18,7 +18,9 @@ class A { * @type object */ this.foo = foo; +>this.foo : Symbol(foo, Decl(a.js, 5, 20)) >this : Symbol(A, Decl(a.js, 0, 0)) +>foo : Symbol(foo, Decl(a.js, 5, 20)) >foo : Symbol(foo, Decl(a.js, 4, 3)) /** @@ -34,14 +36,18 @@ class A { * @type object */ this.bar = arguments.bar; +>this.bar : Symbol(bar, Decl(a.js, 15, 35)) >this : Symbol(A, Decl(a.js, 0, 0)) +>bar : Symbol(bar, Decl(a.js, 15, 35)) >arguments : Symbol(arguments, Decl(a.js, 15, 7)) /** * @type object */ this.baz = arguments[key]; +>this.baz : Symbol(baz, Decl(a.js, 20, 27)) >this : Symbol(A, Decl(a.js, 0, 0)) +>baz : Symbol(baz, Decl(a.js, 20, 27)) >arguments : Symbol(arguments, Decl(a.js, 15, 7)) >key : Symbol(key, Decl(a.js, 5, 7)) @@ -49,7 +55,9 @@ class A { * @type object */ this.options = arguments; +>this.options : Symbol(options, Decl(a.js, 25, 28)) >this : Symbol(A, Decl(a.js, 0, 0)) +>options : Symbol(options, Decl(a.js, 25, 28)) >arguments : Symbol(arguments, Decl(a.js, 15, 7)) } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.symbols.diff index 8462d0fb15..2d74098d67 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.symbols.diff @@ -14,12 +14,14 @@ */ this.foo = foo; ->this.foo : Symbol(A.foo, Decl(a.js, 5, 20)) ++>this.foo : Symbol(foo, Decl(a.js, 5, 20)) >this : Symbol(A, Decl(a.js, 0, 0)) ->foo : Symbol(A.foo, Decl(a.js, 5, 20)) ++>foo : Symbol(foo, Decl(a.js, 5, 20)) >foo : Symbol(foo, Decl(a.js, 4, 3)) /** -@@= skipped -10, +8 lines =@@ +@@= skipped -10, +10 lines =@@ */ const arguments = this.arguments; >arguments : Symbol(arguments, Decl(a.js, 15, 7)) @@ -34,8 +36,10 @@ */ this.bar = arguments.bar; ->this.bar : Symbol(A.bar, Decl(a.js, 15, 35)) ++>this.bar : Symbol(bar, Decl(a.js, 15, 35)) >this : Symbol(A, Decl(a.js, 0, 0)) ->bar : Symbol(A.bar, Decl(a.js, 15, 35)) ++>bar : Symbol(bar, Decl(a.js, 15, 35)) >arguments : Symbol(arguments, Decl(a.js, 15, 7)) /** @@ -43,18 +47,22 @@ */ this.baz = arguments[key]; ->this.baz : Symbol(A.baz, Decl(a.js, 20, 27)) ++>this.baz : Symbol(baz, Decl(a.js, 20, 27)) >this : Symbol(A, Decl(a.js, 0, 0)) ->baz : Symbol(A.baz, Decl(a.js, 20, 27)) ++>baz : Symbol(baz, Decl(a.js, 20, 27)) >arguments : Symbol(arguments, Decl(a.js, 15, 7)) >key : Symbol(key, Decl(a.js, 5, 7)) -@@= skipped -27, +23 lines =@@ +@@= skipped -27, +27 lines =@@ * @type object */ this.options = arguments; ->this.options : Symbol(A.options, Decl(a.js, 25, 28)) ++>this.options : Symbol(options, Decl(a.js, 25, 28)) >this : Symbol(A, Decl(a.js, 0, 0)) ->options : Symbol(A.options, Decl(a.js, 25, 28)) ++>options : Symbol(options, Decl(a.js, 25, 28)) >arguments : Symbol(arguments, Decl(a.js, 15, 7)) } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.types index 0aff6a399e..d4a1d0147f 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.types @@ -21,9 +21,9 @@ class A { */ this.foo = foo; >this.foo = foo : object ->this.foo : any +>this.foo : object >this : this ->foo : any +>foo : object >foo : object /** @@ -64,9 +64,9 @@ class A { */ this.options = arguments; >this.options = arguments : object ->this.options : any +>this.options : object >this : this ->options : any +>options : object >arguments : object } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.errors.txt deleted file mode 100644 index dfdc53ff76..0000000000 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.errors.txt +++ /dev/null @@ -1,30 +0,0 @@ -/a.js(13,8): error TS2339: Property 'foo' does not exist on type 'A'. -/a.js(18,8): error TS2339: Property 'bar' does not exist on type 'A'. - - -==== /a.js (2 errors) ==== - const bar = { - arguments: {} - } - - class A { - /** - * @param {object} [foo={}] - */ - m(foo = {}) { - /** - * @type object - */ - this.foo = foo; - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'A'. - - /** - * @type object - */ - this.bar = bar.arguments; - ~~~ -!!! error TS2339: Property 'bar' does not exist on type 'A'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.symbols index 4823b895f4..bd5fcee234 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.symbols @@ -22,14 +22,18 @@ class A { * @type object */ this.foo = foo; +>this.foo : Symbol(foo, Decl(a.js, 8, 14)) >this : Symbol(A, Decl(a.js, 2, 1)) +>foo : Symbol(foo, Decl(a.js, 8, 14)) >foo : Symbol(foo, Decl(a.js, 8, 3)) /** * @type object */ this.bar = bar.arguments; +>this.bar : Symbol(bar, Decl(a.js, 12, 17)) >this : Symbol(A, Decl(a.js, 2, 1)) +>bar : Symbol(bar, Decl(a.js, 12, 17)) >bar.arguments : Symbol(arguments, Decl(a.js, 0, 13)) >bar : Symbol(bar, Decl(a.js, 0, 5)) >arguments : Symbol(arguments, Decl(a.js, 0, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.symbols.diff index 9945efd893..13459fd1cb 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.symbols.diff @@ -13,8 +13,10 @@ */ this.foo = foo; ->this.foo : Symbol(A.foo, Decl(a.js, 8, 14)) ++>this.foo : Symbol(foo, Decl(a.js, 8, 14)) >this : Symbol(A, Decl(a.js, 2, 1)) ->foo : Symbol(A.foo, Decl(a.js, 8, 14)) ++>foo : Symbol(foo, Decl(a.js, 8, 14)) >foo : Symbol(foo, Decl(a.js, 8, 3)) /** @@ -22,8 +24,10 @@ */ this.bar = bar.arguments; ->this.bar : Symbol(A.bar, Decl(a.js, 12, 17)) ++>this.bar : Symbol(bar, Decl(a.js, 12, 17)) >this : Symbol(A, Decl(a.js, 2, 1)) ->bar : Symbol(A.bar, Decl(a.js, 12, 17)) ++>bar : Symbol(bar, Decl(a.js, 12, 17)) >bar.arguments : Symbol(arguments, Decl(a.js, 0, 13)) >bar : Symbol(bar, Decl(a.js, 0, 5)) >arguments : Symbol(arguments, Decl(a.js, 0, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.types index 98385d5311..52dfe258aa 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.types @@ -26,9 +26,9 @@ class A { */ this.foo = foo; >this.foo = foo : object ->this.foo : any +>this.foo : object >this : this ->foo : any +>foo : object >foo : object /** @@ -36,9 +36,9 @@ class A { */ this.bar = bar.arguments; >this.bar = bar.arguments : {} ->this.bar : any +>this.bar : {} >this : this ->bar : any +>bar : {} >bar.arguments : {} >bar : { arguments: {}; } >arguments : {} diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.errors.txt deleted file mode 100644 index e210d448b5..0000000000 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -/a.js(6,8): error TS2339: Property 'foo' does not exist on type 'A'. - - -==== /a.js (1 errors) ==== - class A { - m() { - /** - * @type object - */ - this.foo = arguments; - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'A'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.symbols index 36a5539ff4..3f77f99d24 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.symbols @@ -11,7 +11,9 @@ class A { * @type object */ this.foo = arguments; +>this.foo : Symbol(foo, Decl(a.js, 1, 6)) >this : Symbol(A, Decl(a.js, 0, 0)) +>foo : Symbol(foo, Decl(a.js, 1, 6)) >arguments : Symbol(arguments) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.symbols.diff index ea8294ab42..debc3fd69b 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.symbols.diff @@ -12,8 +12,10 @@ */ this.foo = arguments; ->this.foo : Symbol(A.foo, Decl(a.js, 1, 6)) ++>this.foo : Symbol(foo, Decl(a.js, 1, 6)) >this : Symbol(A, Decl(a.js, 0, 0)) ->foo : Symbol(A.foo, Decl(a.js, 1, 6)) ++>foo : Symbol(foo, Decl(a.js, 1, 6)) >arguments : Symbol(arguments) } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.types index 657ff5f04f..ac9153d9ac 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.types @@ -12,9 +12,9 @@ class A { */ this.foo = arguments; >this.foo = arguments : IArguments ->this.foo : any +>this.foo : IArguments >this : this ->foo : any +>foo : IArguments >arguments : IArguments } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.errors.txt deleted file mode 100644 index eafabede66..0000000000 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -/a.js(6,8): error TS2339: Property 'callee' does not exist on type 'A'. - - -==== /a.js (1 errors) ==== - class A { - m() { - /** - * @type Function - */ - this.callee = arguments.callee; - ~~~~~~ -!!! error TS2339: Property 'callee' does not exist on type 'A'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.symbols b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.symbols index 582af763dc..348def231f 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.symbols +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.symbols @@ -11,7 +11,9 @@ class A { * @type Function */ this.callee = arguments.callee; +>this.callee : Symbol(callee, Decl(a.js, 1, 6)) >this : Symbol(A, Decl(a.js, 0, 0)) +>callee : Symbol(callee, Decl(a.js, 1, 6)) >arguments.callee : Symbol(callee, Decl(lib.es5.d.ts, --, --)) >arguments : Symbol(arguments) >callee : Symbol(callee, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.symbols.diff index 2eb50b7c29..4573aaf73a 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.symbols.diff @@ -12,9 +12,11 @@ */ this.callee = arguments.callee; ->this.callee : Symbol(A.callee, Decl(a.js, 1, 6)) ++>this.callee : Symbol(callee, Decl(a.js, 1, 6)) >this : Symbol(A, Decl(a.js, 0, 0)) ->callee : Symbol(A.callee, Decl(a.js, 1, 6)) ->arguments.callee : Symbol(IArguments.callee, Decl(lib.es5.d.ts, --, --)) ++>callee : Symbol(callee, Decl(a.js, 1, 6)) +>arguments.callee : Symbol(callee, Decl(lib.es5.d.ts, --, --)) >arguments : Symbol(arguments) ->callee : Symbol(IArguments.callee, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.types index 2b9cb505da..afae4e22ad 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.types @@ -12,9 +12,9 @@ class A { */ this.callee = arguments.callee; >this.callee = arguments.callee : Function ->this.callee : any +>this.callee : Function >this : this ->callee : any +>callee : Function >arguments.callee : Function >arguments : IArguments >callee : Function diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt b/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt index 929046f1f9..6861a76432 100644 --- a/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt @@ -1,30 +1,20 @@ -autoLift2.ts(5,14): error TS2339: Property 'foo' does not exist on type 'A'. autoLift2.ts(5,17): error TS1005: ';' expected. autoLift2.ts(5,19): error TS2693: 'any' only refers to a type, but is being used as a value here. -autoLift2.ts(6,14): error TS2339: Property 'bar' does not exist on type 'A'. autoLift2.ts(6,17): error TS1005: ';' expected. autoLift2.ts(6,19): error TS2693: 'any' only refers to a type, but is being used as a value here. -autoLift2.ts(12,11): error TS2339: Property 'foo' does not exist on type 'A'. -autoLift2.ts(14,11): error TS2339: Property 'bar' does not exist on type 'A'. -autoLift2.ts(16,33): error TS2339: Property 'foo' does not exist on type 'A'. -autoLift2.ts(18,33): error TS2339: Property 'bar' does not exist on type 'A'. -==== autoLift2.ts (10 errors) ==== +==== autoLift2.ts (4 errors) ==== class A { constructor() { this.foo: any; - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'A'. ~ !!! error TS1005: ';' expected. ~~~ !!! error TS2693: 'any' only refers to a type, but is being used as a value here. this.bar: any; - ~~~ -!!! error TS2339: Property 'bar' does not exist on type 'A'. ~ !!! error TS1005: ';' expected. ~~~ @@ -35,20 +25,12 @@ autoLift2.ts(18,33): error TS2339: Property 'bar' does not exist on type 'A'. baz() { this.foo = "foo"; - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'A'. this.bar = "bar"; - ~~~ -!!! error TS2339: Property 'bar' does not exist on type 'A'. [1, 2].forEach((p) => this.foo); - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'A'. [1, 2].forEach((p) => this.bar); - ~~~ -!!! error TS2339: Property 'bar' does not exist on type 'A'. } diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt.diff new file mode 100644 index 0000000000..c0937b24ee --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt.diff @@ -0,0 +1,55 @@ +--- old.autoLift2.errors.txt ++++ new.autoLift2.errors.txt +@@= skipped -0, +0 lines =@@ +-autoLift2.ts(5,14): error TS2339: Property 'foo' does not exist on type 'A'. + autoLift2.ts(5,17): error TS1005: ';' expected. + autoLift2.ts(5,19): error TS2693: 'any' only refers to a type, but is being used as a value here. +-autoLift2.ts(6,14): error TS2339: Property 'bar' does not exist on type 'A'. + autoLift2.ts(6,17): error TS1005: ';' expected. + autoLift2.ts(6,19): error TS2693: 'any' only refers to a type, but is being used as a value here. +-autoLift2.ts(12,11): error TS2339: Property 'foo' does not exist on type 'A'. +-autoLift2.ts(14,11): error TS2339: Property 'bar' does not exist on type 'A'. +-autoLift2.ts(16,33): error TS2339: Property 'foo' does not exist on type 'A'. +-autoLift2.ts(18,33): error TS2339: Property 'bar' does not exist on type 'A'. + + +-==== autoLift2.ts (10 errors) ==== ++==== autoLift2.ts (4 errors) ==== + class A + + { + constructor() { + this.foo: any; +- ~~~ +-!!! error TS2339: Property 'foo' does not exist on type 'A'. + ~ + !!! error TS1005: ';' expected. + ~~~ + !!! error TS2693: 'any' only refers to a type, but is being used as a value here. + this.bar: any; +- ~~~ +-!!! error TS2339: Property 'bar' does not exist on type 'A'. + ~ + !!! error TS1005: ';' expected. + ~~~ +@@= skipped -34, +24 lines =@@ + baz() { + + this.foo = "foo"; +- ~~~ +-!!! error TS2339: Property 'foo' does not exist on type 'A'. + + this.bar = "bar"; +- ~~~ +-!!! error TS2339: Property 'bar' does not exist on type 'A'. + + [1, 2].forEach((p) => this.foo); +- ~~~ +-!!! error TS2339: Property 'foo' does not exist on type 'A'. + + [1, 2].forEach((p) => this.bar); +- ~~~ +-!!! error TS2339: Property 'bar' does not exist on type 'A'. + + } + diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.symbols b/testdata/baselines/reference/submodule/compiler/autoLift2.symbols index 8c317b40df..01d4c419bc 100644 --- a/testdata/baselines/reference/submodule/compiler/autoLift2.symbols +++ b/testdata/baselines/reference/submodule/compiler/autoLift2.symbols @@ -7,10 +7,14 @@ class A { constructor() { this.foo: any; +>this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) +>foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) this.bar: any; +>this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) +>bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) } @@ -18,22 +22,30 @@ class A >baz : Symbol(baz, Decl(autoLift2.ts, 6, 5)) this.foo = "foo"; +>this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) +>foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) this.bar = "bar"; +>this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) +>bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) [1, 2].forEach((p) => this.foo); >[1, 2].forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(autoLift2.ts, 15, 21)) +>this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) +>foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) [1, 2].forEach((p) => this.bar); >[1, 2].forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(autoLift2.ts, 17, 21)) +>this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) +>bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) } diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.symbols.diff b/testdata/baselines/reference/submodule/compiler/autoLift2.symbols.diff index b4f3d58938..30f82a59b7 100644 --- a/testdata/baselines/reference/submodule/compiler/autoLift2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/autoLift2.symbols.diff @@ -1,6 +1,18 @@ --- old.autoLift2.symbols +++ new.autoLift2.symbols -@@= skipped -14, +14 lines =@@ +@@= skipped -6, +6 lines =@@ + { + constructor() { + this.foo: any; ++>this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) + >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) ++>foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) + + this.bar: any; ++>this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) + >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) ++>bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) + } baz() { @@ -8,9 +20,14 @@ +>baz : Symbol(baz, Decl(autoLift2.ts, 6, 5)) this.foo = "foo"; ++>this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) -@@= skipped -9, +9 lines =@@ ++>foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) + + this.bar = "bar"; ++>this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) ++>bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) [1, 2].forEach((p) => this.foo); ->[1, 2].forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) @@ -18,7 +35,9 @@ +>[1, 2].forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(autoLift2.ts, 15, 21)) ++>this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) ++>foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) [1, 2].forEach((p) => this.bar); ->[1, 2].forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) @@ -26,9 +45,13 @@ +>[1, 2].forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(autoLift2.ts, 17, 21)) ++>this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) ++>bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) + + } -@@= skipped -22, +22 lines =@@ +@@= skipped -39, +51 lines =@@ >A : Symbol(A, Decl(autoLift2.ts, 0, 0)) a.baz(); diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.types b/testdata/baselines/reference/submodule/compiler/autoLift2.types index c27de71fcb..16ef2ac4a3 100644 --- a/testdata/baselines/reference/submodule/compiler/autoLift2.types +++ b/testdata/baselines/reference/submodule/compiler/autoLift2.types @@ -7,15 +7,15 @@ class A { constructor() { this.foo: any; ->this.foo : any +>this.foo : string >this : this ->foo : any +>foo : string >any : any this.bar: any; ->this.bar : any +>this.bar : string >this : this ->bar : any +>bar : string >any : any } @@ -25,16 +25,16 @@ class A this.foo = "foo"; >this.foo = "foo" : "foo" ->this.foo : any +>this.foo : string >this : this ->foo : any +>foo : string >"foo" : "foo" this.bar = "bar"; >this.bar = "bar" : "bar" ->this.bar : any +>this.bar : string >this : this ->bar : any +>bar : string >"bar" : "bar" [1, 2].forEach((p) => this.foo); @@ -44,11 +44,11 @@ class A >1 : 1 >2 : 2 >forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void ->(p) => this.foo : (p: number) => any +>(p) => this.foo : (p: number) => string >p : number ->this.foo : any +>this.foo : string >this : this ->foo : any +>foo : string [1, 2].forEach((p) => this.bar); >[1, 2].forEach((p) => this.bar) : void @@ -57,11 +57,11 @@ class A >1 : 1 >2 : 2 >forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void ->(p) => this.bar : (p: number) => any +>(p) => this.bar : (p: number) => string >p : number ->this.bar : any +>this.bar : string >this : this ->bar : any +>bar : string } diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.types.diff b/testdata/baselines/reference/submodule/compiler/autoLift2.types.diff new file mode 100644 index 0000000000..02cd9b545e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/autoLift2.types.diff @@ -0,0 +1,73 @@ +--- old.autoLift2.types ++++ new.autoLift2.types +@@= skipped -6, +6 lines =@@ + { + constructor() { + this.foo: any; +->this.foo : any ++>this.foo : string + >this : this +->foo : any ++>foo : string + >any : any + + this.bar: any; +->this.bar : any ++>this.bar : string + >this : this +->bar : any ++>bar : string + >any : any + } + +@@= skipped -18, +18 lines =@@ + + this.foo = "foo"; + >this.foo = "foo" : "foo" +->this.foo : any ++>this.foo : string + >this : this +->foo : any ++>foo : string + >"foo" : "foo" + + this.bar = "bar"; + >this.bar = "bar" : "bar" +->this.bar : any ++>this.bar : string + >this : this +->bar : any ++>bar : string + >"bar" : "bar" + + [1, 2].forEach((p) => this.foo); +@@= skipped -19, +19 lines =@@ + >1 : 1 + >2 : 2 + >forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +->(p) => this.foo : (p: number) => any ++>(p) => this.foo : (p: number) => string + >p : number +->this.foo : any ++>this.foo : string + >this : this +->foo : any ++>foo : string + + [1, 2].forEach((p) => this.bar); + >[1, 2].forEach((p) => this.bar) : void +@@= skipped -13, +13 lines =@@ + >1 : 1 + >2 : 2 + >forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +->(p) => this.bar : (p: number) => any ++>(p) => this.bar : (p: number) => string + >p : number +->this.bar : any ++>this.bar : string + >this : this +->bar : any ++>bar : string + + } + diff --git a/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.symbols b/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.symbols index 25bb5fae95..1976ed4cd9 100644 --- a/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.symbols +++ b/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.symbols @@ -15,7 +15,9 @@ someFunction(function(BaseClass) { constructor() { super(); this.foo = "bar"; +>this.foo : Symbol(foo, Decl(weird.js, 5, 20)) >this : Symbol(Hello, Decl(weird.js, 2, 35)) +>foo : Symbol(foo, Decl(weird.js, 5, 20)) } _render(error) { >_render : Symbol(_render, Decl(weird.js, 7, 9)) diff --git a/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.symbols.diff b/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.symbols.diff index 20a9e196bf..2d4f6ce8de 100644 --- a/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.symbols.diff @@ -5,8 +5,10 @@ super(); this.foo = "bar"; ->this.foo : Symbol(Hello.foo, Decl(weird.js, 5, 20)) ++>this.foo : Symbol(foo, Decl(weird.js, 5, 20)) >this : Symbol(Hello, Decl(weird.js, 2, 35)) ->foo : Symbol(Hello.foo, Decl(weird.js, 5, 20)) ++>foo : Symbol(foo, Decl(weird.js, 5, 20)) } _render(error) { ->_render : Symbol(Hello._render, Decl(weird.js, 7, 9)) diff --git a/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.types b/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.types index 7f98768cc3..e96d388900 100644 --- a/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.types +++ b/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.types @@ -25,9 +25,9 @@ someFunction(function(BaseClass) { this.foo = "bar"; >this.foo = "bar" : "bar" ->this.foo : any +>this.foo : string >this : this ->foo : any +>foo : string >"bar" : "bar" } _render(error) { diff --git a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.errors.txt b/testdata/baselines/reference/submodule/compiler/checkJsFiles7.errors.txt index 755057b544..a616ed7e39 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/checkJsFiles7.errors.txt @@ -1,19 +1,13 @@ -a.js(4,8): error TS2339: Property 'a' does not exist on type 'C'. -a.js(5,8): error TS2339: Property 'a' does not exist on type 'C'. -a.js(5,19): error TS2339: Property 'a' does not exist on type 'C'. +a.js(4,3): error TS7022: 'a' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -==== a.js (3 errors) ==== +==== a.js (1 errors) ==== class C { constructor() { /** @type {boolean} */ this.a = true; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C'. + ~~~~~~~~~~~~~ +!!! error TS7022: 'a' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. this.a = !!this.a; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C'. - ~ -!!! error TS2339: Property 'a' does not exist on type 'C'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.symbols b/testdata/baselines/reference/submodule/compiler/checkJsFiles7.symbols index e71d934583..e4a8c4e653 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.symbols +++ b/testdata/baselines/reference/submodule/compiler/checkJsFiles7.symbols @@ -7,10 +7,16 @@ class C { constructor() { /** @type {boolean} */ this.a = true; +>this.a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) >this : Symbol(C, Decl(a.js, 0, 0)) +>a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) this.a = !!this.a; +>this.a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) >this : Symbol(C, Decl(a.js, 0, 0)) +>a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) +>this.a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) >this : Symbol(C, Decl(a.js, 0, 0)) +>a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) } } diff --git a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.symbols.diff b/testdata/baselines/reference/submodule/compiler/checkJsFiles7.symbols.diff index bc2b9302ce..9513e11d24 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/checkJsFiles7.symbols.diff @@ -5,15 +5,21 @@ /** @type {boolean} */ this.a = true; ->this.a : Symbol(C.a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) ++>this.a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) >this : Symbol(C, Decl(a.js, 0, 0)) ->a : Symbol(C.a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) ++>a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) this.a = !!this.a; ->this.a : Symbol(C.a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) ++>this.a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) >this : Symbol(C, Decl(a.js, 0, 0)) ->a : Symbol(C.a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) ->this.a : Symbol(C.a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) ++>a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) ++>this.a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) >this : Symbol(C, Decl(a.js, 0, 0)) ->a : Symbol(C.a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) ++>a : Symbol(a, Decl(a.js, 1, 16), Decl(a.js, 3, 16)) } } diff --git a/testdata/baselines/reference/submodule/compiler/checkJsFiles_noErrorLocation.symbols b/testdata/baselines/reference/submodule/compiler/checkJsFiles_noErrorLocation.symbols index 84ae6d00c2..64bba334a1 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsFiles_noErrorLocation.symbols +++ b/testdata/baselines/reference/submodule/compiler/checkJsFiles_noErrorLocation.symbols @@ -24,9 +24,9 @@ class B extends A { >super : Symbol(A, Decl(a.js, 0, 0)) this.foo = () => 3; ->this.foo : Symbol(foo, Decl(a.js, 4, 3)) +>this.foo : Symbol(foo, Decl(a.js, 12, 12)) >this : Symbol(B, Decl(a.js, 8, 1)) ->foo : Symbol(foo, Decl(a.js, 4, 3)) +>foo : Symbol(foo, Decl(a.js, 12, 12)) } } @@ -35,7 +35,7 @@ const i = new B(); >B : Symbol(B, Decl(a.js, 8, 1)) i.foo(); ->i.foo : Symbol(foo, Decl(a.js, 4, 3)) +>i.foo : Symbol(foo, Decl(a.js, 12, 12)) >i : Symbol(i, Decl(a.js, 17, 5)) ->foo : Symbol(foo, Decl(a.js, 4, 3)) +>foo : Symbol(foo, Decl(a.js, 12, 12)) diff --git a/testdata/baselines/reference/submodule/compiler/checkJsFiles_noErrorLocation.symbols.diff b/testdata/baselines/reference/submodule/compiler/checkJsFiles_noErrorLocation.symbols.diff index 74c6825cad..9c10ded2a1 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsFiles_noErrorLocation.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/checkJsFiles_noErrorLocation.symbols.diff @@ -14,10 +14,10 @@ this.foo = () => 3; ->this.foo : Symbol(B.foo, Decl(a.js, 12, 12)) -+>this.foo : Symbol(foo, Decl(a.js, 4, 3)) ++>this.foo : Symbol(foo, Decl(a.js, 12, 12)) >this : Symbol(B, Decl(a.js, 8, 1)) ->foo : Symbol(B.foo, Decl(a.js, 12, 12)) -+>foo : Symbol(foo, Decl(a.js, 4, 3)) ++>foo : Symbol(foo, Decl(a.js, 12, 12)) } } @@ -26,8 +26,8 @@ i.foo(); ->i.foo : Symbol(B.foo, Decl(a.js, 12, 12)) -+>i.foo : Symbol(foo, Decl(a.js, 4, 3)) ++>i.foo : Symbol(foo, Decl(a.js, 12, 12)) >i : Symbol(i, Decl(a.js, 17, 5)) ->foo : Symbol(B.foo, Decl(a.js, 12, 12)) -+>foo : Symbol(foo, Decl(a.js, 4, 3)) ++>foo : Symbol(foo, Decl(a.js, 12, 12)) diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.errors.txt b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.errors.txt index 2b935da1b2..60e165bd67 100644 --- a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.errors.txt @@ -1,16 +1,13 @@ -noSuperInJSDocExtends.js(6,14): error TS2339: Property 'x' does not exist on type 'Derived'. noSuperInJSDocExtends.js(14,9): error TS2335: 'super' can only be referenced in a derived class. -==== noSuperInJSDocExtends.js (2 errors) ==== +==== noSuperInJSDocExtends.js (1 errors) ==== class Based { } /** @extends {Based} */ class Derived { constructor() { this; this.x = 10; - ~ -!!! error TS2339: Property 'x' does not exist on type 'Derived'. var that = this; } } diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.symbols b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.symbols index 415c6c65a5..e3fe4e67dc 100644 --- a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.symbols +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.symbols @@ -13,7 +13,9 @@ class Derived { >this : Symbol(Derived, Decl(noSuperInJSDocExtends.js, 0, 15)) this.x = 10; +>this.x : Symbol(x, Decl(noSuperInJSDocExtends.js, 4, 13)) >this : Symbol(Derived, Decl(noSuperInJSDocExtends.js, 0, 15)) +>x : Symbol(x, Decl(noSuperInJSDocExtends.js, 4, 13)) var that = this; >that : Symbol(that, Decl(noSuperInJSDocExtends.js, 6, 11)) diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.symbols.diff b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.symbols.diff index 159b198b5b..7e32adf812 100644 --- a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.symbols.diff @@ -5,8 +5,10 @@ this.x = 10; ->this.x : Symbol(Derived.x, Decl(noSuperInJSDocExtends.js, 4, 13)) ++>this.x : Symbol(x, Decl(noSuperInJSDocExtends.js, 4, 13)) >this : Symbol(Derived, Decl(noSuperInJSDocExtends.js, 0, 15)) ->x : Symbol(Derived.x, Decl(noSuperInJSDocExtends.js, 4, 13)) ++>x : Symbol(x, Decl(noSuperInJSDocExtends.js, 4, 13)) var that = this; >that : Symbol(that, Decl(noSuperInJSDocExtends.js, 6, 11)) diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.types b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.types index 537ac0f503..ffb39d8b65 100644 --- a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.types +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing9.types @@ -14,9 +14,9 @@ class Derived { this.x = 10; >this.x = 10 : 10 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >10 : 10 var that = this; diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingAny.symbols b/testdata/baselines/reference/submodule/compiler/classExtendingAny.symbols index 8fc7cc71bd..6d575ef72a 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendingAny.symbols +++ b/testdata/baselines/reference/submodule/compiler/classExtendingAny.symbols @@ -43,13 +43,17 @@ class B extends Err { constructor() { super() this.wat = 12 +>this.wat : Symbol(wat, Decl(b.js, 2, 15)) >this : Symbol(B, Decl(b.js, 0, 0)) +>wat : Symbol(wat, Decl(b.js, 2, 15)) } f() { >f : Symbol(f, Decl(b.js, 4, 5)) this.wat +>this.wat : Symbol(wat, Decl(b.js, 2, 15)) >this : Symbol(B, Decl(b.js, 0, 0)) +>wat : Symbol(wat, Decl(b.js, 2, 15)) this.wit >this : Symbol(B, Decl(b.js, 0, 0)) diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingAny.symbols.diff b/testdata/baselines/reference/submodule/compiler/classExtendingAny.symbols.diff index 40363e773e..3115c309fd 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendingAny.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/classExtendingAny.symbols.diff @@ -30,8 +30,10 @@ super() this.wat = 12 ->this.wat : Symbol(B.wat, Decl(b.js, 2, 15)) ++>this.wat : Symbol(wat, Decl(b.js, 2, 15)) >this : Symbol(B, Decl(b.js, 0, 0)) ->wat : Symbol(B.wat, Decl(b.js, 2, 15)) ++>wat : Symbol(wat, Decl(b.js, 2, 15)) } f() { ->f : Symbol(B.f, Decl(b.js, 4, 5)) @@ -39,8 +41,10 @@ this.wat ->this.wat : Symbol(B.wat, Decl(b.js, 2, 15)) ++>this.wat : Symbol(wat, Decl(b.js, 2, 15)) >this : Symbol(B, Decl(b.js, 0, 0)) ->wat : Symbol(B.wat, Decl(b.js, 2, 15)) ++>wat : Symbol(wat, Decl(b.js, 2, 15)) this.wit >this : Symbol(B, Decl(b.js, 0, 0)) diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingAny.types b/testdata/baselines/reference/submodule/compiler/classExtendingAny.types index 0af748dfa5..3baf140094 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendingAny.types +++ b/testdata/baselines/reference/submodule/compiler/classExtendingAny.types @@ -69,18 +69,18 @@ class B extends Err { this.wat = 12 >this.wat = 12 : 12 ->this.wat : any +>this.wat : number >this : this ->wat : any +>wat : number >12 : 12 } f() { >f : () => void this.wat ->this.wat : any +>this.wat : number >this : this ->wat : any +>wat : number this.wit >this.wit : any diff --git a/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.errors.txt b/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.errors.txt index f6f76a6597..912485f742 100644 --- a/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.errors.txt @@ -1,22 +1,16 @@ -index.js(5,14): error TS2339: Property 'roots' does not exist on type 'YaddaBase'. index.js(7,14): error TS2339: Property 'justProp' does not exist on type 'YaddaBase'. index.js(9,9): error TS7053: Element implicitly has an 'any' type because expression of type '"literalElementAccess"' can't be used to index type 'YaddaBase'. Property 'literalElementAccess' does not exist on type 'YaddaBase'. -index.js(14,14): error TS2339: Property 'foo' does not exist on type 'YaddaBase'. -index.js(20,22): error TS2339: Property 'roots' does not exist on type 'YaddaBase'. -index.js(23,22): error TS2339: Property 'foo' does not exist on type 'YaddaBase'. index.js(26,22): error TS2339: Property 'justProp' does not exist on type 'YaddaBase'. index.js(29,22): error TS2339: Property 'literalElementAccess' does not exist on type 'YaddaBase'. -==== index.js (8 errors) ==== +==== index.js (4 errors) ==== // https://github.com/microsoft/TypeScript/issues/55884 class YaddaBase { constructor() { this.roots = "hi"; - ~~~~~ -!!! error TS2339: Property 'roots' does not exist on type 'YaddaBase'. /** @type number */ this.justProp; ~~~~~~~~ @@ -31,21 +25,15 @@ index.js(29,22): error TS2339: Property 'literalElementAccess' does not exist on } accessor b = () => { this.foo = 10 - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'YaddaBase'. } } class DerivedYadda extends YaddaBase { get rootTests() { return super.roots; - ~~~~~ -!!! error TS2339: Property 'roots' does not exist on type 'YaddaBase'. } get fooTests() { return super.foo; - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'YaddaBase'. } get justPropTests() { return super.justProp; diff --git a/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.symbols b/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.symbols index 46f169c456..65edc89a44 100644 --- a/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.symbols +++ b/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.symbols @@ -8,7 +8,9 @@ class YaddaBase { constructor() { this.roots = "hi"; +>this.roots : Symbol(roots, Decl(index.js, 3, 19)) >this : Symbol(YaddaBase, Decl(index.js, 0, 0)) +>roots : Symbol(roots, Decl(index.js, 3, 19)) /** @type number */ this.justProp; @@ -27,7 +29,9 @@ class YaddaBase { >b : Symbol(b, Decl(index.js, 11, 5)) this.foo = 10 +>this.foo : Symbol(foo, Decl(index.js, 12, 24)) >this : Symbol(YaddaBase, Decl(index.js, 0, 0)) +>foo : Symbol(foo, Decl(index.js, 12, 24)) } } @@ -39,13 +43,17 @@ class DerivedYadda extends YaddaBase { >rootTests : Symbol(rootTests, Decl(index.js, 17, 38)) return super.roots; +>super.roots : Symbol(roots, Decl(index.js, 3, 19)) >super : Symbol(YaddaBase, Decl(index.js, 0, 0)) +>roots : Symbol(roots, Decl(index.js, 3, 19)) } get fooTests() { >fooTests : Symbol(fooTests, Decl(index.js, 20, 5)) return super.foo; +>super.foo : Symbol(foo, Decl(index.js, 12, 24)) >super : Symbol(YaddaBase, Decl(index.js, 0, 0)) +>foo : Symbol(foo, Decl(index.js, 12, 24)) } get justPropTests() { >justPropTests : Symbol(justPropTests, Decl(index.js, 23, 5)) diff --git a/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.symbols.diff b/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.symbols.diff index 90f307cb65..ce7ec2cbab 100644 --- a/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.symbols.diff @@ -5,8 +5,10 @@ constructor() { this.roots = "hi"; ->this.roots : Symbol(YaddaBase.roots, Decl(index.js, 3, 19)) ++>this.roots : Symbol(roots, Decl(index.js, 3, 19)) >this : Symbol(YaddaBase, Decl(index.js, 0, 0)) ->roots : Symbol(YaddaBase.roots, Decl(index.js, 3, 19)) ++>roots : Symbol(roots, Decl(index.js, 3, 19)) /** @type number */ this.justProp; @@ -32,12 +34,14 @@ this.foo = 10 ->this.foo : Symbol(YaddaBase.foo, Decl(index.js, 12, 24)) ++>this.foo : Symbol(foo, Decl(index.js, 12, 24)) >this : Symbol(YaddaBase, Decl(index.js, 0, 0)) ->foo : Symbol(YaddaBase.foo, Decl(index.js, 12, 24)) ++>foo : Symbol(foo, Decl(index.js, 12, 24)) } } -@@= skipped -35, +28 lines =@@ +@@= skipped -35, +32 lines =@@ >YaddaBase : Symbol(YaddaBase, Decl(index.js, 0, 0)) get rootTests() { @@ -46,8 +50,10 @@ return super.roots; ->super.roots : Symbol(YaddaBase.roots, Decl(index.js, 3, 19)) ++>super.roots : Symbol(roots, Decl(index.js, 3, 19)) >super : Symbol(YaddaBase, Decl(index.js, 0, 0)) ->roots : Symbol(YaddaBase.roots, Decl(index.js, 3, 19)) ++>roots : Symbol(roots, Decl(index.js, 3, 19)) } get fooTests() { ->fooTests : Symbol(DerivedYadda.fooTests, Decl(index.js, 20, 5)) @@ -55,8 +61,10 @@ return super.foo; ->super.foo : Symbol(YaddaBase.foo, Decl(index.js, 12, 24)) ++>super.foo : Symbol(foo, Decl(index.js, 12, 24)) >super : Symbol(YaddaBase, Decl(index.js, 0, 0)) ->foo : Symbol(YaddaBase.foo, Decl(index.js, 12, 24)) ++>foo : Symbol(foo, Decl(index.js, 12, 24)) } get justPropTests() { ->justPropTests : Symbol(DerivedYadda.justPropTests, Decl(index.js, 23, 5)) diff --git a/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.types b/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.types index 32fe920fc6..6c05bcb8a5 100644 --- a/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.types +++ b/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.types @@ -9,9 +9,9 @@ class YaddaBase { constructor() { this.roots = "hi"; >this.roots = "hi" : "hi" ->this.roots : any +>this.roots : string >this : this ->roots : any +>roots : string >"hi" : "hi" /** @type number */ @@ -38,9 +38,9 @@ class YaddaBase { this.foo = 10 >this.foo = 10 : 10 ->this.foo : any +>this.foo : number >this : this ->foo : any +>foo : number >10 : 10 } } @@ -50,20 +50,20 @@ class DerivedYadda extends YaddaBase { >YaddaBase : YaddaBase get rootTests() { ->rootTests : any +>rootTests : string return super.roots; ->super.roots : any +>super.roots : string >super : YaddaBase ->roots : any +>roots : string } get fooTests() { ->fooTests : any +>fooTests : number return super.foo; ->super.foo : any +>super.foo : number >super : YaddaBase ->foo : any +>foo : number } get justPropTests() { >justPropTests : any diff --git a/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.errors.txt b/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.errors.txt new file mode 100644 index 0000000000..9b23f935a5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.errors.txt @@ -0,0 +1,31 @@ +classPropInitializationInferenceWithElementAccess.ts(3,5): 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. +classPropInitializationInferenceWithElementAccess.ts(4,5): error TS7022: 'y' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. +classPropInitializationInferenceWithElementAccess.ts(5,5): error TS7022: 'z' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. +classPropInitializationInferenceWithElementAccess.ts(7,5): error TS7022: '0' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. + + +==== classPropInitializationInferenceWithElementAccess.ts (4 errors) ==== + // repro #49339 + export class Cls { + 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. + y; + ~ +!!! error TS7022: 'y' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. + z; + ~ +!!! error TS7022: 'z' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. + + 0; + ~ +!!! error TS7022: '0' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. + + constructor(seed: number) { + this['x'] = [seed]; + this['y'] = { seed }; + this['z'] = `${seed}`; + + this[0] = [seed]; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.errors.txt.diff new file mode 100644 index 0000000000..9e54d827d4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.errors.txt.diff @@ -0,0 +1,36 @@ +--- old.classPropInitializationInferenceWithElementAccess.errors.txt ++++ new.classPropInitializationInferenceWithElementAccess.errors.txt +@@= skipped -0, +-1 lines =@@ +- +@@= skipped --1, +1 lines =@@ ++classPropInitializationInferenceWithElementAccess.ts(3,5): 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. ++classPropInitializationInferenceWithElementAccess.ts(4,5): error TS7022: 'y' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. ++classPropInitializationInferenceWithElementAccess.ts(5,5): error TS7022: 'z' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. ++classPropInitializationInferenceWithElementAccess.ts(7,5): error TS7022: '0' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. ++ ++ ++==== classPropInitializationInferenceWithElementAccess.ts (4 errors) ==== ++ // repro #49339 ++ export class Cls { ++ 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. ++ y; ++ ~ ++!!! error TS7022: 'y' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. ++ z; ++ ~ ++!!! error TS7022: 'z' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. ++ ++ 0; ++ ~ ++!!! error TS7022: '0' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. ++ ++ constructor(seed: number) { ++ this['x'] = [seed]; ++ this['y'] = { seed }; ++ this['z'] = `${seed}`; ++ ++ this[0] = [seed]; ++ } ++ } diff --git a/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.types b/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.types index 47752a9793..a8d6e9d8ae 100644 --- a/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.types +++ b/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.types @@ -6,23 +6,23 @@ export class Cls { >Cls : Cls x; ->x : number[] +>x : any y; ->y : { seed: number; } +>y : any z; ->z : string +>z : any 0; ->0 : number[] +>0 : any constructor(seed: number) { >seed : number this['x'] = [seed]; >this['x'] = [seed] : number[] ->this['x'] : number[] +>this['x'] : any >this : this >'x' : "x" >[seed] : number[] @@ -30,7 +30,7 @@ export class Cls { this['y'] = { seed }; >this['y'] = { seed } : { seed: number; } ->this['y'] : { seed: number; } +>this['y'] : any >this : this >'y' : "y" >{ seed } : { seed: number; } @@ -38,7 +38,7 @@ export class Cls { this['z'] = `${seed}`; >this['z'] = `${seed}` : string ->this['z'] : string +>this['z'] : any >this : this >'z' : "z" >`${seed}` : string @@ -46,7 +46,7 @@ export class Cls { this[0] = [seed]; >this[0] = [seed] : number[] ->this[0] : number[] +>this[0] : any >this : this >0 : 0 >[seed] : number[] diff --git a/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.types.diff b/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.types.diff new file mode 100644 index 0000000000..050a318f34 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classPropInitializationInferenceWithElementAccess.types.diff @@ -0,0 +1,58 @@ +--- old.classPropInitializationInferenceWithElementAccess.types ++++ new.classPropInitializationInferenceWithElementAccess.types +@@= skipped -5, +5 lines =@@ + >Cls : Cls + + x; +->x : number[] ++>x : any + + y; +->y : { seed: number; } ++>y : any + + z; +->z : string ++>z : any + + 0; +->0 : number[] ++>0 : any + + constructor(seed: number) { + >seed : number + + this['x'] = [seed]; + >this['x'] = [seed] : number[] +->this['x'] : number[] ++>this['x'] : any + >this : this + >'x' : "x" + >[seed] : number[] +@@= skipped -24, +24 lines =@@ + + this['y'] = { seed }; + >this['y'] = { seed } : { seed: number; } +->this['y'] : { seed: number; } ++>this['y'] : any + >this : this + >'y' : "y" + >{ seed } : { seed: number; } +@@= skipped -8, +8 lines =@@ + + this['z'] = `${seed}`; + >this['z'] = `${seed}` : string +->this['z'] : string ++>this['z'] : any + >this : this + >'z' : "z" + >`${seed}` : string +@@= skipped -8, +8 lines =@@ + + this[0] = [seed]; + >this[0] = [seed] : number[] +->this[0] : number[] ++>this[0] : any + >this : this + >0 : 0 + >[seed] : number[] diff --git a/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.symbols b/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.symbols index e53dec83aa..6d855a65dc 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.symbols +++ b/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.symbols @@ -12,9 +12,9 @@ class C { >a : Symbol(a, Decl(a.js, 4, 8)) this.constructor = a; ->this.constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) +>this.constructor : Symbol(constructor, Decl(a.js, 4, 12)) >this : Symbol(C, Decl(a.js, 0, 0)) ->constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) +>constructor : Symbol(constructor, Decl(a.js, 4, 12)) >a : Symbol(a, Decl(a.js, 4, 8)) } } diff --git a/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.symbols.diff b/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.symbols.diff index 6352eb028b..c256a5bb4f 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.symbols.diff @@ -10,10 +10,10 @@ this.constructor = a; ->this.constructor : Symbol(C.constructor, Decl(a.js, 4, 12)) -+>this.constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) ++>this.constructor : Symbol(constructor, Decl(a.js, 4, 12)) >this : Symbol(C, Decl(a.js, 0, 0)) ->constructor : Symbol(C.constructor, Decl(a.js, 4, 12)) -+>constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) ++>constructor : Symbol(constructor, Decl(a.js, 4, 12)) >a : Symbol(a, Decl(a.js, 4, 8)) } } diff --git a/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.types b/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.types index eba3e34f99..03fa2881a5 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.types +++ b/testdata/baselines/reference/submodule/compiler/constructorPropertyJs.types @@ -13,9 +13,9 @@ class C { this.constructor = a; >this.constructor = a : any ->this.constructor : Function +>this.constructor : any >this : this ->constructor : Function +>constructor : any >a : any } } diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt index ce074f663a..f231306080 100644 --- a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt @@ -4,15 +4,8 @@ divergentAccessorsVisibility1.ts(20,17): error TS2808: A get accessor must be at divergentAccessorsVisibility1.ts(21,9): error TS2808: A get accessor must be at least as accessible as the setter divergentAccessorsVisibility1.ts(23,17): error TS2808: A get accessor must be at least as accessible as the setter divergentAccessorsVisibility1.ts(24,19): error TS2808: A get accessor must be at least as accessible as the setter -divergentAccessorsVisibility1.ts(66,14): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(69,14): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(72,14): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(80,19): error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(81,19): error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(82,19): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(86,14): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(89,14): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(92,14): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(62,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. + Property 'PrivatePublic' is private in type 'Base' but not in type 'Derived'. divergentAccessorsVisibility1.ts(99,10): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. divergentAccessorsVisibility1.ts(100,10): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. divergentAccessorsVisibility1.ts(102,10): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. @@ -31,27 +24,9 @@ divergentAccessorsVisibility1.ts(122,10): error TS2445: Property 'ProtectedProte divergentAccessorsVisibility1.ts(123,10): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. divergentAccessorsVisibility1.ts(125,10): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. divergentAccessorsVisibility1.ts(126,10): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(129,11): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. -divergentAccessorsVisibility1.ts(130,11): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(132,11): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. -divergentAccessorsVisibility1.ts(133,11): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(135,11): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. -divergentAccessorsVisibility1.ts(136,11): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(141,16): error TS2445: Property 'ProtectedPublic' is protected and only accessible within class 'Base' and its subclasses. -divergentAccessorsVisibility1.ts(142,16): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. -divergentAccessorsVisibility1.ts(143,16): error TS2445: Property 'ProtectedPrivate' is protected and only accessible within class 'Base' and its subclasses. -divergentAccessorsVisibility1.ts(144,16): error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(145,16): error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(146,16): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(149,11): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. -divergentAccessorsVisibility1.ts(150,11): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(152,11): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. -divergentAccessorsVisibility1.ts(153,11): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. -divergentAccessorsVisibility1.ts(155,11): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. -divergentAccessorsVisibility1.ts(156,11): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. -==== divergentAccessorsVisibility1.ts (51 errors) ==== +==== divergentAccessorsVisibility1.ts (25 errors) ==== class Base { get PublicPublic() { return 0; } set PublicPublic(v) { return; } @@ -126,22 +101,19 @@ divergentAccessorsVisibility1.ts(156,11): error TS2341: Property 'PrivatePrivate } class Derived extends Base { + ~~~~~~~ +!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'PrivatePublic' is private in type 'Base' but not in type 'Derived'. test2() { this.PublicPublic = 0; this.PublicProtected = 0; this.PublicPrivate = 0; - ~~~~~~~~~~~~~ -!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. this.ProtectedPublic = 0; this.ProtectedProtected = 0; this.ProtectedPrivate = 0; - ~~~~~~~~~~~~~~~~ -!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. this.PrivatePublic = 0; this.PrivateProtected = 0; this.PrivatePrivate = 0; - ~~~~~~~~~~~~~~ -!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. void this.PublicPublic; void this.PublicProtected; @@ -150,30 +122,18 @@ divergentAccessorsVisibility1.ts(156,11): error TS2341: Property 'PrivatePrivate void this.ProtectedProtected; void this.ProtectedPrivate; void this.PrivatePublic; - ~~~~~~~~~~~~~ -!!! error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. void this.PrivateProtected; - ~~~~~~~~~~~~~~~~ -!!! error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. void this.PrivatePrivate; - ~~~~~~~~~~~~~~ -!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. this.PublicPublic += 0; this.PublicProtected += 0; this.PublicPrivate += 0; - ~~~~~~~~~~~~~ -!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. this.ProtectedPublic += 0; this.ProtectedProtected += 0; this.ProtectedPrivate += 0; - ~~~~~~~~~~~~~~~~ -!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. this.PrivatePublic += 0; this.PrivateProtected += 0; this.PrivatePrivate += 0; - ~~~~~~~~~~~~~~ -!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. } } @@ -247,68 +207,32 @@ divergentAccessorsVisibility1.ts(156,11): error TS2341: Property 'PrivatePrivate deriv.PublicPublic = 0; deriv.PublicProtected = 0; - ~~~~~~~~~~~~~~~ -!!! error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.PublicPrivate = 0; - ~~~~~~~~~~~~~ -!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. deriv.ProtectedPublic = 0; deriv.ProtectedProtected = 0; - ~~~~~~~~~~~~~~~~~~ -!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.ProtectedPrivate = 0; - ~~~~~~~~~~~~~~~~ -!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. deriv.PrivatePublic = 0; deriv.PrivateProtected = 0; - ~~~~~~~~~~~~~~~~ -!!! error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.PrivatePrivate = 0; - ~~~~~~~~~~~~~~ -!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. void deriv.PublicPublic; void deriv.PublicProtected; void deriv.PublicPrivate; void deriv.ProtectedPublic; - ~~~~~~~~~~~~~~~ -!!! error TS2445: Property 'ProtectedPublic' is protected and only accessible within class 'Base' and its subclasses. void deriv.ProtectedProtected; - ~~~~~~~~~~~~~~~~~~ -!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. void deriv.ProtectedPrivate; - ~~~~~~~~~~~~~~~~ -!!! error TS2445: Property 'ProtectedPrivate' is protected and only accessible within class 'Base' and its subclasses. void deriv.PrivatePublic; - ~~~~~~~~~~~~~ -!!! error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. void deriv.PrivateProtected; - ~~~~~~~~~~~~~~~~ -!!! error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. void deriv.PrivatePrivate; - ~~~~~~~~~~~~~~ -!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. deriv.PublicPublic += 0; deriv.PublicProtected += 0; - ~~~~~~~~~~~~~~~ -!!! error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.PublicPrivate += 0; - ~~~~~~~~~~~~~ -!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. deriv.ProtectedPublic += 0; deriv.ProtectedProtected += 0; - ~~~~~~~~~~~~~~~~~~ -!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.ProtectedPrivate += 0; - ~~~~~~~~~~~~~~~~ -!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. deriv.PrivatePublic += 0; deriv.PrivateProtected += 0; - ~~~~~~~~~~~~~~~~ -!!! error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.PrivatePrivate += 0; - ~~~~~~~~~~~~~~ -!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt.diff new file mode 100644 index 0000000000..2c1a674cb1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt.diff @@ -0,0 +1,175 @@ +--- old.divergentAccessorsVisibility1.errors.txt ++++ new.divergentAccessorsVisibility1.errors.txt +@@= skipped -3, +3 lines =@@ + divergentAccessorsVisibility1.ts(21,9): error TS2808: A get accessor must be at least as accessible as the setter + divergentAccessorsVisibility1.ts(23,17): error TS2808: A get accessor must be at least as accessible as the setter + divergentAccessorsVisibility1.ts(24,19): error TS2808: A get accessor must be at least as accessible as the setter +-divergentAccessorsVisibility1.ts(66,14): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(69,14): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(72,14): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(80,19): error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(81,19): error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(82,19): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(86,14): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(89,14): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(92,14): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. ++divergentAccessorsVisibility1.ts(62,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. ++ Property 'PrivatePublic' is private in type 'Base' but not in type 'Derived'. + divergentAccessorsVisibility1.ts(99,10): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. + divergentAccessorsVisibility1.ts(100,10): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. + divergentAccessorsVisibility1.ts(102,10): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. +@@= skipped -27, +20 lines =@@ + divergentAccessorsVisibility1.ts(123,10): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. + divergentAccessorsVisibility1.ts(125,10): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. + divergentAccessorsVisibility1.ts(126,10): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(129,11): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. +-divergentAccessorsVisibility1.ts(130,11): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(132,11): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. +-divergentAccessorsVisibility1.ts(133,11): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(135,11): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. +-divergentAccessorsVisibility1.ts(136,11): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(141,16): error TS2445: Property 'ProtectedPublic' is protected and only accessible within class 'Base' and its subclasses. +-divergentAccessorsVisibility1.ts(142,16): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. +-divergentAccessorsVisibility1.ts(143,16): error TS2445: Property 'ProtectedPrivate' is protected and only accessible within class 'Base' and its subclasses. +-divergentAccessorsVisibility1.ts(144,16): error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(145,16): error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(146,16): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(149,11): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. +-divergentAccessorsVisibility1.ts(150,11): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(152,11): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. +-divergentAccessorsVisibility1.ts(153,11): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. +-divergentAccessorsVisibility1.ts(155,11): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. +-divergentAccessorsVisibility1.ts(156,11): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. + + +-==== divergentAccessorsVisibility1.ts (51 errors) ==== ++==== divergentAccessorsVisibility1.ts (25 errors) ==== + class Base { + get PublicPublic() { return 0; } + set PublicPublic(v) { return; } +@@= skipped -95, +77 lines =@@ + } + + class Derived extends Base { ++ ~~~~~~~ ++!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. ++!!! error TS2415: Property 'PrivatePublic' is private in type 'Base' but not in type 'Derived'. + test2() { + this.PublicPublic = 0; + this.PublicProtected = 0; + this.PublicPrivate = 0; +- ~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. + this.ProtectedPublic = 0; + this.ProtectedProtected = 0; + this.ProtectedPrivate = 0; +- ~~~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. + this.PrivatePublic = 0; + this.PrivateProtected = 0; + this.PrivatePrivate = 0; +- ~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. + + void this.PublicPublic; + void this.PublicProtected; +@@= skipped -24, +21 lines =@@ + void this.ProtectedProtected; + void this.ProtectedPrivate; + void this.PrivatePublic; +- ~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. + void this.PrivateProtected; +- ~~~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. + void this.PrivatePrivate; +- ~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. + + this.PublicPublic += 0; + this.PublicProtected += 0; + this.PublicPrivate += 0; +- ~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. + this.ProtectedPublic += 0; + this.ProtectedProtected += 0; + this.ProtectedPrivate += 0; +- ~~~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. + this.PrivatePublic += 0; + this.PrivateProtected += 0; + this.PrivatePrivate += 0; +- ~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. + } + } + +@@= skipped -97, +85 lines =@@ + + deriv.PublicPublic = 0; + deriv.PublicProtected = 0; +- ~~~~~~~~~~~~~~~ +-!!! error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. + deriv.PublicPrivate = 0; +- ~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. + deriv.ProtectedPublic = 0; + deriv.ProtectedProtected = 0; +- ~~~~~~~~~~~~~~~~~~ +-!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. + deriv.ProtectedPrivate = 0; +- ~~~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. + deriv.PrivatePublic = 0; + deriv.PrivateProtected = 0; +- ~~~~~~~~~~~~~~~~ +-!!! error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. + deriv.PrivatePrivate = 0; +- ~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. + + void deriv.PublicPublic; + void deriv.PublicProtected; + void deriv.PublicPrivate; + void deriv.ProtectedPublic; +- ~~~~~~~~~~~~~~~ +-!!! error TS2445: Property 'ProtectedPublic' is protected and only accessible within class 'Base' and its subclasses. + void deriv.ProtectedProtected; +- ~~~~~~~~~~~~~~~~~~ +-!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. + void deriv.ProtectedPrivate; +- ~~~~~~~~~~~~~~~~ +-!!! error TS2445: Property 'ProtectedPrivate' is protected and only accessible within class 'Base' and its subclasses. + void deriv.PrivatePublic; +- ~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. + void deriv.PrivateProtected; +- ~~~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. + void deriv.PrivatePrivate; +- ~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. + + deriv.PublicPublic += 0; + deriv.PublicProtected += 0; +- ~~~~~~~~~~~~~~~ +-!!! error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. + deriv.PublicPrivate += 0; +- ~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. + deriv.ProtectedPublic += 0; + deriv.ProtectedProtected += 0; +- ~~~~~~~~~~~~~~~~~~ +-!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. + deriv.ProtectedPrivate += 0; +- ~~~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. + deriv.PrivatePublic += 0; + deriv.PrivateProtected += 0; +- ~~~~~~~~~~~~~~~~ +-!!! error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. + deriv.PrivatePrivate += 0; +- ~~~~~~~~~~~~~~ +-!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. + } + diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols index b4a002dad1..f31f0302a5 100644 --- a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols +++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols @@ -215,139 +215,139 @@ class Derived extends Base { >test2 : Symbol(test2, Decl(divergentAccessorsVisibility1.ts, 61, 28)) this.PublicPublic = 0; ->this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) this.PublicProtected = 0; ->this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) this.PublicPrivate = 0; ->this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) this.ProtectedPublic = 0; ->this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) this.ProtectedProtected = 0; ->this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) this.ProtectedPrivate = 0; ->this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) this.PrivatePublic = 0; ->this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) this.PrivateProtected = 0; ->this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) this.PrivatePrivate = 0; ->this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) void this.PublicPublic; ->this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) void this.PublicProtected; ->this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) void this.PublicPrivate; ->this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) void this.ProtectedPublic; ->this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) void this.ProtectedProtected; ->this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) void this.ProtectedPrivate; ->this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) void this.PrivatePublic; ->this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) void this.PrivateProtected; ->this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) void this.PrivatePrivate; ->this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) this.PublicPublic += 0; ->this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) this.PublicProtected += 0; ->this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) this.PublicPrivate += 0; ->this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) this.ProtectedPublic += 0; ->this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) this.ProtectedProtected += 0; ->this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) this.ProtectedPrivate += 0; ->this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) this.PrivatePublic += 0; ->this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) this.PrivateProtected += 0; ->this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) this.PrivatePrivate += 0; ->this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) } } @@ -496,138 +496,138 @@ function fn() { >PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) deriv.PublicPublic = 0; ->deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) deriv.PublicProtected = 0; ->deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) deriv.PublicPrivate = 0; ->deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) deriv.ProtectedPublic = 0; ->deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) deriv.ProtectedProtected = 0; ->deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) deriv.ProtectedPrivate = 0; ->deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) deriv.PrivatePublic = 0; ->deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) deriv.PrivateProtected = 0; ->deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) deriv.PrivatePrivate = 0; ->deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) void deriv.PublicPublic; ->deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) void deriv.PublicProtected; ->deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) void deriv.PublicPrivate; ->deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) void deriv.ProtectedPublic; ->deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) void deriv.ProtectedProtected; ->deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) void deriv.ProtectedPrivate; ->deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) void deriv.PrivatePublic; ->deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) void deriv.PrivateProtected; ->deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) void deriv.PrivatePrivate; ->deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) deriv.PublicPublic += 0; ->deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) deriv.PublicProtected += 0; ->deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) deriv.PublicPrivate += 0; ->deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) deriv.ProtectedPublic += 0; ->deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) deriv.ProtectedProtected += 0; ->deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) deriv.ProtectedPrivate += 0; ->deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) deriv.PrivatePublic += 0; ->deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) deriv.PrivateProtected += 0; ->deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) deriv.PrivatePrivate += 0; ->deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) } diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols.diff index 731adea620..b991efd092 100644 --- a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols.diff @@ -288,192 +288,192 @@ this.PublicPublic = 0; ->this.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) this.PublicProtected = 0; ->this.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) this.PublicPrivate = 0; ->this.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) this.ProtectedPublic = 0; ->this.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) this.ProtectedProtected = 0; ->this.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) this.ProtectedPrivate = 0; ->this.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) this.PrivatePublic = 0; ->this.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) this.PrivateProtected = 0; ->this.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) this.PrivatePrivate = 0; ->this.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) void this.PublicPublic; ->this.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) void this.PublicProtected; ->this.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) void this.PublicPrivate; ->this.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) void this.ProtectedPublic; ->this.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) void this.ProtectedProtected; ->this.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) void this.ProtectedPrivate; ->this.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) void this.PrivatePublic; ->this.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) void this.PrivateProtected; ->this.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) void this.PrivatePrivate; ->this.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) this.PublicPublic += 0; ->this.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) this.PublicProtected += 0; ->this.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) this.PublicPrivate += 0; ->this.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) this.ProtectedPublic += 0; ->this.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) this.ProtectedProtected += 0; ->this.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) this.ProtectedPrivate += 0; ->this.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) this.PrivatePublic += 0; ->this.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) this.PrivateProtected += 0; ->this.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) this.PrivatePrivate += 0; ->this.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) } } @@ -671,191 +671,191 @@ deriv.PublicPublic = 0; ->deriv.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) deriv.PublicProtected = 0; ->deriv.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) deriv.PublicPrivate = 0; ->deriv.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) deriv.ProtectedPublic = 0; ->deriv.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) deriv.ProtectedProtected = 0; ->deriv.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) deriv.ProtectedPrivate = 0; ->deriv.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) deriv.PrivatePublic = 0; ->deriv.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) deriv.PrivateProtected = 0; ->deriv.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) deriv.PrivatePrivate = 0; ->deriv.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) void deriv.PublicPublic; ->deriv.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) void deriv.PublicProtected; ->deriv.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) void deriv.PublicPrivate; ->deriv.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) void deriv.ProtectedPublic; ->deriv.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) void deriv.ProtectedProtected; ->deriv.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) void deriv.ProtectedPrivate; ->deriv.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) void deriv.PrivatePublic; ->deriv.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) void deriv.PrivateProtected; ->deriv.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) void deriv.PrivatePrivate; ->deriv.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) deriv.PublicPublic += 0; ->deriv.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) deriv.PublicProtected += 0; ->deriv.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) deriv.PublicPrivate += 0; ->deriv.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) deriv.ProtectedPublic += 0; ->deriv.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) deriv.ProtectedProtected += 0; ->deriv.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) deriv.ProtectedPrivate += 0; ->deriv.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) deriv.PrivatePublic += 0; ->deriv.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) deriv.PrivateProtected += 0; ->deriv.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) deriv.PrivatePrivate += 0; ->deriv.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt deleted file mode 100644 index e87eeb37db..0000000000 --- a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt +++ /dev/null @@ -1,25 +0,0 @@ -es6DeclOrdering.ts(6,20): error TS2339: Property '_store' does not exist on type 'Bar'. -es6DeclOrdering.ts(11,13): error TS2339: Property '_store' does not exist on type 'Bar'. - - -==== es6DeclOrdering.ts (2 errors) ==== - class Bar { - - //public bar() { } - - public foo() { - return this._store.length; - ~~~~~~ -!!! error TS2339: Property '_store' does not exist on type 'Bar'. - - } - - constructor(store: string) { - this._store = store; // this is an error for some reason? Unresolved symbol store - ~~~~~~ -!!! error TS2339: Property '_store' does not exist on type 'Bar'. - - } - } - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt.diff new file mode 100644 index 0000000000..ff2d7d1734 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt.diff @@ -0,0 +1,30 @@ +--- old.es6DeclOrdering.errors.txt ++++ new.es6DeclOrdering.errors.txt +@@= skipped -0, +-1 lines =@@ +-es6DeclOrdering.ts(6,20): error TS2339: Property '_store' does not exist on type 'Bar'. +-es6DeclOrdering.ts(11,13): error TS2339: Property '_store' does not exist on type 'Bar'. +- +- +-==== es6DeclOrdering.ts (2 errors) ==== +- class Bar { +- +- //public bar() { } +- +- public foo() { +- return this._store.length; +- ~~~~~~ +-!!! error TS2339: Property '_store' does not exist on type 'Bar'. +- +- } +- +- constructor(store: string) { +- this._store = store; // this is an error for some reason? Unresolved symbol store +- ~~~~~~ +-!!! error TS2339: Property '_store' does not exist on type 'Bar'. +- +- } +- } +- +- +@@= skipped --1, +1 lines =@@ ++ diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols index 1274d3aa85..9a257175c0 100644 --- a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols @@ -10,7 +10,11 @@ class Bar { >foo : Symbol(foo, Decl(es6DeclOrdering.ts, 0, 11)) return this._store.length; +>this._store.length : Symbol(length, Decl(lib.es5.d.ts, --, --)) +>this._store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) >this : Symbol(Bar, Decl(es6DeclOrdering.ts, 0, 0)) +>_store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) +>length : Symbol(length, Decl(lib.es5.d.ts, --, --)) } @@ -18,7 +22,9 @@ class Bar { >store : Symbol(store, Decl(es6DeclOrdering.ts, 9, 15)) this._store = store; // this is an error for some reason? Unresolved symbol store +>this._store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) >this : Symbol(Bar, Decl(es6DeclOrdering.ts, 0, 0)) +>_store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) >store : Symbol(store, Decl(es6DeclOrdering.ts, 9, 15)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols.diff b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols.diff index e62340e68a..fed37c0b18 100644 --- a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols.diff @@ -8,4 +8,21 @@ +>foo : Symbol(foo, Decl(es6DeclOrdering.ts, 0, 11)) return this._store.length; ++>this._store.length : Symbol(length, Decl(lib.es5.d.ts, --, --)) ++>this._store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) >this : Symbol(Bar, Decl(es6DeclOrdering.ts, 0, 0)) ++>_store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) ++>length : Symbol(length, Decl(lib.es5.d.ts, --, --)) + + } + +@@= skipped -11, +15 lines =@@ + >store : Symbol(store, Decl(es6DeclOrdering.ts, 9, 15)) + + this._store = store; // this is an error for some reason? Unresolved symbol store ++>this._store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) + >this : Symbol(Bar, Decl(es6DeclOrdering.ts, 0, 0)) ++>_store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) + >store : Symbol(store, Decl(es6DeclOrdering.ts, 9, 15)) + + } diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types index 57a1384a8a..766fa55195 100644 --- a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types +++ b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types @@ -7,14 +7,14 @@ class Bar { //public bar() { } public foo() { ->foo : () => any +>foo : () => number return this._store.length; ->this._store.length : any ->this._store : any +>this._store.length : number +>this._store : string >this : this ->_store : any ->length : any +>_store : string +>length : number } @@ -23,9 +23,9 @@ class Bar { this._store = store; // this is an error for some reason? Unresolved symbol store >this._store = store : string ->this._store : any +>this._store : string >this : this ->_store : any +>_store : string >store : string } diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types.diff b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types.diff new file mode 100644 index 0000000000..a7947ca3e3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types.diff @@ -0,0 +1,34 @@ +--- old.es6DeclOrdering.types ++++ new.es6DeclOrdering.types +@@= skipped -6, +6 lines =@@ + //public bar() { } + + public foo() { +->foo : () => any ++>foo : () => number + + return this._store.length; +->this._store.length : any +->this._store : any ++>this._store.length : number ++>this._store : string + >this : this +->_store : any +->length : any ++>_store : string ++>length : number + + } + +@@= skipped -16, +16 lines =@@ + + this._store = store; // this is an error for some reason? Unresolved symbol store + >this._store = store : string +->this._store : any ++>this._store : string + >this : this +->_store : any ++>_store : string + >store : string + + } diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt new file mode 100644 index 0000000000..46fcfea96d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt @@ -0,0 +1,22 @@ +inheritedConstructorPropertyContextualType.ts(7,7): error TS2415: Class 'Assignment' incorrectly extends base class 'Base'. + The types of 'state.version' are incompatible between these types. + Type 'number' is not assignable to type '2'. + + +==== inheritedConstructorPropertyContextualType.ts (1 errors) ==== + interface State { + version: 2 + } + declare class Base { + state: S + } + class Assignment extends Base { + ~~~~~~~~~~ +!!! error TS2415: Class 'Assignment' incorrectly extends base class 'Base'. +!!! error TS2415: The types of 'state.version' are incompatible between these types. +!!! error TS2415: Type 'number' is not assignable to type '2'. + constructor() { + super() + this.state = { version: 2 } + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt.diff new file mode 100644 index 0000000000..be4a414ab4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt.diff @@ -0,0 +1,27 @@ +--- old.inheritedConstructorPropertyContextualType.errors.txt ++++ new.inheritedConstructorPropertyContextualType.errors.txt +@@= skipped -0, +-1 lines =@@ +- +@@= skipped --1, +1 lines =@@ ++inheritedConstructorPropertyContextualType.ts(7,7): error TS2415: Class 'Assignment' incorrectly extends base class 'Base'. ++ The types of 'state.version' are incompatible between these types. ++ Type 'number' is not assignable to type '2'. ++ ++ ++==== inheritedConstructorPropertyContextualType.ts (1 errors) ==== ++ interface State { ++ version: 2 ++ } ++ declare class Base { ++ state: S ++ } ++ class Assignment extends Base { ++ ~~~~~~~~~~ ++!!! error TS2415: Class 'Assignment' incorrectly extends base class 'Base'. ++!!! error TS2415: The types of 'state.version' are incompatible between these types. ++!!! error TS2415: Type 'number' is not assignable to type '2'. ++ constructor() { ++ super() ++ this.state = { version: 2 } ++ } ++ } diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols index bff5cb6112..ca1d667450 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols @@ -25,9 +25,9 @@ class Assignment extends Base { >super : Symbol(Base, Decl(inheritedConstructorPropertyContextualType.ts, 2, 1)) this.state = { version: 2 } ->this.state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) +>this.state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 8, 15)) >this : Symbol(Assignment, Decl(inheritedConstructorPropertyContextualType.ts, 5, 1)) ->state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) +>state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 8, 15)) >version : Symbol(version, Decl(inheritedConstructorPropertyContextualType.ts, 9, 22)) } } diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols.diff b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols.diff index 36c8673f78..224eac7a5f 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols.diff @@ -22,10 +22,10 @@ this.state = { version: 2 } ->this.state : Symbol(Base.state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) -+>this.state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) ++>this.state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 8, 15)) >this : Symbol(Assignment, Decl(inheritedConstructorPropertyContextualType.ts, 5, 1)) ->state : Symbol(Base.state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) -+>state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) ++>state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 8, 15)) >version : Symbol(version, Decl(inheritedConstructorPropertyContextualType.ts, 9, 22)) } } diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types index a76235c7f2..6e000e290c 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types @@ -21,12 +21,12 @@ class Assignment extends Base { >super : typeof Base this.state = { version: 2 } ->this.state = { version: 2 } : { version: 2; } ->this.state : State +>this.state = { version: 2 } : { version: number; } +>this.state : { version: number; } >this : this ->state : State ->{ version: 2 } : { version: 2; } ->version : 2 +>state : { version: number; } +>{ version: 2 } : { version: number; } +>version : number >2 : 2 } } diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types.diff b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types.diff new file mode 100644 index 0000000000..9bad7c90af --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types.diff @@ -0,0 +1,20 @@ +--- old.inheritedConstructorPropertyContextualType.types ++++ new.inheritedConstructorPropertyContextualType.types +@@= skipped -20, +20 lines =@@ + >super : typeof Base + + this.state = { version: 2 } +->this.state = { version: 2 } : { version: 2; } +->this.state : State ++>this.state = { version: 2 } : { version: number; } ++>this.state : { version: number; } + >this : this +->state : State +->{ version: 2 } : { version: 2; } +->version : 2 ++>state : { version: number; } ++>{ version: 2 } : { version: number; } ++>version : number + >2 : 2 + } + } diff --git a/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.errors.txt b/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.errors.txt deleted file mode 100644 index 09f737a9b8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.errors.txt +++ /dev/null @@ -1,27 +0,0 @@ -/src/a.js(3,14): error TS2339: Property 'doSomething' does not exist on type 'typeof Thing'. -/src/a.js(7,7): error TS2339: Property 'doSomething' does not exist on type 'typeof Thing'. - - -==== /src/a.js (2 errors) ==== - class Thing { - static { - this.doSomething = () => {}; - ~~~~~~~~~~~ -!!! error TS2339: Property 'doSomething' does not exist on type 'typeof Thing'. - } - } - - Thing.doSomething(); - ~~~~~~~~~~~ -!!! error TS2339: Property 'doSomething' does not exist on type 'typeof Thing'. - - // GH#46468 - class ElementsArray extends Array { - static { - const superisArray = super.isArray; - const customIsArray = (arg)=> superisArray(arg); - this.isArray = customIsArray; - } - } - - ElementsArray.isArray(new ElementsArray()); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols b/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols index d1808dba46..a473ff443b 100644 --- a/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols +++ b/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols @@ -6,12 +6,16 @@ class Thing { static { this.doSomething = () => {}; +>this.doSomething : Symbol(doSomething, Decl(a.js, 1, 12)) >this : Symbol(Thing, Decl(a.js, 0, 0)) +>doSomething : Symbol(doSomething, Decl(a.js, 1, 12)) } } Thing.doSomething(); +>Thing.doSomething : Symbol(doSomething, Decl(a.js, 1, 12)) >Thing : Symbol(Thing, Decl(a.js, 0, 0)) +>doSomething : Symbol(doSomething, Decl(a.js, 1, 12)) // GH#46468 class ElementsArray extends Array { @@ -32,16 +36,16 @@ class ElementsArray extends Array { >arg : Symbol(arg, Decl(a.js, 12, 31)) this.isArray = customIsArray; ->this.isArray : Symbol(isArray, Decl(lib.es5.d.ts, --, --)) +>this.isArray : Symbol(isArray, Decl(a.js, 12, 56)) >this : Symbol(ElementsArray, Decl(a.js, 6, 20)) ->isArray : Symbol(isArray, Decl(lib.es5.d.ts, --, --)) +>isArray : Symbol(isArray, Decl(a.js, 12, 56)) >customIsArray : Symbol(customIsArray, Decl(a.js, 12, 13)) } } ElementsArray.isArray(new ElementsArray()); ->ElementsArray.isArray : Symbol(isArray, Decl(lib.es5.d.ts, --, --)) +>ElementsArray.isArray : Symbol(isArray, Decl(a.js, 12, 56)) >ElementsArray : Symbol(ElementsArray, Decl(a.js, 6, 20)) ->isArray : Symbol(isArray, Decl(lib.es5.d.ts, --, --)) +>isArray : Symbol(isArray, Decl(a.js, 12, 56)) >ElementsArray : Symbol(ElementsArray, Decl(a.js, 6, 20)) diff --git a/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols.diff b/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols.diff index d42b98b3cb..c704ab0294 100644 --- a/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols.diff @@ -5,19 +5,23 @@ static { this.doSomething = () => {}; ->this.doSomething : Symbol(Thing.doSomething, Decl(a.js, 1, 12)) ++>this.doSomething : Symbol(doSomething, Decl(a.js, 1, 12)) >this : Symbol(Thing, Decl(a.js, 0, 0)) ->doSomething : Symbol(Thing.doSomething, Decl(a.js, 1, 12)) ++>doSomething : Symbol(doSomething, Decl(a.js, 1, 12)) } } Thing.doSomething(); ->Thing.doSomething : Symbol(Thing.doSomething, Decl(a.js, 1, 12)) ++>Thing.doSomething : Symbol(doSomething, Decl(a.js, 1, 12)) >Thing : Symbol(Thing, Decl(a.js, 0, 0)) ->doSomething : Symbol(Thing.doSomething, Decl(a.js, 1, 12)) ++>doSomething : Symbol(doSomething, Decl(a.js, 1, 12)) // GH#46468 class ElementsArray extends Array { -@@= skipped -19, +15 lines =@@ +@@= skipped -19, +19 lines =@@ static { const superisArray = super.isArray; >superisArray : Symbol(superisArray, Decl(a.js, 11, 13)) @@ -34,19 +38,19 @@ this.isArray = customIsArray; ->this.isArray : Symbol(ElementsArray.isArray, Decl(a.js, 12, 56)) -+>this.isArray : Symbol(isArray, Decl(lib.es5.d.ts, --, --)) ++>this.isArray : Symbol(isArray, Decl(a.js, 12, 56)) >this : Symbol(ElementsArray, Decl(a.js, 6, 20)) ->isArray : Symbol(ElementsArray.isArray, Decl(a.js, 12, 56)) -+>isArray : Symbol(isArray, Decl(lib.es5.d.ts, --, --)) ++>isArray : Symbol(isArray, Decl(a.js, 12, 56)) >customIsArray : Symbol(customIsArray, Decl(a.js, 12, 13)) } } ElementsArray.isArray(new ElementsArray()); ->ElementsArray.isArray : Symbol(ElementsArray.isArray, Decl(a.js, 12, 56)) -+>ElementsArray.isArray : Symbol(isArray, Decl(lib.es5.d.ts, --, --)) ++>ElementsArray.isArray : Symbol(isArray, Decl(a.js, 12, 56)) >ElementsArray : Symbol(ElementsArray, Decl(a.js, 6, 20)) ->isArray : Symbol(ElementsArray.isArray, Decl(a.js, 12, 56)) -+>isArray : Symbol(isArray, Decl(lib.es5.d.ts, --, --)) ++>isArray : Symbol(isArray, Decl(a.js, 12, 56)) >ElementsArray : Symbol(ElementsArray, Decl(a.js, 6, 20)) diff --git a/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.types b/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.types index 4033c56ddd..878d7ab799 100644 --- a/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.types +++ b/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.types @@ -7,18 +7,18 @@ class Thing { static { this.doSomething = () => {}; >this.doSomething = () => {} : () => void ->this.doSomething : any +>this.doSomething : () => void >this : typeof Thing ->doSomething : any +>doSomething : () => void >() => {} : () => void } } Thing.doSomething(); ->Thing.doSomething() : any ->Thing.doSomething : any +>Thing.doSomething() : void +>Thing.doSomething : () => void >Thing : typeof Thing ->doSomething : any +>doSomething : () => void // GH#46468 class ElementsArray extends Array { diff --git a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.errors.txt b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.errors.txt deleted file mode 100644 index d4e3e8cb73..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.errors.txt +++ /dev/null @@ -1,35 +0,0 @@ -index.js(15,18): error TS2339: Property 'test' does not exist on type 'X'. - - -==== test/Test.js (0 errors) ==== - /** @module test/Test */ - class Test {} - export default Test; -==== Test.js (0 errors) ==== - /** @module Test */ - class Test {} - export default Test; -==== index.js (1 errors) ==== - import Test from './test/Test.js' - - /** - * @typedef {Object} Options - * @property {typeof import("./Test.js").default} [test] - */ - - class X extends Test { - /** - * @param {Options} options - */ - constructor(options) { - super(); - if (options.test) { - this.test = new options.test(); - ~~~~ -!!! error TS2339: Property 'test' does not exist on type 'X'. - } - } - } - - export default X; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.symbols b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.symbols index 8918628870..437444590e 100644 --- a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.symbols @@ -44,7 +44,9 @@ class X extends Test { >test : Symbol(test, Decl(index.js, 4, 3)) this.test = new options.test(); +>this.test : Symbol(test, Decl(index.js, 13, 27)) >this : Symbol(X, Decl(index.js, 0, 33)) +>test : Symbol(test, Decl(index.js, 13, 27)) >options.test : Symbol(test, Decl(index.js, 4, 3)) >options : Symbol(options, Decl(index.js, 11, 16)) >test : Symbol(test, Decl(index.js, 4, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.symbols.diff index 23c36473e0..c39546fa79 100644 --- a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitDoesNotRenameImport.symbols.diff @@ -5,8 +5,10 @@ this.test = new options.test(); ->this.test : Symbol(X.test, Decl(index.js, 13, 27)) ++>this.test : Symbol(test, Decl(index.js, 13, 27)) >this : Symbol(X, Decl(index.js, 0, 33)) ->test : Symbol(X.test, Decl(index.js, 13, 27)) ++>test : Symbol(test, Decl(index.js, 13, 27)) >options.test : Symbol(test, Decl(index.js, 4, 3)) >options : Symbol(options, Decl(index.js, 11, 16)) >test : Symbol(test, Decl(index.js, 4, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.errors.txt index 7393382479..ab500a993a 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.errors.txt @@ -1,18 +1,15 @@ -bar.ts(1,11): error TS2339: Property 'p' does not exist on type 'C'. -foo.js(3,12): error TS2339: Property 'p' does not exist on type 'C'. +bar.ts(1,1): error TS2322: Type 'string' is not assignable to type 'number'. -==== foo.js (1 errors) ==== +==== foo.js (0 errors) ==== class C { constructor () { this.p = 0; - ~ -!!! error TS2339: Property 'p' does not exist on type 'C'. } } ==== bar.ts (1 errors) ==== (new C()).p = "string"; - ~ -!!! error TS2339: Property 'p' does not exist on type 'C'. + ~~~~~~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.symbols b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.symbols index 8d57db0171..0c7b113021 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.symbols @@ -6,11 +6,15 @@ class C { constructor () { this.p = 0; +>this.p : Symbol(p, Decl(foo.js, 1, 18)) >this : Symbol(C, Decl(foo.js, 0, 0)) +>p : Symbol(p, Decl(foo.js, 1, 18)) } } === bar.ts === (new C()).p = "string"; +>(new C()).p : Symbol(p, Decl(foo.js, 1, 18)) >C : Symbol(C, Decl(foo.js, 0, 0)) +>p : Symbol(p, Decl(foo.js, 1, 18)) diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.symbols.diff index 926e616c30..8fd0031318 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.symbols.diff @@ -5,14 +5,18 @@ constructor () { this.p = 0; ->this.p : Symbol(C.p, Decl(foo.js, 1, 18)) ++>this.p : Symbol(p, Decl(foo.js, 1, 18)) >this : Symbol(C, Decl(foo.js, 0, 0)) ->p : Symbol(C.p, Decl(foo.js, 1, 18)) ++>p : Symbol(p, Decl(foo.js, 1, 18)) } } === bar.ts === (new C()).p = "string"; ->(new C()).p : Symbol(C.p, Decl(foo.js, 1, 18)) ++>(new C()).p : Symbol(p, Decl(foo.js, 1, 18)) >C : Symbol(C, Decl(foo.js, 0, 0)) ->p : Symbol(C.p, Decl(foo.js, 1, 18)) ++>p : Symbol(p, Decl(foo.js, 1, 18)) diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.types b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.types index 2d60e58772..8561bb3d55 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.types +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType.types @@ -7,9 +7,9 @@ class C { constructor () { this.p = 0; >this.p = 0 : 0 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >0 : 0 } } @@ -17,10 +17,10 @@ class C { === bar.ts === (new C()).p = "string"; >(new C()).p = "string" : "string" ->(new C()).p : any +>(new C()).p : number >(new C()) : C >new C() : C >C : typeof C ->p : any +>p : number >"string" : "string" diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.errors.txt deleted file mode 100644 index 294dc6c361..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -bar.ts(1,11): error TS2339: Property 'p' does not exist on type 'C'. -foo.js(4,12): error TS2339: Property 'p' does not exist on type 'C'. - - -==== foo.js (1 errors) ==== - class C { - constructor() { - /** @type {number[]}*/ - this.p = []; - ~ -!!! error TS2339: Property 'p' does not exist on type 'C'. - } - } - -==== bar.ts (1 errors) ==== - (new C()).p.push("string"); - ~ -!!! error TS2339: Property 'p' does not exist on type 'C'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.symbols b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.symbols index 04a81852e1..0e0fd6c043 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.symbols @@ -7,11 +7,17 @@ class C { constructor() { /** @type {number[]}*/ this.p = []; +>this.p : Symbol(p, Decl(foo.js, 1, 19)) >this : Symbol(C, Decl(foo.js, 0, 0)) +>p : Symbol(p, Decl(foo.js, 1, 19)) } } === bar.ts === (new C()).p.push("string"); +>(new C()).p.push : Symbol(push, Decl(lib.es5.d.ts, --, --)) +>(new C()).p : Symbol(p, Decl(foo.js, 1, 19)) >C : Symbol(C, Decl(foo.js, 0, 0)) +>p : Symbol(p, Decl(foo.js, 1, 19)) +>push : Symbol(push, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.symbols.diff index fe83bfbb00..99b1cd2d24 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.symbols.diff @@ -5,8 +5,10 @@ /** @type {number[]}*/ this.p = []; ->this.p : Symbol(C.p, Decl(foo.js, 1, 19)) ++>this.p : Symbol(p, Decl(foo.js, 1, 19)) >this : Symbol(C, Decl(foo.js, 0, 0)) ->p : Symbol(C.p, Decl(foo.js, 1, 19)) ++>p : Symbol(p, Decl(foo.js, 1, 19)) } } @@ -14,7 +16,11 @@ (new C()).p.push("string"); ->(new C()).p.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) ->(new C()).p : Symbol(C.p, Decl(foo.js, 1, 19)) ++>(new C()).p.push : Symbol(push, Decl(lib.es5.d.ts, --, --)) ++>(new C()).p : Symbol(p, Decl(foo.js, 1, 19)) >C : Symbol(C, Decl(foo.js, 0, 0)) ->p : Symbol(C.p, Decl(foo.js, 1, 19)) ->push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) ++>p : Symbol(p, Decl(foo.js, 1, 19)) ++>push : Symbol(push, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.types b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.types index dc9f7b35d4..8b01de9f4a 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.types +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.types @@ -8,22 +8,22 @@ class C { /** @type {number[]}*/ this.p = []; >this.p = [] : undefined[] ->this.p : any +>this.p : any[] >this : this ->p : any +>p : any[] >[] : undefined[] } } === bar.ts === (new C()).p.push("string"); ->(new C()).p.push("string") : any ->(new C()).p.push : any ->(new C()).p : any +>(new C()).p.push("string") : number +>(new C()).p.push : (...items: any[]) => number +>(new C()).p : any[] >(new C()) : C >new C() : C >C : typeof C ->p : any ->push : any +>p : any[] +>push : (...items: any[]) => number >"string" : "string" diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.errors.txt index 21b1e3a24f..29ff32d934 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.errors.txt @@ -1,29 +1,23 @@ -bar.ts(1,11): error TS2339: Property 'p' does not exist on type 'C'. +bar.ts(1,1): error TS2322: Type 'string' is not assignable to type 'number'. foo.js(3,13): error TS2304: Cannot find name 'cond'. -foo.js(4,18): error TS2339: Property 'p' does not exist on type 'C'. -foo.js(7,18): error TS2339: Property 'p' does not exist on type 'C'. -==== foo.js (3 errors) ==== +==== foo.js (1 errors) ==== class C { constructor() { if (cond) { ~~~~ !!! error TS2304: Cannot find name 'cond'. this.p = null; - ~ -!!! error TS2339: Property 'p' does not exist on type 'C'. } else { this.p = 0; - ~ -!!! error TS2339: Property 'p' does not exist on type 'C'. } } } ==== bar.ts (1 errors) ==== (new C()).p = "string"; // Error - ~ -!!! error TS2339: Property 'p' does not exist on type 'C'. + ~~~~~~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.symbols b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.symbols index b63e539d58..52fe803f0e 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.symbols @@ -7,16 +7,22 @@ class C { constructor() { if (cond) { this.p = null; +>this.p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) >this : Symbol(C, Decl(foo.js, 0, 0)) +>p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) } else { this.p = 0; +>this.p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) >this : Symbol(C, Decl(foo.js, 0, 0)) +>p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) } } } === bar.ts === (new C()).p = "string"; // Error +>(new C()).p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) >C : Symbol(C, Decl(foo.js, 0, 0)) +>p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.symbols.diff index e5aa43a910..2fdfd24a2f 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.symbols.diff @@ -5,14 +5,18 @@ if (cond) { this.p = null; ->this.p : Symbol(C.p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) ++>this.p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) >this : Symbol(C, Decl(foo.js, 0, 0)) ->p : Symbol(C.p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) ++>p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) } else { this.p = 0; ->this.p : Symbol(C.p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) ++>this.p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) >this : Symbol(C, Decl(foo.js, 0, 0)) ->p : Symbol(C.p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) ++>p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) } } } @@ -20,6 +24,8 @@ === bar.ts === (new C()).p = "string"; // Error ->(new C()).p : Symbol(C.p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) ++>(new C()).p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) >C : Symbol(C, Decl(foo.js, 0, 0)) ->p : Symbol(C.p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) ++>p : Symbol(p, Decl(foo.js, 2, 19), Decl(foo.js, 5, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.types b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.types index 5f23276ab6..75150cbea6 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.types +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.types @@ -10,16 +10,16 @@ class C { this.p = null; >this.p = null : null ->this.p : any +>this.p : number >this : this ->p : any +>p : number } else { this.p = 0; >this.p = 0 : 0 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >0 : 0 } } @@ -28,10 +28,10 @@ class C { === bar.ts === (new C()).p = "string"; // Error >(new C()).p = "string" : "string" ->(new C()).p : any +>(new C()).p : number >(new C()) : C >new C() : C >C : typeof C ->p : any +>p : number >"string" : "string" diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.errors.txt deleted file mode 100644 index e2135f9c43..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -foo.js(3,10): error TS2339: Property 'testStackOverflow' does not exist on type 'StackOverflowTest'. -foo.js(3,35): error TS2339: Property 'testStackOverflow' does not exist on type 'StackOverflowTest'. - - -==== foo.js (2 errors) ==== - export class StackOverflowTest { - constructor () { - this.testStackOverflow = this.testStackOverflow.bind(this) - ~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'testStackOverflow' does not exist on type 'StackOverflowTest'. - ~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'testStackOverflow' does not exist on type 'StackOverflowTest'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.symbols b/testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.symbols index f7ebd3598e..c328c242bd 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.symbols @@ -6,8 +6,12 @@ export class StackOverflowTest { constructor () { this.testStackOverflow = this.testStackOverflow.bind(this) +>this.testStackOverflow : Symbol(testStackOverflow, Decl(foo.js, 1, 18)) >this : Symbol(StackOverflowTest, Decl(foo.js, 0, 0)) +>testStackOverflow : Symbol(testStackOverflow, Decl(foo.js, 1, 18)) +>this.testStackOverflow : Symbol(testStackOverflow, Decl(foo.js, 1, 18)) >this : Symbol(StackOverflowTest, Decl(foo.js, 0, 0)) +>testStackOverflow : Symbol(testStackOverflow, Decl(foo.js, 1, 18)) >this : Symbol(StackOverflowTest, Decl(foo.js, 0, 0)) } } diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.symbols.diff index e0c6d108d2..e499b3e7ed 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassSelfReferencedProperty.symbols.diff @@ -5,11 +5,15 @@ constructor () { this.testStackOverflow = this.testStackOverflow.bind(this) ->this.testStackOverflow : Symbol(StackOverflowTest.testStackOverflow, Decl(foo.js, 1, 18)) ++>this.testStackOverflow : Symbol(testStackOverflow, Decl(foo.js, 1, 18)) >this : Symbol(StackOverflowTest, Decl(foo.js, 0, 0)) ->testStackOverflow : Symbol(StackOverflowTest.testStackOverflow, Decl(foo.js, 1, 18)) ->this.testStackOverflow : Symbol(StackOverflowTest.testStackOverflow, Decl(foo.js, 1, 18)) ++>testStackOverflow : Symbol(testStackOverflow, Decl(foo.js, 1, 18)) ++>this.testStackOverflow : Symbol(testStackOverflow, Decl(foo.js, 1, 18)) >this : Symbol(StackOverflowTest, Decl(foo.js, 0, 0)) ->testStackOverflow : Symbol(StackOverflowTest.testStackOverflow, Decl(foo.js, 1, 18)) ++>testStackOverflow : Symbol(testStackOverflow, Decl(foo.js, 1, 18)) >this : Symbol(StackOverflowTest, Decl(foo.js, 0, 0)) } } diff --git a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.errors.txt deleted file mode 100644 index 89bd8e1449..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.errors.txt +++ /dev/null @@ -1,62 +0,0 @@ -jsFileMethodOverloads.js(9,10): error TS2339: Property 'value' does not exist on type 'Example'. -jsFileMethodOverloads.js(26,24): error TS2339: Property 'value' does not exist on type 'Example'. -jsFileMethodOverloads.js(44,25): error TS2339: Property 'value' does not exist on type 'Example'. -jsFileMethodOverloads.js(44,39): error TS2339: Property 'value' does not exist on type 'Example'. - - -==== jsFileMethodOverloads.js (4 errors) ==== - /** - * @template T - */ - class Example { - /** - * @param {T} value - */ - constructor(value) { - this.value = value; - ~~~~~ -!!! error TS2339: Property 'value' does not exist on type 'Example'. - } - - /** - * @overload - * @param {Example} this - * @returns {'number'} - */ - /** - * @overload - * @param {Example} this - * @returns {'string'} - */ - /** - * @returns {string} - */ - getTypeName() { - return typeof this.value; - ~~~~~ -!!! error TS2339: Property 'value' does not exist on type 'Example'. - } - - /** - * @template U - * @overload - * @param {(y: T) => U} fn - * @returns {U} - */ - /** - * @overload - * @returns {T} - */ - /** - * @param {(y: T) => unknown} [fn] - * @returns {unknown} - */ - transform(fn) { - return fn ? fn(this.value) : this.value; - ~~~~~ -!!! error TS2339: Property 'value' does not exist on type 'Example'. - ~~~~~ -!!! error TS2339: Property 'value' does not exist on type 'Example'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.symbols b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.symbols index a687c543b7..48393c0e27 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.symbols @@ -14,7 +14,9 @@ >value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 14)) this.value = value; +>this.value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads.js, 0, 0)) +>value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) >value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 14)) } @@ -35,7 +37,9 @@ >getTypeName : Symbol(getTypeName, Decl(jsFileMethodOverloads.js, 9, 3)) return typeof this.value; +>this.value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads.js, 0, 0)) +>value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) } /** @@ -59,8 +63,12 @@ return fn ? fn(this.value) : this.value; >fn : Symbol(fn, Decl(jsFileMethodOverloads.js, 42, 12)) >fn : Symbol(fn, Decl(jsFileMethodOverloads.js, 42, 12)) +>this.value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads.js, 0, 0)) +>value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) +>this.value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads.js, 0, 0)) +>value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) } } diff --git a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.symbols.diff index 73eec63d7a..26026c746b 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.symbols.diff @@ -5,12 +5,14 @@ this.value = value; ->this.value : Symbol(Example.value, Decl(jsFileMethodOverloads.js, 7, 22)) ++>this.value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads.js, 0, 0)) ->value : Symbol(Example.value, Decl(jsFileMethodOverloads.js, 7, 22)) ++>value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) >value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 14)) } -@@= skipped -20, +18 lines =@@ +@@= skipped -20, +20 lines =@@ * @returns {string} */ getTypeName() { @@ -19,12 +21,14 @@ return typeof this.value; ->this.value : Symbol(Example.value, Decl(jsFileMethodOverloads.js, 7, 22)) ++>this.value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads.js, 0, 0)) ->value : Symbol(Example.value, Decl(jsFileMethodOverloads.js, 7, 22)) ++>value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) } /** -@@= skipped -23, +21 lines =@@ +@@= skipped -23, +23 lines =@@ * @returns {unknown} */ transform(fn) { @@ -36,11 +40,15 @@ >fn : Symbol(fn, Decl(jsFileMethodOverloads.js, 42, 12)) >fn : Symbol(fn, Decl(jsFileMethodOverloads.js, 42, 12)) ->this.value : Symbol(Example.value, Decl(jsFileMethodOverloads.js, 7, 22)) ++>this.value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads.js, 0, 0)) ->value : Symbol(Example.value, Decl(jsFileMethodOverloads.js, 7, 22)) ->this.value : Symbol(Example.value, Decl(jsFileMethodOverloads.js, 7, 22)) ++>value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) ++>this.value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads.js, 0, 0)) ->value : Symbol(Example.value, Decl(jsFileMethodOverloads.js, 7, 22)) ++>value : Symbol(value, Decl(jsFileMethodOverloads.js, 7, 22)) } } diff --git a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.types b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.types index bc65bc8731..088962be63 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.types +++ b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.types @@ -15,9 +15,9 @@ this.value = value; >this.value = value : T ->this.value : any +>this.value : T >this : this ->value : any +>value : T >value : T } @@ -39,9 +39,9 @@ return typeof this.value; >typeof this.value : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" ->this.value : any +>this.value : T >this : this ->value : any +>value : T } /** @@ -63,16 +63,16 @@ >fn : (y: T) => unknown return fn ? fn(this.value) : this.value; ->fn ? fn(this.value) : this.value : any +>fn ? fn(this.value) : this.value : unknown >fn : (y: T) => unknown >fn(this.value) : unknown >fn : (y: T) => unknown ->this.value : any +>this.value : T >this : this ->value : any ->this.value : any +>value : T +>this.value : T >this : this ->value : any +>value : T } } diff --git a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.errors.txt deleted file mode 100644 index 1a58e0d84c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.errors.txt +++ /dev/null @@ -1,59 +0,0 @@ -jsFileMethodOverloads2.js(10,10): error TS2339: Property 'value' does not exist on type 'Example'. -jsFileMethodOverloads2.js(25,24): error TS2339: Property 'value' does not exist on type 'Example'. -jsFileMethodOverloads2.js(41,25): error TS2339: Property 'value' does not exist on type 'Example'. -jsFileMethodOverloads2.js(41,39): error TS2339: Property 'value' does not exist on type 'Example'. - - -==== jsFileMethodOverloads2.js (4 errors) ==== - // Also works if all @overload tags are combined in one comment. - /** - * @template T - */ - class Example { - /** - * @param {T} value - */ - constructor(value) { - this.value = value; - ~~~~~ -!!! error TS2339: Property 'value' does not exist on type 'Example'. - } - - /** - * @overload - * @param {Example} this - * @returns {'number'} - * - * @overload - * @param {Example} this - * @returns {'string'} - * - * @returns {string} - */ - getTypeName() { - return typeof this.value; - ~~~~~ -!!! error TS2339: Property 'value' does not exist on type 'Example'. - } - - /** - * @template U - * @overload - * @param {(y: T) => U} fn - * @returns {U} - * - * @overload - * @returns {T} - * - * @param {(y: T) => unknown} [fn] - * @returns {unknown} - */ - transform(fn) { - return fn ? fn(this.value) : this.value; - ~~~~~ -!!! error TS2339: Property 'value' does not exist on type 'Example'. - ~~~~~ -!!! error TS2339: Property 'value' does not exist on type 'Example'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.symbols b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.symbols index 4c9111b516..577a8c148a 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.symbols @@ -15,7 +15,9 @@ >value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 14)) this.value = value; +>this.value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads2.js, 0, 0)) +>value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) >value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 14)) } @@ -34,7 +36,9 @@ >getTypeName : Symbol(getTypeName, Decl(jsFileMethodOverloads2.js, 10, 3)) return typeof this.value; +>this.value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads2.js, 0, 0)) +>value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) } /** @@ -56,8 +60,12 @@ return fn ? fn(this.value) : this.value; >fn : Symbol(fn, Decl(jsFileMethodOverloads2.js, 39, 12)) >fn : Symbol(fn, Decl(jsFileMethodOverloads2.js, 39, 12)) +>this.value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads2.js, 0, 0)) +>value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) +>this.value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads2.js, 0, 0)) +>value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) } } diff --git a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.symbols.diff index 2dd9b9fe6c..9f909d2fd1 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.symbols.diff @@ -5,12 +5,14 @@ this.value = value; ->this.value : Symbol(Example.value, Decl(jsFileMethodOverloads2.js, 8, 22)) ++>this.value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads2.js, 0, 0)) ->value : Symbol(Example.value, Decl(jsFileMethodOverloads2.js, 8, 22)) ++>value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) >value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 14)) } -@@= skipped -18, +16 lines =@@ +@@= skipped -18, +18 lines =@@ * @returns {string} */ getTypeName() { @@ -19,12 +21,14 @@ return typeof this.value; ->this.value : Symbol(Example.value, Decl(jsFileMethodOverloads2.js, 8, 22)) ++>this.value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads2.js, 0, 0)) ->value : Symbol(Example.value, Decl(jsFileMethodOverloads2.js, 8, 22)) ++>value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) } /** -@@= skipped -21, +19 lines =@@ +@@= skipped -21, +21 lines =@@ * @returns {unknown} */ transform(fn) { @@ -36,11 +40,15 @@ >fn : Symbol(fn, Decl(jsFileMethodOverloads2.js, 39, 12)) >fn : Symbol(fn, Decl(jsFileMethodOverloads2.js, 39, 12)) ->this.value : Symbol(Example.value, Decl(jsFileMethodOverloads2.js, 8, 22)) ++>this.value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads2.js, 0, 0)) ->value : Symbol(Example.value, Decl(jsFileMethodOverloads2.js, 8, 22)) ->this.value : Symbol(Example.value, Decl(jsFileMethodOverloads2.js, 8, 22)) ++>value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) ++>this.value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) >this : Symbol(Example, Decl(jsFileMethodOverloads2.js, 0, 0)) ->value : Symbol(Example.value, Decl(jsFileMethodOverloads2.js, 8, 22)) ++>value : Symbol(value, Decl(jsFileMethodOverloads2.js, 8, 22)) } } diff --git a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.types b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.types index 070ca77f5a..cb8e52b272 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.types +++ b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.types @@ -16,9 +16,9 @@ this.value = value; >this.value = value : T ->this.value : any +>this.value : T >this : this ->value : any +>value : T >value : T } @@ -38,9 +38,9 @@ return typeof this.value; >typeof this.value : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" ->this.value : any +>this.value : T >this : this ->value : any +>value : T } /** @@ -60,16 +60,16 @@ >fn : (y: T) => unknown return fn ? fn(this.value) : this.value; ->fn ? fn(this.value) : this.value : any +>fn ? fn(this.value) : this.value : unknown >fn : (y: T) => unknown >fn(this.value) : unknown >fn : (y: T) => unknown ->this.value : any +>this.value : T >this : this ->value : any ->this.value : any +>value : T +>this.value : T >this : this ->value : any +>value : T } } diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt b/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt index af49fe3be6..6313e5e403 100644 --- a/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt @@ -1,10 +1,8 @@ propertyOrdering.ts(6,23): error TS2301: Initializer of instance member variable '_store' cannot reference identifier 'store' declared in the constructor. propertyOrdering.ts(9,34): error TS2551: Property 'store' does not exist on type 'Foo'. Did you mean '_store'? -propertyOrdering.ts(16,25): error TS2339: Property '_store' does not exist on type 'Bar'. -propertyOrdering.ts(20,14): error TS2339: Property '_store' does not exist on type 'Bar'. -==== propertyOrdering.ts (4 errors) ==== +==== propertyOrdering.ts (2 errors) ==== class Foo { constructor(store: string) { } public foo() { @@ -26,14 +24,10 @@ propertyOrdering.ts(20,14): error TS2339: Property '_store' does not exist on ty public foo() { return this._store.length; // shouldn't be an error - ~~~~~~ -!!! error TS2339: Property '_store' does not exist on type 'Bar'. } constructor(store: string) { this._store = store; - ~~~~~~ -!!! error TS2339: Property '_store' does not exist on type 'Bar'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt.diff new file mode 100644 index 0000000000..2bf48c6035 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt.diff @@ -0,0 +1,29 @@ +--- old.propertyOrdering.errors.txt ++++ new.propertyOrdering.errors.txt +@@= skipped -0, +0 lines =@@ + propertyOrdering.ts(6,23): error TS2301: Initializer of instance member variable '_store' cannot reference identifier 'store' declared in the constructor. + propertyOrdering.ts(9,34): error TS2551: Property 'store' does not exist on type 'Foo'. Did you mean '_store'? +-propertyOrdering.ts(16,25): error TS2339: Property '_store' does not exist on type 'Bar'. +-propertyOrdering.ts(20,14): error TS2339: Property '_store' does not exist on type 'Bar'. + + +-==== propertyOrdering.ts (4 errors) ==== ++==== propertyOrdering.ts (2 errors) ==== + class Foo { + constructor(store: string) { } + public foo() { +@@= skipped -25, +23 lines =@@ + public foo() { + + return this._store.length; // shouldn't be an error +- ~~~~~~ +-!!! error TS2339: Property '_store' does not exist on type 'Bar'. + + } + constructor(store: string) { + this._store = store; +- ~~~~~~ +-!!! error TS2339: Property '_store' does not exist on type 'Bar'. + } + } + diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols b/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols index 9422e77318..8c8c7bde9b 100644 --- a/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols +++ b/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols @@ -32,14 +32,20 @@ class Bar { >foo : Symbol(foo, Decl(propertyOrdering.ts, 12, 11)) return this._store.length; // shouldn't be an error +>this._store.length : Symbol(length, Decl(lib.es5.d.ts, --, --)) +>this._store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) >this : Symbol(Bar, Decl(propertyOrdering.ts, 10, 1)) +>_store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) +>length : Symbol(length, Decl(lib.es5.d.ts, --, --)) } constructor(store: string) { >store : Symbol(store, Decl(propertyOrdering.ts, 18, 16)) this._store = store; +>this._store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) >this : Symbol(Bar, Decl(propertyOrdering.ts, 10, 1)) +>_store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) >store : Symbol(store, Decl(propertyOrdering.ts, 18, 16)) } } diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols.diff b/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols.diff index 0309e502b7..4155aed8b2 100644 --- a/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols.diff @@ -33,4 +33,20 @@ +>foo : Symbol(foo, Decl(propertyOrdering.ts, 12, 11)) return this._store.length; // shouldn't be an error ++>this._store.length : Symbol(length, Decl(lib.es5.d.ts, --, --)) ++>this._store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) >this : Symbol(Bar, Decl(propertyOrdering.ts, 10, 1)) ++>_store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) ++>length : Symbol(length, Decl(lib.es5.d.ts, --, --)) + + } + constructor(store: string) { + >store : Symbol(store, Decl(propertyOrdering.ts, 18, 16)) + + this._store = store; ++>this._store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) + >this : Symbol(Bar, Decl(propertyOrdering.ts, 10, 1)) ++>_store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) + >store : Symbol(store, Decl(propertyOrdering.ts, 18, 16)) + } + } diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.types b/testdata/baselines/reference/submodule/compiler/propertyOrdering.types index bfeea1ec81..7a3735fc99 100644 --- a/testdata/baselines/reference/submodule/compiler/propertyOrdering.types +++ b/testdata/baselines/reference/submodule/compiler/propertyOrdering.types @@ -34,14 +34,14 @@ class Bar { >Bar : Bar public foo() { ->foo : () => any +>foo : () => number return this._store.length; // shouldn't be an error ->this._store.length : any ->this._store : any +>this._store.length : number +>this._store : string >this : this ->_store : any ->length : any +>_store : string +>length : number } constructor(store: string) { @@ -49,9 +49,9 @@ class Bar { this._store = store; >this._store = store : string ->this._store : any +>this._store : string >this : this ->_store : any +>_store : string >store : string } } diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.types.diff b/testdata/baselines/reference/submodule/compiler/propertyOrdering.types.diff new file mode 100644 index 0000000000..09e3305474 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/propertyOrdering.types.diff @@ -0,0 +1,34 @@ +--- old.propertyOrdering.types ++++ new.propertyOrdering.types +@@= skipped -33, +33 lines =@@ + >Bar : Bar + + public foo() { +->foo : () => any ++>foo : () => number + + return this._store.length; // shouldn't be an error +->this._store.length : any +->this._store : any ++>this._store.length : number ++>this._store : string + >this : this +->_store : any +->length : any ++>_store : string ++>length : number + + } + constructor(store: string) { +@@= skipped -15, +15 lines =@@ + + this._store = store; + >this._store = store : string +->this._store : any ++>this._store : string + >this : this +->_store : any ++>_store : string + >store : string + } + } diff --git a/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols b/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols index 376b9ea6df..219d1f0af3 100644 --- a/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols +++ b/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols @@ -7,5 +7,6 @@ class X { constructor() { this['__proto__'] = null; // used to cause ICE >this : Symbol(X, Decl(protoInIndexer.ts, 0, 0)) +>'__proto__' : Symbol(__proto__, Decl(protoInIndexer.ts, 1, 19)) } } diff --git a/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols.diff b/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols.diff new file mode 100644 index 0000000000..7a258511d9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols.diff @@ -0,0 +1,9 @@ +--- old.protoInIndexer.symbols ++++ new.protoInIndexer.symbols +@@= skipped -6, +6 lines =@@ + constructor() { + this['__proto__'] = null; // used to cause ICE + >this : Symbol(X, Decl(protoInIndexer.ts, 0, 0)) ++>'__proto__' : Symbol(__proto__, Decl(protoInIndexer.ts, 1, 19)) + } + } diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt deleted file mode 100644 index ece87dc999..0000000000 --- a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -readonlyAssignmentInSubclassOfClassExpression.ts(4,14): error TS2540: Cannot assign to 'attrib' because it is a read-only property. - - -==== readonlyAssignmentInSubclassOfClassExpression.ts (1 errors) ==== - class C extends (class {} as new () => Readonly<{ attrib: number }>) { - constructor() { - super() - this.attrib = 2 - ~~~~~~ -!!! error TS2540: Cannot assign to 'attrib' because it is a read-only property. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt.diff new file mode 100644 index 0000000000..b10e43db02 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt.diff @@ -0,0 +1,18 @@ +--- old.readonlyAssignmentInSubclassOfClassExpression.errors.txt ++++ new.readonlyAssignmentInSubclassOfClassExpression.errors.txt +@@= skipped -0, +-1 lines =@@ +-readonlyAssignmentInSubclassOfClassExpression.ts(4,14): error TS2540: Cannot assign to 'attrib' because it is a read-only property. +- +- +-==== readonlyAssignmentInSubclassOfClassExpression.ts (1 errors) ==== +- class C extends (class {} as new () => Readonly<{ attrib: number }>) { +- constructor() { +- super() +- this.attrib = 2 +- ~~~~~~ +-!!! error TS2540: Cannot assign to 'attrib' because it is a read-only property. +- } +- } +- +@@= skipped --1, +1 lines =@@ ++ diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols index a0ee4d5686..0dbdd091e1 100644 --- a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols +++ b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols @@ -11,9 +11,9 @@ class C extends (class {} as new () => Readonly<{ attrib: number }>) { >super : Symbol((Anonymous type), Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 28)) this.attrib = 2 ->this.attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 49)) +>this.attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 2, 15)) >this : Symbol(C, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 0)) ->attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 49)) +>attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 2, 15)) } } diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols.diff b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols.diff index 9c341797a2..61cdf8abbb 100644 --- a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols.diff @@ -8,4 +8,11 @@ +>super : Symbol((Anonymous type), Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 28)) this.attrib = 2 - >this.attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 49)) +->this.attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 49)) ++>this.attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 2, 15)) + >this : Symbol(C, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 0)) +->attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 49)) ++>attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 2, 15)) + } + } + diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types index d17d413d3b..4d2b000c26 100644 --- a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types +++ b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types @@ -15,9 +15,9 @@ class C extends (class {} as new () => Readonly<{ attrib: number }>) { this.attrib = 2 >this.attrib = 2 : 2 ->this.attrib : any +>this.attrib : number >this : this ->attrib : any +>attrib : number >2 : 2 } } diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types.diff b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types.diff new file mode 100644 index 0000000000..d2c7a428c5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types.diff @@ -0,0 +1,14 @@ +--- old.readonlyAssignmentInSubclassOfClassExpression.types ++++ new.readonlyAssignmentInSubclassOfClassExpression.types +@@= skipped -14, +14 lines =@@ + + this.attrib = 2 + >this.attrib = 2 : 2 +->this.attrib : any ++>this.attrib : number + >this : this +->attrib : any ++>attrib : number + >2 : 2 + } + } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols index befe1abcb8..443796de78 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols @@ -16,9 +16,9 @@ class D extends C { v = 1; this.p = 1; ->this.p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) +>this.p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 3, 12)) >this : Symbol(D, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 42)) ->p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) +>p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 3, 12)) s = 1; } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols.diff index 26f1f96c28..b21f7a6231 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols.diff @@ -22,10 +22,10 @@ v = 1; this.p = 1; ->this.p : Symbol(C.p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) -+>this.p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) ++>this.p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 3, 12)) >this : Symbol(D, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 42)) ->p : Symbol(C.p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) -+>p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) ++>p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 3, 12)) s = 1; } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types index 6578619fba..a4f81a8132 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types @@ -21,9 +21,9 @@ class D extends C { this.p = 1; >this.p = 1 : 1 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >1 : 1 s = 1; diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types.diff new file mode 100644 index 0000000000..6fcf57deb0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types.diff @@ -0,0 +1,14 @@ +--- old.scopeCheckExtendedClassInsidePublicMethod2.types ++++ new.scopeCheckExtendedClassInsidePublicMethod2.types +@@= skipped -20, +20 lines =@@ + + this.p = 1; + >this.p = 1 : 1 +->this.p : any ++>this.p : number + >this : this +->p : any ++>p : number + >1 : 1 + + s = 1; diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt index 3db23f9143..3bec1ec139 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt @@ -1,9 +1,8 @@ scopeCheckExtendedClassInsideStaticMethod1.ts(4,7): error TS2304: Cannot find name 'v'. -scopeCheckExtendedClassInsideStaticMethod1.ts(5,12): error TS2339: Property 'p' does not exist on type 'typeof D'. scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? -==== scopeCheckExtendedClassInsideStaticMethod1.ts (3 errors) ==== +==== scopeCheckExtendedClassInsideStaticMethod1.ts (2 errors) ==== class C { private v; public p; static s; } class D extends C { static c() { @@ -11,8 +10,6 @@ scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error TS2662: Cannot find na ~ !!! error TS2304: Cannot find name 'v'. this.p = 1; - ~ -!!! error TS2339: Property 'p' does not exist on type 'typeof D'. s = 1; ~ !!! error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt.diff new file mode 100644 index 0000000000..75e3573376 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt.diff @@ -0,0 +1,22 @@ +--- old.scopeCheckExtendedClassInsideStaticMethod1.errors.txt ++++ new.scopeCheckExtendedClassInsideStaticMethod1.errors.txt +@@= skipped -0, +0 lines =@@ + scopeCheckExtendedClassInsideStaticMethod1.ts(4,7): error TS2304: Cannot find name 'v'. +-scopeCheckExtendedClassInsideStaticMethod1.ts(5,12): error TS2339: Property 'p' does not exist on type 'typeof D'. + scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? + + +-==== scopeCheckExtendedClassInsideStaticMethod1.ts (3 errors) ==== ++==== scopeCheckExtendedClassInsideStaticMethod1.ts (2 errors) ==== + class C { private v; public p; static s; } + class D extends C { + static c() { +@@= skipped -10, +9 lines =@@ + ~ + !!! error TS2304: Cannot find name 'v'. + this.p = 1; +- ~ +-!!! error TS2339: Property 'p' does not exist on type 'typeof D'. + s = 1; + ~ + !!! error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols index 08bcededef..98dcfd4906 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols @@ -16,7 +16,9 @@ class D extends C { v = 1; this.p = 1; +>this.p : Symbol(p, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 3, 12)) >this : Symbol(D, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 0, 42)) +>p : Symbol(p, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 3, 12)) s = 1; } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols.diff index a728125224..e100b26e3b 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols.diff @@ -21,3 +21,9 @@ v = 1; this.p = 1; ++>this.p : Symbol(p, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 3, 12)) + >this : Symbol(D, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 0, 42)) ++>p : Symbol(p, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 3, 12)) + + s = 1; + } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types index 36f5abfc19..83b8d9a6af 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types @@ -21,9 +21,9 @@ class D extends C { this.p = 1; >this.p = 1 : 1 ->this.p : any +>this.p : number >this : typeof D ->p : any +>p : number >1 : 1 s = 1; diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types.diff new file mode 100644 index 0000000000..c06890b994 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types.diff @@ -0,0 +1,14 @@ +--- old.scopeCheckExtendedClassInsideStaticMethod1.types ++++ new.scopeCheckExtendedClassInsideStaticMethod1.types +@@= skipped -20, +20 lines =@@ + + this.p = 1; + >this.p = 1 : 1 +->this.p : any ++>this.p : number + >this : typeof D +->p : any ++>p : number + >1 : 1 + + s = 1; diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt index 1a8297dc3b..794c40f895 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt @@ -1,8 +1,7 @@ scopeCheckInsideStaticMethod1.ts(6,7): error TS2304: Cannot find name 'v'. -scopeCheckInsideStaticMethod1.ts(8,12): error TS2339: Property 'p' does not exist on type 'typeof C'. -==== scopeCheckInsideStaticMethod1.ts (2 errors) ==== +==== scopeCheckInsideStaticMethod1.ts (1 errors) ==== class C { private v; public p; @@ -13,7 +12,5 @@ scopeCheckInsideStaticMethod1.ts(8,12): error TS2339: Property 'p' does not exis !!! error TS2304: Cannot find name 'v'. C.s = 1; this.p = 1; // ERR - ~ -!!! error TS2339: Property 'p' does not exist on type 'typeof C'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt.diff new file mode 100644 index 0000000000..93aa9f22d0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt.diff @@ -0,0 +1,20 @@ +--- old.scopeCheckInsideStaticMethod1.errors.txt ++++ new.scopeCheckInsideStaticMethod1.errors.txt +@@= skipped -0, +0 lines =@@ + scopeCheckInsideStaticMethod1.ts(6,7): error TS2304: Cannot find name 'v'. +-scopeCheckInsideStaticMethod1.ts(8,12): error TS2339: Property 'p' does not exist on type 'typeof C'. + + +-==== scopeCheckInsideStaticMethod1.ts (2 errors) ==== ++==== scopeCheckInsideStaticMethod1.ts (1 errors) ==== + class C { + private v; + public p; +@@= skipped -12, +11 lines =@@ + !!! error TS2304: Cannot find name 'v'. + C.s = 1; + this.p = 1; // ERR +- ~ +-!!! error TS2339: Property 'p' does not exist on type 'typeof C'. + } + } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols index 3ab9c0f4cc..976a6f22be 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols @@ -23,6 +23,8 @@ class C { >s : Symbol(s, Decl(scopeCheckInsideStaticMethod1.ts, 2, 12)) this.p = 1; // ERR +>this.p : Symbol(p, Decl(scopeCheckInsideStaticMethod1.ts, 6, 14)) >this : Symbol(C, Decl(scopeCheckInsideStaticMethod1.ts, 0, 0)) +>p : Symbol(p, Decl(scopeCheckInsideStaticMethod1.ts, 6, 14)) } } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols.diff index 7dff4e17a6..522879604c 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols.diff @@ -28,4 +28,8 @@ +>s : Symbol(s, Decl(scopeCheckInsideStaticMethod1.ts, 2, 12)) this.p = 1; // ERR ++>this.p : Symbol(p, Decl(scopeCheckInsideStaticMethod1.ts, 6, 14)) >this : Symbol(C, Decl(scopeCheckInsideStaticMethod1.ts, 0, 0)) ++>p : Symbol(p, Decl(scopeCheckInsideStaticMethod1.ts, 6, 14)) + } + } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types index 90e3674361..9d26bfbfb8 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types @@ -30,9 +30,9 @@ class C { this.p = 1; // ERR >this.p = 1 : 1 ->this.p : any +>this.p : number >this : typeof C ->p : any +>p : number >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types.diff new file mode 100644 index 0000000000..4e6e7ead92 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types.diff @@ -0,0 +1,14 @@ +--- old.scopeCheckInsideStaticMethod1.types ++++ new.scopeCheckInsideStaticMethod1.types +@@= skipped -29, +29 lines =@@ + + this.p = 1; // ERR + >this.p = 1 : 1 +->this.p : any ++>this.p : number + >this : typeof C +->p : any ++>p : number + >1 : 1 + } + } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt b/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt index df048098a2..423f23bbc9 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt @@ -1,11 +1,10 @@ staticVisibility.ts(9,9): error TS2662: Cannot find name 's'. Did you mean the static member 'C1.s'? staticVisibility.ts(12,9): error TS2662: Cannot find name 'b'. Did you mean the static member 'C1.b'? staticVisibility.ts(17,9): error TS2304: Cannot find name 'v'. -staticVisibility.ts(18,14): error TS2339: Property 'p' does not exist on type 'typeof C1'. staticVisibility.ts(32,29): error TS2304: Cannot find name 'barback'. -==== staticVisibility.ts (5 errors) ==== +==== staticVisibility.ts (4 errors) ==== class C1 { p: any; @@ -30,8 +29,6 @@ staticVisibility.ts(32,29): error TS2304: Cannot find name 'barback'. ~ !!! error TS2304: Cannot find name 'v'. this.p = 0; // should be error - ~ -!!! error TS2339: Property 'p' does not exist on type 'typeof C1'. C1.s = 1; // should be ok } } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt.diff new file mode 100644 index 0000000000..55120768bc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt.diff @@ -0,0 +1,24 @@ +--- old.staticVisibility.errors.txt ++++ new.staticVisibility.errors.txt +@@= skipped -0, +0 lines =@@ + staticVisibility.ts(9,9): error TS2662: Cannot find name 's'. Did you mean the static member 'C1.s'? + staticVisibility.ts(12,9): error TS2662: Cannot find name 'b'. Did you mean the static member 'C1.b'? + staticVisibility.ts(17,9): error TS2304: Cannot find name 'v'. +-staticVisibility.ts(18,14): error TS2339: Property 'p' does not exist on type 'typeof C1'. + staticVisibility.ts(32,29): error TS2304: Cannot find name 'barback'. + + +-==== staticVisibility.ts (5 errors) ==== ++==== staticVisibility.ts (4 errors) ==== + class C1 { + + p: any; +@@= skipped -29, +28 lines =@@ + ~ + !!! error TS2304: Cannot find name 'v'. + this.p = 0; // should be error +- ~ +-!!! error TS2339: Property 'p' does not exist on type 'typeof C1'. + C1.s = 1; // should be ok + } + } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols b/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols index 25292d35f4..59e2964be7 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols @@ -32,7 +32,9 @@ class C1 { v = 1; // should be error this.p = 0; // should be error +>this.p : Symbol(p, Decl(staticVisibility.ts, 16, 14)) >this : Symbol(C1, Decl(staticVisibility.ts, 0, 0)) +>p : Symbol(p, Decl(staticVisibility.ts, 16, 14)) C1.s = 1; // should be ok >C1.s : Symbol(s, Decl(staticVisibility.ts, 2, 11)) diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols.diff index c1ec242d18..3c540baff1 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols.diff @@ -38,7 +38,9 @@ v = 1; // should be error this.p = 0; // should be error ++>this.p : Symbol(p, Decl(staticVisibility.ts, 16, 14)) >this : Symbol(C1, Decl(staticVisibility.ts, 0, 0)) ++>p : Symbol(p, Decl(staticVisibility.ts, 16, 14)) C1.s = 1; // should be ok ->C1.s : Symbol(C1.s, Decl(staticVisibility.ts, 2, 11)) @@ -49,7 +51,7 @@ } } -@@= skipped -29, +29 lines =@@ +@@= skipped -29, +31 lines =@@ >C2 : Symbol(C2, Decl(staticVisibility.ts, 20, 1)) barback:string = ""; diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.types b/testdata/baselines/reference/submodule/compiler/staticVisibility.types index 7d82e93bc7..00897f3b48 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility.types +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility.types @@ -48,9 +48,9 @@ class C1 { this.p = 0; // should be error >this.p = 0 : 0 ->this.p : any +>this.p : number >this : typeof C1 ->p : any +>p : number >0 : 0 C1.s = 1; // should be ok diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.types.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility.types.diff new file mode 100644 index 0000000000..e8bd5325db --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility.types.diff @@ -0,0 +1,14 @@ +--- old.staticVisibility.types ++++ new.staticVisibility.types +@@= skipped -47, +47 lines =@@ + + this.p = 0; // should be error + >this.p = 0 : 0 +->this.p : any ++>this.p : number + >this : typeof C1 +->p : any ++>p : number + >0 : 0 + + C1.s = 1; // should be ok diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt b/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt index 76c3866179..bd2cf43d98 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt @@ -1,15 +1,12 @@ staticVisibility2.ts(2,12): error TS7008: Member 'sideLength' implicitly has an 'any' type. -staticVisibility2.ts(4,14): error TS2576: Property 'sideLength' does not exist on type 'Square'. Did you mean to access the static member 'Square.sideLength' instead? -==== staticVisibility2.ts (2 errors) ==== +==== staticVisibility2.ts (1 errors) ==== class Square { static sideLength; ~~~~~~~~~~ !!! error TS7008: Member 'sideLength' implicitly has an 'any' type. constructor(sideLength: number) { this.sideLength = sideLength; - ~~~~~~~~~~ -!!! error TS2576: Property 'sideLength' does not exist on type 'Square'. Did you mean to access the static member 'Square.sideLength' instead? } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt.diff new file mode 100644 index 0000000000..725fd3363d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt.diff @@ -0,0 +1,19 @@ +--- old.staticVisibility2.errors.txt ++++ new.staticVisibility2.errors.txt +@@= skipped -0, +0 lines =@@ + staticVisibility2.ts(2,12): error TS7008: Member 'sideLength' implicitly has an 'any' type. +-staticVisibility2.ts(4,14): error TS2576: Property 'sideLength' does not exist on type 'Square'. Did you mean to access the static member 'Square.sideLength' instead? + + +-==== staticVisibility2.ts (2 errors) ==== ++==== staticVisibility2.ts (1 errors) ==== + class Square { + static sideLength; + ~~~~~~~~~~ + !!! error TS7008: Member 'sideLength' implicitly has an 'any' type. + constructor(sideLength: number) { + this.sideLength = sideLength; +- ~~~~~~~~~~ +-!!! error TS2576: Property 'sideLength' does not exist on type 'Square'. Did you mean to access the static member 'Square.sideLength' instead? + } + } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols b/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols index ed9aebe5ee..7273b9df56 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols @@ -11,7 +11,9 @@ class Square { >sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 16)) this.sideLength = sideLength; +>this.sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 37)) >this : Symbol(Square, Decl(staticVisibility2.ts, 0, 0)) +>sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 37)) >sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 16)) } } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols.diff index 22415975fb..540967ccfd 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols.diff @@ -9,3 +9,11 @@ constructor(sideLength: number) { >sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 16)) + + this.sideLength = sideLength; ++>this.sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 37)) + >this : Symbol(Square, Decl(staticVisibility2.ts, 0, 0)) ++>sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 37)) + >sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 16)) + } + } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.types b/testdata/baselines/reference/submodule/compiler/staticVisibility2.types index b26a196254..57030dc87b 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility2.types +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility2.types @@ -12,9 +12,9 @@ class Square { this.sideLength = sideLength; >this.sideLength = sideLength : number ->this.sideLength : any +>this.sideLength : number >this : this ->sideLength : any +>sideLength : number >sideLength : number } } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.types.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility2.types.diff new file mode 100644 index 0000000000..1d4ca5a4fb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility2.types.diff @@ -0,0 +1,14 @@ +--- old.staticVisibility2.types ++++ new.staticVisibility2.types +@@= skipped -11, +11 lines =@@ + + this.sideLength = sideLength; + >this.sideLength = sideLength : number +->this.sideLength : any ++>this.sideLength : number + >this : this +->sideLength : any + >sideLength : number ++>sideLength : number + } + } diff --git a/testdata/baselines/reference/submodule/compiler/statics.errors.txt b/testdata/baselines/reference/submodule/compiler/statics.errors.txt deleted file mode 100644 index e4b8e90349..0000000000 --- a/testdata/baselines/reference/submodule/compiler/statics.errors.txt +++ /dev/null @@ -1,40 +0,0 @@ -statics.ts(6,18): error TS2339: Property 'g' does not exist on type 'C'. -statics.ts(23,33): error TS2339: Property 'g' does not exist on type 'C'. - - -==== statics.ts (2 errors) ==== - module M { - export class C { - x: number; - constructor(public c1: number, public c2: number, c3: number) { - this.x = C.y+this.c1+this.c2+c3; - this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub); - ~ -!!! error TS2339: Property 'g' does not exist on type 'C'. - } - - static priv=2; - static pub=3; - static y=C.priv; - static f(n:number) { - return "wow: "+(n+C.y+C.pub+C.priv); - - } - } - var c=C.y; - export function f() { - var result=""; - result+=(c); - result+=(new C(0,1,2).x); - result+=(C.f(10)); - result+=(new C(5,10,20).g(C.y)); - ~ -!!! error TS2339: Property 'g' does not exist on type 'C'. - return result; - } - } - - M.f(); - - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/statics.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/statics.errors.txt.diff new file mode 100644 index 0000000000..7be67a6480 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/statics.errors.txt.diff @@ -0,0 +1,45 @@ +--- old.statics.errors.txt ++++ new.statics.errors.txt +@@= skipped -0, +-1 lines =@@ +-statics.ts(6,18): error TS2339: Property 'g' does not exist on type 'C'. +-statics.ts(23,33): error TS2339: Property 'g' does not exist on type 'C'. +- +- +-==== statics.ts (2 errors) ==== +- module M { +- export class C { +- x: number; +- constructor(public c1: number, public c2: number, c3: number) { +- this.x = C.y+this.c1+this.c2+c3; +- this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub); +- ~ +-!!! error TS2339: Property 'g' does not exist on type 'C'. +- } +- +- static priv=2; +- static pub=3; +- static y=C.priv; +- static f(n:number) { +- return "wow: "+(n+C.y+C.pub+C.priv); +- +- } +- } +- var c=C.y; +- export function f() { +- var result=""; +- result+=(c); +- result+=(new C(0,1,2).x); +- result+=(C.f(10)); +- result+=(new C(5,10,20).g(C.y)); +- ~ +-!!! error TS2339: Property 'g' does not exist on type 'C'. +- return result; +- } +- } +- +- M.f(); +- +- +- +@@= skipped --1, +1 lines =@@ ++ diff --git a/testdata/baselines/reference/submodule/compiler/statics.symbols b/testdata/baselines/reference/submodule/compiler/statics.symbols index 79b105b579..cd68335214 100644 --- a/testdata/baselines/reference/submodule/compiler/statics.symbols +++ b/testdata/baselines/reference/submodule/compiler/statics.symbols @@ -31,7 +31,9 @@ module M { >c3 : Symbol(c3, Decl(statics.ts, 3, 57)) this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub); +>this.g : Symbol(g, Decl(statics.ts, 4, 44)) >this : Symbol(C, Decl(statics.ts, 0, 10)) +>g : Symbol(g, Decl(statics.ts, 4, 44)) >v : Symbol(v, Decl(statics.ts, 5, 22)) >C.f : Symbol(f, Decl(statics.ts, 10, 24)) >C : Symbol(C, Decl(statics.ts, 0, 10)) @@ -114,7 +116,9 @@ module M { result+=(new C(5,10,20).g(C.y)); >result : Symbol(result, Decl(statics.ts, 18, 11)) +>new C(5,10,20).g : Symbol(g, Decl(statics.ts, 4, 44)) >C : Symbol(C, Decl(statics.ts, 0, 10)) +>g : Symbol(g, Decl(statics.ts, 4, 44)) >C.y : Symbol(y, Decl(statics.ts, 9, 21)) >C : Symbol(C, Decl(statics.ts, 0, 10)) >y : Symbol(y, Decl(statics.ts, 9, 21)) diff --git a/testdata/baselines/reference/submodule/compiler/statics.symbols.diff b/testdata/baselines/reference/submodule/compiler/statics.symbols.diff index 9a92bbc1e6..e37e223cb3 100644 --- a/testdata/baselines/reference/submodule/compiler/statics.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/statics.symbols.diff @@ -38,7 +38,9 @@ >c3 : Symbol(c3, Decl(statics.ts, 3, 57)) this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub); ++>this.g : Symbol(g, Decl(statics.ts, 4, 44)) >this : Symbol(C, Decl(statics.ts, 0, 10)) ++>g : Symbol(g, Decl(statics.ts, 4, 44)) >v : Symbol(v, Decl(statics.ts, 5, 22)) ->C.f : Symbol(C.f, Decl(statics.ts, 10, 24)) +>C.f : Symbol(f, Decl(statics.ts, 10, 24)) @@ -125,7 +127,7 @@ export function f() { >f : Symbol(f, Decl(statics.ts, 16, 14)) -@@= skipped -94, +94 lines =@@ +@@= skipped -94, +96 lines =@@ result+=(new C(0,1,2).x); >result : Symbol(result, Decl(statics.ts, 18, 11)) @@ -145,8 +147,10 @@ result+=(new C(5,10,20).g(C.y)); >result : Symbol(result, Decl(statics.ts, 18, 11)) ++>new C(5,10,20).g : Symbol(g, Decl(statics.ts, 4, 44)) >C : Symbol(C, Decl(statics.ts, 0, 10)) ->C.y : Symbol(C.y, Decl(statics.ts, 9, 21)) ++>g : Symbol(g, Decl(statics.ts, 4, 44)) +>C.y : Symbol(y, Decl(statics.ts, 9, 21)) >C : Symbol(C, Decl(statics.ts, 0, 10)) ->y : Symbol(C.y, Decl(statics.ts, 9, 21)) @@ -154,7 +158,7 @@ return result; >result : Symbol(result, Decl(statics.ts, 18, 11)) -@@= skipped -23, +23 lines =@@ +@@= skipped -23, +25 lines =@@ } M.f(); diff --git a/testdata/baselines/reference/submodule/compiler/statics.types b/testdata/baselines/reference/submodule/compiler/statics.types index 1889beba65..a00cbfd88f 100644 --- a/testdata/baselines/reference/submodule/compiler/statics.types +++ b/testdata/baselines/reference/submodule/compiler/statics.types @@ -36,9 +36,9 @@ module M { 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.g : (v: number) => string >this : this ->g : any +>g : (v: number) => string >(v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub) : (v: number) => string >v : number >C.f(this.x+C.y+v+this.c1+this.c2+C.pub) : string @@ -150,15 +150,15 @@ module M { result+=(new C(5,10,20).g(C.y)); >result+=(new C(5,10,20).g(C.y)) : string >result : string ->(new C(5,10,20).g(C.y)) : any ->new C(5,10,20).g(C.y) : any ->new C(5,10,20).g : any +>(new C(5,10,20).g(C.y)) : string +>new C(5,10,20).g(C.y) : string +>new C(5,10,20).g : (v: number) => string >new C(5,10,20) : C >C : typeof C >5 : 5 >10 : 10 >20 : 20 ->g : any +>g : (v: number) => string >C.y : number >C : typeof C >y : number diff --git a/testdata/baselines/reference/submodule/compiler/statics.types.diff b/testdata/baselines/reference/submodule/compiler/statics.types.diff new file mode 100644 index 0000000000..689692b608 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/statics.types.diff @@ -0,0 +1,34 @@ +--- old.statics.types ++++ new.statics.types +@@= skipped -35, +35 lines =@@ + + 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.g : (v: number) => string + >this : this +->g : any ++>g : (v: number) => string + >(v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub) : (v: number) => string + >v : number + >C.f(this.x+C.y+v+this.c1+this.c2+C.pub) : string +@@= skipped -114, +114 lines =@@ + result+=(new C(5,10,20).g(C.y)); + >result+=(new C(5,10,20).g(C.y)) : string + >result : string +->(new C(5,10,20).g(C.y)) : any +->new C(5,10,20).g(C.y) : any +->new C(5,10,20).g : any ++>(new C(5,10,20).g(C.y)) : string ++>new C(5,10,20).g(C.y) : string ++>new C(5,10,20).g : (v: number) => string + >new C(5,10,20) : C + >C : typeof C + >5 : 5 + >10 : 10 + >20 : 20 +->g : any ++>g : (v: number) => string + >C.y : number + >C : typeof C + >y : number diff --git a/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.errors.txt b/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.errors.txt index 3b3efb4378..c0b7cc2fda 100644 --- a/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.errors.txt @@ -1,12 +1,11 @@ File.js(3,9): error TS2335: 'super' can only be referenced in a derived class. File.js(3,29): error TS2461: Type 'IArguments' is not an array type. -File.js(4,21): error TS2339: Property 'asdf' does not exist on type 'Parent'. File.js(9,5): error TS2416: Property 'initialize' in type 'Child' is not assignable to the same property in base type 'Parent'. Type '() => void' is not assignable to type '() => string'. Type 'void' is not assignable to type 'string'. -==== File.js (4 errors) ==== +==== File.js (3 errors) ==== class Parent { initialize() { super.initialize(...arguments) @@ -15,8 +14,6 @@ File.js(9,5): error TS2416: Property 'initialize' in type 'Child' is not assigna ~~~~~~~~~ !!! error TS2461: Type 'IArguments' is not an array type. return this.asdf = '' - ~~~~ -!!! error TS2339: Property 'asdf' does not exist on type 'Parent'. } } diff --git a/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.symbols b/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.symbols index 606d76b34b..6574c5d889 100644 --- a/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.symbols +++ b/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.symbols @@ -11,7 +11,9 @@ class Parent { >arguments : Symbol(arguments) return this.asdf = '' +>this.asdf : Symbol(asdf, Decl(File.js, 3, 14)) >this : Symbol(Parent, Decl(File.js, 0, 0)) +>asdf : Symbol(asdf, Decl(File.js, 3, 14)) } } diff --git a/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.symbols.diff b/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.symbols.diff index d90bb723f8..af40faa36f 100644 --- a/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.symbols.diff @@ -12,12 +12,14 @@ return this.asdf = '' ->this.asdf : Symbol(Parent.asdf, Decl(File.js, 3, 14)) ++>this.asdf : Symbol(asdf, Decl(File.js, 3, 14)) >this : Symbol(Parent, Decl(File.js, 0, 0)) ->asdf : Symbol(Parent.asdf, Decl(File.js, 3, 14)) ++>asdf : Symbol(asdf, Decl(File.js, 3, 14)) } } -@@= skipped -17, +15 lines =@@ +@@= skipped -17, +17 lines =@@ >Parent : Symbol(Parent, Decl(File.js, 0, 0)) initialize() { diff --git a/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.types b/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.types index 3165c07647..fd23a7b48d 100644 --- a/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.types +++ b/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.types @@ -17,9 +17,9 @@ class Parent { return this.asdf = '' >this.asdf = '' : "" ->this.asdf : any +>this.asdf : string >this : this ->asdf : any +>asdf : string >'' : "" } } diff --git a/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.errors.txt b/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.errors.txt index 2337317f2f..e00dbc28f1 100644 --- a/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.errors.txt @@ -1,27 +1,18 @@ -/a.js(4,14): error TS2339: Property 'data' does not exist on type 'Test'. -/a.js(8,14): error TS2339: Property 'data' does not exist on type 'Test'. /a.js(9,26): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. -/a.js(14,14): error TS2339: Property 'data' does not exist on type 'Test'. /a.js(15,31): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. -/a.js(20,14): error TS2339: Property 'data' does not exist on type 'Test'. /a.js(23,31): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. -/a.js(28,14): error TS2339: Property 'data' does not exist on type 'Test'. /a.js(31,26): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. -==== /a.js (9 errors) ==== +==== /a.js (4 errors) ==== class Test { constructor() { /** @type {number[]} */ this.data = [1, 2, 3]; - ~~~~ -!!! error TS2339: Property 'data' does not exist on type 'Test'. } finderRaw() { this.data.find(function (d) { - ~~~~ -!!! error TS2339: Property 'data' does not exist on type 'Test'. return d === this.data.length ~~~~ !!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. @@ -31,8 +22,6 @@ forEacherRaw() { this.data.forEach(function (d) { - ~~~~ -!!! error TS2339: Property 'data' does not exist on type 'Test'. console.log(d === this.data.length) ~~~~ !!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. @@ -42,8 +31,6 @@ forEacher() { this.data.forEach( - ~~~~ -!!! error TS2339: Property 'data' does not exist on type 'Test'. /** @this {Test} */ function (d) { console.log(d === this.data.length) @@ -55,8 +42,6 @@ finder() { this.data.find( - ~~~~ -!!! error TS2339: Property 'data' does not exist on type 'Test'. /** @this {Test} */ function (d) { return d === this.data.length diff --git a/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.symbols b/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.symbols index f73df8cac3..85dc614666 100644 --- a/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.symbols +++ b/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.symbols @@ -7,14 +7,20 @@ class Test { constructor() { /** @type {number[]} */ this.data = [1, 2, 3]; +>this.data : Symbol(data, Decl(a.js, 1, 19)) >this : Symbol(Test, Decl(a.js, 0, 0)) +>data : Symbol(data, Decl(a.js, 1, 19)) } finderRaw() { >finderRaw : Symbol(finderRaw, Decl(a.js, 4, 5)) this.data.find(function (d) { +>this.data.find : Symbol(find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>this.data : Symbol(data, Decl(a.js, 1, 19)) >this : Symbol(Test, Decl(a.js, 0, 0)) +>data : Symbol(data, Decl(a.js, 1, 19)) +>find : Symbol(find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >d : Symbol(d, Decl(a.js, 7, 33)) return d === this.data.length @@ -27,7 +33,11 @@ class Test { >forEacherRaw : Symbol(forEacherRaw, Decl(a.js, 10, 5)) this.data.forEach(function (d) { +>this.data.forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) +>this.data : Symbol(data, Decl(a.js, 1, 19)) >this : Symbol(Test, Decl(a.js, 0, 0)) +>data : Symbol(data, Decl(a.js, 1, 19)) +>forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >d : Symbol(d, Decl(a.js, 13, 36)) console.log(d === this.data.length) @@ -43,7 +53,11 @@ class Test { >forEacher : Symbol(forEacher, Decl(a.js, 16, 5)) this.data.forEach( +>this.data.forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) +>this.data : Symbol(data, Decl(a.js, 1, 19)) >this : Symbol(Test, Decl(a.js, 0, 0)) +>data : Symbol(data, Decl(a.js, 1, 19)) +>forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) /** @this {Test} */ function (d) { @@ -63,7 +77,11 @@ class Test { >finder : Symbol(finder, Decl(a.js, 24, 5)) this.data.find( +>this.data.find : Symbol(find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>this.data : Symbol(data, Decl(a.js, 1, 19)) >this : Symbol(Test, Decl(a.js, 0, 0)) +>data : Symbol(data, Decl(a.js, 1, 19)) +>find : Symbol(find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) /** @this {Test} */ function (d) { diff --git a/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.symbols.diff b/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.symbols.diff index 29a3e1bd58..92771d6011 100644 --- a/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.symbols.diff @@ -5,8 +5,10 @@ /** @type {number[]} */ this.data = [1, 2, 3]; ->this.data : Symbol(Test.data, Decl(a.js, 1, 19)) ++>this.data : Symbol(data, Decl(a.js, 1, 19)) >this : Symbol(Test, Decl(a.js, 0, 0)) ->data : Symbol(Test.data, Decl(a.js, 1, 19)) ++>data : Symbol(data, Decl(a.js, 1, 19)) } finderRaw() { @@ -16,13 +18,17 @@ this.data.find(function (d) { ->this.data.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->this.data : Symbol(Test.data, Decl(a.js, 1, 19)) ++>this.data.find : Symbol(find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>this.data : Symbol(data, Decl(a.js, 1, 19)) >this : Symbol(Test, Decl(a.js, 0, 0)) ->data : Symbol(Test.data, Decl(a.js, 1, 19)) ->find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>data : Symbol(data, Decl(a.js, 1, 19)) ++>find : Symbol(find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >d : Symbol(d, Decl(a.js, 7, 33)) return d === this.data.length -@@= skipped -23, +17 lines =@@ +@@= skipped -23, +23 lines =@@ } forEacherRaw() { @@ -32,9 +38,13 @@ this.data.forEach(function (d) { ->this.data.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) ->this.data : Symbol(Test.data, Decl(a.js, 1, 19)) ++>this.data.forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) ++>this.data : Symbol(data, Decl(a.js, 1, 19)) >this : Symbol(Test, Decl(a.js, 0, 0)) ->data : Symbol(Test.data, Decl(a.js, 1, 19)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) ++>data : Symbol(data, Decl(a.js, 1, 19)) ++>forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >d : Symbol(d, Decl(a.js, 13, 36)) console.log(d === this.data.length) @@ -55,9 +65,13 @@ this.data.forEach( ->this.data.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) ->this.data : Symbol(Test.data, Decl(a.js, 1, 19)) ++>this.data.forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) ++>this.data : Symbol(data, Decl(a.js, 1, 19)) >this : Symbol(Test, Decl(a.js, 0, 0)) ->data : Symbol(Test.data, Decl(a.js, 1, 19)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) ++>data : Symbol(data, Decl(a.js, 1, 19)) ++>forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) /** @this {Test} */ function (d) { @@ -87,13 +101,17 @@ this.data.find( ->this.data.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->this.data : Symbol(Test.data, Decl(a.js, 1, 19)) ++>this.data.find : Symbol(find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>this.data : Symbol(data, Decl(a.js, 1, 19)) >this : Symbol(Test, Decl(a.js, 0, 0)) ->data : Symbol(Test.data, Decl(a.js, 1, 19)) ->find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>data : Symbol(data, Decl(a.js, 1, 19)) ++>find : Symbol(find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) /** @this {Test} */ function (d) { -@@= skipped -64, +47 lines =@@ +@@= skipped -64, +59 lines =@@ return d === this.data.length >d : Symbol(d, Decl(a.js, 29, 18)) diff --git a/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.types b/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.types index e0d7644f6a..aa86beabe2 100644 --- a/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.types +++ b/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.types @@ -8,9 +8,9 @@ class Test { /** @type {number[]} */ this.data = [1, 2, 3]; >this.data = [1, 2, 3] : number[] ->this.data : any +>this.data : number[] >this : this ->data : any +>data : number[] >[1, 2, 3] : number[] >1 : 1 >2 : 2 @@ -21,18 +21,18 @@ class Test { >finderRaw : () => void this.data.find(function (d) { ->this.data.find(function (d) { return d === this.data.length }) : any ->this.data.find : any ->this.data : any +>this.data.find(function (d) { return d === this.data.length }) : number +>this.data.find : { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; } +>this.data : number[] >this : this ->data : any ->find : any ->function (d) { return d === this.data.length } : (d: any) => boolean ->d : any +>data : number[] +>find : { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; } +>function (d) { return d === this.data.length } : (d: number) => boolean +>d : number return d === this.data.length >d === this.data.length : boolean ->d : any +>d : number >this.data.length : any >this.data : any >this : any @@ -46,14 +46,14 @@ class Test { >forEacherRaw : () => void this.data.forEach(function (d) { ->this.data.forEach(function (d) { console.log(d === this.data.length) }) : any ->this.data.forEach : any ->this.data : any +>this.data.forEach(function (d) { console.log(d === this.data.length) }) : void +>this.data.forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +>this.data : number[] >this : this ->data : any ->forEach : any ->function (d) { console.log(d === this.data.length) } : (d: any) => void ->d : any +>data : number[] +>forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +>function (d) { console.log(d === this.data.length) } : (d: number) => void +>d : number console.log(d === this.data.length) >console.log(d === this.data.length) : void @@ -61,7 +61,7 @@ class Test { >console : Console >log : (...data: any[]) => void >d === this.data.length : boolean ->d : any +>d : number >this.data.length : any >this.data : any >this : any @@ -75,17 +75,17 @@ class Test { >forEacher : () => void this.data.forEach( ->this.data.forEach( /** @this {Test} */ function (d) { console.log(d === this.data.length) }, this) : any ->this.data.forEach : any ->this.data : any +>this.data.forEach( /** @this {Test} */ function (d) { console.log(d === this.data.length) }, this) : void +>this.data.forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +>this.data : number[] >this : this ->data : any ->forEach : any +>data : number[] +>forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void /** @this {Test} */ function (d) { ->function (d) { console.log(d === this.data.length) } : (d: any) => void ->d : any +>function (d) { console.log(d === this.data.length) } : (d: number) => void +>d : number console.log(d === this.data.length) >console.log(d === this.data.length) : void @@ -93,7 +93,7 @@ class Test { >console : Console >log : (...data: any[]) => void >d === this.data.length : boolean ->d : any +>d : number >this.data.length : any >this.data : any >this : any @@ -108,21 +108,21 @@ class Test { >finder : () => void this.data.find( ->this.data.find( /** @this {Test} */ function (d) { return d === this.data.length }, this) : any ->this.data.find : any ->this.data : any +>this.data.find( /** @this {Test} */ function (d) { return d === this.data.length }, this) : number +>this.data.find : { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; } +>this.data : number[] >this : this ->data : any ->find : any +>data : number[] +>find : { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; } /** @this {Test} */ function (d) { ->function (d) { return d === this.data.length } : (d: any) => boolean ->d : any +>function (d) { return d === this.data.length } : (d: number) => boolean +>d : number return d === this.data.length >d === this.data.length : boolean ->d : any +>d : number >this.data.length : any >this.data : any >this : any diff --git a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt index 595511a63e..1ed7aa1da8 100644 --- a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt @@ -9,11 +9,10 @@ unknownSymbols1.ts(13,12): error TS2304: Cannot find name 'asdf'. unknownSymbols1.ts(16,21): error TS2304: Cannot find name 'asdf'. unknownSymbols1.ts(17,21): error TS2304: Cannot find name 'adsf'. unknownSymbols1.ts(22,15): error TS2304: Cannot find name 'asdf'. -unknownSymbols1.ts(30,14): error TS2339: Property 'asdf' does not exist on type 'C5'. -unknownSymbols1.ts(30,21): error TS2304: Cannot find name 'asdf'. +unknownSymbols1.ts(30,21): error TS2663: Cannot find name 'asdf'. Did you mean the instance member 'this.asdf'? -==== unknownSymbols1.ts (13 errors) ==== +==== unknownSymbols1.ts (12 errors) ==== var x = asdf; ~~~~ !!! error TS2304: Cannot find name 'asdf'. @@ -66,9 +65,7 @@ unknownSymbols1.ts(30,21): error TS2304: Cannot find name 'asdf'. class C5 { constructor() { this.asdf = asdf; - ~~~~ -!!! error TS2339: Property 'asdf' does not exist on type 'C5'. ~~~~ -!!! error TS2304: Cannot find name 'asdf'. +!!! error TS2663: Cannot find name 'asdf'. Did you mean the instance member 'this.asdf'? } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt.diff new file mode 100644 index 0000000000..4eaa53e871 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt.diff @@ -0,0 +1,27 @@ +--- old.unknownSymbols1.errors.txt ++++ new.unknownSymbols1.errors.txt +@@= skipped -8, +8 lines =@@ + unknownSymbols1.ts(16,21): error TS2304: Cannot find name 'asdf'. + unknownSymbols1.ts(17,21): error TS2304: Cannot find name 'adsf'. + unknownSymbols1.ts(22,15): error TS2304: Cannot find name 'asdf'. +-unknownSymbols1.ts(30,14): error TS2339: Property 'asdf' does not exist on type 'C5'. +-unknownSymbols1.ts(30,21): error TS2304: Cannot find name 'asdf'. ++unknownSymbols1.ts(30,21): error TS2663: Cannot find name 'asdf'. Did you mean the instance member 'this.asdf'? + + +-==== unknownSymbols1.ts (13 errors) ==== ++==== unknownSymbols1.ts (12 errors) ==== + var x = asdf; + ~~~~ + !!! error TS2304: Cannot find name 'asdf'. +@@= skipped -57, +56 lines =@@ + class C5 { + constructor() { + this.asdf = asdf; +- ~~~~ +-!!! error TS2339: Property 'asdf' does not exist on type 'C5'. + ~~~~ +-!!! error TS2304: Cannot find name 'asdf'. ++!!! error TS2663: Cannot find name 'asdf'. Did you mean the instance member 'this.asdf'? + } + } diff --git a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols index d9a9a8ac87..e7612d6452 100644 --- a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols +++ b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols @@ -69,6 +69,8 @@ class C5 { constructor() { this.asdf = asdf; +>this.asdf : Symbol(asdf, Decl(unknownSymbols1.ts, 28, 19)) >this : Symbol(C5, Decl(unknownSymbols1.ts, 25, 19)) +>asdf : Symbol(asdf, Decl(unknownSymbols1.ts, 28, 19)) } } diff --git a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols.diff b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols.diff index 96e0ebda6b..84d5c1c44f 100644 --- a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols.diff @@ -14,3 +14,12 @@ >C : Symbol(C, Decl(unknownSymbols1.ts, 8, 16)) >asdf : Symbol(asdf) } +@@= skipped -38, +38 lines =@@ + + constructor() { + this.asdf = asdf; ++>this.asdf : Symbol(asdf, Decl(unknownSymbols1.ts, 28, 19)) + >this : Symbol(C5, Decl(unknownSymbols1.ts, 25, 19)) ++>asdf : Symbol(asdf, Decl(unknownSymbols1.ts, 28, 19)) + } + } diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols index 2538a42a89..428ff1d685 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols @@ -13,22 +13,22 @@ module X.Y { >y : Symbol(y, Decl(class.ts, 2, 30)) this.x = x; ->this.x : Symbol(x, Decl(class.ts, 5, 9)) +>this.x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->x : Symbol(x, Decl(class.ts, 5, 9)) +>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; ->this.y : Symbol(y, Decl(class.ts, 6, 18)) +>this.y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->y : Symbol(y, Decl(class.ts, 6, 18)) +>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } x: number; ->x : Symbol(x, Decl(class.ts, 5, 9)) +>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) y: number; ->y : Symbol(y, Decl(class.ts, 6, 18)) +>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff index ba12629ccb..e786bf7b3e 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff @@ -5,27 +5,27 @@ this.x = x; ->this.x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>this.x : Symbol(x, Decl(class.ts, 5, 9)) ++>this.x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>x : Symbol(x, Decl(class.ts, 5, 9)) ++>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; ->this.y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>this.y : Symbol(y, Decl(class.ts, 6, 18)) ++>this.y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>y : Symbol(y, Decl(class.ts, 6, 18)) ++>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } x: number; ->x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>x : Symbol(x, Decl(class.ts, 5, 9)) ++>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) y: number; ->y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>y : Symbol(y, Decl(class.ts, 6, 18)) ++>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols index 8420b0dbba..fdf7a9b579 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols @@ -13,22 +13,22 @@ module X.Y { >y : Symbol(y, Decl(class.ts, 2, 30)) this.x = x; ->this.x : Symbol(x, Decl(class.ts, 5, 9)) +>this.x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->x : Symbol(x, Decl(class.ts, 5, 9)) +>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; ->this.y : Symbol(y, Decl(class.ts, 6, 18)) +>this.y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->y : Symbol(y, Decl(class.ts, 6, 18)) +>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } x: number; ->x : Symbol(x, Decl(class.ts, 5, 9)) +>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) y: number; ->y : Symbol(y, Decl(class.ts, 6, 18)) +>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff index 6bee47df4c..90fbb41f37 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff @@ -5,27 +5,27 @@ this.x = x; ->this.x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>this.x : Symbol(x, Decl(class.ts, 5, 9)) ++>this.x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>x : Symbol(x, Decl(class.ts, 5, 9)) ++>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; ->this.y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>this.y : Symbol(y, Decl(class.ts, 6, 18)) ++>this.y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>y : Symbol(y, Decl(class.ts, 6, 18)) ++>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } x: number; ->x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>x : Symbol(x, Decl(class.ts, 5, 9)) ++>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) y: number; ->y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>y : Symbol(y, Decl(class.ts, 6, 18)) ++>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols index 9f4a5683b0..7f7a94816f 100644 --- a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols +++ b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols @@ -28,22 +28,22 @@ module X.Y { >y : Symbol(y, Decl(classPoint.ts, 3, 30)) this.x = x; ->this.x : Symbol(x, Decl(classPoint.ts, 6, 9)) +>this.x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) >this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) ->x : Symbol(x, Decl(classPoint.ts, 6, 9)) +>x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) >x : Symbol(x, Decl(classPoint.ts, 3, 20)) this.y = y; ->this.y : Symbol(y, Decl(classPoint.ts, 7, 18)) +>this.y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) >this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) ->y : Symbol(y, Decl(classPoint.ts, 7, 18)) +>y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) >y : Symbol(y, Decl(classPoint.ts, 3, 30)) } x: number; ->x : Symbol(x, Decl(classPoint.ts, 6, 9)) +>x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) y: number; ->y : Symbol(y, Decl(classPoint.ts, 7, 18)) +>y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff index 21b8b5a549..19a2cfdfc2 100644 --- a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff @@ -5,27 +5,27 @@ this.x = x; ->this.x : Symbol(Point.x, Decl(classPoint.ts, 6, 9)) -+>this.x : Symbol(x, Decl(classPoint.ts, 6, 9)) ++>this.x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) >this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) ->x : Symbol(Point.x, Decl(classPoint.ts, 6, 9)) -+>x : Symbol(x, Decl(classPoint.ts, 6, 9)) ++>x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) >x : Symbol(x, Decl(classPoint.ts, 3, 20)) this.y = y; ->this.y : Symbol(Point.y, Decl(classPoint.ts, 7, 18)) -+>this.y : Symbol(y, Decl(classPoint.ts, 7, 18)) ++>this.y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) >this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) ->y : Symbol(Point.y, Decl(classPoint.ts, 7, 18)) -+>y : Symbol(y, Decl(classPoint.ts, 7, 18)) ++>y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) >y : Symbol(y, Decl(classPoint.ts, 3, 30)) } x: number; ->x : Symbol(Point.x, Decl(classPoint.ts, 6, 9)) -+>x : Symbol(x, Decl(classPoint.ts, 6, 9)) ++>x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) y: number; ->y : Symbol(Point.y, Decl(classPoint.ts, 7, 18)) -+>y : Symbol(y, Decl(classPoint.ts, 7, 18)) ++>y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.errors.txt b/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.errors.txt deleted file mode 100644 index 83bc395c6d..0000000000 --- a/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.errors.txt +++ /dev/null @@ -1,23 +0,0 @@ -Compilation.js(8,14): error TS2339: Property 'assets' does not exist on type 'C'. -Compilation.js(11,20): error TS2339: Property 'assets' does not exist on type 'C'. - - -==== Compilation.js (2 errors) ==== - // from webpack/lib/Compilation.js and filed at #26427 - /** @param {{ [s: string]: number }} map */ - function mappy(map) {} - - export class C { - constructor() { - /** @type {{ [assetName: string]: number}} */ - this.assets = {}; - ~~~~~~ -!!! error TS2339: Property 'assets' does not exist on type 'C'. - } - m() { - mappy(this.assets) - ~~~~~~ -!!! error TS2339: Property 'assets' does not exist on type 'C'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.symbols b/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.symbols index 4f0bae52a8..95c02c95ff 100644 --- a/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.symbols +++ b/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.symbols @@ -13,14 +13,18 @@ export class C { constructor() { /** @type {{ [assetName: string]: number}} */ this.assets = {}; +>this.assets : Symbol(assets, Decl(Compilation.js, 5, 19)) >this : Symbol(C, Decl(Compilation.js, 2, 22)) +>assets : Symbol(assets, Decl(Compilation.js, 5, 19)) } m() { >m : Symbol(m, Decl(Compilation.js, 8, 5)) mappy(this.assets) >mappy : Symbol(mappy, Decl(Compilation.js, 0, 0)) +>this.assets : Symbol(assets, Decl(Compilation.js, 5, 19)) >this : Symbol(C, Decl(Compilation.js, 2, 22)) +>assets : Symbol(assets, Decl(Compilation.js, 5, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.symbols.diff b/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.symbols.diff index b4e7b68e98..34802ed4cb 100644 --- a/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.symbols.diff @@ -5,8 +5,10 @@ /** @type {{ [assetName: string]: number}} */ this.assets = {}; ->this.assets : Symbol(C.assets, Decl(Compilation.js, 5, 19)) ++>this.assets : Symbol(assets, Decl(Compilation.js, 5, 19)) >this : Symbol(C, Decl(Compilation.js, 2, 22)) ->assets : Symbol(C.assets, Decl(Compilation.js, 5, 19)) ++>assets : Symbol(assets, Decl(Compilation.js, 5, 19)) } m() { ->m : Symbol(C.m, Decl(Compilation.js, 8, 5)) @@ -15,8 +17,10 @@ mappy(this.assets) >mappy : Symbol(mappy, Decl(Compilation.js, 0, 0)) ->this.assets : Symbol(C.assets, Decl(Compilation.js, 5, 19)) ++>this.assets : Symbol(assets, Decl(Compilation.js, 5, 19)) >this : Symbol(C, Decl(Compilation.js, 2, 22)) ->assets : Symbol(C.assets, Decl(Compilation.js, 5, 19)) ++>assets : Symbol(assets, Decl(Compilation.js, 5, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.types b/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.types index 6dfed7c6ed..0aa7bbc7b2 100644 --- a/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.types +++ b/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.types @@ -14,9 +14,9 @@ export class C { /** @type {{ [assetName: string]: number}} */ this.assets = {}; >this.assets = {} : {} ->this.assets : any +>this.assets : {} >this : this ->assets : any +>assets : {} >{} : {} } m() { @@ -25,9 +25,9 @@ export class C { mappy(this.assets) >mappy(this.assets) : void >mappy : (map: { [s: string]: number; }) => void ->this.assets : any +>this.assets : {} >this : this ->assets : any +>assets : {} } } diff --git a/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.errors.txt b/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.errors.txt index 89f4bc9ab8..321592a027 100644 --- a/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.errors.txt @@ -1,8 +1,6 @@ first.js(21,19): error TS2507: Type '{ (numberOxen: number): void; circle: (wagons: any) => any; }' is not a constructor function type. -first.js(24,14): error TS2339: Property 'foonly' does not exist on type 'Sql'. first.js(27,21): error TS8020: JSDoc types can only be used inside documentation comments. first.js(44,4): error TS2339: Property 'numberOxen' does not exist on type 'Sql'. -first.js(44,20): error TS2339: Property 'foonly' does not exist on type 'Sql'. first.js(47,24): error TS2507: Type '(numberEaten: number) => void' is not a constructor function type. generic.js(9,23): error TS2507: Type '(flavour: T) => void' is not a constructor function type. generic.js(11,21): error TS2339: Property 'flavour' does not exist on type 'Chowder'. @@ -14,7 +12,7 @@ second.ts(14,25): error TS2507: Type '{ (numberOxen: number): void; circle: (wag second.ts(26,3): error TS2339: Property 'numberOxen' does not exist on type 'Conestoga'. -==== first.js (6 errors) ==== +==== first.js (4 errors) ==== /** * @constructor * @param {number} numberOxen @@ -41,8 +39,6 @@ second.ts(26,3): error TS2339: Property 'numberOxen' does not exist on type 'Con constructor() { super(); // error: not enough arguments this.foonly = 12 - ~~~~~~ -!!! error TS2339: Property 'foonly' does not exist on type 'Sql'. } /** * @param {Array.} files @@ -67,8 +63,6 @@ second.ts(26,3): error TS2339: Property 'numberOxen' does not exist on type 'Con db.numberOxen = db.foonly ~~~~~~~~~~ !!! error TS2339: Property 'numberOxen' does not exist on type 'Sql'. - ~~~~~~ -!!! error TS2339: Property 'foonly' does not exist on type 'Sql'. // error, can't extend a TS constructor function class Drakkhen extends Dragon { diff --git a/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.symbols b/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.symbols index 502126ceb5..eaa0caa190 100644 --- a/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.symbols +++ b/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.symbols @@ -54,7 +54,9 @@ class Sql extends Wagon { constructor() { super(); // error: not enough arguments this.foonly = 12 +>this.foonly : Symbol(foonly, Decl(first.js, 22, 16)) >this : Symbol(Sql, Decl(first.js, 18, 1)) +>foonly : Symbol(foonly, Decl(first.js, 22, 16)) } /** * @param {Array.} files @@ -86,7 +88,9 @@ var db = new Sql(); db.numberOxen = db.foonly >db : Symbol(db, Decl(first.js, 42, 3)) +>db.foonly : Symbol(foonly, Decl(first.js, 22, 16)) >db : Symbol(db, Decl(first.js, 42, 3)) +>foonly : Symbol(foonly, Decl(first.js, 22, 16)) // error, can't extend a TS constructor function class Drakkhen extends Dragon { diff --git a/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.symbols.diff b/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.symbols.diff index 5bc5073147..bc2c43c61f 100644 --- a/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.symbols.diff @@ -85,12 +85,14 @@ - this.foonly = 12 ->this.foonly : Symbol(Sql.foonly, Decl(first.js, 22, 16)) ++>this.foonly : Symbol(foonly, Decl(first.js, 22, 16)) >this : Symbol(Sql, Decl(first.js, 18, 1)) ->foonly : Symbol(Sql.foonly, Decl(first.js, 22, 16)) ++>foonly : Symbol(foonly, Decl(first.js, 22, 16)) } /** * @param {Array.} files -@@= skipped -76, +56 lines =@@ +@@= skipped -76, +58 lines =@@ * This is not assignable, so should have a type error */ load(files, format) { @@ -130,11 +132,13 @@ ->db : Symbol(db, Decl(first.js, 42, 3), Decl(first.js, 42, 19)) ->foonly : Symbol(Sql.foonly, Decl(first.js, 22, 16)) +>db : Symbol(db, Decl(first.js, 42, 3)) ++>db.foonly : Symbol(foonly, Decl(first.js, 22, 16)) +>db : Symbol(db, Decl(first.js, 42, 3)) ++>foonly : Symbol(foonly, Decl(first.js, 22, 16)) // error, can't extend a TS constructor function class Drakkhen extends Dragon { -@@= skipped -56, +44 lines =@@ +@@= skipped -56, +46 lines =@@ // ok class Conestoga extends Wagon { >Conestoga : Symbol(Conestoga, Decl(second.ts, 11, 1)) diff --git a/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.types b/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.types index ff87ed7d40..00b1492a59 100644 --- a/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.types +++ b/testdata/baselines/reference/submodule/conformance/classCanExtendConstructorFunction.types @@ -93,9 +93,9 @@ class Sql extends Wagon { this.foonly = 12 >this.foonly = 12 : 12 ->this.foonly : any +>this.foonly : number >this : this ->foonly : any +>foonly : number >12 : 12 } /** @@ -144,13 +144,13 @@ var db = new Sql(); >Sql : typeof Sql db.numberOxen = db.foonly ->db.numberOxen = db.foonly : any +>db.numberOxen = db.foonly : number >db.numberOxen : any >db : Sql >numberOxen : any ->db.foonly : any +>db.foonly : number >db : Sql ->foonly : any +>foonly : number // error, can't extend a TS constructor function class Drakkhen extends Dragon { diff --git a/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols b/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols index b4a2e53998..8a632ee8ab 100644 --- a/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols +++ b/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols @@ -71,14 +71,14 @@ class D1 extends getBase() { >super : Symbol(BaseConstructor, Decl(classExtendingClassLikeType.ts, 7, 1)) this.x = "x"; ->this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) +>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 20, 28)) >this : Symbol(D1, Decl(classExtendingClassLikeType.ts, 16, 44)) ->x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) +>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 20, 28)) this.y = "y"; ->this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) +>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 21, 21)) >this : Symbol(D1, Decl(classExtendingClassLikeType.ts, 16, 44)) ->y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) +>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 21, 21)) } } @@ -94,14 +94,14 @@ class D2 extends getBase() { >super : Symbol(BaseConstructor, Decl(classExtendingClassLikeType.ts, 7, 1)) this.x = 1; ->this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) +>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 29, 22)) >this : Symbol(D2, Decl(classExtendingClassLikeType.ts, 24, 1)) ->x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) +>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 29, 22)) this.y = 2; ->this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) +>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 30, 19)) >this : Symbol(D2, Decl(classExtendingClassLikeType.ts, 24, 1)) ->y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) +>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 30, 19)) } } @@ -114,14 +114,14 @@ class D3 extends getBase() { >super : Symbol(BaseConstructor, Decl(classExtendingClassLikeType.ts, 7, 1)) this.x = "x"; ->this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) +>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 37, 25)) >this : Symbol(D3, Decl(classExtendingClassLikeType.ts, 33, 1)) ->x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) +>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 37, 25)) this.y = 2; ->this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) +>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 38, 21)) >this : Symbol(D3, Decl(classExtendingClassLikeType.ts, 33, 1)) ->y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) +>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 38, 21)) } } diff --git a/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols.diff b/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols.diff index 62ac7e69d9..7e00b15230 100644 --- a/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols.diff @@ -19,17 +19,17 @@ this.x = "x"; ->this.x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) ++>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 20, 28)) >this : Symbol(D1, Decl(classExtendingClassLikeType.ts, 16, 44)) ->x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) ++>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 20, 28)) this.y = "y"; ->this.y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) ++>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 21, 21)) >this : Symbol(D1, Decl(classExtendingClassLikeType.ts, 16, 44)) ->y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) ++>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 21, 21)) } } @@ -38,17 +38,17 @@ this.x = 1; ->this.x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) ++>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 29, 22)) >this : Symbol(D2, Decl(classExtendingClassLikeType.ts, 24, 1)) ->x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) ++>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 29, 22)) this.y = 2; ->this.y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) ++>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 30, 19)) >this : Symbol(D2, Decl(classExtendingClassLikeType.ts, 24, 1)) ->y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) ++>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 30, 19)) } } @@ -57,17 +57,17 @@ this.x = "x"; ->this.x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) ++>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 37, 25)) >this : Symbol(D3, Decl(classExtendingClassLikeType.ts, 33, 1)) ->x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) ++>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 37, 25)) this.y = 2; ->this.y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) ++>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 38, 21)) >this : Symbol(D3, Decl(classExtendingClassLikeType.ts, 33, 1)) ->y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) ++>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 38, 21)) } } diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols index 90160b2ae6..e45d8c9ddd 100644 --- a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols +++ b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols @@ -6,11 +6,11 @@ class C { static { this.x = 1; ->this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) >this : Symbol(C, Decl(classStaticBlockUseBeforeDef2.ts, 0, 0)) ->x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } static x; ->x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols.diff b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols.diff index 51d36adc6c..49968a9bb7 100644 --- a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols.diff @@ -5,13 +5,13 @@ static { this.x = 1; ->this.x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) >this : Symbol(C, Decl(classStaticBlockUseBeforeDef2.ts, 0, 0)) ->x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } static x; ->x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols index 90160b2ae6..e45d8c9ddd 100644 --- a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols +++ b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols @@ -6,11 +6,11 @@ class C { static { this.x = 1; ->this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) >this : Symbol(C, Decl(classStaticBlockUseBeforeDef2.ts, 0, 0)) ->x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } static x; ->x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols.diff b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols.diff index e93495a077..de3c6ded6a 100644 --- a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols.diff @@ -5,13 +5,13 @@ static { this.x = 1; ->this.x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) >this : Symbol(C, Decl(classStaticBlockUseBeforeDef2.ts, 0, 0)) ->x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } static x; ->x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } diff --git a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt index 170c786adf..b5f6ebd776 100644 --- a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt @@ -4,9 +4,7 @@ test.js(11,7): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(14,4): error TS2339: Property 'x' does not exist on type '{}'. test.js(16,7): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(18,4): error TS2339: Property 'x' does not exist on type '{}'. -test.js(25,14): error TS2339: Property 's' does not exist on type 'Thing'. test.js(27,15): error TS7006: Parameter 'n' implicitly has an 'any' type. -test.js(32,14): error TS2339: Property 's' does not exist on type 'Thing'. test.js(34,15): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(42,1): 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. test.js(44,7): error TS7006: Parameter 'n' implicitly has an 'any' type. @@ -18,7 +16,7 @@ test.js(61,17): error TS2339: Property 'x' does not exist on type 'Thing'. test.js(69,7): error TS7006: Parameter 'n' implicitly has an 'any' type. -==== test.js (17 errors) ==== +==== test.js (15 errors) ==== /** @typedef {{ status: 'done' m(n: number): void @@ -54,8 +52,6 @@ test.js(69,7): error TS7006: Parameter 'n' implicitly has an 'any' type. constructor() { /** @type {DoneStatus} */ this.s = { - ~ -!!! error TS2339: Property 's' does not exist on type 'Thing'. status: 'done', m(n) { } ~ @@ -65,8 +61,6 @@ test.js(69,7): error TS7006: Parameter 'n' implicitly has an 'any' type. fail() { this.s = { - ~ -!!! error TS2339: Property 's' does not exist on type 'Thing'. status: 'done', m(n) { } ~ diff --git a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.symbols b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.symbols index 41184f59b1..f8ecaed1ce 100644 --- a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.symbols +++ b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.symbols @@ -43,7 +43,9 @@ class Thing { constructor() { /** @type {DoneStatus} */ this.s = { +>this.s : Symbol(s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) >this : Symbol(Thing, Decl(test.js, 17, 4)) +>s : Symbol(s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) status: 'done', >status : Symbol(status, Decl(test.js, 24, 18)) @@ -58,7 +60,9 @@ class Thing { >fail : Symbol(fail, Decl(test.js, 28, 5)) this.s = { +>this.s : Symbol(s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) >this : Symbol(Thing, Decl(test.js, 17, 4)) +>s : Symbol(s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) status: 'done', >status : Symbol(status, Decl(test.js, 31, 18)) diff --git a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.symbols.diff b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.symbols.diff index db95ee40cb..e9c9027368 100644 --- a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.symbols.diff @@ -43,12 +43,14 @@ /** @type {DoneStatus} */ this.s = { ->this.s : Symbol(Thing.s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) ++>this.s : Symbol(s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) >this : Symbol(Thing, Decl(test.js, 17, 4)) ->s : Symbol(Thing.s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) ++>s : Symbol(s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) status: 'done', >status : Symbol(status, Decl(test.js, 24, 18)) -@@= skipped -14, +12 lines =@@ +@@= skipped -14, +14 lines =@@ } fail() { @@ -57,12 +59,14 @@ this.s = { ->this.s : Symbol(Thing.s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) ++>this.s : Symbol(s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) >this : Symbol(Thing, Decl(test.js, 17, 4)) ->s : Symbol(Thing.s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) ++>s : Symbol(s, Decl(test.js, 22, 19), Decl(test.js, 30, 12)) status: 'done', >status : Symbol(status, Decl(test.js, 31, 18)) -@@= skipped -22, +20 lines =@@ +@@= skipped -22, +22 lines =@@ /** @type {DoneStatus} */ exports.x = { >exports.x : Symbol(x, Decl(test.js, 36, 1)) diff --git a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types index 4cc8ca007c..a1a9b91653 100644 --- a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types +++ b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types @@ -57,9 +57,9 @@ class Thing { /** @type {DoneStatus} */ this.s = { >this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } ->this.s : any +>this.s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } >this : this ->s : any +>s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } >{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } status: 'done', @@ -77,9 +77,9 @@ class Thing { this.s = { >this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } ->this.s : any +>this.s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } >this : this ->s : any +>s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } >{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } status: 'done', diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt index 340676d800..5ff64493d8 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt @@ -1,14 +1,12 @@ destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. destructuringParameterProperties2.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties2.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties2.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties2.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. destructuringParameterProperties2.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties2.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. destructuringParameterProperties2.ts(21,42): error TS2322: Type 'string' is not assignable to type 'boolean'. -==== destructuringParameterProperties2.ts (8 errors) ==== +==== destructuringParameterProperties2.ts (6 errors) ==== class C1 { constructor(private k: number, private [a, b, c]: [number, string, boolean]) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -19,15 +17,11 @@ destructuringParameterProperties2.ts(21,42): error TS2322: Type 'string' is not ~ !!! error TS2339: Property 'c' does not exist on type 'C1'. this.a = a || k; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. } } public getA() { return this.a - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. } public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt.diff new file mode 100644 index 0000000000..752d407e74 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt.diff @@ -0,0 +1,34 @@ +--- old.destructuringParameterProperties2.errors.txt ++++ new.destructuringParameterProperties2.errors.txt +@@= skipped -0, +0 lines =@@ + destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. + destructuringParameterProperties2.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. + destructuringParameterProperties2.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +-destructuringParameterProperties2.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +-destructuringParameterProperties2.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. + destructuringParameterProperties2.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. + destructuringParameterProperties2.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. + destructuringParameterProperties2.ts(21,42): error TS2322: Type 'string' is not assignable to type 'boolean'. + + +-==== destructuringParameterProperties2.ts (8 errors) ==== ++==== destructuringParameterProperties2.ts (6 errors) ==== + class C1 { + constructor(private k: number, private [a, b, c]: [number, string, boolean]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@@= skipped -18, +16 lines =@@ + ~ + !!! error TS2339: Property 'c' does not exist on type 'C1'. + this.a = a || k; +- ~ +-!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + } + + public getA() { + return this.a +- ~ +-!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + + public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols index 215a3c57f4..5073978290 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols @@ -21,7 +21,9 @@ class C1 { >undefined : Symbol(undefined) this.a = a || k; +>this.a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties2.ts, 0, 0)) +>a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) >a : Symbol(a, Decl(destructuringParameterProperties2.ts, 1, 44)) >k : Symbol(k, Decl(destructuringParameterProperties2.ts, 1, 16)) } @@ -31,7 +33,9 @@ class C1 { >getA : Symbol(getA, Decl(destructuringParameterProperties2.ts, 5, 5)) return this.a +>this.a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties2.ts, 0, 0)) +>a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) } public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols.diff index 4e392caf28..0d8cd54903 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols.diff @@ -9,7 +9,16 @@ >a : Symbol(a, Decl(destructuringParameterProperties2.ts, 1, 44)) >b : Symbol(b, Decl(destructuringParameterProperties2.ts, 1, 46)) >c : Symbol(c, Decl(destructuringParameterProperties2.ts, 1, 49)) -@@= skipped -23, +23 lines =@@ +@@= skipped -16, +16 lines =@@ + >undefined : Symbol(undefined) + + this.a = a || k; ++>this.a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) + >this : Symbol(C1, Decl(destructuringParameterProperties2.ts, 0, 0)) ++>a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) + >a : Symbol(a, Decl(destructuringParameterProperties2.ts, 1, 44)) + >k : Symbol(k, Decl(destructuringParameterProperties2.ts, 1, 16)) + } } public getA() { @@ -17,7 +26,9 @@ +>getA : Symbol(getA, Decl(destructuringParameterProperties2.ts, 5, 5)) return this.a ++>this.a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties2.ts, 0, 0)) ++>a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) } public getB() { @@ -34,7 +45,7 @@ return this.c; >this : Symbol(C1, Decl(destructuringParameterProperties2.ts, 0, 0)) -@@= skipped -31, +31 lines =@@ +@@= skipped -38, +42 lines =@@ >x_a : Symbol(x_a, Decl(destructuringParameterProperties2.ts, 21, 5)) >x_b : Symbol(x_b, Decl(destructuringParameterProperties2.ts, 21, 9)) >x_c : Symbol(x_c, Decl(destructuringParameterProperties2.ts, 21, 14)) diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types index bdcf64bed4..a8f9ce5b79 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types @@ -35,9 +35,9 @@ class C1 { this.a = a || k; >this.a = a || k : number ->this.a : any +>this.a : number >this : this ->a : any +>a : number >a || k : number >a : number >k : number @@ -45,12 +45,12 @@ class C1 { } public getA() { ->getA : () => any +>getA : () => number return this.a ->this.a : any +>this.a : number >this : this ->a : any +>a : number } public getB() { @@ -83,14 +83,14 @@ var x = new C1(undefined, [0, undefined, ""]); >"" : "" var [x_a, x_b, x_c] = [x.getA(), x.getB(), x.getC()]; ->x_a : any +>x_a : number >x_b : any >x_c : any ->[x.getA(), x.getB(), x.getC()] : [any, any, any] ->x.getA() : any ->x.getA : () => any +>[x.getA(), x.getB(), x.getC()] : [number, any, any] +>x.getA() : number +>x.getA : () => number >x : C1 ->getA : () => any +>getA : () => number >x.getB() : any >x.getB : () => any >x : C1 @@ -111,14 +111,14 @@ var y = new C1(10, [0, "", true]); >true : true var [y_a, y_b, y_c] = [y.getA(), y.getB(), y.getC()]; ->y_a : any +>y_a : number >y_b : any >y_c : any ->[y.getA(), y.getB(), y.getC()] : [any, any, any] ->y.getA() : any ->y.getA : () => any +>[y.getA(), y.getB(), y.getC()] : [number, any, any] +>y.getA() : number +>y.getA : () => number >y : C1 ->getA : () => any +>getA : () => number >y.getB() : any >y.getB : () => any >y : C1 @@ -138,14 +138,14 @@ var z = new C1(10, [undefined, "", null]); >"" : "" var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; ->z_a : any +>z_a : number >z_b : any >z_c : any ->[z.getA(), z.getB(), z.getC()] : [any, any, any] ->z.getA() : any ->z.getA : () => any +>[z.getA(), z.getB(), z.getC()] : [number, any, any] +>z.getA() : number +>z.getA : () => number >z : C1 ->getA : () => any +>getA : () => number >z.getB() : any >z.getB : () => any >z : C1 diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types.diff new file mode 100644 index 0000000000..c0d34c5a6c --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types.diff @@ -0,0 +1,90 @@ +--- old.destructuringParameterProperties2.types ++++ new.destructuringParameterProperties2.types +@@= skipped -34, +34 lines =@@ + + this.a = a || k; + >this.a = a || k : number +->this.a : any ++>this.a : number + >this : this +->a : any ++>a : number + >a || k : number + >a : number + >k : number +@@= skipped -10, +10 lines =@@ + } + + public getA() { +->getA : () => any ++>getA : () => number + + return this.a +->this.a : any ++>this.a : number + >this : this +->a : any ++>a : number + } + + public getB() { +@@= skipped -38, +38 lines =@@ + >"" : "" + + var [x_a, x_b, x_c] = [x.getA(), x.getB(), x.getC()]; +->x_a : any ++>x_a : number + >x_b : any + >x_c : any +->[x.getA(), x.getB(), x.getC()] : [any, any, any] +->x.getA() : any +->x.getA : () => any ++>[x.getA(), x.getB(), x.getC()] : [number, any, any] ++>x.getA() : number ++>x.getA : () => number + >x : C1 +->getA : () => any ++>getA : () => number + >x.getB() : any + >x.getB : () => any + >x : C1 +@@= skipped -28, +28 lines =@@ + >true : true + + var [y_a, y_b, y_c] = [y.getA(), y.getB(), y.getC()]; +->y_a : any ++>y_a : number + >y_b : any + >y_c : any +->[y.getA(), y.getB(), y.getC()] : [any, any, any] +->y.getA() : any +->y.getA : () => any ++>[y.getA(), y.getB(), y.getC()] : [number, any, any] ++>y.getA() : number ++>y.getA : () => number + >y : C1 +->getA : () => any ++>getA : () => number + >y.getB() : any + >y.getB : () => any + >y : C1 +@@= skipped -27, +27 lines =@@ + >"" : "" + + var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; +->z_a : any ++>z_a : number + >z_b : any + >z_c : any +->[z.getA(), z.getB(), z.getC()] : [any, any, any] +->z.getA() : any +->z.getA : () => any ++>[z.getA(), z.getB(), z.getC()] : [number, any, any] ++>z.getA() : number ++>z.getA : () => number + >z : C1 +->getA : () => any ++>getA : () => number + >z.getB() : any + >z.getB : () => any + >z : C1 diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt index e46e1e715b..b0507f5b00 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt @@ -1,13 +1,11 @@ destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. destructuringParameterProperties3.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties3.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties3.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties3.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. destructuringParameterProperties3.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties3.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. -==== destructuringParameterProperties3.ts (7 errors) ==== +==== destructuringParameterProperties3.ts (5 errors) ==== class C1 { constructor(private k: T, private [a, b, c]: [T,U,V]) { ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -18,15 +16,11 @@ destructuringParameterProperties3.ts(17,21): error TS2339: Property 'c' does not ~ !!! error TS2339: Property 'c' does not exist on type 'C1'. this.a = a || k; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. } } public getA() { return this.a - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. } public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt.diff new file mode 100644 index 0000000000..2e165ee6df --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt.diff @@ -0,0 +1,33 @@ +--- old.destructuringParameterProperties3.errors.txt ++++ new.destructuringParameterProperties3.errors.txt +@@= skipped -0, +0 lines =@@ + destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. + destructuringParameterProperties3.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. + destructuringParameterProperties3.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +-destructuringParameterProperties3.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +-destructuringParameterProperties3.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. + destructuringParameterProperties3.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. + destructuringParameterProperties3.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. + + +-==== destructuringParameterProperties3.ts (7 errors) ==== ++==== destructuringParameterProperties3.ts (5 errors) ==== + class C1 { + constructor(private k: T, private [a, b, c]: [T,U,V]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +@@= skipped -17, +15 lines =@@ + ~ + !!! error TS2339: Property 'c' does not exist on type 'C1'. + this.a = a || k; +- ~ +-!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + } + + public getA() { + return this.a +- ~ +-!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + + public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols index c72fd89927..dc5e168e6c 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols @@ -28,7 +28,9 @@ class C1 { >undefined : Symbol(undefined) this.a = a || k; +>this.a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties3.ts, 0, 0)) +>a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) >a : Symbol(a, Decl(destructuringParameterProperties3.ts, 1, 39)) >k : Symbol(k, Decl(destructuringParameterProperties3.ts, 1, 16)) } @@ -38,7 +40,9 @@ class C1 { >getA : Symbol(getA, Decl(destructuringParameterProperties3.ts, 5, 5)) return this.a +>this.a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties3.ts, 0, 0)) +>a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) } public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols.diff index 11e2af1128..63ee2c246f 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols.diff @@ -9,7 +9,16 @@ >T : Symbol(T, Decl(destructuringParameterProperties3.ts, 0, 9)) >a : Symbol(a, Decl(destructuringParameterProperties3.ts, 1, 39)) >b : Symbol(b, Decl(destructuringParameterProperties3.ts, 1, 41)) -@@= skipped -27, +27 lines =@@ +@@= skipped -20, +20 lines =@@ + >undefined : Symbol(undefined) + + this.a = a || k; ++>this.a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) + >this : Symbol(C1, Decl(destructuringParameterProperties3.ts, 0, 0)) ++>a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) + >a : Symbol(a, Decl(destructuringParameterProperties3.ts, 1, 39)) + >k : Symbol(k, Decl(destructuringParameterProperties3.ts, 1, 16)) + } } public getA() { @@ -17,7 +26,9 @@ +>getA : Symbol(getA, Decl(destructuringParameterProperties3.ts, 5, 5)) return this.a ++>this.a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties3.ts, 0, 0)) ++>a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) } public getB() { @@ -34,7 +45,7 @@ return this.c; >this : Symbol(C1, Decl(destructuringParameterProperties3.ts, 0, 0)) -@@= skipped -30, +30 lines =@@ +@@= skipped -37, +41 lines =@@ >x_a : Symbol(x_a, Decl(destructuringParameterProperties3.ts, 21, 5)) >x_b : Symbol(x_b, Decl(destructuringParameterProperties3.ts, 21, 9)) >x_c : Symbol(x_c, Decl(destructuringParameterProperties3.ts, 21, 14)) diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types index ebc55e29b1..12616a3c41 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types @@ -35,9 +35,9 @@ class C1 { this.a = a || k; >this.a = a || k : T ->this.a : any +>this.a : T >this : this ->a : any +>a : T >a || k : T >a : T >k : T @@ -45,12 +45,12 @@ class C1 { } public getA() { ->getA : () => any +>getA : () => T return this.a ->this.a : any +>this.a : T >this : this ->a : any +>a : T } public getB() { @@ -83,14 +83,14 @@ var x = new C1(undefined, [0, true, ""]); >"" : "" var [x_a, x_b, x_c] = [x.getA(), x.getB(), x.getC()]; ->x_a : any +>x_a : number >x_b : any >x_c : any ->[x.getA(), x.getB(), x.getC()] : [any, any, any] ->x.getA() : any ->x.getA : () => any +>[x.getA(), x.getB(), x.getC()] : [number, any, any] +>x.getA() : number +>x.getA : () => number >x : C1 ->getA : () => any +>getA : () => number >x.getB() : any >x.getB : () => any >x : C1 @@ -111,14 +111,14 @@ var y = new C1(10, [0, true, true]); >true : true var [y_a, y_b, y_c] = [y.getA(), y.getB(), y.getC()]; ->y_a : any +>y_a : number >y_b : any >y_c : any ->[y.getA(), y.getB(), y.getC()] : [any, any, any] ->y.getA() : any ->y.getA : () => any +>[y.getA(), y.getB(), y.getC()] : [number, any, any] +>y.getA() : number +>y.getA : () => number >y : C1 ->getA : () => any +>getA : () => number >y.getB() : any >y.getB : () => any >y : C1 @@ -139,14 +139,14 @@ var z = new C1(10, [undefined, "", ""]); >"" : "" var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; ->z_a : any +>z_a : number >z_b : any >z_c : any ->[z.getA(), z.getB(), z.getC()] : [any, any, any] ->z.getA() : any ->z.getA : () => any +>[z.getA(), z.getB(), z.getC()] : [number, any, any] +>z.getA() : 10 +>z.getA : () => 10 >z : C1<10, string, string> ->getA : () => any +>getA : () => 10 >z.getB() : any >z.getB : () => any >z : C1<10, string, string> @@ -167,14 +167,14 @@ var w = new C1(10, [undefined, undefined, undefined]); >undefined : undefined var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; ->z_a : any +>z_a : number >z_b : any >z_c : any ->[z.getA(), z.getB(), z.getC()] : [any, any, any] ->z.getA() : any ->z.getA : () => any +>[z.getA(), z.getB(), z.getC()] : [number, any, any] +>z.getA() : 10 +>z.getA : () => 10 >z : C1<10, string, string> ->getA : () => any +>getA : () => 10 >z.getB() : any >z.getB : () => any >z : C1<10, string, string> diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types.diff new file mode 100644 index 0000000000..c9c3b16854 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types.diff @@ -0,0 +1,110 @@ +--- old.destructuringParameterProperties3.types ++++ new.destructuringParameterProperties3.types +@@= skipped -34, +34 lines =@@ + + this.a = a || k; + >this.a = a || k : T +->this.a : any ++>this.a : T + >this : this +->a : any ++>a : T + >a || k : T + >a : T + >k : T +@@= skipped -10, +10 lines =@@ + } + + public getA() { +->getA : () => any ++>getA : () => T + + return this.a +->this.a : any ++>this.a : T + >this : this +->a : any ++>a : T + } + + public getB() { +@@= skipped -38, +38 lines =@@ + >"" : "" + + var [x_a, x_b, x_c] = [x.getA(), x.getB(), x.getC()]; +->x_a : any ++>x_a : number + >x_b : any + >x_c : any +->[x.getA(), x.getB(), x.getC()] : [any, any, any] +->x.getA() : any +->x.getA : () => any ++>[x.getA(), x.getB(), x.getC()] : [number, any, any] ++>x.getA() : number ++>x.getA : () => number + >x : C1 +->getA : () => any ++>getA : () => number + >x.getB() : any + >x.getB : () => any + >x : C1 +@@= skipped -28, +28 lines =@@ + >true : true + + var [y_a, y_b, y_c] = [y.getA(), y.getB(), y.getC()]; +->y_a : any ++>y_a : number + >y_b : any + >y_c : any +->[y.getA(), y.getB(), y.getC()] : [any, any, any] +->y.getA() : any +->y.getA : () => any ++>[y.getA(), y.getB(), y.getC()] : [number, any, any] ++>y.getA() : number ++>y.getA : () => number + >y : C1 +->getA : () => any ++>getA : () => number + >y.getB() : any + >y.getB : () => any + >y : C1 +@@= skipped -28, +28 lines =@@ + >"" : "" + + var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; +->z_a : any ++>z_a : number + >z_b : any + >z_c : any +->[z.getA(), z.getB(), z.getC()] : [any, any, any] +->z.getA() : any +->z.getA : () => any ++>[z.getA(), z.getB(), z.getC()] : [number, any, any] ++>z.getA() : 10 ++>z.getA : () => 10 + >z : C1<10, string, string> +->getA : () => any ++>getA : () => 10 + >z.getB() : any + >z.getB : () => any + >z : C1<10, string, string> +@@= skipped -28, +28 lines =@@ + >undefined : undefined + + var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; +->z_a : any ++>z_a : number + >z_b : any + >z_c : any +->[z.getA(), z.getB(), z.getC()] : [any, any, any] +->z.getA() : any +->z.getA : () => any ++>[z.getA(), z.getB(), z.getC()] : [number, any, any] ++>z.getA() : 10 ++>z.getA : () => 10 + >z : C1<10, string, string> +->getA : () => any ++>getA : () => 10 + >z.getB() : any + >z.getB : () => any + >z : C1<10, string, string> diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt index 43d58026dc..205632beb5 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt @@ -1,16 +1,13 @@ destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. destructuringParameterProperties4.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties4.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties4.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties4.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. destructuringParameterProperties4.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties4.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties4.ts(23,24): error TS2339: Property 'a' does not exist on type 'C2'. destructuringParameterProperties4.ts(23,34): error TS2339: Property 'b' does not exist on type 'C2'. destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not exist on type 'C2'. -==== destructuringParameterProperties4.ts (10 errors) ==== +==== destructuringParameterProperties4.ts (7 errors) ==== class C1 { constructor(private k: T, protected [a, b, c]: [T,U,V]) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -21,15 +18,11 @@ destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not ~ !!! error TS2339: Property 'c' does not exist on type 'C1'. this.a = a || k; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. } } public getA() { return this.a - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. } public getB() { @@ -48,8 +41,6 @@ destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not class C2 extends C1 { public doSomethingWithSuperProperties() { return `${this.a} ${this.b} ${this.c}`; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C2'. ~ !!! error TS2339: Property 'b' does not exist on type 'C2'. ~ diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt.diff new file mode 100644 index 0000000000..edd878f744 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt.diff @@ -0,0 +1,45 @@ +--- old.destructuringParameterProperties4.errors.txt ++++ new.destructuringParameterProperties4.errors.txt +@@= skipped -0, +0 lines =@@ + destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. + destructuringParameterProperties4.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. + destructuringParameterProperties4.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +-destructuringParameterProperties4.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +-destructuringParameterProperties4.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. + destructuringParameterProperties4.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. + destructuringParameterProperties4.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. +-destructuringParameterProperties4.ts(23,24): error TS2339: Property 'a' does not exist on type 'C2'. + destructuringParameterProperties4.ts(23,34): error TS2339: Property 'b' does not exist on type 'C2'. + destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not exist on type 'C2'. + + +-==== destructuringParameterProperties4.ts (10 errors) ==== ++==== destructuringParameterProperties4.ts (7 errors) ==== + class C1 { + constructor(private k: T, protected [a, b, c]: [T,U,V]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@@= skipped -20, +17 lines =@@ + ~ + !!! error TS2339: Property 'c' does not exist on type 'C1'. + this.a = a || k; +- ~ +-!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + } + + public getA() { + return this.a +- ~ +-!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + + public getB() { +@@= skipped -27, +23 lines =@@ + class C2 extends C1 { + public doSomethingWithSuperProperties() { + return `${this.a} ${this.b} ${this.c}`; +- ~ +-!!! error TS2339: Property 'a' does not exist on type 'C2'. + ~ + !!! error TS2339: Property 'b' does not exist on type 'C2'. + ~ diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols index b9dc13b453..aacf2c78fe 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols @@ -28,7 +28,9 @@ class C1 { >undefined : Symbol(undefined) this.a = a || k; +>this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) +>a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >a : Symbol(a, Decl(destructuringParameterProperties4.ts, 1, 41)) >k : Symbol(k, Decl(destructuringParameterProperties4.ts, 1, 16)) } @@ -38,7 +40,9 @@ class C1 { >getA : Symbol(getA, Decl(destructuringParameterProperties4.ts, 5, 5)) return this.a +>this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) +>a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) } public getB() { @@ -64,7 +68,9 @@ class C2 extends C1 { >doSomethingWithSuperProperties : Symbol(doSomethingWithSuperProperties, Decl(destructuringParameterProperties4.ts, 20, 46)) return `${this.a} ${this.b} ${this.c}`; +>this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) +>a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) } diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols.diff index d70509fefa..af3740b008 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols.diff @@ -9,7 +9,16 @@ >T : Symbol(T, Decl(destructuringParameterProperties4.ts, 0, 9)) >a : Symbol(a, Decl(destructuringParameterProperties4.ts, 1, 41)) >b : Symbol(b, Decl(destructuringParameterProperties4.ts, 1, 43)) -@@= skipped -27, +27 lines =@@ +@@= skipped -20, +20 lines =@@ + >undefined : Symbol(undefined) + + this.a = a || k; ++>this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) + >this : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) ++>a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) + >a : Symbol(a, Decl(destructuringParameterProperties4.ts, 1, 41)) + >k : Symbol(k, Decl(destructuringParameterProperties4.ts, 1, 16)) + } } public getA() { @@ -17,7 +26,9 @@ +>getA : Symbol(getA, Decl(destructuringParameterProperties4.ts, 5, 5)) return this.a ++>this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) ++>a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) } public getB() { @@ -34,7 +45,7 @@ return this.c; >this : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) -@@= skipped -26, +26 lines =@@ +@@= skipped -33, +37 lines =@@ >C1 : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) public doSomethingWithSuperProperties() { @@ -42,4 +53,9 @@ +>doSomethingWithSuperProperties : Symbol(doSomethingWithSuperProperties, Decl(destructuringParameterProperties4.ts, 20, 46)) return `${this.a} ${this.b} ${this.c}`; ++>this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) ++>a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) + >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) + >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) + } diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types index 398c982425..d27bb633fc 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types @@ -35,9 +35,9 @@ class C1 { this.a = a || k; >this.a = a || k : T ->this.a : any +>this.a : T >this : this ->a : any +>a : T >a || k : T >a : T >k : T @@ -45,12 +45,12 @@ class C1 { } public getA() { ->getA : () => any +>getA : () => T return this.a ->this.a : any +>this.a : T >this : this ->a : any +>a : T } public getB() { @@ -81,9 +81,9 @@ class C2 extends C1 { return `${this.a} ${this.b} ${this.c}`; >`${this.a} ${this.b} ${this.c}` : string ->this.a : any +>this.a : number >this : this ->a : any +>a : number >this.b : any >this : this >b : any diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types.diff new file mode 100644 index 0000000000..cd971a8520 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types.diff @@ -0,0 +1,42 @@ +--- old.destructuringParameterProperties4.types ++++ new.destructuringParameterProperties4.types +@@= skipped -34, +34 lines =@@ + + this.a = a || k; + >this.a = a || k : T +->this.a : any ++>this.a : T + >this : this +->a : any ++>a : T + >a || k : T + >a : T + >k : T +@@= skipped -10, +10 lines =@@ + } + + public getA() { +->getA : () => any ++>getA : () => T + + return this.a +->this.a : any ++>this.a : T + >this : this +->a : any ++>a : T + } + + public getB() { +@@= skipped -36, +36 lines =@@ + + return `${this.a} ${this.b} ${this.c}`; + >`${this.a} ${this.b} ${this.c}` : string +->this.a : any ++>this.a : number + >this : this +->a : any ++>a : number + >this.b : any + >this : this + >b : any diff --git a/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.errors.txt b/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.errors.txt index b96ad08101..a02025e400 100644 --- a/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.errors.txt @@ -1,9 +1,8 @@ -mod.js(7,14): error TS2339: Property 'p' does not exist on type 'Classic'. use.js(8,15): error TS2694: Namespace '"mod"' has no exported member 'n'. use.js(9,13): error TS2749: 's.Classic' refers to a value, but is being used as a type here. Did you mean 'typeof s.Classic'? -==== mod.js (1 errors) ==== +==== mod.js (0 errors) ==== exports.n = {}; exports.n.K = function () { this.x = 10; @@ -11,8 +10,6 @@ use.js(9,13): error TS2749: 's.Classic' refers to a value, but is being used as exports.Classic = class { constructor() { this.p = 1 - ~ -!!! error TS2339: Property 'p' does not exist on type 'Classic'. } } diff --git a/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.symbols b/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.symbols index f6d5296284..d69228d32c 100644 --- a/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.symbols +++ b/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.symbols @@ -20,7 +20,9 @@ exports.Classic = class { constructor() { this.p = 1 +>this.p : Symbol(p, Decl(mod.js, 5, 19)) >this : Symbol(Classic, Decl(mod.js, 4, 17)) +>p : Symbol(p, Decl(mod.js, 5, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.symbols.diff b/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.symbols.diff index a2a8856e4d..e0de9eca9d 100644 --- a/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.symbols.diff @@ -34,12 +34,14 @@ constructor() { this.p = 1 ->this.p : Symbol(Classic.p, Decl(mod.js, 5, 19)) ++>this.p : Symbol(p, Decl(mod.js, 5, 19)) >this : Symbol(Classic, Decl(mod.js, 4, 17)) ->p : Symbol(Classic.p, Decl(mod.js, 5, 19)) ++>p : Symbol(p, Decl(mod.js, 5, 19)) } } -@@= skipped -35, +28 lines =@@ +@@= skipped -35, +30 lines =@@ var k = new s.n.K() >k : Symbol(k, Decl(use.js, 2, 3)) diff --git a/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.types b/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.types index 681339429e..306dc5cf2f 100644 --- a/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.types +++ b/testdata/baselines/reference/submodule/conformance/exportNestedNamespaces.types @@ -34,9 +34,9 @@ exports.Classic = class { constructor() { this.p = 1 >this.p = 1 : 1 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt index 45e8a2a01d..0e68c75bbf 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt @@ -1,265 +1,185 @@ -a.js(4,18): error TS2339: Property 'inConstructor' does not exist on type 'C'. -a.js(7,18): error TS2339: Property 'inConstructor' does not exist on type 'C'. -a.js(9,14): error TS2339: Property 'inMultiple' does not exist on type 'C'. -a.js(13,18): error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -a.js(14,18): error TS2339: Property 'inMethodNullable' does not exist on type 'C'. -a.js(17,18): error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -a.js(18,18): error TS2339: Property 'inMethodNullable' does not exist on type 'C'. -a.js(20,14): error TS2339: Property 'inMultiple' does not exist on type 'C'. -a.js(21,14): error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. -a.js(25,22): error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. -a.js(28,22): error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. -a.js(34,18): error TS2339: Property 'inGetter' does not exist on type 'C'. -a.js(37,18): error TS2339: Property 'inGetter' does not exist on type 'C'. -a.js(39,14): error TS2339: Property 'inMultiple' does not exist on type 'C'. -a.js(40,14): error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. -a.js(44,18): error TS2339: Property 'inSetter' does not exist on type 'C'. -a.js(47,18): error TS2339: Property 'inSetter' does not exist on type 'C'. -a.js(52,18): error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. -a.js(55,18): error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. -a.js(60,18): error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. -a.js(63,18): error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. -a.js(68,22): error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. -a.js(71,22): error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. -a.js(77,18): error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. -a.js(80,18): error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. -a.js(85,18): error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. -a.js(88,18): error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. -a.js(93,18): error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. -a.js(96,18): error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. -b.ts(4,24): error TS2339: Property 'inConstructor' does not exist on type 'C'. -b.ts(8,35): error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -b.ts(9,35): error TS2339: Property 'inGetter' does not exist on type 'C'. -b.ts(10,35): error TS2339: Property 'inSetter' does not exist on type 'C'. -b.ts(11,35): error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. -b.ts(12,35): error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. -b.ts(17,16): error TS2339: Property 'inMultiple' does not exist on type 'C'. -b.ts(19,36): error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. -b.ts(21,13): error TS2339: Property 'inMethodNullable' does not exist on type 'C'. -b.ts(24,35): error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. -b.ts(25,35): error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. -b.ts(26,35): error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. -b.ts(27,35): error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. -b.ts(28,35): error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. +b.ts(8,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(9,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(11,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(17,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'number' must be of type 'number', but here has type 'string | number | boolean'. +b.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrBooleanOrUndefined' must be of type 'string | boolean | undefined', but here has type 'string | boolean'. +b.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'any' must be of type 'any', but here has type 'null | undefined'. +b.ts(24,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(25,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(26,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(27,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(28,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -==== a.js (29 errors) ==== +==== a.js (0 errors) ==== class C { constructor() { if (Math.random()) { this.inConstructor = 0; - ~~~~~~~~~~~~~ -!!! error TS2339: Property 'inConstructor' does not exist on type 'C'. } else { this.inConstructor = "string" - ~~~~~~~~~~~~~ -!!! error TS2339: Property 'inConstructor' does not exist on type 'C'. } this.inMultiple = 0; - ~~~~~~~~~~ -!!! error TS2339: Property 'inMultiple' does not exist on type 'C'. } method() { if (Math.random()) { this.inMethod = 0; - ~~~~~~~~ -!!! error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -!!! related TS2728 a.js:11:5: 'method' is declared here. this.inMethodNullable = null; - ~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inMethodNullable' does not exist on type 'C'. } else { this.inMethod = "string" - ~~~~~~~~ -!!! error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -!!! related TS2728 a.js:11:5: 'method' is declared here. this.inMethodNullable = undefined; - ~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inMethodNullable' does not exist on type 'C'. } this.inMultiple = "string"; - ~~~~~~~~~~ -!!! error TS2339: Property 'inMultiple' does not exist on type 'C'. this.inMultipleMethods = "string"; - ~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. var action = () => { if (Math.random()) { this.inNestedArrowFunction = 0; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. } else { this.inNestedArrowFunction = "string" - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. } }; } get() { if (Math.random()) { this.inGetter = 0; - ~~~~~~~~ -!!! error TS2339: Property 'inGetter' does not exist on type 'C'. } else { this.inGetter = "string" - ~~~~~~~~ -!!! error TS2339: Property 'inGetter' does not exist on type 'C'. } this.inMultiple = false; - ~~~~~~~~~~ -!!! error TS2339: Property 'inMultiple' does not exist on type 'C'. this.inMultipleMethods = false; - ~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. } set() { if (Math.random()) { this.inSetter = 0; - ~~~~~~~~ -!!! error TS2339: Property 'inSetter' does not exist on type 'C'. } else { this.inSetter = "string" - ~~~~~~~~ -!!! error TS2339: Property 'inSetter' does not exist on type 'C'. } } prop = () => { if (Math.random()) { this.inPropertyDeclaration = 0; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. } else { this.inPropertyDeclaration = "string" - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. } } static method() { if (Math.random()) { this.inStaticMethod = 0; - ~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. } else { this.inStaticMethod = "string" - ~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. } var action = () => { if (Math.random()) { this.inStaticNestedArrowFunction = 0; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. } else { this.inStaticNestedArrowFunction = "string" - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. } }; } static get() { if (Math.random()) { this.inStaticGetter = 0; - ~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. } else { this.inStaticGetter = "string" - ~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. } } static set() { if (Math.random()) { this.inStaticSetter = 0; - ~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. } else { this.inStaticSetter = "string" - ~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. } } static prop = () => { if (Math.random()) { this.inStaticPropertyDeclaration = 0; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. } else { this.inStaticPropertyDeclaration = "string" - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. } } } -==== b.ts (14 errors) ==== +==== b.ts (13 errors) ==== var c = new C(); var stringOrNumber: string | number; var stringOrNumber = c.inConstructor; - ~~~~~~~~~~~~~ -!!! error TS2339: Property 'inConstructor' does not exist on type 'C'. var stringOrNumberOrUndefined: string | number | undefined; var stringOrNumberOrUndefined = c.inMethod; - ~~~~~~~~ -!!! error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -!!! related TS2728 a.js:11:5: 'method' is declared here. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inGetter; - ~~~~~~~~ -!!! error TS2339: Property 'inGetter' does not exist on type 'C'. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inSetter; - ~~~~~~~~ -!!! error TS2339: Property 'inSetter' does not exist on type 'C'. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inPropertyDeclaration; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inNestedArrowFunction - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrBoolean: string | number | boolean; var number: number; var number = c.inMultiple; - ~~~~~~~~~~ -!!! error TS2339: Property 'inMultiple' does not exist on type 'C'. + ~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'number' must be of type 'number', but here has type 'string | number | boolean'. +!!! related TS6203 b.ts:16:5: 'number' was also declared here. var stringOrBooleanOrUndefined : string | boolean | undefined; var stringOrBooleanOrUndefined = c.inMultipleMethods; - ~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrBooleanOrUndefined' must be of type 'string | boolean | undefined', but here has type 'string | boolean'. +!!! related TS6203 b.ts:18:5: 'stringOrBooleanOrUndefined' was also declared here. var any: any; var any = c.inMethodNullable; - ~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inMethodNullable' does not exist on type 'C'. + ~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'any' must be of type 'any', but here has type 'null | undefined'. +!!! related TS6203 b.ts:20:5: 'any' was also declared here. var stringOrNumberOrUndefined = C.inStaticMethod; - ~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticGetter; - ~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticSetter; - ~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.symbols b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.symbols index 9b3d2cb9fc..b7d88d631d 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.symbols +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.symbols @@ -11,14 +11,20 @@ class C { >random : Symbol(random, Decl(lib.es5.d.ts, --, --)) this.inConstructor = 0; +>this.inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) } else { this.inConstructor = "string" +>this.inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) } this.inMultiple = 0; +>this.inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) } method() { >method : Symbol(method, Decl(a.js, 9, 5)) @@ -29,24 +35,36 @@ class C { >random : Symbol(random, Decl(lib.es5.d.ts, --, --)) this.inMethod = 0; +>this.inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) this.inMethodNullable = null; +>this.inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) } else { this.inMethod = "string" +>this.inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) this.inMethodNullable = undefined; +>this.inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) >undefined : Symbol(undefined) } this.inMultiple = "string"; +>this.inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) this.inMultipleMethods = "string"; +>this.inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) var action = () => { >action : Symbol(action, Decl(a.js, 22, 11)) @@ -57,11 +75,15 @@ class C { >random : Symbol(random, Decl(lib.es5.d.ts, --, --)) this.inNestedArrowFunction = 0; +>this.inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) } else { this.inNestedArrowFunction = "string" +>this.inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) } }; } @@ -74,17 +96,25 @@ class C { >random : Symbol(random, Decl(lib.es5.d.ts, --, --)) this.inGetter = 0; +>this.inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) } else { this.inGetter = "string" +>this.inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) } this.inMultiple = false; +>this.inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) this.inMultipleMethods = false; +>this.inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) } set() { >set : Symbol(set, Decl(a.js, 40, 5)) @@ -95,11 +125,15 @@ class C { >random : Symbol(random, Decl(lib.es5.d.ts, --, --)) this.inSetter = 0; +>this.inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) } else { this.inSetter = "string" +>this.inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) } } prop = () => { @@ -111,11 +145,15 @@ class C { >random : Symbol(random, Decl(lib.es5.d.ts, --, --)) this.inPropertyDeclaration = 0; +>this.inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) } else { this.inPropertyDeclaration = "string" +>this.inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) } } static method() { @@ -127,11 +165,15 @@ class C { >random : Symbol(random, Decl(lib.es5.d.ts, --, --)) this.inStaticMethod = 0; +>this.inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) } else { this.inStaticMethod = "string" +>this.inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) } var action = () => { @@ -143,11 +185,15 @@ class C { >random : Symbol(random, Decl(lib.es5.d.ts, --, --)) this.inStaticNestedArrowFunction = 0; +>this.inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) } else { this.inStaticNestedArrowFunction = "string" +>this.inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) } }; } @@ -160,11 +206,15 @@ class C { >random : Symbol(random, Decl(lib.es5.d.ts, --, --)) this.inStaticGetter = 0; +>this.inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) } else { this.inStaticGetter = "string" +>this.inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) } } static set() { @@ -176,11 +226,15 @@ class C { >random : Symbol(random, Decl(lib.es5.d.ts, --, --)) this.inStaticSetter = 0; +>this.inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) } else { this.inStaticSetter = "string" +>this.inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) } } static prop = () => { @@ -192,11 +246,15 @@ class C { >random : Symbol(random, Decl(lib.es5.d.ts, --, --)) this.inStaticPropertyDeclaration = 0; +>this.inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) } else { this.inStaticPropertyDeclaration = "string" +>this.inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) } } } @@ -211,30 +269,42 @@ var stringOrNumber: string | number; var stringOrNumber = c.inConstructor; >stringOrNumber : Symbol(stringOrNumber, Decl(b.ts, 2, 3), Decl(b.ts, 3, 3)) +>c.inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) +>inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) var stringOrNumberOrUndefined: string | number | undefined; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) var stringOrNumberOrUndefined = c.inMethod; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) +>c.inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) +>inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) var stringOrNumberOrUndefined = c.inGetter; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) +>c.inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) +>inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) var stringOrNumberOrUndefined = c.inSetter; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) +>c.inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) +>inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) var stringOrNumberOrUndefined = c.inPropertyDeclaration; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) +>c.inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) +>inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) var stringOrNumberOrUndefined = c.inNestedArrowFunction >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) +>c.inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) >c : Symbol(c, Decl(b.ts, 0, 3)) +>inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) var stringOrNumberOrBoolean: string | number | boolean; >stringOrNumberOrBoolean : Symbol(stringOrNumberOrBoolean, Decl(b.ts, 13, 3)) @@ -244,40 +314,56 @@ var number: number; var number = c.inMultiple; >number : Symbol(number, Decl(b.ts, 15, 3), Decl(b.ts, 16, 3)) +>c.inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) >c : Symbol(c, Decl(b.ts, 0, 3)) +>inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) var stringOrBooleanOrUndefined : string | boolean | undefined; >stringOrBooleanOrUndefined : Symbol(stringOrBooleanOrUndefined, Decl(b.ts, 17, 3), Decl(b.ts, 18, 3)) var stringOrBooleanOrUndefined = c.inMultipleMethods; >stringOrBooleanOrUndefined : Symbol(stringOrBooleanOrUndefined, Decl(b.ts, 17, 3), Decl(b.ts, 18, 3)) +>c.inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) >c : Symbol(c, Decl(b.ts, 0, 3)) +>inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) var any: any; >any : Symbol(any, Decl(b.ts, 19, 3), Decl(b.ts, 20, 3)) var any = c.inMethodNullable; >any : Symbol(any, Decl(b.ts, 19, 3), Decl(b.ts, 20, 3)) +>c.inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) >c : Symbol(c, Decl(b.ts, 0, 3)) +>inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) var stringOrNumberOrUndefined = C.inStaticMethod; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) +>C.inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) >C : Symbol(C, Decl(a.js, 0, 0)) +>inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) var stringOrNumberOrUndefined = C.inStaticGetter; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) +>C.inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) >C : Symbol(C, Decl(a.js, 0, 0)) +>inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) var stringOrNumberOrUndefined = C.inStaticSetter; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) +>C.inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) >C : Symbol(C, Decl(a.js, 0, 0)) +>inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) +>C.inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) >C : Symbol(C, Decl(a.js, 0, 0)) +>inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) +>C.inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) >C : Symbol(C, Decl(a.js, 0, 0)) +>inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.symbols.diff b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.symbols.diff index 937130cae9..89989e1e91 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.symbols.diff @@ -12,19 +12,25 @@ this.inConstructor = 0; ->this.inConstructor : Symbol(C.inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) ++>this.inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inConstructor : Symbol(C.inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) ++>inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) } else { this.inConstructor = "string" ->this.inConstructor : Symbol(C.inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) ++>this.inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inConstructor : Symbol(C.inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) ++>inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) } this.inMultiple = 0; ->this.inMultiple : Symbol(C.inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) ++>this.inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMultiple : Symbol(C.inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) ++>inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) } method() { ->method : Symbol(C.method, Decl(a.js, 9, 5)) @@ -39,35 +45,47 @@ this.inMethod = 0; ->this.inMethod : Symbol(C.inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) ++>this.inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMethod : Symbol(C.inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) ++>inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) this.inMethodNullable = null; ->this.inMethodNullable : Symbol(C.inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) ++>this.inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMethodNullable : Symbol(C.inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) ++>inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) } else { this.inMethod = "string" ->this.inMethod : Symbol(C.inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) ++>this.inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMethod : Symbol(C.inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) ++>inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) this.inMethodNullable = undefined; ->this.inMethodNullable : Symbol(C.inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) ++>this.inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMethodNullable : Symbol(C.inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) ++>inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) >undefined : Symbol(undefined) } this.inMultiple = "string"; ->this.inMultiple : Symbol(C.inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) ++>this.inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMultiple : Symbol(C.inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) ++>inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) this.inMultipleMethods = "string"; ->this.inMultipleMethods : Symbol(C.inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) ++>this.inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMultipleMethods : Symbol(C.inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) ++>inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) var action = () => { >action : Symbol(action, Decl(a.js, 22, 11)) @@ -81,14 +99,18 @@ this.inNestedArrowFunction = 0; ->this.inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) ++>this.inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) ++>inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) } else { this.inNestedArrowFunction = "string" ->this.inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) ++>this.inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) ++>inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) } }; } @@ -105,24 +127,32 @@ this.inGetter = 0; ->this.inGetter : Symbol(C.inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) ++>this.inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inGetter : Symbol(C.inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) ++>inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) } else { this.inGetter = "string" ->this.inGetter : Symbol(C.inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) ++>this.inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inGetter : Symbol(C.inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) ++>inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) } this.inMultiple = false; ->this.inMultiple : Symbol(C.inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) ++>this.inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMultiple : Symbol(C.inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) ++>inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) this.inMultipleMethods = false; ->this.inMultipleMethods : Symbol(C.inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) ++>this.inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMultipleMethods : Symbol(C.inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) ++>inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) } set() { ->set : Symbol(C.set, Decl(a.js, 40, 5)) @@ -137,14 +167,18 @@ this.inSetter = 0; ->this.inSetter : Symbol(C.inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) ++>this.inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inSetter : Symbol(C.inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) ++>inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) } else { this.inSetter = "string" ->this.inSetter : Symbol(C.inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) ++>this.inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inSetter : Symbol(C.inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) ++>inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) } } prop = () => { @@ -160,14 +194,18 @@ this.inPropertyDeclaration = 0; ->this.inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) ++>this.inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) ++>inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) } else { this.inPropertyDeclaration = "string" ->this.inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) ++>this.inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) ++>inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) } } static method() { @@ -183,14 +221,18 @@ this.inStaticMethod = 0; ->this.inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) ++>this.inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) ++>inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) } else { this.inStaticMethod = "string" ->this.inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) ++>this.inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) ++>inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) } var action = () => { @@ -205,14 +247,18 @@ this.inStaticNestedArrowFunction = 0; ->this.inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) ++>this.inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) ++>inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) } else { this.inStaticNestedArrowFunction = "string" ->this.inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) ++>this.inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) ++>inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) } }; } @@ -229,14 +275,18 @@ this.inStaticGetter = 0; ->this.inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) ++>this.inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) ++>inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) } else { this.inStaticGetter = "string" ->this.inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) ++>this.inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) ++>inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) } } static set() { @@ -252,14 +302,18 @@ this.inStaticSetter = 0; ->this.inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) ++>this.inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) ++>inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) } else { this.inStaticSetter = "string" ->this.inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) ++>this.inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) ++>inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) } } static prop = () => { @@ -275,24 +329,30 @@ this.inStaticPropertyDeclaration = 0; ->this.inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) ++>this.inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) ++>inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) } else { this.inStaticPropertyDeclaration = "string" ->this.inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) ++>this.inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) ++>inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) } } } -@@= skipped -263, +205 lines =@@ +@@= skipped -263, +263 lines =@@ var stringOrNumber = c.inConstructor; >stringOrNumber : Symbol(stringOrNumber, Decl(b.ts, 2, 3), Decl(b.ts, 3, 3)) ->c.inConstructor : Symbol(C.inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) ++>c.inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inConstructor : Symbol(C.inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) ++>inConstructor : Symbol(inConstructor, Decl(a.js, 2, 28), Decl(a.js, 5, 14)) var stringOrNumberOrUndefined: string | number | undefined; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) @@ -300,42 +360,54 @@ var stringOrNumberOrUndefined = c.inMethod; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) ->c.inMethod : Symbol(C.inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) ++>c.inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inMethod : Symbol(C.inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) ++>inMethod : Symbol(inMethod, Decl(a.js, 11, 28), Decl(a.js, 15, 14)) var stringOrNumberOrUndefined = c.inGetter; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) ->c.inGetter : Symbol(C.inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) ++>c.inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inGetter : Symbol(C.inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) ++>inGetter : Symbol(inGetter, Decl(a.js, 32, 28), Decl(a.js, 35, 14)) var stringOrNumberOrUndefined = c.inSetter; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) ->c.inSetter : Symbol(C.inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) ++>c.inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inSetter : Symbol(C.inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) ++>inSetter : Symbol(inSetter, Decl(a.js, 42, 28), Decl(a.js, 45, 14)) var stringOrNumberOrUndefined = c.inPropertyDeclaration; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) ->c.inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) ++>c.inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) ++>inPropertyDeclaration : Symbol(inPropertyDeclaration, Decl(a.js, 50, 28), Decl(a.js, 53, 14)) var stringOrNumberOrUndefined = c.inNestedArrowFunction >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) ->c.inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) ++>c.inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) ++>inNestedArrowFunction : Symbol(inNestedArrowFunction, Decl(a.js, 23, 32), Decl(a.js, 26, 18)) var stringOrNumberOrBoolean: string | number | boolean; >stringOrNumberOrBoolean : Symbol(stringOrNumberOrBoolean, Decl(b.ts, 13, 3)) -@@= skipped -45, +33 lines =@@ +@@= skipped -45, +45 lines =@@ var number = c.inMultiple; >number : Symbol(number, Decl(b.ts, 15, 3), Decl(b.ts, 16, 3)) ->c.inMultiple : Symbol(C.inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) ++>c.inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inMultiple : Symbol(C.inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) ++>inMultiple : Symbol(inMultiple, Decl(a.js, 7, 9), Decl(a.js, 18, 9), Decl(a.js, 37, 9)) var stringOrBooleanOrUndefined : string | boolean | undefined; >stringOrBooleanOrUndefined : Symbol(stringOrBooleanOrUndefined, Decl(b.ts, 17, 3), Decl(b.ts, 18, 3)) @@ -343,8 +415,10 @@ var stringOrBooleanOrUndefined = c.inMultipleMethods; >stringOrBooleanOrUndefined : Symbol(stringOrBooleanOrUndefined, Decl(b.ts, 17, 3), Decl(b.ts, 18, 3)) ->c.inMultipleMethods : Symbol(C.inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) ++>c.inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inMultipleMethods : Symbol(C.inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) ++>inMultipleMethods : Symbol(inMultipleMethods, Decl(a.js, 19, 35), Decl(a.js, 38, 32)) var any: any; >any : Symbol(any, Decl(b.ts, 19, 3), Decl(b.ts, 20, 3)) @@ -352,37 +426,49 @@ var any = c.inMethodNullable; >any : Symbol(any, Decl(b.ts, 19, 3), Decl(b.ts, 20, 3)) ->c.inMethodNullable : Symbol(C.inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) ++>c.inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inMethodNullable : Symbol(C.inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) ++>inMethodNullable : Symbol(inMethodNullable, Decl(a.js, 12, 30), Decl(a.js, 16, 36)) var stringOrNumberOrUndefined = C.inStaticMethod; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) ->C.inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) ++>C.inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) >C : Symbol(C, Decl(a.js, 0, 0)) ->inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) ++>inStaticMethod : Symbol(inStaticMethod, Decl(a.js, 58, 28), Decl(a.js, 61, 14)) var stringOrNumberOrUndefined = C.inStaticGetter; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) ->C.inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) ++>C.inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) >C : Symbol(C, Decl(a.js, 0, 0)) ->inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) ++>inStaticGetter : Symbol(inStaticGetter, Decl(a.js, 75, 28), Decl(a.js, 78, 14)) var stringOrNumberOrUndefined = C.inStaticSetter; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) ->C.inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) ++>C.inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) >C : Symbol(C, Decl(a.js, 0, 0)) ->inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) ++>inStaticSetter : Symbol(inStaticSetter, Decl(a.js, 83, 28), Decl(a.js, 86, 14)) var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) ->C.inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) ++>C.inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) >C : Symbol(C, Decl(a.js, 0, 0)) ->inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) ++>inStaticPropertyDeclaration : Symbol(inStaticPropertyDeclaration, Decl(a.js, 91, 28), Decl(a.js, 94, 14)) var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; >stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3) ... and 6 more) ->C.inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) ++>C.inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) >C : Symbol(C, Decl(a.js, 0, 0)) ->inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) ++>inStaticNestedArrowFunction : Symbol(inStaticNestedArrowFunction, Decl(a.js, 66, 32), Decl(a.js, 69, 18)) diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types index b971b4ea75..4017809e05 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types @@ -13,24 +13,24 @@ class C { this.inConstructor = 0; >this.inConstructor = 0 : 0 ->this.inConstructor : any +>this.inConstructor : string | number >this : this ->inConstructor : any +>inConstructor : string | number >0 : 0 } else { this.inConstructor = "string" >this.inConstructor = "string" : "string" ->this.inConstructor : any +>this.inConstructor : string | number >this : this ->inConstructor : any +>inConstructor : string | number >"string" : "string" } this.inMultiple = 0; >this.inMultiple = 0 : 0 ->this.inMultiple : any +>this.inMultiple : string | number | boolean >this : this ->inMultiple : any +>inMultiple : string | number | boolean >0 : 0 } method() { @@ -44,44 +44,44 @@ class C { this.inMethod = 0; >this.inMethod = 0 : 0 ->this.inMethod : any +>this.inMethod : string | number >this : this ->inMethod : any +>inMethod : string | number >0 : 0 this.inMethodNullable = null; >this.inMethodNullable = null : null ->this.inMethodNullable : any +>this.inMethodNullable : null | undefined >this : this ->inMethodNullable : any +>inMethodNullable : null | undefined } else { this.inMethod = "string" >this.inMethod = "string" : "string" ->this.inMethod : any +>this.inMethod : string | number >this : this ->inMethod : any +>inMethod : string | number >"string" : "string" this.inMethodNullable = undefined; >this.inMethodNullable = undefined : undefined ->this.inMethodNullable : any +>this.inMethodNullable : null | undefined >this : this ->inMethodNullable : any +>inMethodNullable : null | undefined >undefined : undefined } this.inMultiple = "string"; >this.inMultiple = "string" : "string" ->this.inMultiple : any +>this.inMultiple : string | number | boolean >this : this ->inMultiple : any +>inMultiple : string | number | boolean >"string" : "string" this.inMultipleMethods = "string"; >this.inMultipleMethods = "string" : "string" ->this.inMultipleMethods : any +>this.inMultipleMethods : string | boolean >this : this ->inMultipleMethods : any +>inMultipleMethods : string | boolean >"string" : "string" var action = () => { @@ -96,17 +96,17 @@ class C { this.inNestedArrowFunction = 0; >this.inNestedArrowFunction = 0 : 0 ->this.inNestedArrowFunction : any +>this.inNestedArrowFunction : string | number >this : this ->inNestedArrowFunction : any +>inNestedArrowFunction : string | number >0 : 0 } else { this.inNestedArrowFunction = "string" >this.inNestedArrowFunction = "string" : "string" ->this.inNestedArrowFunction : any +>this.inNestedArrowFunction : string | number >this : this ->inNestedArrowFunction : any +>inNestedArrowFunction : string | number >"string" : "string" } }; @@ -122,31 +122,31 @@ class C { this.inGetter = 0; >this.inGetter = 0 : 0 ->this.inGetter : any +>this.inGetter : string | number >this : this ->inGetter : any +>inGetter : string | number >0 : 0 } else { this.inGetter = "string" >this.inGetter = "string" : "string" ->this.inGetter : any +>this.inGetter : string | number >this : this ->inGetter : any +>inGetter : string | number >"string" : "string" } this.inMultiple = false; >this.inMultiple = false : false ->this.inMultiple : any +>this.inMultiple : string | number | boolean >this : this ->inMultiple : any +>inMultiple : string | number | boolean >false : false this.inMultipleMethods = false; >this.inMultipleMethods = false : false ->this.inMultipleMethods : any +>this.inMultipleMethods : string | boolean >this : this ->inMultipleMethods : any +>inMultipleMethods : string | boolean >false : false } set() { @@ -160,17 +160,17 @@ class C { this.inSetter = 0; >this.inSetter = 0 : 0 ->this.inSetter : any +>this.inSetter : string | number >this : this ->inSetter : any +>inSetter : string | number >0 : 0 } else { this.inSetter = "string" >this.inSetter = "string" : "string" ->this.inSetter : any +>this.inSetter : string | number >this : this ->inSetter : any +>inSetter : string | number >"string" : "string" } } @@ -186,17 +186,17 @@ class C { this.inPropertyDeclaration = 0; >this.inPropertyDeclaration = 0 : 0 ->this.inPropertyDeclaration : any +>this.inPropertyDeclaration : string | number >this : this ->inPropertyDeclaration : any +>inPropertyDeclaration : string | number >0 : 0 } else { this.inPropertyDeclaration = "string" >this.inPropertyDeclaration = "string" : "string" ->this.inPropertyDeclaration : any +>this.inPropertyDeclaration : string | number >this : this ->inPropertyDeclaration : any +>inPropertyDeclaration : string | number >"string" : "string" } } @@ -211,17 +211,17 @@ class C { this.inStaticMethod = 0; >this.inStaticMethod = 0 : 0 ->this.inStaticMethod : any +>this.inStaticMethod : string | number >this : typeof C ->inStaticMethod : any +>inStaticMethod : string | number >0 : 0 } else { this.inStaticMethod = "string" >this.inStaticMethod = "string" : "string" ->this.inStaticMethod : any +>this.inStaticMethod : string | number >this : typeof C ->inStaticMethod : any +>inStaticMethod : string | number >"string" : "string" } @@ -237,17 +237,17 @@ class C { this.inStaticNestedArrowFunction = 0; >this.inStaticNestedArrowFunction = 0 : 0 ->this.inStaticNestedArrowFunction : any +>this.inStaticNestedArrowFunction : string | number >this : typeof C ->inStaticNestedArrowFunction : any +>inStaticNestedArrowFunction : string | number >0 : 0 } else { this.inStaticNestedArrowFunction = "string" >this.inStaticNestedArrowFunction = "string" : "string" ->this.inStaticNestedArrowFunction : any +>this.inStaticNestedArrowFunction : string | number >this : typeof C ->inStaticNestedArrowFunction : any +>inStaticNestedArrowFunction : string | number >"string" : "string" } }; @@ -263,17 +263,17 @@ class C { this.inStaticGetter = 0; >this.inStaticGetter = 0 : 0 ->this.inStaticGetter : any +>this.inStaticGetter : string | number >this : typeof C ->inStaticGetter : any +>inStaticGetter : string | number >0 : 0 } else { this.inStaticGetter = "string" >this.inStaticGetter = "string" : "string" ->this.inStaticGetter : any +>this.inStaticGetter : string | number >this : typeof C ->inStaticGetter : any +>inStaticGetter : string | number >"string" : "string" } } @@ -288,17 +288,17 @@ class C { this.inStaticSetter = 0; >this.inStaticSetter = 0 : 0 ->this.inStaticSetter : any +>this.inStaticSetter : string | number >this : typeof C ->inStaticSetter : any +>inStaticSetter : string | number >0 : 0 } else { this.inStaticSetter = "string" >this.inStaticSetter = "string" : "string" ->this.inStaticSetter : any +>this.inStaticSetter : string | number >this : typeof C ->inStaticSetter : any +>inStaticSetter : string | number >"string" : "string" } } @@ -314,17 +314,17 @@ class C { this.inStaticPropertyDeclaration = 0; >this.inStaticPropertyDeclaration = 0 : 0 ->this.inStaticPropertyDeclaration : any +>this.inStaticPropertyDeclaration : string | number >this : typeof C ->inStaticPropertyDeclaration : any +>inStaticPropertyDeclaration : string | number >0 : 0 } else { this.inStaticPropertyDeclaration = "string" >this.inStaticPropertyDeclaration = "string" : "string" ->this.inStaticPropertyDeclaration : any +>this.inStaticPropertyDeclaration : string | number >this : typeof C ->inStaticPropertyDeclaration : any +>inStaticPropertyDeclaration : string | number >"string" : "string" } } @@ -341,42 +341,42 @@ var stringOrNumber: string | number; var stringOrNumber = c.inConstructor; >stringOrNumber : string | number ->c.inConstructor : any +>c.inConstructor : string | number >c : C ->inConstructor : any +>inConstructor : string | number var stringOrNumberOrUndefined: string | number | undefined; >stringOrNumberOrUndefined : string | number | undefined var stringOrNumberOrUndefined = c.inMethod; >stringOrNumberOrUndefined : string | number | undefined ->c.inMethod : any +>c.inMethod : string | number >c : C ->inMethod : any +>inMethod : string | number var stringOrNumberOrUndefined = c.inGetter; >stringOrNumberOrUndefined : string | number | undefined ->c.inGetter : any +>c.inGetter : string | number >c : C ->inGetter : any +>inGetter : string | number var stringOrNumberOrUndefined = c.inSetter; >stringOrNumberOrUndefined : string | number | undefined ->c.inSetter : any +>c.inSetter : string | number >c : C ->inSetter : any +>inSetter : string | number var stringOrNumberOrUndefined = c.inPropertyDeclaration; >stringOrNumberOrUndefined : string | number | undefined ->c.inPropertyDeclaration : any +>c.inPropertyDeclaration : string | number >c : C ->inPropertyDeclaration : any +>inPropertyDeclaration : string | number var stringOrNumberOrUndefined = c.inNestedArrowFunction >stringOrNumberOrUndefined : string | number | undefined ->c.inNestedArrowFunction : any +>c.inNestedArrowFunction : string | number >c : C ->inNestedArrowFunction : any +>inNestedArrowFunction : string | number var stringOrNumberOrBoolean: string | number | boolean; >stringOrNumberOrBoolean : string | number | boolean @@ -386,56 +386,56 @@ var number: number; var number = c.inMultiple; >number : number ->c.inMultiple : any +>c.inMultiple : string | number | boolean >c : C ->inMultiple : any +>inMultiple : string | number | boolean var stringOrBooleanOrUndefined : string | boolean | undefined; >stringOrBooleanOrUndefined : string | boolean | undefined var stringOrBooleanOrUndefined = c.inMultipleMethods; >stringOrBooleanOrUndefined : string | boolean | undefined ->c.inMultipleMethods : any +>c.inMultipleMethods : string | boolean >c : C ->inMultipleMethods : any +>inMultipleMethods : string | boolean var any: any; >any : any var any = c.inMethodNullable; >any : any ->c.inMethodNullable : any +>c.inMethodNullable : null | undefined >c : C ->inMethodNullable : any +>inMethodNullable : null | undefined var stringOrNumberOrUndefined = C.inStaticMethod; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticMethod : any +>C.inStaticMethod : string | number >C : typeof C ->inStaticMethod : any +>inStaticMethod : string | number var stringOrNumberOrUndefined = C.inStaticGetter; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticGetter : any +>C.inStaticGetter : string | number >C : typeof C ->inStaticGetter : any +>inStaticGetter : string | number var stringOrNumberOrUndefined = C.inStaticSetter; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticSetter : any +>C.inStaticSetter : string | number >C : typeof C ->inStaticSetter : any +>inStaticSetter : string | number var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticPropertyDeclaration : any +>C.inStaticPropertyDeclaration : string | number >C : typeof C ->inStaticPropertyDeclaration : any +>inStaticPropertyDeclaration : string | number var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticNestedArrowFunction : any +>C.inStaticNestedArrowFunction : string | number >C : typeof C ->inStaticNestedArrowFunction : any +>inStaticNestedArrowFunction : string | number diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.errors.txt b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.errors.txt deleted file mode 100644 index cbe4d1d6a0..0000000000 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -a.js(3,14): error TS2339: Property 'p' does not exist on type 'Base'. -a.js(8,14): error TS2339: Property 'p' does not exist on type 'Derived'. - - -==== a.js (2 errors) ==== - class Base { - constructor() { - this.p = 1 - ~ -!!! error TS2339: Property 'p' does not exist on type 'Base'. - } - } - class Derived extends Base { - m() { - this.p = 1 - ~ -!!! error TS2339: Property 'p' does not exist on type 'Derived'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.symbols b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.symbols index d4a4c6c800..52a63cb1f1 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.symbols +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.symbols @@ -6,7 +6,9 @@ class Base { constructor() { this.p = 1 +>this.p : Symbol(p, Decl(a.js, 1, 19)) >this : Symbol(Base, Decl(a.js, 0, 0)) +>p : Symbol(p, Decl(a.js, 1, 19)) } } class Derived extends Base { @@ -17,7 +19,9 @@ class Derived extends Base { >m : Symbol(m, Decl(a.js, 5, 28)) this.p = 1 +>this.p : Symbol(p, Decl(a.js, 6, 9)) >this : Symbol(Derived, Decl(a.js, 4, 1)) +>p : Symbol(p, Decl(a.js, 6, 9)) } } diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.symbols.diff b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.symbols.diff index c6e911fa2b..e26836758f 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.symbols.diff @@ -5,12 +5,14 @@ constructor() { this.p = 1 ->this.p : Symbol(Base.p, Decl(a.js, 1, 19)) ++>this.p : Symbol(p, Decl(a.js, 1, 19)) >this : Symbol(Base, Decl(a.js, 0, 0)) ->p : Symbol(Base.p, Decl(a.js, 1, 19)) ++>p : Symbol(p, Decl(a.js, 1, 19)) } } class Derived extends Base { -@@= skipped -10, +8 lines =@@ +@@= skipped -10, +10 lines =@@ >Base : Symbol(Base, Decl(a.js, 0, 0)) m() { @@ -19,8 +21,10 @@ this.p = 1 ->this.p : Symbol(Base.p, Decl(a.js, 1, 19)) ++>this.p : Symbol(p, Decl(a.js, 6, 9)) >this : Symbol(Derived, Decl(a.js, 4, 1)) ->p : Symbol(Derived.p, Decl(a.js, 6, 9)) ++>p : Symbol(p, Decl(a.js, 6, 9)) } } diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.types b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.types index f33d07ed67..d8cd230943 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.types +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments3.types @@ -7,9 +7,9 @@ class Base { constructor() { this.p = 1 >this.p = 1 : 1 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >1 : 1 } } @@ -22,9 +22,9 @@ class Derived extends Base { this.p = 1 >this.p = 1 : 1 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.errors.txt b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.errors.txt deleted file mode 100644 index 9621283237..0000000000 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.errors.txt +++ /dev/null @@ -1,21 +0,0 @@ -a.js(3,14): error TS2339: Property 'p' does not exist on type 'Base'. -a.js(9,14): error TS2339: Property 'p' does not exist on type 'Derived'. - - -==== a.js (2 errors) ==== - class Base { - m() { - this.p = 1 - ~ -!!! error TS2339: Property 'p' does not exist on type 'Base'. - } - } - class Derived extends Base { - m() { - // should be OK, and p should have type number | undefined from its base - this.p = 1 - ~ -!!! error TS2339: Property 'p' does not exist on type 'Derived'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.symbols b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.symbols index 2de068fc06..0d094f43d5 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.symbols +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.symbols @@ -8,7 +8,9 @@ class Base { >m : Symbol(m, Decl(a.js, 0, 12)) this.p = 1 +>this.p : Symbol(p, Decl(a.js, 1, 9)) >this : Symbol(Base, Decl(a.js, 0, 0)) +>p : Symbol(p, Decl(a.js, 1, 9)) } } class Derived extends Base { @@ -20,7 +22,9 @@ class Derived extends Base { // should be OK, and p should have type number | undefined from its base this.p = 1 +>this.p : Symbol(p, Decl(a.js, 6, 9)) >this : Symbol(Derived, Decl(a.js, 4, 1)) +>p : Symbol(p, Decl(a.js, 6, 9)) } } diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.symbols.diff b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.symbols.diff index 9321dafa2f..691c3cd14f 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.symbols.diff @@ -9,12 +9,14 @@ this.p = 1 ->this.p : Symbol(Base.p, Decl(a.js, 1, 9)) ++>this.p : Symbol(p, Decl(a.js, 1, 9)) >this : Symbol(Base, Decl(a.js, 0, 0)) ->p : Symbol(Base.p, Decl(a.js, 1, 9)) ++>p : Symbol(p, Decl(a.js, 1, 9)) } } class Derived extends Base { -@@= skipped -13, +11 lines =@@ +@@= skipped -13, +13 lines =@@ >Base : Symbol(Base, Decl(a.js, 0, 0)) m() { @@ -24,8 +26,10 @@ // should be OK, and p should have type number | undefined from its base this.p = 1 ->this.p : Symbol(Base.p, Decl(a.js, 1, 9)) ++>this.p : Symbol(p, Decl(a.js, 6, 9)) >this : Symbol(Derived, Decl(a.js, 4, 1)) ->p : Symbol(Derived.p, Decl(a.js, 6, 9)) ++>p : Symbol(p, Decl(a.js, 6, 9)) } } diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.types b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.types index 4fe0b74cc7..b2f4b88fff 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.types +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.types @@ -9,9 +9,9 @@ class Base { this.p = 1 >this.p = 1 : 1 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >1 : 1 } } @@ -25,9 +25,9 @@ class Derived extends Base { // should be OK, and p should have type number | undefined from its base this.p = 1 >this.p = 1 : 1 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.errors.txt b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.errors.txt deleted file mode 100644 index 360010e81f..0000000000 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.errors.txt +++ /dev/null @@ -1,28 +0,0 @@ -a.js(3,14): error TS2339: Property 'p' does not exist on type 'Base'. -a.js(10,14): error TS2339: Property 'p' does not exist on type 'Derived'. -a.js(13,21): error TS2339: Property 'p' does not exist on type 'Derived'. - - -==== a.js (3 errors) ==== - class Base { - m() { - this.p = 1 - ~ -!!! error TS2339: Property 'p' does not exist on type 'Base'. - } - } - class Derived extends Base { - constructor() { - super(); - // should be OK, and p should have type number from this assignment - this.p = 1 - ~ -!!! error TS2339: Property 'p' does not exist on type 'Derived'. - } - test() { - return this.p - ~ -!!! error TS2339: Property 'p' does not exist on type 'Derived'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.symbols b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.symbols index 49b9b5950d..0a1bcea9b4 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.symbols +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.symbols @@ -8,7 +8,9 @@ class Base { >m : Symbol(m, Decl(a.js, 0, 12)) this.p = 1 +>this.p : Symbol(p, Decl(a.js, 1, 9)) >this : Symbol(Base, Decl(a.js, 0, 0)) +>p : Symbol(p, Decl(a.js, 1, 9)) } } class Derived extends Base { @@ -21,13 +23,17 @@ class Derived extends Base { // should be OK, and p should have type number from this assignment this.p = 1 +>this.p : Symbol(p, Decl(a.js, 7, 16)) >this : Symbol(Derived, Decl(a.js, 4, 1)) +>p : Symbol(p, Decl(a.js, 7, 16)) } test() { >test : Symbol(test, Decl(a.js, 10, 5)) return this.p +>this.p : Symbol(p, Decl(a.js, 7, 16)) >this : Symbol(Derived, Decl(a.js, 4, 1)) +>p : Symbol(p, Decl(a.js, 7, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.symbols.diff b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.symbols.diff index 68941210f6..8a267c250d 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.symbols.diff @@ -9,18 +9,22 @@ this.p = 1 ->this.p : Symbol(Base.p, Decl(a.js, 1, 9)) ++>this.p : Symbol(p, Decl(a.js, 1, 9)) >this : Symbol(Base, Decl(a.js, 0, 0)) ->p : Symbol(Base.p, Decl(a.js, 1, 9)) ++>p : Symbol(p, Decl(a.js, 1, 9)) } } class Derived extends Base { -@@= skipped -18, +16 lines =@@ +@@= skipped -18, +18 lines =@@ // should be OK, and p should have type number from this assignment this.p = 1 ->this.p : Symbol(Derived.p, Decl(a.js, 7, 16)) ++>this.p : Symbol(p, Decl(a.js, 7, 16)) >this : Symbol(Derived, Decl(a.js, 4, 1)) ->p : Symbol(Derived.p, Decl(a.js, 7, 16)) ++>p : Symbol(p, Decl(a.js, 7, 16)) } test() { ->test : Symbol(Derived.test, Decl(a.js, 10, 5)) @@ -28,8 +32,10 @@ return this.p ->this.p : Symbol(Derived.p, Decl(a.js, 7, 16)) ++>this.p : Symbol(p, Decl(a.js, 7, 16)) >this : Symbol(Derived, Decl(a.js, 4, 1)) ->p : Symbol(Derived.p, Decl(a.js, 7, 16)) ++>p : Symbol(p, Decl(a.js, 7, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.types b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.types index 4a05d187c1..990a50d8df 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.types +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.types @@ -9,9 +9,9 @@ class Base { this.p = 1 >this.p = 1 : 1 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >1 : 1 } } @@ -27,18 +27,18 @@ class Derived extends Base { // should be OK, and p should have type number from this assignment this.p = 1 >this.p = 1 : 1 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >1 : 1 } test() { ->test : () => any +>test : () => number return this.p ->this.p : any +>this.p : number >this : this ->p : any +>p : number } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.errors.txt index 06fa15c729..e16dd6d33a 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.errors.txt @@ -1,13 +1,7 @@ -index.js(138,14): error TS2339: Property 'p1' does not exist on type 'K'. -index.js(139,14): error TS2339: Property 'p2' does not exist on type 'K'. -index.js(143,21): error TS2339: Property 'p1' does not exist on type 'K'. -index.js(151,14): error TS2339: Property 'prop' does not exist on type 'M'. -index.js(165,14): error TS2339: Property 'another' does not exist on type 'N'. index.js(173,24): error TS2314: Generic type 'N' requires 1 type argument(s). -index.js(179,14): error TS2339: Property 'another2' does not exist on type 'O'. -==== index.js (7 errors) ==== +==== index.js (1 errors) ==== export class A {} export class B { @@ -146,17 +140,11 @@ index.js(179,14): error TS2339: Property 'another2' does not exist on type 'O export class K { constructor() { this.p1 = 12; - ~~ -!!! error TS2339: Property 'p1' does not exist on type 'K'. this.p2 = "ok"; - ~~ -!!! error TS2339: Property 'p2' does not exist on type 'K'. } method() { return this.p1; - ~~ -!!! error TS2339: Property 'p1' does not exist on type 'K'. } } @@ -165,8 +153,6 @@ index.js(179,14): error TS2339: Property 'another2' does not exist on type 'O export class M extends null { constructor() { this.prop = 12; - ~~~~ -!!! error TS2339: Property 'prop' does not exist on type 'M'. } } @@ -181,8 +167,6 @@ index.js(179,14): error TS2339: Property 'another2' does not exist on type 'O constructor(param) { super(); this.another = param; - ~~~~~~~ -!!! error TS2339: Property 'another' does not exist on type 'N'. } } @@ -199,8 +183,6 @@ index.js(179,14): error TS2339: Property 'another2' does not exist on type 'O constructor(param) { super(param); this.another2 = param; - ~~~~~~~~ -!!! error TS2339: Property 'another2' does not exist on type 'O'. } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.symbols b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.symbols index cca7d7f567..124066f56a 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.symbols @@ -199,17 +199,23 @@ export class K { constructor() { this.p1 = 12; +>this.p1 : Symbol(p1, Decl(index.js, 136, 19)) >this : Symbol(K, Decl(index.js, 132, 17)) +>p1 : Symbol(p1, Decl(index.js, 136, 19)) this.p2 = "ok"; +>this.p2 : Symbol(p2, Decl(index.js, 137, 21)) >this : Symbol(K, Decl(index.js, 132, 17)) +>p2 : Symbol(p2, Decl(index.js, 137, 21)) } method() { >method : Symbol(method, Decl(index.js, 139, 5)) return this.p1; +>this.p1 : Symbol(p1, Decl(index.js, 136, 19)) >this : Symbol(K, Decl(index.js, 132, 17)) +>p1 : Symbol(p1, Decl(index.js, 136, 19)) } } @@ -222,7 +228,9 @@ export class M extends null { constructor() { this.prop = 12; +>this.prop : Symbol(prop, Decl(index.js, 149, 19)) >this : Symbol(M, Decl(index.js, 146, 27)) +>prop : Symbol(prop, Decl(index.js, 149, 19)) } } @@ -244,7 +252,9 @@ export class N extends L { >super : Symbol(L, Decl(index.js, 144, 1)) this.another = param; +>this.another : Symbol(another, Decl(index.js, 163, 16)) >this : Symbol(N, Decl(index.js, 152, 1)) +>another : Symbol(another, Decl(index.js, 163, 16)) >param : Symbol(param, Decl(index.js, 162, 16)) } } @@ -267,7 +277,9 @@ export class O extends N { >param : Symbol(param, Decl(index.js, 176, 16)) this.another2 = param; +>this.another2 : Symbol(another2, Decl(index.js, 177, 21)) >this : Symbol(O, Decl(index.js, 166, 1)) +>another2 : Symbol(another2, Decl(index.js, 177, 21)) >param : Symbol(param, Decl(index.js, 176, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.symbols.diff index f3c9432a46..c550f86230 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.symbols.diff @@ -142,13 +142,17 @@ constructor() { this.p1 = 12; ->this.p1 : Symbol(K.p1, Decl(index.js, 136, 19)) ++>this.p1 : Symbol(p1, Decl(index.js, 136, 19)) >this : Symbol(K, Decl(index.js, 132, 17)) ->p1 : Symbol(K.p1, Decl(index.js, 136, 19)) ++>p1 : Symbol(p1, Decl(index.js, 136, 19)) this.p2 = "ok"; ->this.p2 : Symbol(K.p2, Decl(index.js, 137, 21)) ++>this.p2 : Symbol(p2, Decl(index.js, 137, 21)) >this : Symbol(K, Decl(index.js, 132, 17)) ->p2 : Symbol(K.p2, Decl(index.js, 137, 21)) ++>p2 : Symbol(p2, Decl(index.js, 137, 21)) } method() { @@ -157,32 +161,38 @@ return this.p1; ->this.p1 : Symbol(K.p1, Decl(index.js, 136, 19)) ++>this.p1 : Symbol(p1, Decl(index.js, 136, 19)) >this : Symbol(K, Decl(index.js, 132, 17)) ->p1 : Symbol(K.p1, Decl(index.js, 136, 19)) ++>p1 : Symbol(p1, Decl(index.js, 136, 19)) } } -@@= skipped -29, +23 lines =@@ +@@= skipped -29, +29 lines =@@ constructor() { this.prop = 12; ->this.prop : Symbol(M.prop, Decl(index.js, 149, 19)) ++>this.prop : Symbol(prop, Decl(index.js, 149, 19)) >this : Symbol(M, Decl(index.js, 146, 27)) ->prop : Symbol(M.prop, Decl(index.js, 149, 19)) ++>prop : Symbol(prop, Decl(index.js, 149, 19)) } } -@@= skipped -24, +22 lines =@@ +@@= skipped -24, +24 lines =@@ >super : Symbol(L, Decl(index.js, 144, 1)) this.another = param; ->this.another : Symbol(N.another, Decl(index.js, 163, 16)) ++>this.another : Symbol(another, Decl(index.js, 163, 16)) >this : Symbol(N, Decl(index.js, 152, 1)) ->another : Symbol(N.another, Decl(index.js, 163, 16)) ++>another : Symbol(another, Decl(index.js, 163, 16)) >param : Symbol(param, Decl(index.js, 162, 16)) } } -@@= skipped -22, +20 lines =@@ +@@= skipped -22, +22 lines =@@ >param : Symbol(param, Decl(index.js, 176, 16)) super(param); @@ -191,12 +201,14 @@ this.another2 = param; ->this.another2 : Symbol(O.another2, Decl(index.js, 177, 21)) ++>this.another2 : Symbol(another2, Decl(index.js, 177, 21)) >this : Symbol(O, Decl(index.js, 166, 1)) ->another2 : Symbol(O.another2, Decl(index.js, 177, 21)) ++>another2 : Symbol(another2, Decl(index.js, 177, 21)) >param : Symbol(param, Decl(index.js, 176, 16)) } } -@@= skipped -22, +19 lines =@@ +@@= skipped -22, +21 lines =@@ >HasStatics : Symbol(HasStatics, Decl(index.js, 184, 38)) static staticMethod() {} diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.types index c91b52d442..55d8ff591b 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClasses.types @@ -211,26 +211,26 @@ export class K { constructor() { this.p1 = 12; >this.p1 = 12 : 12 ->this.p1 : any +>this.p1 : number >this : this ->p1 : any +>p1 : number >12 : 12 this.p2 = "ok"; >this.p2 = "ok" : "ok" ->this.p2 : any +>this.p2 : string >this : this ->p2 : any +>p2 : string >"ok" : "ok" } method() { ->method : () => any +>method : () => number return this.p1; ->this.p1 : any +>this.p1 : number >this : this ->p1 : any +>p1 : number } } @@ -244,9 +244,9 @@ export class M extends null { constructor() { this.prop = 12; >this.prop = 12 : 12 ->this.prop : any +>this.prop : number >this : this ->prop : any +>prop : number >12 : 12 } } @@ -271,9 +271,9 @@ export class N extends L { this.another = param; >this.another = param : T ->this.another : any +>this.another : T >this : this ->another : any +>another : T >param : T } } @@ -299,9 +299,9 @@ export class O extends N { this.another2 = param; >this.another2 = param : U ->this.another2 : any +>this.another2 : U >this : this ->another2 : any +>another2 : U >param : U } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.errors.txt deleted file mode 100644 index 3d2adf9d83..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -index.js(6,14): error TS2339: Property 't' does not exist on type 'Thing'. - - -==== index.js (1 errors) ==== - module.exports = class Thing { - /** - * @param {number} p - */ - constructor(p) { - this.t = 12 + p; - ~ -!!! error TS2339: Property 't' does not exist on type 'Thing'. - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.symbols b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.symbols index 83a3a7a016..aed4fd3a34 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.symbols @@ -14,7 +14,9 @@ module.exports = class Thing { >p : Symbol(p, Decl(index.js, 4, 16)) this.t = 12 + p; +>this.t : Symbol(t, Decl(index.js, 4, 20)) >this : Symbol(Thing, Decl(index.js, 0, 16)) +>t : Symbol(t, Decl(index.js, 4, 20)) >p : Symbol(p, Decl(index.js, 4, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.symbols.diff index bd0fd254b3..13b311a4bc 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.symbols.diff @@ -18,8 +18,10 @@ this.t = 12 + p; ->this.t : Symbol(Thing.t, Decl(index.js, 4, 20)) ++>this.t : Symbol(t, Decl(index.js, 4, 20)) >this : Symbol(Thing, Decl(index.js, 0, 16)) ->t : Symbol(Thing.t, Decl(index.js, 4, 20)) ++>t : Symbol(t, Decl(index.js, 4, 20)) >p : Symbol(p, Decl(index.js, 4, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.types index 6c07169ce3..d322982939 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpression.types @@ -17,9 +17,9 @@ module.exports = class Thing { this.t = 12 + p; >this.t = 12 + p : number ->this.t : any +>this.t : number >this : this ->t : any +>t : number >12 + p : number >12 : 12 >p : number diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.errors.txt deleted file mode 100644 index 3f74bfb462..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -index.js(6,14): error TS2339: Property 't' does not exist on type 'exports'. - - -==== index.js (1 errors) ==== - module.exports = class { - /** - * @param {number} p - */ - constructor(p) { - this.t = 12 + p; - ~ -!!! error TS2339: Property 't' does not exist on type 'exports'. - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.symbols b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.symbols index 35054e8bcc..1af9593125 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.symbols @@ -13,7 +13,9 @@ module.exports = class { >p : Symbol(p, Decl(index.js, 4, 16)) this.t = 12 + p; +>this.t : Symbol(t, Decl(index.js, 4, 20)) >this : Symbol(exports, Decl(index.js, 0, 16)) +>t : Symbol(t, Decl(index.js, 4, 20)) >p : Symbol(p, Decl(index.js, 4, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.symbols.diff index bbf1ef9d75..c15742543f 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.symbols.diff @@ -18,8 +18,10 @@ this.t = 12 + p; ->this.t : Symbol(exports.t, Decl(index.js, 4, 20)) ++>this.t : Symbol(t, Decl(index.js, 4, 20)) >this : Symbol(exports, Decl(index.js, 0, 16)) ->t : Symbol(exports.t, Decl(index.js, 4, 20)) ++>t : Symbol(t, Decl(index.js, 4, 20)) >p : Symbol(p, Decl(index.js, 4, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.types index 2e87e5ddee..b412728bd4 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.types @@ -16,9 +16,9 @@ module.exports = class { this.t = 12 + p; >this.t = 12 + p : number ->this.t : any +>this.t : number >this : this ->t : any +>t : number >12 + p : number >12 : 12 >p : number diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.errors.txt index 67f1f520d4..22d27100d3 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.errors.txt @@ -1,10 +1,8 @@ index.js(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -index.js(6,14): error TS2339: Property 't' does not exist on type 'exports'. index.js(9,16): error TS2339: Property 'Sub' does not exist on type 'typeof exports'. -index.js(11,14): error TS2339: Property 'instance' does not exist on type 'Sub'. -==== index.js (4 errors) ==== +==== index.js (2 errors) ==== module.exports = class { ~~~~~~~~~~~~~~~~~~~~~~~~ /** @@ -17,8 +15,6 @@ index.js(11,14): error TS2339: Property 'instance' does not exist on type 'Sub'. ~~~~~~~~~~~~~~~~~~~~ this.t = 12 + p; ~~~~~~~~~~~~~~~~~~~~~~~~ - ~ -!!! error TS2339: Property 't' does not exist on type 'exports'. } ~~~~~ } @@ -29,8 +25,6 @@ index.js(11,14): error TS2339: Property 'instance' does not exist on type 'Sub'. !!! error TS2339: Property 'Sub' does not exist on type 'typeof exports'. constructor() { this.instance = new module.exports(10); - ~~~~~~~~ -!!! error TS2339: Property 'instance' does not exist on type 'Sub'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.symbols b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.symbols index e3f9777c61..d41006552a 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.symbols @@ -13,7 +13,9 @@ module.exports = class { >p : Symbol(p, Decl(index.js, 4, 16)) this.t = 12 + p; +>this.t : Symbol(t, Decl(index.js, 4, 20)) >this : Symbol(exports, Decl(index.js, 0, 16)) +>t : Symbol(t, Decl(index.js, 4, 20)) >p : Symbol(p, Decl(index.js, 4, 16)) } } @@ -24,7 +26,9 @@ module.exports.Sub = class { constructor() { this.instance = new module.exports(10); +>this.instance : Symbol(instance, Decl(index.js, 9, 19)) >this : Symbol(Sub, Decl(index.js, 8, 20)) +>instance : Symbol(instance, Decl(index.js, 9, 19)) >module.exports : Symbol(exports, Decl(index.js, 0, 16)) >module : Symbol(module.exports) >exports : Symbol(exports, Decl(index.js, 0, 16)) diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.symbols.diff index 58e1fc86c6..e6b81e8f1f 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.symbols.diff @@ -18,8 +18,10 @@ this.t = 12 + p; ->this.t : Symbol(exports.t, Decl(index.js, 4, 20)) ++>this.t : Symbol(t, Decl(index.js, 4, 20)) >this : Symbol(exports, Decl(index.js, 0, 16)) ->t : Symbol(exports.t, Decl(index.js, 4, 20)) ++>t : Symbol(t, Decl(index.js, 4, 20)) >p : Symbol(p, Decl(index.js, 4, 16)) } } @@ -36,11 +38,13 @@ constructor() { this.instance = new module.exports(10); ->this.instance : Symbol(Sub.instance, Decl(index.js, 9, 19)) ++>this.instance : Symbol(instance, Decl(index.js, 9, 19)) >this : Symbol(Sub, Decl(index.js, 8, 20)) ->instance : Symbol(Sub.instance, Decl(index.js, 9, 19)) ->module.exports : Symbol(module.exports, Decl(index.js, 0, 0)) ->module : Symbol(module, Decl(index.js, 0, 0), Decl(index.js, 10, 27)) ->exports : Symbol(module.exports, Decl(index.js, 0, 0)) ++>instance : Symbol(instance, Decl(index.js, 9, 19)) +>module.exports : Symbol(exports, Decl(index.js, 0, 16)) +>module : Symbol(module.exports) +>exports : Symbol(exports, Decl(index.js, 0, 16)) diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types index f60baf73c8..52373bd837 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types @@ -16,9 +16,9 @@ module.exports = class { this.t = 12 + p; >this.t = 12 + p : number ->this.t : any +>this.t : number >this : this ->t : any +>t : number >12 + p : number >12 : 12 >p : number @@ -36,9 +36,9 @@ module.exports.Sub = class { constructor() { this.instance = new module.exports(10); >this.instance = new module.exports(10) : exports ->this.instance : any +>this.instance : exports >this : this ->instance : any +>instance : exports >new module.exports(10) : exports >module.exports : typeof exports >module : { exports: typeof exports; } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.errors.txt index e044c86ea0..ffdd928e4d 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.errors.txt @@ -1,9 +1,8 @@ index.js(7,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -index.js(9,14): error TS2339: Property 'x' does not exist on type 'Q'. index.js(12,16): error TS2339: Property 'Another' does not exist on type 'typeof Q'. -==== index.js (3 errors) ==== +==== index.js (2 errors) ==== class A { member = new Q(); } @@ -16,8 +15,6 @@ index.js(12,16): error TS2339: Property 'Another' does not exist on type 'typeof ~~~~~~~~~~~~~~~~~~~ this.x = new A(); ~~~~~~~~~~~~~~~~~~~~~~~~~ - ~ -!!! error TS2339: Property 'x' does not exist on type 'Q'. } ~~~~~ } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.symbols b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.symbols index 805429bac6..4fcf0449c5 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.symbols @@ -22,7 +22,9 @@ module.exports = class Q { constructor() { this.x = new A(); +>this.x : Symbol(x, Decl(index.js, 7, 19)) >this : Symbol(Q, Decl(index.js, 6, 16)) +>x : Symbol(x, Decl(index.js, 7, 19)) >A : Symbol(A, Decl(index.js, 0, 0)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.symbols.diff index 609960e85b..6f991a9d7a 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.symbols.diff @@ -27,8 +27,10 @@ constructor() { this.x = new A(); ->this.x : Symbol(Q.x, Decl(index.js, 7, 19)) ++>this.x : Symbol(x, Decl(index.js, 7, 19)) >this : Symbol(Q, Decl(index.js, 6, 16)) ->x : Symbol(Q.x, Decl(index.js, 7, 19)) ++>x : Symbol(x, Decl(index.js, 7, 19)) >A : Symbol(A, Decl(index.js, 0, 0)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.types index 319c1a7127..95a716be1d 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.types @@ -27,9 +27,9 @@ module.exports = class Q { constructor() { this.x = new A(); >this.x = new A() : A ->this.x : any +>this.x : A >this : this ->x : any +>x : A >new A() : A >A : typeof A } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.errors.txt deleted file mode 100644 index 6843f37be4..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.errors.txt +++ /dev/null @@ -1,24 +0,0 @@ -index.js(5,14): error TS2339: Property 'usage' does not exist on type 'Container'. -obj.js(3,14): error TS2339: Property 'x' does not exist on type 'Obj'. - - -==== index.js (1 errors) ==== - const Obj = require("./obj"); - - class Container { - constructor() { - this.usage = new Obj(); - ~~~~~ -!!! error TS2339: Property 'usage' does not exist on type 'Container'. - } - } - - module.exports = Container; -==== obj.js (1 errors) ==== - module.exports = class Obj { - constructor() { - this.x = 12; - ~ -!!! error TS2339: Property 'x' does not exist on type 'Obj'. - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.symbols b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.symbols index 89d7829634..a7775109f2 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.symbols @@ -11,7 +11,9 @@ class Container { constructor() { this.usage = new Obj(); +>this.usage : Symbol(usage, Decl(index.js, 3, 19)) >this : Symbol(Container, Decl(index.js, 0, 29)) +>usage : Symbol(usage, Decl(index.js, 3, 19)) >Obj : Symbol(Obj, Decl(index.js, 0, 5)) } } @@ -31,6 +33,8 @@ module.exports = class Obj { constructor() { this.x = 12; +>this.x : Symbol(x, Decl(obj.js, 1, 19)) >this : Symbol(Obj, Decl(obj.js, 0, 16)) +>x : Symbol(x, Decl(obj.js, 1, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.symbols.diff index 1e3e65d778..6364e6c6f6 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.symbols.diff @@ -5,8 +5,10 @@ constructor() { this.usage = new Obj(); ->this.usage : Symbol(Container.usage, Decl(index.js, 3, 19)) ++>this.usage : Symbol(usage, Decl(index.js, 3, 19)) >this : Symbol(Container, Decl(index.js, 0, 29)) ->usage : Symbol(Container.usage, Decl(index.js, 3, 19)) ++>usage : Symbol(usage, Decl(index.js, 3, 19)) >Obj : Symbol(Obj, Decl(index.js, 0, 5)) } } @@ -33,7 +35,9 @@ constructor() { this.x = 12; ->this.x : Symbol(Obj.x, Decl(obj.js, 1, 19)) ++>this.x : Symbol(x, Decl(obj.js, 1, 19)) >this : Symbol(Obj, Decl(obj.js, 0, 16)) ->x : Symbol(Obj.x, Decl(obj.js, 1, 19)) ++>x : Symbol(x, Decl(obj.js, 1, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.types index 1b123a62e8..82d89b5177 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedVisibility.types @@ -13,9 +13,9 @@ class Container { constructor() { this.usage = new Obj(); >this.usage = new Obj() : Obj ->this.usage : any +>this.usage : Obj >this : this ->usage : any +>usage : Obj >new Obj() : Obj >Obj : typeof Obj } @@ -40,9 +40,9 @@ module.exports = class Obj { constructor() { this.x = 12; >this.x = 12 : 12 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >12 : 12 } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.errors.txt deleted file mode 100644 index ea9fa27085..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.errors.txt +++ /dev/null @@ -1,41 +0,0 @@ -source.js(21,14): error TS2339: Property 'field' does not exist on type 'Aleph'. - - -==== source.js (1 errors) ==== - /** - * Foos a bar together using an `a` and a `b` - * @param {number} a - * @param {string} b - */ - export function foo(a, b) {} - - /** - * Legacy - DO NOT USE - */ - export class Aleph { - /** - * Impossible to construct. - * @param {Aleph} a - * @param {null} b - */ - constructor(a, b) { - /** - * Field is always null - */ - this.field = b; - ~~~~~ -!!! error TS2339: Property 'field' does not exist on type 'Aleph'. - } - - /** - * Doesn't actually do anything - * @returns {void} - */ - doIt() {} - } - - /** - * Not the speed of light - */ - export const c = 12; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.symbols b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.symbols index 3fd722228e..c52e15f576 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.symbols @@ -30,7 +30,9 @@ export class Aleph { * Field is always null */ this.field = b; +>this.field : Symbol(field, Decl(source.js, 16, 23)) >this : Symbol(Aleph, Decl(source.js, 5, 28)) +>field : Symbol(field, Decl(source.js, 16, 23)) >b : Symbol(b, Decl(source.js, 16, 18)) } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.symbols.diff index e5ec9ae836..de372f02e9 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.symbols.diff @@ -5,12 +5,14 @@ */ this.field = b; ->this.field : Symbol(Aleph.field, Decl(source.js, 16, 23)) ++>this.field : Symbol(field, Decl(source.js, 16, 23)) >this : Symbol(Aleph, Decl(source.js, 5, 28)) ->field : Symbol(Aleph.field, Decl(source.js, 16, 23)) ++>field : Symbol(field, Decl(source.js, 16, 23)) >b : Symbol(b, Decl(source.js, 16, 18)) } -@@= skipped -11, +9 lines =@@ +@@= skipped -11, +11 lines =@@ * @returns {void} */ doIt() {} diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.types index 981b176d05..6936cd5b08 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.types @@ -31,9 +31,9 @@ export class Aleph { */ this.field = b; >this.field = b : null ->this.field : any +>this.field : null >this : this ->field : any +>field : null >b : null } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt index 378f232af2..7661c69146 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt @@ -1,17 +1,12 @@ -index.js(9,14): error TS2339: Property 'objects' does not exist on type 'Render'. index.js(14,18): error TS2749: 'Rectangle' refers to a value, but is being used as a type here. Did you mean 'typeof Rectangle'? -index.js(18,14): error TS2339: Property 'objects' does not exist on type 'Render'. -test.js(5,31): error TS2339: Property 'objects' does not exist on type 'Render'. -==== test.js (1 errors) ==== +==== test.js (0 errors) ==== const {Render} = require("./index"); let render = new Render(); render.addRectangle(); console.log("Objects", render.objects); - ~~~~~~~ -!!! error TS2339: Property 'objects' does not exist on type 'Render'. ==== rectangle.js (0 errors) ==== class Rectangle { constructor() { @@ -20,7 +15,7 @@ test.js(5,31): error TS2339: Property 'objects' does not exist on type 'Render'. } module.exports = { Rectangle }; -==== index.js (3 errors) ==== +==== index.js (1 errors) ==== const {Rectangle} = require('./rectangle'); class Render { @@ -30,8 +25,6 @@ test.js(5,31): error TS2339: Property 'objects' does not exist on type 'Render'. * @type {Rectangle[]} */ this.objects = []; - ~~~~~~~ -!!! error TS2339: Property 'objects' does not exist on type 'Render'. } /** * Adds a rectangle @@ -43,8 +36,6 @@ test.js(5,31): error TS2339: Property 'objects' does not exist on type 'Render'. addRectangle() { const obj = new Rectangle(); this.objects.push(obj); - ~~~~~~~ -!!! error TS2339: Property 'objects' does not exist on type 'Render'. return obj; } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.symbols b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.symbols index bc6e98c0ba..5d93790c21 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.symbols @@ -19,7 +19,9 @@ console.log("Objects", render.objects); >console.log : Symbol(log, Decl(lib.dom.d.ts, --, --)) >console : Symbol(console, Decl(lib.dom.d.ts, --, --)) >log : Symbol(log, Decl(lib.dom.d.ts, --, --)) +>render.objects : Symbol(objects, Decl(index.js, 3, 19)) >render : Symbol(render, Decl(test.js, 1, 3)) +>objects : Symbol(objects, Decl(index.js, 3, 19)) === rectangle.js === class Rectangle { @@ -54,7 +56,9 @@ class Render { * @type {Rectangle[]} */ this.objects = []; +>this.objects : Symbol(objects, Decl(index.js, 3, 19)) >this : Symbol(Render, Decl(index.js, 0, 43)) +>objects : Symbol(objects, Decl(index.js, 3, 19)) } /** * Adds a rectangle @@ -69,7 +73,11 @@ class Render { >Rectangle : Symbol(Rectangle, Decl(index.js, 0, 7)) this.objects.push(obj); +>this.objects.push : Symbol(push, Decl(lib.es5.d.ts, --, --)) +>this.objects : Symbol(objects, Decl(index.js, 3, 19)) >this : Symbol(Render, Decl(index.js, 0, 43)) +>objects : Symbol(objects, Decl(index.js, 3, 19)) +>push : Symbol(push, Decl(lib.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(index.js, 16, 13)) return obj; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.symbols.diff index 8c870ff340..52106eb537 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.symbols.diff @@ -17,12 +17,14 @@ ->log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) ->render.objects : Symbol(Render.objects, Decl(index.js, 3, 19)) +>log : Symbol(log, Decl(lib.dom.d.ts, --, --)) ++>render.objects : Symbol(objects, Decl(index.js, 3, 19)) >render : Symbol(render, Decl(test.js, 1, 3)) ->objects : Symbol(Render.objects, Decl(index.js, 3, 19)) ++>objects : Symbol(objects, Decl(index.js, 3, 19)) === rectangle.js === class Rectangle { -@@= skipped -18, +16 lines =@@ +@@= skipped -18, +18 lines =@@ constructor() { console.log("I'm a rectangle!"); @@ -49,12 +51,14 @@ */ this.objects = []; ->this.objects : Symbol(Render.objects, Decl(index.js, 3, 19)) ++>this.objects : Symbol(objects, Decl(index.js, 3, 19)) >this : Symbol(Render, Decl(index.js, 0, 43)) ->objects : Symbol(Render.objects, Decl(index.js, 3, 19)) ++>objects : Symbol(objects, Decl(index.js, 3, 19)) } /** * Adds a rectangle -@@= skipped -10, +8 lines =@@ +@@= skipped -10, +10 lines =@@ * @returns {Rectangle} the rect */ addRectangle() { @@ -68,13 +72,17 @@ this.objects.push(obj); ->this.objects.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) ->this.objects : Symbol(Render.objects, Decl(index.js, 3, 19)) ++>this.objects.push : Symbol(push, Decl(lib.es5.d.ts, --, --)) ++>this.objects : Symbol(objects, Decl(index.js, 3, 19)) >this : Symbol(Render, Decl(index.js, 0, 43)) ->objects : Symbol(Render.objects, Decl(index.js, 3, 19)) ->push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) ++>objects : Symbol(objects, Decl(index.js, 3, 19)) ++>push : Symbol(push, Decl(lib.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(index.js, 16, 13)) return obj; -@@= skipped -20, +16 lines =@@ +@@= skipped -20, +20 lines =@@ } module.exports = { Render }; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types index c11d9b3b3a..e8bbdfd39d 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types @@ -24,9 +24,9 @@ console.log("Objects", render.objects); >console : Console >log : (...data: any[]) => void >"Objects" : "Objects" ->render.objects : any +>render.objects : any[] >render : Render ->objects : any +>objects : any[] === rectangle.js === class Rectangle { @@ -67,9 +67,9 @@ class Render { */ this.objects = []; >this.objects = [] : undefined[] ->this.objects : any +>this.objects : any[] >this : this ->objects : any +>objects : any[] >[] : undefined[] } /** @@ -86,12 +86,12 @@ class Render { >Rectangle : typeof Rectangle this.objects.push(obj); ->this.objects.push(obj) : any ->this.objects.push : any ->this.objects : any +>this.objects.push(obj) : number +>this.objects.push : (...items: any[]) => number +>this.objects : any[] >this : this ->objects : any ->push : any +>objects : any[] +>push : (...items: any[]) => number >obj : Rectangle return obj; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt index c319376abf..a68a8b93bb 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt @@ -1,6 +1,4 @@ conn.js(11,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -usage.js(10,14): error TS2339: Property 'connItem' does not exist on type 'Wrap'. -usage.js(12,14): error TS2339: Property 'another' does not exist on type 'Wrap'. usage.js(16,1): error TS2309: An export assignment cannot be used in a module with other exported elements. @@ -19,7 +17,7 @@ usage.js(16,1): error TS2309: An export assignment cannot be used in a module wi ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2309: An export assignment cannot be used in a module with other exported elements. -==== usage.js (3 errors) ==== +==== usage.js (1 errors) ==== /** * @typedef {import("./conn")} Conn */ @@ -30,12 +28,8 @@ usage.js(16,1): error TS2309: An export assignment cannot be used in a module wi */ constructor(c) { this.connItem = c.item; - ~~~~~~~~ -!!! error TS2339: Property 'connItem' does not exist on type 'Wrap'. /** @type {import("./conn").Whatever} */ this.another = ""; - ~~~~~~~ -!!! error TS2339: Property 'another' does not exist on type 'Wrap'. } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.symbols b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.symbols index 9c06625b4c..bbf4e52c52 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.symbols @@ -37,14 +37,18 @@ class Wrap { >c : Symbol(c, Decl(usage.js, 8, 16)) this.connItem = c.item; +>this.connItem : Symbol(connItem, Decl(usage.js, 8, 20)) >this : Symbol(Wrap, Decl(usage.js, 0, 0)) +>connItem : Symbol(connItem, Decl(usage.js, 8, 20)) >c.item : Symbol(item, Decl(conn.js, 5, 20)) >c : Symbol(c, Decl(usage.js, 8, 16)) >item : Symbol(item, Decl(conn.js, 5, 20)) /** @type {import("./conn").Whatever} */ this.another = ""; +>this.another : Symbol(another, Decl(usage.js, 9, 31)) >this : Symbol(Wrap, Decl(usage.js, 0, 0)) +>another : Symbol(another, Decl(usage.js, 9, 31)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.symbols.diff index 612c925f9d..9c986517f7 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.symbols.diff @@ -27,9 +27,11 @@ this.connItem = c.item; ->this.connItem : Symbol(Wrap.connItem, Decl(usage.js, 8, 20)) ++>this.connItem : Symbol(connItem, Decl(usage.js, 8, 20)) >this : Symbol(Wrap, Decl(usage.js, 0, 0)) ->connItem : Symbol(Wrap.connItem, Decl(usage.js, 8, 20)) ->c.item : Symbol(Conn.item, Decl(conn.js, 5, 20)) ++>connItem : Symbol(connItem, Decl(usage.js, 8, 20)) +>c.item : Symbol(item, Decl(conn.js, 5, 20)) >c : Symbol(c, Decl(usage.js, 8, 16)) ->item : Symbol(Conn.item, Decl(conn.js, 5, 20)) @@ -38,8 +40,10 @@ /** @type {import("./conn").Whatever} */ this.another = ""; ->this.another : Symbol(Wrap.another, Decl(usage.js, 9, 31)) ++>this.another : Symbol(another, Decl(usage.js, 9, 31)) >this : Symbol(Wrap, Decl(usage.js, 0, 0)) ->another : Symbol(Wrap.another, Decl(usage.js, 9, 31)) ++>another : Symbol(another, Decl(usage.js, 9, 31)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.types index b2cfda6619..6d134a4005 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.types @@ -40,9 +40,9 @@ class Wrap { this.connItem = c.item; >this.connItem = c.item : number ->this.connItem : any +>this.connItem : number >this : this ->connItem : any +>connItem : number >c.item : number >c : Conn >item : number @@ -50,9 +50,9 @@ class Wrap { /** @type {import("./conn").Whatever} */ this.another = ""; >this.another = "" : "" ->this.another : any +>this.another : string >this : this ->another : any +>another : string >"" : "" } } diff --git a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt index 7669085ec0..8eab022bb0 100644 --- a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt @@ -1,16 +1,15 @@ a.js(2,10): error TS2339: Property 'a' does not exist on type '{}'. -a.js(7,14): error TS2339: Property 'member' does not exist on type 'C'. -a.js(8,14): error TS2339: Property 'member' does not exist on type 'C'. +a.js(8,21): error TS2339: Property 'a' does not exist on type '{}'. a.js(16,14): error TS2339: Property 'a' does not exist on type '{}'. b.ts(1,10): error TS2339: Property 'a' does not exist on type '{}'. -b.ts(2,11): error TS2339: Property 'member' does not exist on type 'C'. +b.ts(2,18): error TS2339: Property 'a' does not exist on type '{}'. b.ts(3,29): error TS2339: Property 'a' does not exist on type '{}'. b.ts(4,14): error TS2339: Property 'a' does not exist on type '{}'. b.ts(5,8): error TS2339: Property 'a' does not exist on type '{}'. b.ts(6,10): error TS2339: Property 'a' does not exist on type '{}'. -==== a.js (4 errors) ==== +==== a.js (3 errors) ==== var variable = {}; variable.a = 0; ~ @@ -20,11 +19,9 @@ b.ts(6,10): error TS2339: Property 'a' does not exist on type '{}'. initializedMember = {}; constructor() { this.member = {}; - ~~~~~~ -!!! error TS2339: Property 'member' does not exist on type 'C'. this.member.a = 0; - ~~~~~~ -!!! error TS2339: Property 'member' does not exist on type 'C'. + ~ +!!! error TS2339: Property 'a' does not exist on type '{}'. } } @@ -48,8 +45,8 @@ b.ts(6,10): error TS2339: Property 'a' does not exist on type '{}'. ~ !!! error TS2339: Property 'a' does not exist on type '{}'. (new C()).member.a = 1; - ~~~~~~ -!!! error TS2339: Property 'member' does not exist on type 'C'. + ~ +!!! error TS2339: Property 'a' does not exist on type '{}'. (new C()).initializedMember.a = 1; ~ !!! error TS2339: Property 'a' does not exist on type '{}'. diff --git a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.symbols b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.symbols index 2cbc79fe45..442679b339 100644 --- a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.symbols @@ -15,10 +15,14 @@ class C { constructor() { this.member = {}; +>this.member : Symbol(member, Decl(a.js, 5, 19)) >this : Symbol(C, Decl(a.js, 1, 15)) +>member : Symbol(member, Decl(a.js, 5, 19)) this.member.a = 0; +>this.member : Symbol(member, Decl(a.js, 5, 19)) >this : Symbol(C, Decl(a.js, 1, 15)) +>member : Symbol(member, Decl(a.js, 5, 19)) } } @@ -50,7 +54,9 @@ variable.a = 1; >variable : Symbol(variable, Decl(a.js, 0, 3)) (new C()).member.a = 1; +>(new C()).member : Symbol(member, Decl(a.js, 5, 19)) >C : Symbol(C, Decl(a.js, 1, 15)) +>member : Symbol(member, Decl(a.js, 5, 19)) (new C()).initializedMember.a = 1; >(new C()).initializedMember : Symbol(initializedMember, Decl(a.js, 3, 9)) diff --git a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.symbols.diff index a4a7304f74..37fcd73633 100644 --- a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.symbols.diff @@ -23,13 +23,17 @@ constructor() { this.member = {}; ->this.member : Symbol(C.member, Decl(a.js, 5, 19)) ++>this.member : Symbol(member, Decl(a.js, 5, 19)) >this : Symbol(C, Decl(a.js, 1, 15)) ->member : Symbol(C.member, Decl(a.js, 5, 19)) ++>member : Symbol(member, Decl(a.js, 5, 19)) this.member.a = 0; ->this.member : Symbol(C.member, Decl(a.js, 5, 19)) ++>this.member : Symbol(member, Decl(a.js, 5, 19)) >this : Symbol(C, Decl(a.js, 1, 15)) ->member : Symbol(C.member, Decl(a.js, 5, 19)) ++>member : Symbol(member, Decl(a.js, 5, 19)) } } @@ -39,7 +43,7 @@ property: {} >property : Symbol(property, Decl(a.js, 11, 11)) -@@= skipped -36, +30 lines =@@ +@@= skipped -36, +34 lines =@@ obj.property.a = 0; >obj.property : Symbol(property, Decl(a.js, 11, 11)) @@ -59,8 +63,10 @@ (new C()).member.a = 1; ->(new C()).member : Symbol(C.member, Decl(a.js, 5, 19)) ++>(new C()).member : Symbol(member, Decl(a.js, 5, 19)) >C : Symbol(C, Decl(a.js, 1, 15)) ->member : Symbol(C.member, Decl(a.js, 5, 19)) ++>member : Symbol(member, Decl(a.js, 5, 19)) (new C()).initializedMember.a = 1; ->(new C()).initializedMember : Symbol(C.initializedMember, Decl(a.js, 3, 9)) diff --git a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.types b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.types index 4b1c247006..59bea220ae 100644 --- a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.types +++ b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.types @@ -22,17 +22,17 @@ class C { constructor() { this.member = {}; >this.member = {} : {} ->this.member : any +>this.member : {} >this : this ->member : any +>member : {} >{} : {} this.member.a = 0; >this.member.a = 0 : 0 >this.member.a : any ->this.member : any +>this.member : {} >this : this ->member : any +>member : {} >a : any >0 : 0 } @@ -81,11 +81,11 @@ variable.a = 1; (new C()).member.a = 1; >(new C()).member.a = 1 : 1 >(new C()).member.a : any ->(new C()).member : any +>(new C()).member : {} >(new C()) : C >new C() : C >C : typeof C ->member : any +>member : {} >a : any >1 : 1 diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.errors.txt deleted file mode 100644 index e31c1638b8..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.errors.txt +++ /dev/null @@ -1,104 +0,0 @@ -jsdocAccessibilityTag.js(32,14): error TS2339: Property 'priv2' does not exist on type 'C'. -jsdocAccessibilityTag.js(38,14): error TS2339: Property 'prot2' does not exist on type 'C'. -jsdocAccessibilityTag.js(44,14): error TS2339: Property 'pub2' does not exist on type 'C'. -jsdocAccessibilityTag.js(46,23): error TS2339: Property 'priv2' does not exist on type 'C'. -jsdocAccessibilityTag.js(55,14): error TS2339: Property 'priv2' does not exist on type 'D'. -jsdocAccessibilityTag.js(55,27): error TS2339: Property 'prot2' does not exist on type 'D'. -jsdocAccessibilityTag.js(55,40): error TS2339: Property 'pub2' does not exist on type 'D'. -jsdocAccessibilityTag.js(60,9): error TS2339: Property 'priv2' does not exist on type 'C'. -jsdocAccessibilityTag.js(60,25): error TS2339: Property 'prot2' does not exist on type 'C'. -jsdocAccessibilityTag.js(60,41): error TS2339: Property 'pub2' does not exist on type 'C'. -jsdocAccessibilityTag.js(61,9): error TS2339: Property 'priv2' does not exist on type 'D'. -jsdocAccessibilityTag.js(61,25): error TS2339: Property 'prot2' does not exist on type 'D'. -jsdocAccessibilityTag.js(61,41): error TS2339: Property 'pub2' does not exist on type 'D'. - - -==== jsdocAccessibilityTag.js (13 errors) ==== - class A { - /** - * Ap docs - * - * @private - */ - priv = 4; - /** - * Aq docs - * - * @protected - */ - prot = 5; - /** - * Ar docs - * - * @public - */ - pub = 6; - /** @public */ - get ack() { return this.priv } - /** @private */ - set ack(value) { } - } - class C { - constructor() { - /** - * Cp docs - * - * @private - */ - this.priv2 = 1; - ~~~~~ -!!! error TS2339: Property 'priv2' does not exist on type 'C'. - /** - * Cq docs - * - * @protected - */ - this.prot2 = 2; - ~~~~~ -!!! error TS2339: Property 'prot2' does not exist on type 'C'. - /** - * Cr docs - * - * @public - */ - this.pub2 = 3; - ~~~~ -!!! error TS2339: Property 'pub2' does not exist on type 'C'. - } - h() { return this.priv2 } - ~~~~~ -!!! error TS2339: Property 'priv2' does not exist on type 'C'. - } - class B extends A { - m() { - this.priv + this.prot + this.pub - } - } - class D extends C { - n() { - this.priv2 + this.prot2 + this.pub2 - ~~~~~ -!!! error TS2339: Property 'priv2' does not exist on type 'D'. - ~~~~~ -!!! error TS2339: Property 'prot2' does not exist on type 'D'. - ~~~~ -!!! error TS2339: Property 'pub2' does not exist on type 'D'. - } - } - new A().priv + new A().prot + new A().pub - new B().priv + new B().prot + new B().pub - new C().priv2 + new C().prot2 + new C().pub2 - ~~~~~ -!!! error TS2339: Property 'priv2' does not exist on type 'C'. - ~~~~~ -!!! error TS2339: Property 'prot2' does not exist on type 'C'. - ~~~~ -!!! error TS2339: Property 'pub2' does not exist on type 'C'. - new D().priv2 + new D().prot2 + new D().pub2 - ~~~~~ -!!! error TS2339: Property 'priv2' does not exist on type 'D'. - ~~~~~ -!!! error TS2339: Property 'prot2' does not exist on type 'D'. - ~~~~ -!!! error TS2339: Property 'pub2' does not exist on type 'D'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.symbols b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.symbols index 83859f7ba3..277a9b8d86 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.symbols @@ -50,7 +50,9 @@ class C { * @private */ this.priv2 = 1; +>this.priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) >this : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) +>priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) /** * Cq docs @@ -58,7 +60,9 @@ class C { * @protected */ this.prot2 = 2; +>this.prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) >this : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) +>prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) /** * Cr docs @@ -66,11 +70,15 @@ class C { * @public */ this.pub2 = 3; +>this.pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) >this : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) +>pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) } h() { return this.priv2 } >h : Symbol(h, Decl(jsdocAccessibilityTag.js, 44, 5)) +>this.priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) >this : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) +>priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) } class B extends A { >B : Symbol(B, Decl(jsdocAccessibilityTag.js, 46, 1)) @@ -99,9 +107,15 @@ class D extends C { >n : Symbol(n, Decl(jsdocAccessibilityTag.js, 52, 19)) this.priv2 + this.prot2 + this.pub2 +>this.priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) >this : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) +>priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) +>this.prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) >this : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) +>prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) +>this.pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) >this : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) +>pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) } } new A().priv + new A().prot + new A().pub @@ -127,12 +141,24 @@ new B().priv + new B().prot + new B().pub >pub : Symbol(pub, Decl(jsdocAccessibilityTag.js, 12, 13)) new C().priv2 + new C().prot2 + new C().pub2 +>new C().priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) >C : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) +>priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) +>new C().prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) >C : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) +>prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) +>new C().pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) >C : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) +>pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) new D().priv2 + new D().prot2 + new D().pub2 +>new D().priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) >D : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) +>priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) +>new D().prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) >D : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) +>prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) +>new D().pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) >D : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) +>pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.symbols.diff index 44760012d2..940dbddb90 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.symbols.diff @@ -47,35 +47,43 @@ */ this.priv2 = 1; ->this.priv2 : Symbol(C.priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ++>this.priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) >this : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) ->priv2 : Symbol(C.priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ++>priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) /** * Cq docs -@@= skipped -10, +8 lines =@@ +@@= skipped -10, +10 lines =@@ * @protected */ this.prot2 = 2; ->this.prot2 : Symbol(C.prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) ++>this.prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) >this : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) ->prot2 : Symbol(C.prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) ++>prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) /** * Cr docs -@@= skipped -10, +8 lines =@@ +@@= skipped -10, +10 lines =@@ * @public */ this.pub2 = 3; ->this.pub2 : Symbol(C.pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) ++>this.pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) >this : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) ->pub2 : Symbol(C.pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) ++>pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) } h() { return this.priv2 } ->h : Symbol(C.h, Decl(jsdocAccessibilityTag.js, 44, 5)) ->this.priv2 : Symbol(C.priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) +>h : Symbol(h, Decl(jsdocAccessibilityTag.js, 44, 5)) ++>this.priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) >this : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) ->priv2 : Symbol(C.priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ++>priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) } class B extends A { >B : Symbol(B, Decl(jsdocAccessibilityTag.js, 46, 1)) @@ -104,7 +112,7 @@ } } class D extends C { -@@= skipped -34, +30 lines =@@ +@@= skipped -34, +34 lines =@@ >C : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) n() { @@ -113,14 +121,20 @@ this.priv2 + this.prot2 + this.pub2 ->this.priv2 : Symbol(C.priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ++>this.priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) >this : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) ->priv2 : Symbol(C.priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ->this.prot2 : Symbol(C.prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) ++>priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ++>this.prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) >this : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) ->prot2 : Symbol(C.prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) ->this.pub2 : Symbol(C.pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) ++>prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) ++>this.pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) >this : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) ->pub2 : Symbol(C.pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) ++>pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) } } new A().priv + new A().prot + new A().pub @@ -159,23 +173,35 @@ new C().priv2 + new C().prot2 + new C().pub2 ->new C().priv2 : Symbol(C.priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ++>new C().priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) >C : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) ->priv2 : Symbol(C.priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ->new C().prot2 : Symbol(C.prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) ++>priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ++>new C().prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) >C : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) ->prot2 : Symbol(C.prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) ->new C().pub2 : Symbol(C.pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) ++>prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) ++>new C().pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) >C : Symbol(C, Decl(jsdocAccessibilityTag.js, 23, 1)) ->pub2 : Symbol(C.pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) ++>pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) new D().priv2 + new D().prot2 + new D().pub2 ->new D().priv2 : Symbol(C.priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ++>new D().priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) >D : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) ->priv2 : Symbol(C.priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ->new D().prot2 : Symbol(C.prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) ++>priv2 : Symbol(priv2, Decl(jsdocAccessibilityTag.js, 25, 19)) ++>new D().prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) >D : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) ->prot2 : Symbol(C.prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) ->new D().pub2 : Symbol(C.pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) ++>prot2 : Symbol(prot2, Decl(jsdocAccessibilityTag.js, 31, 23)) ++>new D().pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) >D : Symbol(D, Decl(jsdocAccessibilityTag.js, 51, 1)) ->pub2 : Symbol(C.pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) ++>pub2 : Symbol(pub2, Decl(jsdocAccessibilityTag.js, 37, 23)) diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.types b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.types index 491d5803d3..b992a45708 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTags.types @@ -54,9 +54,9 @@ class C { */ this.priv2 = 1; >this.priv2 = 1 : 1 ->this.priv2 : any +>this.priv2 : number >this : this ->priv2 : any +>priv2 : number >1 : 1 /** @@ -66,9 +66,9 @@ class C { */ this.prot2 = 2; >this.prot2 = 2 : 2 ->this.prot2 : any +>this.prot2 : number >this : this ->prot2 : any +>prot2 : number >2 : 2 /** @@ -78,16 +78,16 @@ class C { */ this.pub2 = 3; >this.pub2 = 3 : 3 ->this.pub2 : any +>this.pub2 : number >this : this ->pub2 : any +>pub2 : number >3 : 3 } h() { return this.priv2 } ->h : () => any ->this.priv2 : any +>h : () => number +>this.priv2 : number >this : this ->priv2 : any +>priv2 : number } class B extends A { >B : B @@ -118,17 +118,17 @@ class D extends C { >n : () => void this.priv2 + this.prot2 + this.pub2 ->this.priv2 + this.prot2 + this.pub2 : any ->this.priv2 + this.prot2 : any ->this.priv2 : any +>this.priv2 + this.prot2 + this.pub2 : number +>this.priv2 + this.prot2 : number +>this.priv2 : number >this : this ->priv2 : any ->this.prot2 : any +>priv2 : number +>this.prot2 : number >this : this ->prot2 : any ->this.pub2 : any +>prot2 : number +>this.pub2 : number >this : this ->pub2 : any +>pub2 : number } } new A().priv + new A().prot + new A().pub @@ -164,34 +164,34 @@ new B().priv + new B().prot + new B().pub >pub : number new C().priv2 + new C().prot2 + new C().pub2 ->new C().priv2 + new C().prot2 + new C().pub2 : any ->new C().priv2 + new C().prot2 : any ->new C().priv2 : any +>new C().priv2 + new C().prot2 + new C().pub2 : number +>new C().priv2 + new C().prot2 : number +>new C().priv2 : number >new C() : C >C : typeof C ->priv2 : any ->new C().prot2 : any +>priv2 : number +>new C().prot2 : number >new C() : C >C : typeof C ->prot2 : any ->new C().pub2 : any +>prot2 : number +>new C().pub2 : number >new C() : C >C : typeof C ->pub2 : any +>pub2 : number new D().priv2 + new D().prot2 + new D().pub2 ->new D().priv2 + new D().prot2 + new D().pub2 : any ->new D().priv2 + new D().prot2 : any ->new D().priv2 : any +>new D().priv2 + new D().prot2 + new D().pub2 : number +>new D().priv2 + new D().prot2 : number +>new D().priv2 : number >new D() : D >D : typeof D ->priv2 : any ->new D().prot2 : any +>priv2 : number +>new D().prot2 : number >new D() : D >D : typeof D ->prot2 : any ->new D().pub2 : any +>prot2 : number +>new D().pub2 : number >new D() : D >D : typeof D ->pub2 : any +>pub2 : number diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.errors.txt deleted file mode 100644 index 8e5868b1ae..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.errors.txt +++ /dev/null @@ -1,65 +0,0 @@ -jsdocAccessibilityTagDeclarations.js(5,14): error TS2339: Property 'c' does not exist on type 'Protected'. -jsdocAccessibilityTagDeclarations.js(9,21): error TS2339: Property 'c' does not exist on type 'Protected'. -jsdocAccessibilityTagDeclarations.js(12,27): error TS2339: Property 'c' does not exist on type 'Protected'. -jsdocAccessibilityTagDeclarations.js(14,25): error TS2339: Property 'c' does not exist on type 'Protected'. -jsdocAccessibilityTagDeclarations.js(21,14): error TS2339: Property 'c' does not exist on type 'Private'. -jsdocAccessibilityTagDeclarations.js(25,21): error TS2339: Property 'c' does not exist on type 'Private'. -jsdocAccessibilityTagDeclarations.js(28,27): error TS2339: Property 'c' does not exist on type 'Private'. -jsdocAccessibilityTagDeclarations.js(30,25): error TS2339: Property 'c' does not exist on type 'Private'. - - -==== jsdocAccessibilityTagDeclarations.js (8 errors) ==== - class Protected { - /** @protected */ - constructor(c) { - /** @protected */ - this.c = c - ~ -!!! error TS2339: Property 'c' does not exist on type 'Protected'. - } - /** @protected */ - m() { - return this.c - ~ -!!! error TS2339: Property 'c' does not exist on type 'Protected'. - } - /** @protected */ - get p() { return this.c } - ~ -!!! error TS2339: Property 'c' does not exist on type 'Protected'. - /** @protected */ - set p(value) { this.c = value } - ~ -!!! error TS2339: Property 'c' does not exist on type 'Protected'. - } - - class Private { - /** @private */ - constructor(c) { - /** @private */ - this.c = c - ~ -!!! error TS2339: Property 'c' does not exist on type 'Private'. - } - /** @private */ - m() { - return this.c - ~ -!!! error TS2339: Property 'c' does not exist on type 'Private'. - } - /** @private */ - get p() { return this.c } - ~ -!!! error TS2339: Property 'c' does not exist on type 'Private'. - /** @private */ - set p(value) { this.c = value } - ~ -!!! error TS2339: Property 'c' does not exist on type 'Private'. - } - - // https://github.com/microsoft/TypeScript/issues/38401 - class C { - constructor(/** @public */ x, /** @protected */ y, /** @private */ z) { - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.symbols b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.symbols index 409c251aff..9a0087608f 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.symbols @@ -10,7 +10,9 @@ class Protected { /** @protected */ this.c = c +>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >this : Symbol(Protected, Decl(jsdocAccessibilityTagDeclarations.js, 0, 0)) +>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 16)) } /** @protected */ @@ -18,18 +20,24 @@ class Protected { >m : Symbol(m, Decl(jsdocAccessibilityTagDeclarations.js, 5, 5)) return this.c +>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >this : Symbol(Protected, Decl(jsdocAccessibilityTagDeclarations.js, 0, 0)) +>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) } /** @protected */ get p() { return this.c } >p : Symbol(p, Decl(jsdocAccessibilityTagDeclarations.js, 9, 5), Decl(jsdocAccessibilityTagDeclarations.js, 11, 29)) +>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >this : Symbol(Protected, Decl(jsdocAccessibilityTagDeclarations.js, 0, 0)) +>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) /** @protected */ set p(value) { this.c = value } >p : Symbol(p, Decl(jsdocAccessibilityTagDeclarations.js, 9, 5), Decl(jsdocAccessibilityTagDeclarations.js, 11, 29)) >value : Symbol(value, Decl(jsdocAccessibilityTagDeclarations.js, 13, 10)) +>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >this : Symbol(Protected, Decl(jsdocAccessibilityTagDeclarations.js, 0, 0)) +>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >value : Symbol(value, Decl(jsdocAccessibilityTagDeclarations.js, 13, 10)) } @@ -42,7 +50,9 @@ class Private { /** @private */ this.c = c +>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >this : Symbol(Private, Decl(jsdocAccessibilityTagDeclarations.js, 14, 1)) +>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 16)) } /** @private */ @@ -50,18 +60,24 @@ class Private { >m : Symbol(m, Decl(jsdocAccessibilityTagDeclarations.js, 21, 5)) return this.c +>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >this : Symbol(Private, Decl(jsdocAccessibilityTagDeclarations.js, 14, 1)) +>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) } /** @private */ get p() { return this.c } >p : Symbol(p, Decl(jsdocAccessibilityTagDeclarations.js, 25, 5), Decl(jsdocAccessibilityTagDeclarations.js, 27, 29)) +>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >this : Symbol(Private, Decl(jsdocAccessibilityTagDeclarations.js, 14, 1)) +>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) /** @private */ set p(value) { this.c = value } >p : Symbol(p, Decl(jsdocAccessibilityTagDeclarations.js, 25, 5), Decl(jsdocAccessibilityTagDeclarations.js, 27, 29)) >value : Symbol(value, Decl(jsdocAccessibilityTagDeclarations.js, 29, 10)) +>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >this : Symbol(Private, Decl(jsdocAccessibilityTagDeclarations.js, 14, 1)) +>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >value : Symbol(value, Decl(jsdocAccessibilityTagDeclarations.js, 29, 10)) } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.symbols.diff index c116473ee9..931b8544dd 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.symbols.diff @@ -5,8 +5,10 @@ /** @protected */ this.c = c ->this.c : Symbol(Protected.c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) ++>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >this : Symbol(Protected, Decl(jsdocAccessibilityTagDeclarations.js, 0, 0)) ->c : Symbol(Protected.c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) ++>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 16)) } /** @protected */ @@ -16,16 +18,20 @@ return this.c ->this.c : Symbol(Protected.c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) ++>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >this : Symbol(Protected, Decl(jsdocAccessibilityTagDeclarations.js, 0, 0)) ->c : Symbol(Protected.c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) ++>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) } /** @protected */ get p() { return this.c } ->p : Symbol(Protected.p, Decl(jsdocAccessibilityTagDeclarations.js, 9, 5), Decl(jsdocAccessibilityTagDeclarations.js, 11, 29)) ->this.c : Symbol(Protected.c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) +>p : Symbol(p, Decl(jsdocAccessibilityTagDeclarations.js, 9, 5), Decl(jsdocAccessibilityTagDeclarations.js, 11, 29)) ++>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >this : Symbol(Protected, Decl(jsdocAccessibilityTagDeclarations.js, 0, 0)) ->c : Symbol(Protected.c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) ++>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) /** @protected */ set p(value) { this.c = value } @@ -33,18 +39,22 @@ +>p : Symbol(p, Decl(jsdocAccessibilityTagDeclarations.js, 9, 5), Decl(jsdocAccessibilityTagDeclarations.js, 11, 29)) >value : Symbol(value, Decl(jsdocAccessibilityTagDeclarations.js, 13, 10)) ->this.c : Symbol(Protected.c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) ++>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >this : Symbol(Protected, Decl(jsdocAccessibilityTagDeclarations.js, 0, 0)) ->c : Symbol(Protected.c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) ++>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 2, 20), Decl(jsdocAccessibilityTagDeclarations.js, 13, 18)) >value : Symbol(value, Decl(jsdocAccessibilityTagDeclarations.js, 13, 10)) } -@@= skipped -40, +32 lines =@@ +@@= skipped -40, +40 lines =@@ /** @private */ this.c = c ->this.c : Symbol(Private.c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) ++>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >this : Symbol(Private, Decl(jsdocAccessibilityTagDeclarations.js, 14, 1)) ->c : Symbol(Private.c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) ++>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 16)) } /** @private */ @@ -54,16 +64,20 @@ return this.c ->this.c : Symbol(Private.c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) ++>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >this : Symbol(Private, Decl(jsdocAccessibilityTagDeclarations.js, 14, 1)) ->c : Symbol(Private.c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) ++>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) } /** @private */ get p() { return this.c } ->p : Symbol(Private.p, Decl(jsdocAccessibilityTagDeclarations.js, 25, 5), Decl(jsdocAccessibilityTagDeclarations.js, 27, 29)) ->this.c : Symbol(Private.c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) +>p : Symbol(p, Decl(jsdocAccessibilityTagDeclarations.js, 25, 5), Decl(jsdocAccessibilityTagDeclarations.js, 27, 29)) ++>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >this : Symbol(Private, Decl(jsdocAccessibilityTagDeclarations.js, 14, 1)) ->c : Symbol(Private.c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) ++>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) /** @private */ set p(value) { this.c = value } @@ -71,8 +85,10 @@ +>p : Symbol(p, Decl(jsdocAccessibilityTagDeclarations.js, 25, 5), Decl(jsdocAccessibilityTagDeclarations.js, 27, 29)) >value : Symbol(value, Decl(jsdocAccessibilityTagDeclarations.js, 29, 10)) ->this.c : Symbol(Private.c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) ++>this.c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >this : Symbol(Private, Decl(jsdocAccessibilityTagDeclarations.js, 14, 1)) ->c : Symbol(Private.c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) ++>c : Symbol(c, Decl(jsdocAccessibilityTagDeclarations.js, 18, 20), Decl(jsdocAccessibilityTagDeclarations.js, 29, 18)) >value : Symbol(value, Decl(jsdocAccessibilityTagDeclarations.js, 29, 10)) } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.errors.txt deleted file mode 100644 index eed8c48c54..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -/a.js(1,32): error TS2339: Property 'x' does not exist on type 'A'. -/a.js(5,14): error TS2339: Property 'x' does not exist on type 'B'. - - -==== /a.js (2 errors) ==== - class A { constructor() { this.x = 0; } } - ~ -!!! error TS2339: Property 'x' does not exist on type 'A'. - /** @augments */ - class B extends A { - m() { - this.x - ~ -!!! error TS2339: Property 'x' does not exist on type 'B'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.symbols b/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.symbols index feb265a4f6..9f5d3d2679 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.symbols @@ -3,7 +3,9 @@ === /a.js === class A { constructor() { this.x = 0; } } >A : Symbol(A, Decl(a.js, 0, 0)) +>this.x : Symbol(x, Decl(a.js, 0, 25)) >this : Symbol(A, Decl(a.js, 0, 0)) +>x : Symbol(x, Decl(a.js, 0, 25)) /** @augments */ class B extends A { @@ -14,7 +16,9 @@ class B extends A { >m : Symbol(m, Decl(a.js, 2, 19)) this.x +>this.x : Symbol(x, Decl(a.js, 0, 25)) >this : Symbol(B, Decl(a.js, 0, 41)) +>x : Symbol(x, Decl(a.js, 0, 25)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.symbols.diff index 9ea0441d43..8619f5d69b 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.symbols.diff @@ -5,12 +5,14 @@ class A { constructor() { this.x = 0; } } >A : Symbol(A, Decl(a.js, 0, 0)) ->this.x : Symbol(A.x, Decl(a.js, 0, 25)) ++>this.x : Symbol(x, Decl(a.js, 0, 25)) >this : Symbol(A, Decl(a.js, 0, 0)) ->x : Symbol(A.x, Decl(a.js, 0, 25)) ++>x : Symbol(x, Decl(a.js, 0, 25)) /** @augments */ class B extends A { -@@= skipped -10, +8 lines =@@ +@@= skipped -10, +10 lines =@@ >A : Symbol(A, Decl(a.js, 0, 0)) m() { @@ -18,4 +20,9 @@ +>m : Symbol(m, Decl(a.js, 2, 19)) this.x ++>this.x : Symbol(x, Decl(a.js, 0, 25)) >this : Symbol(B, Decl(a.js, 0, 41)) ++>x : Symbol(x, Decl(a.js, 0, 25)) + } + } + diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.types b/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.types index eabcec772e..b9fe07c4e7 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocAugmentsMissingType.types @@ -4,9 +4,9 @@ class A { constructor() { this.x = 0; } } >A : A >this.x = 0 : 0 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >0 : 0 /** @augments */ @@ -18,9 +18,9 @@ class B extends A { >m : () => void this.x ->this.x : any +>this.x : number >this : this ->x : any +>x : number } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.errors.txt index c28265597d..036f30301f 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.errors.txt @@ -1,11 +1,8 @@ -/b.js(1,32): error TS2339: Property 'x' does not exist on type 'A'. /b.js(6,21): error TS2339: Property 'x' does not exist on type 'B'. -==== /b.js (2 errors) ==== +==== /b.js (1 errors) ==== class A { constructor() { this.x = 0; } } - ~ -!!! error TS2339: Property 'x' does not exist on type 'A'. /** @augments A */ class B { diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.symbols b/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.symbols index 2f7b96e4bd..18451ffd71 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.symbols @@ -3,7 +3,9 @@ === /b.js === class A { constructor() { this.x = 0; } } >A : Symbol(A, Decl(b.js, 0, 0)) +>this.x : Symbol(x, Decl(b.js, 0, 25)) >this : Symbol(A, Decl(b.js, 0, 0)) +>x : Symbol(x, Decl(b.js, 0, 25)) /** @augments A */ class B { diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.symbols.diff index 8cc7b59aa8..33f61eda88 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.symbols.diff @@ -5,8 +5,10 @@ class A { constructor() { this.x = 0; } } >A : Symbol(A, Decl(b.js, 0, 0)) ->this.x : Symbol(A.x, Decl(b.js, 0, 25)) ++>this.x : Symbol(x, Decl(b.js, 0, 25)) >this : Symbol(A, Decl(b.js, 0, 0)) ->x : Symbol(A.x, Decl(b.js, 0, 25)) ++>x : Symbol(x, Decl(b.js, 0, 25)) /** @augments A */ class B { diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.types b/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.types index 794ff6b84f..61c393b56d 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocAugments_noExtends.types @@ -4,9 +4,9 @@ class A { constructor() { this.x = 0; } } >A : A >this.x = 0 : 0 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >0 : 0 /** @augments A */ diff --git a/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.errors.txt index 47d91d1ee9..bed5688d1f 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.errors.txt @@ -3,7 +3,6 @@ functions.js(5,14): error TS7006: Parameter 'c' implicitly has an 'any' type. functions.js(9,23): error TS7006: Parameter 'n' implicitly has an 'any' type. functions.js(13,13): error TS2552: Cannot find name 'function'. Did you mean 'Function'? functions.js(15,14): error TS7006: Parameter 'c' implicitly has an 'any' type. -functions.js(22,14): error TS2339: Property 'length' does not exist on type 'C'. functions.js(30,12): error TS2552: Cannot find name 'function'. Did you mean 'Function'? functions.js(31,19): error TS7006: Parameter 'ab' implicitly has an 'any' type. functions.js(31,23): error TS7006: Parameter 'onetwo' implicitly has an 'any' type. @@ -12,7 +11,7 @@ functions.js(51,26): error TS7006: Parameter 'dref' implicitly has an 'any' type functions.js(72,14): error TS7019: Rest parameter 'args' implicitly has an 'any[]' type. -==== functions.js (12 errors) ==== +==== functions.js (11 errors) ==== /** * @param {function(this: string, number): number} c is just passing on through * @return {function(this: string, number): number} @@ -47,8 +46,6 @@ functions.js(72,14): error TS7019: Rest parameter 'args' implicitly has an 'any[ /** @param {number} n */ constructor(n) { this.length = n; - ~~~~~~ -!!! error TS2339: Property 'length' does not exist on type 'C'. } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.symbols b/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.symbols index ff39725e2c..ab055207cb 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.symbols @@ -39,7 +39,9 @@ class C { >n : Symbol(n, Decl(functions.js, 20, 16)) this.length = n; +>this.length : Symbol(length, Decl(functions.js, 20, 20)) >this : Symbol(C, Decl(functions.js, 16, 1)) +>length : Symbol(length, Decl(functions.js, 20, 20)) >n : Symbol(n, Decl(functions.js, 20, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.symbols.diff index aa404bb503..c737c61c03 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.symbols.diff @@ -15,12 +15,14 @@ this.length = n; ->this.length : Symbol(C.length, Decl(functions.js, 20, 20)) ++>this.length : Symbol(length, Decl(functions.js, 20, 20)) >this : Symbol(C, Decl(functions.js, 16, 1)) ->length : Symbol(C.length, Decl(functions.js, 20, 20)) ++>length : Symbol(length, Decl(functions.js, 20, 20)) >n : Symbol(n, Decl(functions.js, 20, 16)) } } -@@= skipped -17, +15 lines =@@ +@@= skipped -17, +17 lines =@@ >y : Symbol(y, Decl(functions.js, 25, 3)) z.length; diff --git a/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.types b/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.types index c58ccc8fdc..d6a9685cba 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocFunctionType.types @@ -46,9 +46,9 @@ class C { this.length = n; >this.length = n : number ->this.length : any +>this.length : number >this : this ->length : any +>length : number >n : number } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.errors.txt deleted file mode 100644 index 8ca8e5ff2a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.errors.txt +++ /dev/null @@ -1,11 +0,0 @@ -/a.js(1,32): error TS2339: Property 'x' does not exist on type 'A'. - - -==== /a.js (1 errors) ==== - class A { constructor() { this.x = 0; } } - ~ -!!! error TS2339: Property 'x' does not exist on type 'A'. - /** @implements */ - class B { - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.symbols b/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.symbols index fc0d3ba5fd..11f054e551 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.symbols @@ -3,7 +3,9 @@ === /a.js === class A { constructor() { this.x = 0; } } >A : Symbol(A, Decl(a.js, 0, 0)) +>this.x : Symbol(x, Decl(a.js, 0, 25)) >this : Symbol(A, Decl(a.js, 0, 0)) +>x : Symbol(x, Decl(a.js, 0, 25)) /** @implements */ class B { diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.symbols.diff index ebaa4ced51..21a4214527 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.symbols.diff @@ -5,8 +5,10 @@ class A { constructor() { this.x = 0; } } >A : Symbol(A, Decl(a.js, 0, 0)) ->this.x : Symbol(A.x, Decl(a.js, 0, 25)) ++>this.x : Symbol(x, Decl(a.js, 0, 25)) >this : Symbol(A, Decl(a.js, 0, 0)) ->x : Symbol(A.x, Decl(a.js, 0, 25)) ++>x : Symbol(x, Decl(a.js, 0, 25)) /** @implements */ class B { diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.types b/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.types index adbd6e9e74..95372c290f 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocImplements_missingType.types @@ -4,9 +4,9 @@ class A { constructor() { this.x = 0; } } >A : A >this.x = 0 : 0 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >0 : 0 /** @implements */ diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.errors.txt deleted file mode 100644 index 6a050787a6..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.errors.txt +++ /dev/null @@ -1,23 +0,0 @@ -/a.js(1,32): error TS2339: Property 'x' does not exist on type 'A'. -/a.js(12,26): error TS2339: Property 'x' does not exist on type 'B3'. - - -==== /a.js (2 errors) ==== - class A { constructor() { this.x = 0; } } - ~ -!!! error TS2339: Property 'x' does not exist on type 'A'. - /** @implements A*/ - class B {} - - /** @implements A*/ - class B2 { - x = 10 - } - - /** @implements {A}*/ - class B3 { - constructor() { this.x = 10 } - ~ -!!! error TS2339: Property 'x' does not exist on type 'B3'. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.symbols b/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.symbols index e0dac68391..5013b1f0cb 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.symbols @@ -3,7 +3,9 @@ === /a.js === class A { constructor() { this.x = 0; } } >A : Symbol(A, Decl(a.js, 0, 0)) +>this.x : Symbol(x, Decl(a.js, 0, 25)) >this : Symbol(A, Decl(a.js, 0, 0)) +>x : Symbol(x, Decl(a.js, 0, 25)) /** @implements A*/ class B {} @@ -22,6 +24,8 @@ class B3 { >B3 : Symbol(B3, Decl(a.js, 7, 1)) constructor() { this.x = 10 } +>this.x : Symbol(x, Decl(a.js, 11, 19)) >this : Symbol(B3, Decl(a.js, 7, 1)) +>x : Symbol(x, Decl(a.js, 11, 19)) } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.symbols.diff index 6f9f35c8f7..29bdf82245 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.symbols.diff @@ -5,12 +5,14 @@ class A { constructor() { this.x = 0; } } >A : Symbol(A, Decl(a.js, 0, 0)) ->this.x : Symbol(A.x, Decl(a.js, 0, 25)) ++>this.x : Symbol(x, Decl(a.js, 0, 25)) >this : Symbol(A, Decl(a.js, 0, 0)) ->x : Symbol(A.x, Decl(a.js, 0, 25)) ++>x : Symbol(x, Decl(a.js, 0, 25)) /** @implements A*/ class B {} -@@= skipped -13, +11 lines =@@ +@@= skipped -13, +13 lines =@@ >B2 : Symbol(B2, Decl(a.js, 2, 10)) x = 10 @@ -24,7 +26,9 @@ constructor() { this.x = 10 } ->this.x : Symbol(B3.x, Decl(a.js, 11, 19)) ++>this.x : Symbol(x, Decl(a.js, 11, 19)) >this : Symbol(B3, Decl(a.js, 7, 1)) ->x : Symbol(B3.x, Decl(a.js, 11, 19)) ++>x : Symbol(x, Decl(a.js, 11, 19)) } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.types b/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.types index 61462e794a..59006e629c 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocImplements_properties.types @@ -4,9 +4,9 @@ class A { constructor() { this.x = 0; } } >A : A >this.x = 0 : 0 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >0 : 0 /** @implements A*/ @@ -28,9 +28,9 @@ class B3 { constructor() { this.x = 10 } >this.x = 10 : 10 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >10 : 10 } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImportType.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocImportType.errors.txt deleted file mode 100644 index 50d816064a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsdocImportType.errors.txt +++ /dev/null @@ -1,36 +0,0 @@ -mod1.js(4,14): error TS2339: Property 'chunk' does not exist on type 'Chunk'. -use.js(5,3): error TS2339: Property 'chunk' does not exist on type 'Chunk'. -use.js(10,3): error TS2339: Property 'chunk' does not exist on type 'Chunk'. - - -==== use.js (2 errors) ==== - /// - /** @typedef {import("./mod1")} C - * @type {C} */ - var c; - c.chunk; - ~~~~~ -!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. - - const D = require("./mod1"); - /** @type {D} */ - var d; - d.chunk; - ~~~~~ -!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. - -==== types.d.ts (0 errors) ==== - declare function require(name: string): any; - declare var exports: any; - declare var module: { exports: any }; -==== mod1.js (1 errors) ==== - /// - class Chunk { - constructor() { - this.chunk = 1; - ~~~~~ -!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. - } - } - module.exports = Chunk; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImportType.symbols b/testdata/baselines/reference/submodule/conformance/jsdocImportType.symbols index 93fb6896b8..0b2cf45d42 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImportType.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocImportType.symbols @@ -8,7 +8,9 @@ var c; >c : Symbol(c, Decl(use.js, 3, 3)) c.chunk; +>c.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >c : Symbol(c, Decl(use.js, 3, 3)) +>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) const D = require("./mod1"); >D : Symbol(D, Decl(use.js, 6, 5)) @@ -20,7 +22,9 @@ var d; >d : Symbol(d, Decl(use.js, 8, 3)) d.chunk; +>d.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >d : Symbol(d, Decl(use.js, 8, 3)) +>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) === types.d.ts === declare function require(name: string): any; @@ -41,7 +45,9 @@ class Chunk { constructor() { this.chunk = 1; +>this.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >this : Symbol(Chunk, Decl(mod1.js, 0, 0)) +>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) } } module.exports = Chunk; diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImportType.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocImportType.symbols.diff index f46c241539..2f07cdaac9 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImportType.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocImportType.symbols.diff @@ -5,28 +5,34 @@ c.chunk; ->c.chunk : Symbol(D.chunk, Decl(mod1.js, 2, 19)) ++>c.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >c : Symbol(c, Decl(use.js, 3, 3)) ->chunk : Symbol(D.chunk, Decl(mod1.js, 2, 19)) ++>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) const D = require("./mod1"); >D : Symbol(D, Decl(use.js, 6, 5)) -@@= skipped -14, +12 lines =@@ +@@= skipped -14, +14 lines =@@ >d : Symbol(d, Decl(use.js, 8, 3)) d.chunk; ->d.chunk : Symbol(D.chunk, Decl(mod1.js, 2, 19)) ++>d.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >d : Symbol(d, Decl(use.js, 8, 3)) ->chunk : Symbol(D.chunk, Decl(mod1.js, 2, 19)) ++>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) === types.d.ts === declare function require(name: string): any; -@@= skipped -23, +21 lines =@@ +@@= skipped -23, +23 lines =@@ constructor() { this.chunk = 1; ->this.chunk : Symbol(Chunk.chunk, Decl(mod1.js, 2, 19)) ++>this.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >this : Symbol(Chunk, Decl(mod1.js, 0, 0)) ->chunk : Symbol(Chunk.chunk, Decl(mod1.js, 2, 19)) ++>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) } } module.exports = Chunk; diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImportType.types b/testdata/baselines/reference/submodule/conformance/jsdocImportType.types index f2014f2aca..3bcae8e524 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImportType.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocImportType.types @@ -8,9 +8,9 @@ var c; >c : Chunk c.chunk; ->c.chunk : any +>c.chunk : number >c : Chunk ->chunk : any +>chunk : number const D = require("./mod1"); >D : typeof Chunk @@ -23,9 +23,9 @@ var d; >d : Chunk d.chunk; ->d.chunk : any +>d.chunk : number >d : Chunk ->chunk : any +>chunk : number === types.d.ts === declare function require(name: string): any; @@ -47,9 +47,9 @@ class Chunk { constructor() { this.chunk = 1; >this.chunk = 1 : 1 ->this.chunk : any +>this.chunk : number >this : this ->chunk : any +>chunk : number >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImportType2.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocImportType2.errors.txt deleted file mode 100644 index 3273bfe228..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsdocImportType2.errors.txt +++ /dev/null @@ -1,35 +0,0 @@ -mod1.js(4,14): error TS2339: Property 'chunk' does not exist on type 'Chunk'. -use.js(5,3): error TS2339: Property 'chunk' does not exist on type 'Chunk'. -use.js(10,3): error TS2339: Property 'chunk' does not exist on type 'Chunk'. - - -==== use.js (2 errors) ==== - /// - /** @typedef {import("./mod1")} C - * @type {C} */ - var c; - c.chunk; - ~~~~~ -!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. - - const D = require("./mod1"); - /** @type {D} */ - var d; - d.chunk; - ~~~~~ -!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. - -==== types.d.ts (0 errors) ==== - declare function require(name: string): any; - declare var exports: any; - declare var module: { exports: any }; -==== mod1.js (1 errors) ==== - /// - module.exports = class Chunk { - constructor() { - this.chunk = 1; - ~~~~~ -!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImportType2.symbols b/testdata/baselines/reference/submodule/conformance/jsdocImportType2.symbols index b5061bd821..3b00ab377e 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImportType2.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocImportType2.symbols @@ -8,7 +8,9 @@ var c; >c : Symbol(c, Decl(use.js, 3, 3)) c.chunk; +>c.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >c : Symbol(c, Decl(use.js, 3, 3)) +>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) const D = require("./mod1"); >D : Symbol(D, Decl(use.js, 6, 5)) @@ -20,7 +22,9 @@ var d; >d : Symbol(d, Decl(use.js, 8, 3)) d.chunk; +>d.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >d : Symbol(d, Decl(use.js, 8, 3)) +>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) === types.d.ts === declare function require(name: string): any; @@ -44,7 +48,9 @@ module.exports = class Chunk { constructor() { this.chunk = 1; +>this.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >this : Symbol(Chunk, Decl(mod1.js, 1, 16)) +>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImportType2.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocImportType2.symbols.diff index add0deb055..2c4f2ac9ad 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImportType2.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocImportType2.symbols.diff @@ -5,22 +5,26 @@ c.chunk; ->c.chunk : Symbol(D.chunk, Decl(mod1.js, 2, 19)) ++>c.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >c : Symbol(c, Decl(use.js, 3, 3)) ->chunk : Symbol(D.chunk, Decl(mod1.js, 2, 19)) ++>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) const D = require("./mod1"); >D : Symbol(D, Decl(use.js, 6, 5)) -@@= skipped -14, +12 lines =@@ +@@= skipped -14, +14 lines =@@ >d : Symbol(d, Decl(use.js, 8, 3)) d.chunk; ->d.chunk : Symbol(D.chunk, Decl(mod1.js, 2, 19)) ++>d.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >d : Symbol(d, Decl(use.js, 8, 3)) ->chunk : Symbol(D.chunk, Decl(mod1.js, 2, 19)) ++>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) === types.d.ts === declare function require(name: string): any; -@@= skipped -19, +17 lines =@@ +@@= skipped -19, +19 lines =@@ === mod1.js === /// module.exports = class Chunk { @@ -35,8 +39,10 @@ constructor() { this.chunk = 1; ->this.chunk : Symbol(Chunk.chunk, Decl(mod1.js, 2, 19)) ++>this.chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) >this : Symbol(Chunk, Decl(mod1.js, 1, 16)) ->chunk : Symbol(Chunk.chunk, Decl(mod1.js, 2, 19)) ++>chunk : Symbol(chunk, Decl(mod1.js, 2, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocImportType2.types b/testdata/baselines/reference/submodule/conformance/jsdocImportType2.types index 1fc82acd28..0f4fea0e0a 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocImportType2.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocImportType2.types @@ -8,9 +8,9 @@ var c; >c : Chunk c.chunk; ->c.chunk : any +>c.chunk : number >c : Chunk ->chunk : any +>chunk : number const D = require("./mod1"); >D : typeof Chunk @@ -23,9 +23,9 @@ var d; >d : Chunk d.chunk; ->d.chunk : any +>d.chunk : number >d : Chunk ->chunk : any +>chunk : number === types.d.ts === declare function require(name: string): any; @@ -52,9 +52,9 @@ module.exports = class Chunk { constructor() { this.chunk = 1; >this.chunk = 1 : 1 ->this.chunk : any +>this.chunk : number >this : this ->chunk : any +>chunk : number >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocReadonly.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocReadonly.errors.txt deleted file mode 100644 index 647491a299..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsdocReadonly.errors.txt +++ /dev/null @@ -1,30 +0,0 @@ -jsdocReadonly.js(18,14): error TS2339: Property 'ka' does not exist on type 'LOL'. - - -==== jsdocReadonly.js (1 errors) ==== - class LOL { - /** - * @readonly - * @private - * @type {number} - * Order rules do not apply to JSDoc - */ - x = 1 - /** @readonly */ - y = 2 - /** @readonly Definitely not here */ - static z = 3 - /** @readonly This is OK too */ - constructor() { - /** ok */ - this.y = 2 - /** @readonly ok */ - this.ka = 2 - ~~ -!!! error TS2339: Property 'ka' does not exist on type 'LOL'. - } - } - - var l = new LOL() - l.y = 12 - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocReadonly.symbols b/testdata/baselines/reference/submodule/conformance/jsdocReadonly.symbols index 6039838e87..bb4fb8df76 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocReadonly.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocReadonly.symbols @@ -31,7 +31,9 @@ class LOL { /** @readonly ok */ this.ka = 2 +>this.ka : Symbol(ka, Decl(jsdocReadonly.js, 15, 18)) >this : Symbol(LOL, Decl(jsdocReadonly.js, 0, 0)) +>ka : Symbol(ka, Decl(jsdocReadonly.js, 15, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocReadonly.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocReadonly.symbols.diff index c225b15afb..d67146cd96 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocReadonly.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocReadonly.symbols.diff @@ -30,8 +30,10 @@ /** @readonly ok */ this.ka = 2 ->this.ka : Symbol(LOL.ka, Decl(jsdocReadonly.js, 15, 18)) ++>this.ka : Symbol(ka, Decl(jsdocReadonly.js, 15, 18)) >this : Symbol(LOL, Decl(jsdocReadonly.js, 0, 0)) ->ka : Symbol(LOL.ka, Decl(jsdocReadonly.js, 15, 18)) ++>ka : Symbol(ka, Decl(jsdocReadonly.js, 15, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocReadonly.types b/testdata/baselines/reference/submodule/conformance/jsdocReadonly.types index c738ec8d0c..066dd4947c 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocReadonly.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocReadonly.types @@ -37,9 +37,9 @@ class LOL { /** @readonly ok */ this.ka = 2 >this.ka = 2 : 2 ->this.ka : any +>this.ka : number >this : this ->ka : any +>ka : number >2 : 2 } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.errors.txt index a184538a47..fcceb47726 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.errors.txt @@ -1,8 +1,7 @@ -jsdocReadonlyDeclarations.js(11,14): error TS2339: Property 'y' does not exist on type 'C'. jsdocReadonlyDeclarations.js(14,1): error TS2554: Expected 1 arguments, but got 0. -==== jsdocReadonlyDeclarations.js (2 errors) ==== +==== jsdocReadonlyDeclarations.js (1 errors) ==== class C { /** @readonly */ x = 6 @@ -14,8 +13,6 @@ jsdocReadonlyDeclarations.js(14,1): error TS2554: Expected 1 arguments, but got * @type {number} */ this.y = n - ~ -!!! error TS2339: Property 'y' does not exist on type 'C'. } } new C().x diff --git a/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.symbols b/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.symbols index 27d6439f46..4ed312c6d7 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.symbols @@ -23,7 +23,9 @@ class C { * @type {number} */ this.y = n +>this.y : Symbol(y, Decl(jsdocReadonlyDeclarations.js, 5, 18)) >this : Symbol(C, Decl(jsdocReadonlyDeclarations.js, 0, 0)) +>y : Symbol(y, Decl(jsdocReadonlyDeclarations.js, 5, 18)) >n : Symbol(n, Decl(jsdocReadonlyDeclarations.js, 4, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.symbols.diff index dcbb9c5222..796cc5f37e 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.symbols.diff @@ -25,8 +25,10 @@ */ this.y = n ->this.y : Symbol(C.y, Decl(jsdocReadonlyDeclarations.js, 5, 18)) ++>this.y : Symbol(y, Decl(jsdocReadonlyDeclarations.js, 5, 18)) >this : Symbol(C, Decl(jsdocReadonlyDeclarations.js, 0, 0)) ->y : Symbol(C.y, Decl(jsdocReadonlyDeclarations.js, 5, 18)) ++>y : Symbol(y, Decl(jsdocReadonlyDeclarations.js, 5, 18)) >n : Symbol(n, Decl(jsdocReadonlyDeclarations.js, 4, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.errors.txt index 82d9a6ba3a..75303c2689 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.errors.txt @@ -1,9 +1,7 @@ -templateTagOnClasses.js(10,14): error TS2339: Property 'a' does not exist on type 'Foo'. -templateTagOnClasses.js(25,3): error TS2339: Property 'a' does not exist on type 'Foo'. -templateTagOnClasses.js(25,9): error TS2339: Property 'a' does not exist on type 'Foo'. +templateTagOnClasses.js(25,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -==== templateTagOnClasses.js (3 errors) ==== +==== templateTagOnClasses.js (1 errors) ==== /** * @template T * @typedef {(t: T) => T} Id @@ -14,8 +12,6 @@ templateTagOnClasses.js(25,9): error TS2339: Property 'a' does not exist on type /** @param {T} x */ constructor (x) { this.a = x - ~ -!!! error TS2339: Property 'a' does not exist on type 'Foo'. } /** * @@ -31,8 +27,6 @@ templateTagOnClasses.js(25,9): error TS2339: Property 'a' does not exist on type var f = new Foo(1) var g = new Foo(false) f.a = g.a - ~ -!!! error TS2339: Property 'a' does not exist on type 'Foo'. - ~ -!!! error TS2339: Property 'a' does not exist on type 'Foo'. + ~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.symbols b/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.symbols index 7d58faf926..9abcfd61a1 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.symbols @@ -15,7 +15,9 @@ class Foo { >x : Symbol(x, Decl(templateTagOnClasses.js, 8, 17)) this.a = x +>this.a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) >this : Symbol(Foo, Decl(templateTagOnClasses.js, 0, 0)) +>a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) >x : Symbol(x, Decl(templateTagOnClasses.js, 8, 17)) } /** @@ -46,6 +48,10 @@ var g = new Foo(false) >Foo : Symbol(Foo, Decl(templateTagOnClasses.js, 0, 0)) f.a = g.a +>f.a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) >f : Symbol(f, Decl(templateTagOnClasses.js, 22, 3)) +>a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) +>g.a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) >g : Symbol(g, Decl(templateTagOnClasses.js, 23, 3)) +>a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.symbols.diff index 9cdeba9d93..91dc57a1fe 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.symbols.diff @@ -5,12 +5,14 @@ this.a = x ->this.a : Symbol(Foo.a, Decl(templateTagOnClasses.js, 8, 21)) ++>this.a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) >this : Symbol(Foo, Decl(templateTagOnClasses.js, 0, 0)) ->a : Symbol(Foo.a, Decl(templateTagOnClasses.js, 8, 21)) ++>a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) >x : Symbol(x, Decl(templateTagOnClasses.js, 8, 17)) } /** -@@= skipped -13, +11 lines =@@ +@@= skipped -13, +13 lines =@@ * @return {T} */ foo(x, y, alpha) { @@ -36,7 +38,11 @@ ->f : Symbol(f, Decl(templateTagOnClasses.js, 22, 3), Decl(templateTagOnClasses.js, 23, 22)) ->a : Symbol(Foo.a, Decl(templateTagOnClasses.js, 8, 21)) ->g.a : Symbol(Foo.a, Decl(templateTagOnClasses.js, 8, 21)) ++>f.a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) +>f : Symbol(f, Decl(templateTagOnClasses.js, 22, 3)) ++>a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) ++>g.a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) >g : Symbol(g, Decl(templateTagOnClasses.js, 23, 3)) ->a : Symbol(Foo.a, Decl(templateTagOnClasses.js, 8, 21)) ++>a : Symbol(a, Decl(templateTagOnClasses.js, 8, 21)) diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.types b/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.types index 34bdf98718..8594128d60 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocTemplateClass.types @@ -16,9 +16,9 @@ class Foo { this.a = x >this.a = x : T ->this.a : any +>this.a : T >this : this ->a : any +>a : T >x : T } /** @@ -55,11 +55,11 @@ var g = new Foo(false) >false : false f.a = g.a ->f.a = g.a : any ->f.a : any +>f.a = g.a : boolean +>f.a : number >f : Foo ->a : any ->g.a : any +>a : number +>g.a : boolean >g : Foo ->a : any +>a : boolean diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.errors.txt index 40ea387acb..d5614f6c67 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.errors.txt @@ -1,5 +1,4 @@ MC.js(5,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -MW.js(8,10): error TS2339: Property 'compiler' does not exist on type 'MW'. MW.js(12,1): error TS2309: An export assignment cannot be used in a module with other exported elements. @@ -20,7 +19,7 @@ MW.js(12,1): error TS2309: An export assignment cannot be used in a module with ~ !!! error TS2309: An export assignment cannot be used in a module with other exported elements. -==== MW.js (2 errors) ==== +==== MW.js (1 errors) ==== /** @typedef {import("./MC")} MC */ class MW { @@ -29,8 +28,6 @@ MW.js(12,1): error TS2309: An export assignment cannot be used in a module with */ constructor(compiler) { this.compiler = compiler; - ~~~~~~~~ -!!! error TS2339: Property 'compiler' does not exist on type 'MW'. } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.symbols b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.symbols index 3ee8f67b2d..812b695c5b 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.symbols @@ -36,7 +36,9 @@ class MW { >compiler : Symbol(compiler, Decl(MW.js, 6, 14)) this.compiler = compiler; +>this.compiler : Symbol(compiler, Decl(MW.js, 6, 25)) >this : Symbol(MW, Decl(MW.js, 0, 0)) +>compiler : Symbol(compiler, Decl(MW.js, 6, 25)) >compiler : Symbol(compiler, Decl(MW.js, 6, 14)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.symbols.diff index 61a7b3444e..c48a51573a 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.symbols.diff @@ -23,8 +23,10 @@ this.compiler = compiler; ->this.compiler : Symbol(MW.compiler, Decl(MW.js, 6, 25)) ++>this.compiler : Symbol(compiler, Decl(MW.js, 6, 25)) >this : Symbol(MW, Decl(MW.js, 0, 0)) ->compiler : Symbol(MW.compiler, Decl(MW.js, 6, 25)) ++>compiler : Symbol(compiler, Decl(MW.js, 6, 25)) >compiler : Symbol(compiler, Decl(MW.js, 6, 14)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.types b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.types index f02de57cd4..b88afbfeca 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfClassExpression.types @@ -41,9 +41,9 @@ class MW { this.compiler = compiler; >this.compiler = compiler : MC ->this.compiler : any +>this.compiler : MC >this : this ->compiler : any +>compiler : MC >compiler : MC } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.errors.txt index a81017037a..38ff7cb972 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.errors.txt @@ -1,6 +1,5 @@ MC.js(6,1): error TS2309: An export assignment cannot be used in a module with other exported elements. MW.js(1,15): error TS1340: Module './MC' does not refer to a type, but is used as a type here. Did you mean 'typeof import('./MC')'? -MW.js(8,10): error TS2339: Property 'compiler' does not exist on type 'MW'. MW.js(12,1): error TS2309: An export assignment cannot be used in a module with other exported elements. @@ -22,7 +21,7 @@ MW.js(12,1): error TS2309: An export assignment cannot be used in a module with ~ !!! error TS2309: An export assignment cannot be used in a module with other exported elements. -==== MW.js (3 errors) ==== +==== MW.js (2 errors) ==== /** @typedef {import("./MC")} MC */ ~~~~~~~~~~~~~~ !!! error TS1340: Module './MC' does not refer to a type, but is used as a type here. Did you mean 'typeof import('./MC')'? @@ -33,8 +32,6 @@ MW.js(12,1): error TS2309: An export assignment cannot be used in a module with */ constructor(compiler) { this.compiler = compiler; - ~~~~~~~~ -!!! error TS2339: Property 'compiler' does not exist on type 'MW'. } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.symbols b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.symbols index 1c27613be4..39ab556833 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.symbols @@ -38,7 +38,9 @@ class MW { >compiler : Symbol(compiler, Decl(MW.js, 6, 14)) this.compiler = compiler; +>this.compiler : Symbol(compiler, Decl(MW.js, 6, 25)) >this : Symbol(MW, Decl(MW.js, 0, 0)) +>compiler : Symbol(compiler, Decl(MW.js, 6, 25)) >compiler : Symbol(compiler, Decl(MW.js, 6, 14)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.symbols.diff index 71368dfa96..162bf8c970 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeReferenceToImportOfFunctionExpression.symbols.diff @@ -16,8 +16,10 @@ this.compiler = compiler; ->this.compiler : Symbol(MW.compiler, Decl(MW.js, 6, 25)) ++>this.compiler : Symbol(compiler, Decl(MW.js, 6, 25)) >this : Symbol(MW, Decl(MW.js, 0, 0)) ->compiler : Symbol(MW.compiler, Decl(MW.js, 6, 25)) ++>compiler : Symbol(compiler, Decl(MW.js, 6, 25)) >compiler : Symbol(compiler, Decl(MW.js, 6, 14)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.errors.txt index 2cac730ae2..5ca40c9e5b 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.errors.txt @@ -1,7 +1,8 @@ b.js(4,31): 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. -b.js(17,14): error TS2339: Property 'p' does not exist on type 'SomeBase'. -b.js(23,14): error TS2339: Property 'x' does not exist on type 'SomeDerived'. -b.js(28,14): error TS2339: Property 'q' does not exist on type 'SomeOther'. +b.js(45,36): error TS2741: Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'. +b.js(49,42): error TS2739: Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x +b.js(51,38): error TS2741: Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'. +b.js(52,38): error TS2741: Property 'q' is missing in type 'SomeBase' but required in type 'SomeOther'. b.js(66,15): error TS1228: A type predicate is only allowed in return type position for functions and methods. b.js(66,38): error TS2454: Variable 'numOrStr' is used before being assigned. b.js(67,2): error TS2322: Type 'string | number' is not assignable to type 'string'. @@ -12,7 +13,7 @@ b.js(67,8): error TS2454: Variable 'numOrStr' is used before being assigned. ==== a.ts (0 errors) ==== var W: string; -==== b.js (8 errors) ==== +==== b.js (9 errors) ==== // @ts-check var W = /** @type {string} */(/** @type {*} */ (4)); @@ -32,23 +33,17 @@ b.js(67,8): error TS2454: Variable 'numOrStr' is used before being assigned. class SomeBase { constructor() { this.p = 42; - ~ -!!! error TS2339: Property 'p' does not exist on type 'SomeBase'. } } class SomeDerived extends SomeBase { constructor() { super(); this.x = 42; - ~ -!!! error TS2339: Property 'x' does not exist on type 'SomeDerived'. } } class SomeOther { constructor() { this.q = 42; - ~ -!!! error TS2339: Property 'q' does not exist on type 'SomeOther'. } } @@ -66,13 +61,24 @@ b.js(67,8): error TS2454: Variable 'numOrStr' is used before being assigned. someBase = /** @type {SomeBase} */(someDerived); someBase = /** @type {SomeBase} */(someBase); someBase = /** @type {SomeBase} */(someOther); // Error + ~~~~~~~~~ +!!! error TS2741: Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'. +!!! related TS2728 b.js:17:9: 'p' is declared here. someDerived = /** @type {SomeDerived} */(someDerived); someDerived = /** @type {SomeDerived} */(someBase); someDerived = /** @type {SomeDerived} */(someOther); // Error + ~~~~~~~~~ +!!! error TS2739: Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x someOther = /** @type {SomeOther} */(someDerived); // Error + ~~~~~~~~~~~ +!!! error TS2741: Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'. +!!! related TS2728 b.js:28:9: 'q' is declared here. someOther = /** @type {SomeOther} */(someBase); // Error + ~~~~~~~~ +!!! error TS2741: Property 'q' is missing in type 'SomeBase' but required in type 'SomeOther'. +!!! related TS2728 b.js:28:9: 'q' is declared here. someOther = /** @type {SomeOther} */(someOther); someFakeClass = someBase; diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.symbols b/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.symbols index ac5f84655a..7602ec59d4 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.symbols +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.symbols @@ -31,7 +31,9 @@ class SomeBase { constructor() { this.p = 42; +>this.p : Symbol(p, Decl(b.js, 15, 19)) >this : Symbol(SomeBase, Decl(b.js, 12, 33)) +>p : Symbol(p, Decl(b.js, 15, 19)) } } class SomeDerived extends SomeBase { @@ -43,7 +45,9 @@ class SomeDerived extends SomeBase { >super : Symbol(SomeBase, Decl(b.js, 12, 33)) this.x = 42; +>this.x : Symbol(x, Decl(b.js, 21, 16)) >this : Symbol(SomeDerived, Decl(b.js, 18, 1)) +>x : Symbol(x, Decl(b.js, 21, 16)) } } class SomeOther { @@ -51,7 +55,9 @@ class SomeOther { constructor() { this.q = 42; +>this.q : Symbol(q, Decl(b.js, 26, 19)) >this : Symbol(SomeOther, Decl(b.js, 24, 1)) +>q : Symbol(q, Decl(b.js, 26, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.symbols.diff b/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.symbols.diff index 336a326137..8a6826b9a1 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.symbols.diff @@ -5,32 +5,38 @@ constructor() { this.p = 42; ->this.p : Symbol(SomeBase.p, Decl(b.js, 15, 19)) ++>this.p : Symbol(p, Decl(b.js, 15, 19)) >this : Symbol(SomeBase, Decl(b.js, 12, 33)) ->p : Symbol(SomeBase.p, Decl(b.js, 15, 19)) ++>p : Symbol(p, Decl(b.js, 15, 19)) } } class SomeDerived extends SomeBase { -@@= skipped -14, +12 lines =@@ +@@= skipped -14, +14 lines =@@ >super : Symbol(SomeBase, Decl(b.js, 12, 33)) this.x = 42; ->this.x : Symbol(SomeDerived.x, Decl(b.js, 21, 16)) ++>this.x : Symbol(x, Decl(b.js, 21, 16)) >this : Symbol(SomeDerived, Decl(b.js, 18, 1)) ->x : Symbol(SomeDerived.x, Decl(b.js, 21, 16)) ++>x : Symbol(x, Decl(b.js, 21, 16)) } } class SomeOther { -@@= skipped -10, +8 lines =@@ +@@= skipped -10, +10 lines =@@ constructor() { this.q = 42; ->this.q : Symbol(SomeOther.q, Decl(b.js, 26, 19)) ++>this.q : Symbol(q, Decl(b.js, 26, 19)) >this : Symbol(SomeOther, Decl(b.js, 24, 1)) ->q : Symbol(SomeOther.q, Decl(b.js, 26, 19)) ++>q : Symbol(q, Decl(b.js, 26, 19)) } } -@@= skipped -11, +9 lines =@@ +@@= skipped -11, +11 lines =@@ /** @type {string|number} */ this.p = "bar"; diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.types b/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.types index 8ae90144ab..868c12ce17 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.types @@ -50,9 +50,9 @@ class SomeBase { constructor() { this.p = 42; >this.p = 42 : 42 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >42 : 42 } } @@ -67,9 +67,9 @@ class SomeDerived extends SomeBase { this.x = 42; >this.x = 42 : 42 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >42 : 42 } } @@ -79,9 +79,9 @@ class SomeOther { constructor() { this.q = 42; >this.q = 42 : 42 ->this.q : any +>this.q : number >this : this ->q : any +>q : number >42 : 42 } } diff --git a/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols b/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols index f4866237ef..be9ade1544 100644 --- a/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols +++ b/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols @@ -519,10 +519,13 @@ export class c { constructor() { this.a = "b"; +>this.a : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) >this : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1)) +>a : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) this["a"] = "b"; >this : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1)) +>"a" : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) } } diff --git a/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols.diff b/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols.diff index 53f1b71f89..ddb15be14d 100644 --- a/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols.diff @@ -85,3 +85,17 @@ } function get123(): Type[K] { +@@= skipped -141, +141 lines =@@ + + constructor() { + this.a = "b"; ++>this.a : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) + >this : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1)) ++>a : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) + + this["a"] = "b"; + >this : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1)) ++>"a" : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) + } + } + diff --git a/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols b/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols index 5a27087f04..68919134f1 100644 --- a/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols +++ b/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols @@ -177,9 +177,9 @@ class Thing3 extends Thing2 { super(10, 20, 30); this._tag = tag; ->this._tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 24, 18)) +>this._tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 58, 26)) >this : Symbol(Thing3, Decl(mixinClassesAnnotated.ts, 54, 1)) ->_tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 24, 18)) +>_tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 58, 26)) >tag : Symbol(tag, Decl(mixinClassesAnnotated.ts, 57, 16)) } test() { diff --git a/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols.diff b/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols.diff index 62511dee7e..872519255d 100644 --- a/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols.diff @@ -135,10 +135,10 @@ super(10, 20, 30); this._tag = tag; ->this._tag : Symbol(Tagged._tag, Decl(mixinClassesAnnotated.ts, 24, 18)) -+>this._tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 24, 18)) ++>this._tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 58, 26)) >this : Symbol(Thing3, Decl(mixinClassesAnnotated.ts, 54, 1)) ->_tag : Symbol(Tagged._tag, Decl(mixinClassesAnnotated.ts, 24, 18)) -+>_tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 24, 18)) ++>_tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 58, 26)) >tag : Symbol(tag, Decl(mixinClassesAnnotated.ts, 57, 16)) } test() { diff --git a/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols b/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols index 5bab33f575..f64e6a23f9 100644 --- a/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols +++ b/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols @@ -154,9 +154,9 @@ class Thing3 extends Thing2 { super(10, 20, 30); this._tag = tag; ->this._tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 20, 32)) +>this._tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 49, 26)) >this : Symbol(Thing3, Decl(mixinClassesAnonymous.ts, 45, 1)) ->_tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 20, 32)) +>_tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 49, 26)) >tag : Symbol(tag, Decl(mixinClassesAnonymous.ts, 48, 16)) } test() { diff --git a/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols.diff b/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols.diff index 7443722962..4d547a8db9 100644 --- a/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols.diff @@ -129,10 +129,10 @@ super(10, 20, 30); this._tag = tag; ->this._tag : Symbol(C._tag, Decl(mixinClassesAnonymous.ts, 20, 32)) -+>this._tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 20, 32)) ++>this._tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 49, 26)) >this : Symbol(Thing3, Decl(mixinClassesAnonymous.ts, 45, 1)) ->_tag : Symbol(C._tag, Decl(mixinClassesAnonymous.ts, 20, 32)) -+>_tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 20, 32)) ++>_tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 49, 26)) >tag : Symbol(tag, Decl(mixinClassesAnonymous.ts, 48, 16)) } test() { diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.errors.txt b/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.errors.txt deleted file mode 100644 index c0f77347c9..0000000000 --- a/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.errors.txt +++ /dev/null @@ -1,42 +0,0 @@ -webpackLibNormalModule.js(4,14): error TS2339: Property 'x' does not exist on type 'C'. -webpackLibNormalModule.js(5,14): error TS2339: Property 'exports' does not exist on type 'C'. -webpackLibNormalModule.js(9,21): error TS2339: Property 'x' does not exist on type 'C'. -webpackLibNormalModule.js(14,19): error TS2339: Property 'exports' does not exist on type 'C'. -webpackLibNormalModule.js(21,23): error TS2339: Property 'exports' does not exist on type 'C'. - - -==== webpackLibNormalModule.js (5 errors) ==== - class C { - /** @param {number} x */ - constructor(x) { - this.x = x - ~ -!!! error TS2339: Property 'x' does not exist on type 'C'. - this.exports = [x] - ~~~~~~~ -!!! error TS2339: Property 'exports' does not exist on type 'C'. - } - /** @param {number} y */ - m(y) { - return this.x + y - ~ -!!! error TS2339: Property 'x' does not exist on type 'C'. - } - } - function exec() { - const module = new C(12); - return module.exports; // should be fine because `module` is defined locally - ~~~~~~~ -!!! error TS2339: Property 'exports' does not exist on type 'C'. - } - - function tricky() { - // (a trickier variant of what webpack does) - const module = new C(12); - return () => { - return module.exports; - ~~~~~~~ -!!! error TS2339: Property 'exports' does not exist on type 'C'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.symbols b/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.symbols index cf20db04f4..9dc1c17695 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.symbols +++ b/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.symbols @@ -9,11 +9,15 @@ class C { >x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 16)) this.x = x +>this.x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 20)) >this : Symbol(C, Decl(webpackLibNormalModule.js, 0, 0)) +>x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 20)) >x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 16)) this.exports = [x] +>this.exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) >this : Symbol(C, Decl(webpackLibNormalModule.js, 0, 0)) +>exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) >x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 16)) } /** @param {number} y */ @@ -22,7 +26,9 @@ class C { >y : Symbol(y, Decl(webpackLibNormalModule.js, 7, 6)) return this.x + y +>this.x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 20)) >this : Symbol(C, Decl(webpackLibNormalModule.js, 0, 0)) +>x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 20)) >y : Symbol(y, Decl(webpackLibNormalModule.js, 7, 6)) } } @@ -34,7 +40,9 @@ function exec() { >C : Symbol(C, Decl(webpackLibNormalModule.js, 0, 0)) return module.exports; // should be fine because `module` is defined locally +>module.exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) >module : Symbol(module, Decl(webpackLibNormalModule.js, 12, 9)) +>exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) } function tricky() { @@ -47,7 +55,9 @@ function tricky() { return () => { return module.exports; +>module.exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) >module : Symbol(module, Decl(webpackLibNormalModule.js, 18, 9)) +>exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.symbols.diff b/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.symbols.diff index 5ad37492c9..b6e9a84bc4 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.symbols.diff @@ -5,14 +5,18 @@ this.x = x ->this.x : Symbol(C.x, Decl(webpackLibNormalModule.js, 2, 20)) ++>this.x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 20)) >this : Symbol(C, Decl(webpackLibNormalModule.js, 0, 0)) ->x : Symbol(C.x, Decl(webpackLibNormalModule.js, 2, 20)) ++>x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 20)) >x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 16)) this.exports = [x] ->this.exports : Symbol(C.exports, Decl(webpackLibNormalModule.js, 3, 18)) ++>this.exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) >this : Symbol(C, Decl(webpackLibNormalModule.js, 0, 0)) ->exports : Symbol(C.exports, Decl(webpackLibNormalModule.js, 3, 18)) ++>exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) >x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 16)) } /** @param {number} y */ @@ -23,28 +27,34 @@ return this.x + y ->this.x : Symbol(C.x, Decl(webpackLibNormalModule.js, 2, 20)) ++>this.x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 20)) >this : Symbol(C, Decl(webpackLibNormalModule.js, 0, 0)) ->x : Symbol(C.x, Decl(webpackLibNormalModule.js, 2, 20)) ++>x : Symbol(x, Decl(webpackLibNormalModule.js, 2, 20)) >y : Symbol(y, Decl(webpackLibNormalModule.js, 7, 6)) } } -@@= skipped -31, +25 lines =@@ +@@= skipped -31, +31 lines =@@ >C : Symbol(C, Decl(webpackLibNormalModule.js, 0, 0)) return module.exports; // should be fine because `module` is defined locally ->module.exports : Symbol(C.exports, Decl(webpackLibNormalModule.js, 3, 18)) ++>module.exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) >module : Symbol(module, Decl(webpackLibNormalModule.js, 12, 9)) ->exports : Symbol(C.exports, Decl(webpackLibNormalModule.js, 3, 18)) ++>exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) } function tricky() { -@@= skipped -15, +13 lines =@@ +@@= skipped -15, +15 lines =@@ return () => { return module.exports; ->module.exports : Symbol(C.exports, Decl(webpackLibNormalModule.js, 3, 18)) ++>module.exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) >module : Symbol(module, Decl(webpackLibNormalModule.js, 18, 9)) ->exports : Symbol(C.exports, Decl(webpackLibNormalModule.js, 3, 18)) ++>exports : Symbol(exports, Decl(webpackLibNormalModule.js, 3, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.types b/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.types index 9d5dbdd72a..3dad622477 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.types +++ b/testdata/baselines/reference/submodule/conformance/moduleExportAssignment6.types @@ -10,34 +10,34 @@ class C { this.x = x >this.x = x : number ->this.x : any +>this.x : number >this : this ->x : any +>x : number >x : number this.exports = [x] >this.exports = [x] : number[] ->this.exports : any +>this.exports : number[] >this : this ->exports : any +>exports : number[] >[x] : number[] >x : number } /** @param {number} y */ m(y) { ->m : (y: number) => any +>m : (y: number) => number >y : number return this.x + y ->this.x + y : any ->this.x : any +>this.x + y : number +>this.x : number >this : this ->x : any +>x : number >y : number } } function exec() { ->exec : () => any +>exec : () => number[] const module = new C(12); >module : C @@ -46,13 +46,13 @@ function exec() { >12 : 12 return module.exports; // should be fine because `module` is defined locally ->module.exports : any +>module.exports : number[] >module : C ->exports : any +>exports : number[] } function tricky() { ->tricky : () => () => any +>tricky : () => () => number[] // (a trickier variant of what webpack does) const module = new C(12); @@ -62,12 +62,12 @@ function tricky() { >12 : 12 return () => { ->() => { return module.exports; } : () => any +>() => { return module.exports; } : () => number[] return module.exports; ->module.exports : any +>module.exports : number[] >module : C ->exports : any +>exports : number[] } } diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.errors.txt b/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.errors.txt index 487aeb584e..a23b0530f1 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.errors.txt @@ -1,9 +1,8 @@ -mod.js(7,14): error TS2339: Property 'p' does not exist on type 'Classic'. use.js(8,15): error TS2694: Namespace '"mod"' has no exported member 'n'. use.js(9,13): error TS2749: 's.Classic' refers to a value, but is being used as a type here. Did you mean 'typeof s.Classic'? -==== mod.js (1 errors) ==== +==== mod.js (0 errors) ==== module.exports.n = {}; module.exports.n.K = function C() { this.x = 10; @@ -11,8 +10,6 @@ use.js(9,13): error TS2749: 's.Classic' refers to a value, but is being used as module.exports.Classic = class { constructor() { this.p = 1 - ~ -!!! error TS2339: Property 'p' does not exist on type 'Classic'. } } diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.symbols b/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.symbols index 500368aaea..c9504b008a 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.symbols +++ b/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.symbols @@ -27,7 +27,9 @@ module.exports.Classic = class { constructor() { this.p = 1 +>this.p : Symbol(p, Decl(mod.js, 5, 19)) >this : Symbol(Classic, Decl(mod.js, 4, 24)) +>p : Symbol(p, Decl(mod.js, 5, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.symbols.diff b/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.symbols.diff index f80d7c93c5..30c7fcec72 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.symbols.diff @@ -48,12 +48,14 @@ constructor() { this.p = 1 ->this.p : Symbol(Classic.p, Decl(mod.js, 5, 19)) ++>this.p : Symbol(p, Decl(mod.js, 5, 19)) >this : Symbol(Classic, Decl(mod.js, 4, 24)) ->p : Symbol(Classic.p, Decl(mod.js, 5, 19)) ++>p : Symbol(p, Decl(mod.js, 5, 19)) } } -@@= skipped -42, +35 lines =@@ +@@= skipped -42, +37 lines =@@ var k = new s.n.K() >k : Symbol(k, Decl(use.js, 2, 3)) diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.types b/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.types index ba531322fa..db883825d9 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.types +++ b/testdata/baselines/reference/submodule/conformance/moduleExportNestedNamespaces.types @@ -41,9 +41,9 @@ module.exports.Classic = class { constructor() { this.p = 1 >this.p = 1 : 1 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols b/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols index fe35cd8d19..7945340511 100644 --- a/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols +++ b/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols @@ -296,16 +296,16 @@ class c3 extends c2 { >super : Symbol(c2, Decl(parserAstSpans1.ts, 69, 13)) this.p1 = super.c2_p1; ->this.p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) +>this.p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) >this : Symbol(c3, Decl(parserAstSpans1.ts, 106, 1)) ->p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) +>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) >super.c2_p1 : Symbol(c2_p1, Decl(parserAstSpans1.ts, 71, 10)) >super : Symbol(c2, Decl(parserAstSpans1.ts, 69, 13)) >c2_p1 : Symbol(c2_p1, Decl(parserAstSpans1.ts, 71, 10)) } /** c3 p1*/ public p1: number; ->p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) +>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) /** c3 f1*/ public f1() { diff --git a/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols.diff b/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols.diff index 0c9a8f01c3..dbfb1dc10f 100644 --- a/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols.diff @@ -374,11 +374,11 @@ this.p1 = super.c2_p1; ->this.p1 : Symbol(c3.p1, Decl(parserAstSpans1.ts, 111, 5)) -+>this.p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) ++>this.p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) >this : Symbol(c3, Decl(parserAstSpans1.ts, 106, 1)) ->p1 : Symbol(c3.p1, Decl(parserAstSpans1.ts, 111, 5)) ->super.c2_p1 : Symbol(c2.c2_p1, Decl(parserAstSpans1.ts, 71, 10)) -+>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) ++>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) +>super.c2_p1 : Symbol(c2_p1, Decl(parserAstSpans1.ts, 71, 10)) >super : Symbol(c2, Decl(parserAstSpans1.ts, 69, 13)) ->c2_p1 : Symbol(c2.c2_p1, Decl(parserAstSpans1.ts, 71, 10)) @@ -387,7 +387,7 @@ /** c3 p1*/ public p1: number; ->p1 : Symbol(c3.p1, Decl(parserAstSpans1.ts, 111, 5)) -+>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) ++>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) /** c3 f1*/ public f1() { diff --git a/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt b/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt index 6b44ee27d8..32c5c27953 100644 --- a/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt @@ -1,9 +1,8 @@ parserClass2.ts(1,43): error TS2304: Cannot find name 'ILogger'. parserClass2.ts(2,37): error TS2304: Cannot find name 'ILogger'. -parserClass2.ts(3,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. -==== parserClass2.ts (3 errors) ==== +==== parserClass2.ts (2 errors) ==== export class LoggerAdapter implements ILogger { ~~~~~~~ !!! error TS2304: Cannot find name 'ILogger'. @@ -11,7 +10,5 @@ parserClass2.ts(3,18): error TS2339: Property '_information' does not exist on t ~~~~~~~ !!! error TS2304: Cannot find name 'ILogger'. this._information = this.logger.information(); - ~~~~~~~~~~~~ -!!! error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt.diff new file mode 100644 index 0000000000..72bdbfa9d5 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt.diff @@ -0,0 +1,21 @@ +--- old.parserClass2.errors.txt ++++ new.parserClass2.errors.txt +@@= skipped -0, +0 lines =@@ + parserClass2.ts(1,43): error TS2304: Cannot find name 'ILogger'. + parserClass2.ts(2,37): error TS2304: Cannot find name 'ILogger'. +-parserClass2.ts(3,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. + + +-==== parserClass2.ts (3 errors) ==== ++==== parserClass2.ts (2 errors) ==== + export class LoggerAdapter implements ILogger { + ~~~~~~~ + !!! error TS2304: Cannot find name 'ILogger'. +@@= skipped -10, +9 lines =@@ + ~~~~~~~ + !!! error TS2304: Cannot find name 'ILogger'. + this._information = this.logger.information(); +- ~~~~~~~~~~~~ +-!!! error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. + } + } diff --git a/testdata/baselines/reference/submodule/conformance/parserClass2.symbols b/testdata/baselines/reference/submodule/conformance/parserClass2.symbols index 28f9588d7c..f822ebab1b 100644 --- a/testdata/baselines/reference/submodule/conformance/parserClass2.symbols +++ b/testdata/baselines/reference/submodule/conformance/parserClass2.symbols @@ -9,7 +9,9 @@ >ILogger : Symbol(ILogger) this._information = this.logger.information(); +>this._information : Symbol(_information, Decl(parserClass2.ts, 1, 46)) >this : Symbol(LoggerAdapter, Decl(parserClass2.ts, 0, 0)) +>_information : Symbol(_information, Decl(parserClass2.ts, 1, 46)) >this.logger : Symbol(logger, Decl(parserClass2.ts, 1, 21)) >this : Symbol(LoggerAdapter, Decl(parserClass2.ts, 0, 0)) >logger : Symbol(logger, Decl(parserClass2.ts, 1, 21)) diff --git a/testdata/baselines/reference/submodule/conformance/parserClass2.symbols.diff b/testdata/baselines/reference/submodule/conformance/parserClass2.symbols.diff index de2de22ace..dd67938883 100644 --- a/testdata/baselines/reference/submodule/conformance/parserClass2.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/parserClass2.symbols.diff @@ -9,8 +9,10 @@ >ILogger : Symbol(ILogger) this._information = this.logger.information(); ++>this._information : Symbol(_information, Decl(parserClass2.ts, 1, 46)) >this : Symbol(LoggerAdapter, Decl(parserClass2.ts, 0, 0)) ->this.logger : Symbol(LoggerAdapter.logger, Decl(parserClass2.ts, 1, 21)) ++>_information : Symbol(_information, Decl(parserClass2.ts, 1, 46)) +>this.logger : Symbol(logger, Decl(parserClass2.ts, 1, 21)) >this : Symbol(LoggerAdapter, Decl(parserClass2.ts, 0, 0)) ->logger : Symbol(LoggerAdapter.logger, Decl(parserClass2.ts, 1, 21)) diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols b/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols index 7870b392f1..3a1938be45 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols @@ -484,15 +484,15 @@ module TypeScript { >super : Symbol(AST, Decl(parserRealSource11.ts, 9, 5)) this.minChar = min; ->this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) +>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 183, 34)) >this : Symbol(IncompleteAST, Decl(parserRealSource11.ts, 179, 5)) ->minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) +>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 183, 34)) >min : Symbol(min, Decl(parserRealSource11.ts, 182, 21)) this.limChar = lim; ->this.limChar : Symbol(limChar, Decl(parserRealSource11.ts, 7, 36)) +>this.limChar : Symbol(limChar, Decl(parserRealSource11.ts, 185, 31)) >this : Symbol(IncompleteAST, Decl(parserRealSource11.ts, 179, 5)) ->limChar : Symbol(limChar, Decl(parserRealSource11.ts, 7, 36)) +>limChar : Symbol(limChar, Decl(parserRealSource11.ts, 185, 31)) >lim : Symbol(lim, Decl(parserRealSource11.ts, 182, 33)) } } @@ -900,9 +900,9 @@ module TypeScript { >TypeFlow : Symbol(TypeFlow) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 331, 46)) >this : Symbol(Label, Decl(parserRealSource11.ts, 322, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 331, 46)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 331, 25)) return this; @@ -1084,9 +1084,9 @@ module TypeScript { >operand : Symbol(operand, Decl(parserRealSource11.ts, 362, 40)) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) return this; @@ -1103,9 +1103,9 @@ module TypeScript { >operand : Symbol(operand, Decl(parserRealSource11.ts, 362, 40)) this.type = typeFlow.stringType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) return this; @@ -1122,9 +1122,9 @@ module TypeScript { >operand : Symbol(operand, Decl(parserRealSource11.ts, 362, 40)) this.type = typeFlow.booleanType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) break; @@ -1176,9 +1176,9 @@ module TypeScript { >type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) this.type = this.castTerm.type; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >this.castTerm.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this.castTerm : Symbol(castTerm, Decl(parserRealSource11.ts, 359, 39)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) @@ -1202,9 +1202,9 @@ module TypeScript { >operand : Symbol(operand, Decl(parserRealSource11.ts, 362, 40)) this.type = typeFlow.checker.undefinedType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) break; @@ -1462,9 +1462,9 @@ module TypeScript { >nodeType : Symbol(nodeType, Decl(parserRealSource11.ts, 517, 21)) this.minChar = this.target.minChar; ->this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) +>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 520, 28)) >this : Symbol(CallExpression, Decl(parserRealSource11.ts, 514, 5)) ->minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) +>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 520, 28)) >this.target.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) >this.target : Symbol(target, Decl(parserRealSource11.ts, 517, 40)) >this : Symbol(CallExpression, Decl(parserRealSource11.ts, 514, 5)) @@ -1663,9 +1663,9 @@ module TypeScript { case NodeType.Member: this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 594, 37)) >this : Symbol(BinaryExpression, Decl(parserRealSource11.ts, 549, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 594, 37)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 556, 25)) return this; @@ -2038,9 +2038,9 @@ module TypeScript { >TypeFlow : Symbol(TypeFlow) this.type = typeFlow.doubleType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 737, 46)) >this : Symbol(NumberLiteral, Decl(parserRealSource11.ts, 728, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 737, 46)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 737, 25)) return this; @@ -2169,9 +2169,9 @@ module TypeScript { >TypeFlow : Symbol(TypeFlow) this.type = typeFlow.regexType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 780, 46)) >this : Symbol(RegexLiteral, Decl(parserRealSource11.ts, 773, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 780, 46)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 780, 25)) return this; @@ -2258,9 +2258,9 @@ module TypeScript { >TypeFlow : Symbol(TypeFlow) this.type = typeFlow.stringType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 807, 46)) >this : Symbol(StringLiteral, Decl(parserRealSource11.ts, 792, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 807, 46)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 807, 25)) return this; @@ -3891,9 +3891,9 @@ module TypeScript { >TypeFlow : Symbol(TypeFlow) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 1305, 46)) >this : Symbol(Statement, Decl(parserRealSource11.ts, 1291, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 1305, 46)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 1305, 25)) return this; @@ -6108,9 +6108,9 @@ module TypeScript { >defaultCase : Symbol(defaultCase, Decl(parserRealSource11.ts, 1933, 33)) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 1974, 83)) >this : Symbol(SwitchStatement, Decl(parserRealSource11.ts, 1930, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 1974, 83)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 1968, 25)) return this; @@ -6295,9 +6295,9 @@ module TypeScript { >body : Symbol(body, Decl(parserRealSource11.ts, 2009, 32)) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 2034, 42)) >this : Symbol(CaseStatement, Decl(parserRealSource11.ts, 2006, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 2034, 42)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2032, 25)) return this; @@ -6440,9 +6440,9 @@ module TypeScript { >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) this.type = typeLink.type; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) >typeLink : Symbol(typeLink, Decl(parserRealSource11.ts, 2076, 15)) // in error recovery cases, there may not be a term @@ -6457,9 +6457,9 @@ module TypeScript { >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) >term : Symbol(term, Decl(parserRealSource11.ts, 2065, 21)) >type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) } typeFlow.inTypeRefTypeCheck = prevInTCTR; @@ -6542,9 +6542,9 @@ module TypeScript { >finallyNode : Symbol(finallyNode, Decl(parserRealSource11.ts, 2098, 41)) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 2113, 77)) >this : Symbol(TryFinally, Decl(parserRealSource11.ts, 2095, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 2113, 77)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2111, 25)) return this; @@ -6781,9 +6781,9 @@ module TypeScript { >catchNode : Symbol(catchNode, Decl(parserRealSource11.ts, 2143, 41)) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 2186, 71)) >this : Symbol(TryCatch, Decl(parserRealSource11.ts, 2140, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 2186, 71)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2184, 25)) return this; @@ -7144,9 +7144,9 @@ module TypeScript { >undefined : Symbol(undefined) } this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 2290, 13)) >this : Symbol(Catch, Decl(parserRealSource11.ts, 2218, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>type : Symbol(type, Decl(parserRealSource11.ts, 2290, 13)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2258, 25)) typeFlow.scope = prevScope; diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols.diff index f1320a0ff9..76a7744ceb 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols.diff @@ -349,18 +349,18 @@ this.minChar = min; ->this.minChar : Symbol(ASTSpan.minChar, Decl(parserRealSource11.ts, 6, 26)) -+>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) ++>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 183, 34)) >this : Symbol(IncompleteAST, Decl(parserRealSource11.ts, 179, 5)) ->minChar : Symbol(ASTSpan.minChar, Decl(parserRealSource11.ts, 6, 26)) -+>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) ++>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 183, 34)) >min : Symbol(min, Decl(parserRealSource11.ts, 182, 21)) this.limChar = lim; ->this.limChar : Symbol(ASTSpan.limChar, Decl(parserRealSource11.ts, 7, 36)) -+>this.limChar : Symbol(limChar, Decl(parserRealSource11.ts, 7, 36)) ++>this.limChar : Symbol(limChar, Decl(parserRealSource11.ts, 185, 31)) >this : Symbol(IncompleteAST, Decl(parserRealSource11.ts, 179, 5)) ->limChar : Symbol(ASTSpan.limChar, Decl(parserRealSource11.ts, 7, 36)) -+>limChar : Symbol(limChar, Decl(parserRealSource11.ts, 7, 36)) ++>limChar : Symbol(limChar, Decl(parserRealSource11.ts, 185, 31)) >lim : Symbol(lim, Decl(parserRealSource11.ts, 182, 33)) } } @@ -777,10 +777,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 331, 46)) >this : Symbol(Label, Decl(parserRealSource11.ts, 322, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 331, 46)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 331, 25)) return this; @@ -922,10 +922,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) return this; @@ -947,10 +947,10 @@ this.type = typeFlow.stringType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) return this; @@ -972,10 +972,10 @@ this.type = typeFlow.booleanType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) break; @@ -1048,12 +1048,12 @@ this.type = this.castTerm.type; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) ->this.castTerm.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) ->this.castTerm : Symbol(UnaryExpression.castTerm, Decl(parserRealSource11.ts, 359, 39)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) +>this.castTerm.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.castTerm : Symbol(castTerm, Decl(parserRealSource11.ts, 359, 39)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) @@ -1082,10 +1082,10 @@ this.type = typeFlow.checker.undefinedType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) break; @@ -1347,12 +1347,12 @@ this.minChar = this.target.minChar; ->this.minChar : Symbol(ASTSpan.minChar, Decl(parserRealSource11.ts, 6, 26)) -+>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) ++>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 520, 28)) >this : Symbol(CallExpression, Decl(parserRealSource11.ts, 514, 5)) ->minChar : Symbol(ASTSpan.minChar, Decl(parserRealSource11.ts, 6, 26)) ->this.target.minChar : Symbol(ASTSpan.minChar, Decl(parserRealSource11.ts, 6, 26)) ->this.target : Symbol(CallExpression.target, Decl(parserRealSource11.ts, 517, 40)) -+>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) ++>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 520, 28)) +>this.target.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) +>this.target : Symbol(target, Decl(parserRealSource11.ts, 517, 40)) >this : Symbol(CallExpression, Decl(parserRealSource11.ts, 514, 5)) @@ -1506,10 +1506,10 @@ case NodeType.Member: this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 594, 37)) >this : Symbol(BinaryExpression, Decl(parserRealSource11.ts, 549, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 594, 37)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 556, 25)) return this; @@ -1796,10 +1796,10 @@ this.type = typeFlow.doubleType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 737, 46)) >this : Symbol(NumberLiteral, Decl(parserRealSource11.ts, 728, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 737, 46)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 737, 25)) return this; @@ -1949,10 +1949,10 @@ this.type = typeFlow.regexType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 780, 46)) >this : Symbol(RegexLiteral, Decl(parserRealSource11.ts, 773, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 780, 46)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 780, 25)) return this; @@ -2017,10 +2017,10 @@ this.type = typeFlow.stringType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 807, 46)) >this : Symbol(StringLiteral, Decl(parserRealSource11.ts, 792, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 807, 46)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 807, 25)) return this; @@ -3800,10 +3800,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 1305, 46)) >this : Symbol(Statement, Decl(parserRealSource11.ts, 1291, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 1305, 46)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 1305, 25)) return this; @@ -5733,10 +5733,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 1974, 83)) >this : Symbol(SwitchStatement, Decl(parserRealSource11.ts, 1930, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 1974, 83)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 1968, 25)) return this; @@ -5882,10 +5882,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 2034, 42)) >this : Symbol(CaseStatement, Decl(parserRealSource11.ts, 2006, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 2034, 42)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2032, 25)) return this; @@ -5996,10 +5996,10 @@ this.type = typeLink.type; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) >typeLink : Symbol(typeLink, Decl(parserRealSource11.ts, 2076, 15)) // in error recovery cases, there may not be a term @@ -6021,10 +6021,10 @@ ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) +>term : Symbol(term, Decl(parserRealSource11.ts, 2065, 21)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) } typeFlow.inTypeRefTypeCheck = prevInTCTR; @@ -6111,10 +6111,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 2113, 77)) >this : Symbol(TryFinally, Decl(parserRealSource11.ts, 2095, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 2113, 77)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2111, 25)) return this; @@ -6268,10 +6268,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 2186, 71)) >this : Symbol(TryCatch, Decl(parserRealSource11.ts, 2140, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 2186, 71)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2184, 25)) return this; @@ -6606,10 +6606,10 @@ } this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 2290, 13)) >this : Symbol(Catch, Decl(parserRealSource11.ts, 2218, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 2290, 13)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2258, 25)) typeFlow.scope = prevScope; diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource11.types b/testdata/baselines/reference/submodule/conformance/parserRealSource11.types index 0fa88d6265..efef683941 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource11.types +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource11.types @@ -1322,9 +1322,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -1605,9 +1605,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -1635,9 +1635,9 @@ module TypeScript { this.type = typeFlow.stringType; >this.type = typeFlow.stringType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.stringType : any >typeFlow : TypeFlow >stringType : any @@ -1665,9 +1665,9 @@ module TypeScript { this.type = typeFlow.booleanType; >this.type = typeFlow.booleanType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.booleanType : any >typeFlow : TypeFlow >booleanType : any @@ -1748,9 +1748,9 @@ module TypeScript { this.type = this.castTerm.type; >this.type = this.castTerm.type : Type ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >this.castTerm.type : Type >this.castTerm : AST >this : this @@ -1783,9 +1783,9 @@ module TypeScript { this.type = typeFlow.checker.undefinedType; >this.type = typeFlow.checker.undefinedType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.checker.undefinedType : any >typeFlow.checker : any >typeFlow : TypeFlow @@ -2658,9 +2658,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -3376,9 +3376,9 @@ module TypeScript { this.type = typeFlow.doubleType; >this.type = typeFlow.doubleType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.doubleType : any >typeFlow : TypeFlow >doubleType : any @@ -3549,9 +3549,9 @@ module TypeScript { this.type = typeFlow.regexType; >this.type = typeFlow.regexType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.regexType : any >typeFlow : TypeFlow >regexType : any @@ -3677,9 +3677,9 @@ module TypeScript { this.type = typeFlow.stringType; >this.type = typeFlow.stringType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.stringType : any >typeFlow : TypeFlow >stringType : any @@ -5795,9 +5795,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -9172,9 +9172,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -9466,9 +9466,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -9688,9 +9688,9 @@ module TypeScript { this.type = typeLink.type; >this.type = typeLink.type : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeLink.type : any >typeLink : any >type : any @@ -9702,15 +9702,15 @@ module TypeScript { >term : AST this.term.type = this.type; ->this.term.type = this.type : Type +>this.term.type = this.type : any >this.term.type : Type >this.term : AST >this : this >term : AST >type : Type ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any } typeFlow.inTypeRefTypeCheck = prevInTCTR; @@ -9825,9 +9825,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -10224,9 +10224,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -10809,9 +10809,9 @@ module TypeScript { } this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : Type +>this.type : any >this : this ->type : Type +>type : any >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource11.types.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource11.types.diff new file mode 100644 index 0000000000..b9b88c72a1 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource11.types.diff @@ -0,0 +1,225 @@ +--- old.parserRealSource11.types ++++ new.parserRealSource11.types +@@= skipped -1321, +1321 lines =@@ + + this.type = typeFlow.voidType; + >this.type = typeFlow.voidType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.voidType : any + >typeFlow : TypeFlow + >voidType : any +@@= skipped -283, +283 lines =@@ + + this.type = typeFlow.voidType; + >this.type = typeFlow.voidType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.voidType : any + >typeFlow : TypeFlow + >voidType : any +@@= skipped -30, +30 lines =@@ + + this.type = typeFlow.stringType; + >this.type = typeFlow.stringType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.stringType : any + >typeFlow : TypeFlow + >stringType : any +@@= skipped -30, +30 lines =@@ + + this.type = typeFlow.booleanType; + >this.type = typeFlow.booleanType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.booleanType : any + >typeFlow : TypeFlow + >booleanType : any +@@= skipped -83, +83 lines =@@ + + this.type = this.castTerm.type; + >this.type = this.castTerm.type : Type +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >this.castTerm.type : Type + >this.castTerm : AST + >this : this +@@= skipped -35, +35 lines =@@ + + this.type = typeFlow.checker.undefinedType; + >this.type = typeFlow.checker.undefinedType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.checker.undefinedType : any + >typeFlow.checker : any + >typeFlow : TypeFlow +@@= skipped -875, +875 lines =@@ + + this.type = typeFlow.voidType; + >this.type = typeFlow.voidType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.voidType : any + >typeFlow : TypeFlow + >voidType : any +@@= skipped -718, +718 lines =@@ + + this.type = typeFlow.doubleType; + >this.type = typeFlow.doubleType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.doubleType : any + >typeFlow : TypeFlow + >doubleType : any +@@= skipped -173, +173 lines =@@ + + this.type = typeFlow.regexType; + >this.type = typeFlow.regexType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.regexType : any + >typeFlow : TypeFlow + >regexType : any +@@= skipped -128, +128 lines =@@ + + this.type = typeFlow.stringType; + >this.type = typeFlow.stringType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.stringType : any + >typeFlow : TypeFlow + >stringType : any +@@= skipped -2118, +2118 lines =@@ + + this.type = typeFlow.voidType; + >this.type = typeFlow.voidType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.voidType : any + >typeFlow : TypeFlow + >voidType : any +@@= skipped -3377, +3377 lines =@@ + + this.type = typeFlow.voidType; + >this.type = typeFlow.voidType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.voidType : any + >typeFlow : TypeFlow + >voidType : any +@@= skipped -294, +294 lines =@@ + + this.type = typeFlow.voidType; + >this.type = typeFlow.voidType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.voidType : any + >typeFlow : TypeFlow + >voidType : any +@@= skipped -222, +222 lines =@@ + + this.type = typeLink.type; + >this.type = typeLink.type : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeLink.type : any + >typeLink : any + >type : any +@@= skipped -14, +14 lines =@@ + >term : AST + + this.term.type = this.type; +->this.term.type = this.type : Type ++>this.term.type = this.type : any + >this.term.type : Type + >this.term : AST + >this : this + >term : AST + >type : Type +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + } + + typeFlow.inTypeRefTypeCheck = prevInTCTR; +@@= skipped -123, +123 lines =@@ + + this.type = typeFlow.voidType; + >this.type = typeFlow.voidType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.voidType : any + >typeFlow : TypeFlow + >voidType : any +@@= skipped -399, +399 lines =@@ + + this.type = typeFlow.voidType; + >this.type = typeFlow.voidType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.voidType : any + >typeFlow : TypeFlow + >voidType : any +@@= skipped -585, +585 lines =@@ + } + this.type = typeFlow.voidType; + >this.type = typeFlow.voidType : any +->this.type : Type ++>this.type : any + >this : this +->type : Type ++>type : any + >typeFlow.voidType : any + >typeFlow : TypeFlow + >voidType : any diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols b/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols index d532209470..8c54742a34 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols @@ -44,7 +44,7 @@ module TypeScript { // initialize the 'constructor' field this["constructor"] = undefined; >this : Symbol(BlockIntrinsics, Decl(parserRealSource4.ts, 5, 19)) ->"constructor" : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) +>"constructor" : Symbol(constructor, Decl(parserRealSource4.ts, 16, 24)) >undefined : Symbol(undefined) } } diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols.diff index aba382fd97..f7ee666626 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols.diff @@ -43,7 +43,7 @@ this["constructor"] = undefined; >this : Symbol(BlockIntrinsics, Decl(parserRealSource4.ts, 5, 19)) ->"constructor" : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) -+>"constructor" : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) ++>"constructor" : Symbol(constructor, Decl(parserRealSource4.ts, 16, 24)) >undefined : Symbol(undefined) } } diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource4.types b/testdata/baselines/reference/submodule/conformance/parserRealSource4.types index 7bc56dad4d..0cb9f6b068 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource4.types +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource4.types @@ -44,7 +44,7 @@ module TypeScript { // initialize the 'constructor' field this["constructor"] = undefined; >this["constructor"] = undefined : undefined ->this["constructor"] : Function +>this["constructor"] : any >this : this >"constructor" : "constructor" >undefined : undefined diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource4.types.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource4.types.diff new file mode 100644 index 0000000000..d549407643 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource4.types.diff @@ -0,0 +1,11 @@ +--- old.parserRealSource4.types ++++ new.parserRealSource4.types +@@= skipped -43, +43 lines =@@ + // initialize the 'constructor' field + this["constructor"] = undefined; + >this["constructor"] = undefined : undefined +->this["constructor"] : Function ++>this["constructor"] : any + >this : this + >"constructor" : "constructor" + >undefined : undefined diff --git a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols index 3c241379aa..51c933123f 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols +++ b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols @@ -24,6 +24,7 @@ class A { this["#foo"] = 3; // Okay (type has index signature and "#foo" does not collide with private identifier #foo) >this : Symbol(A, Decl(privateNameAndIndexSignature.ts, 0, 0)) +>"#foo" : Symbol("#foo", Decl(privateNameAndIndexSignature.ts, 5, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols.diff b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols.diff index e01d35354e..3bb9f0e2e4 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols.diff @@ -18,3 +18,11 @@ constructor(message: string) { >message : Symbol(message, Decl(privateNameAndIndexSignature.ts, 4, 16)) +@@= skipped -16, +16 lines =@@ + + this["#foo"] = 3; // Okay (type has index signature and "#foo" does not collide with private identifier #foo) + >this : Symbol(A, Decl(privateNameAndIndexSignature.ts, 0, 0)) ++>"#foo" : Symbol("#foo", Decl(privateNameAndIndexSignature.ts, 5, 19)) + + } + } diff --git a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types index e0d1a3b416..4ae69d6cf4 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types +++ b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types @@ -29,7 +29,7 @@ class A { 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["#foo"] : number >this : this >"#foo" : "#foo" >3 : 3 diff --git a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types.diff b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types.diff new file mode 100644 index 0000000000..69b43dc089 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types.diff @@ -0,0 +1,11 @@ +--- old.privateNameAndIndexSignature.types ++++ new.privateNameAndIndexSignature.types +@@= skipped -28, +28 lines =@@ + + 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["#foo"] : number + >this : this + >"#foo" : "#foo" + >3 : 3 diff --git a/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols b/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols index 554526879f..ad66ed300a 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols +++ b/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols @@ -6,9 +6,9 @@ class AA { #method() { this.x = 10; }; >#method : Symbol(#method, Decl(privateNameMethodCallExpression.ts, 0, 10)) ->this.x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) +>this.x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) >this : Symbol(AA, Decl(privateNameMethodCallExpression.ts, 0, 0)) ->x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) +>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) #method2(a, ...b) {}; >#method2 : Symbol(#method2, Decl(privateNameMethodCallExpression.ts, 1, 31)) @@ -16,7 +16,7 @@ class AA { >b : Symbol(b, Decl(privateNameMethodCallExpression.ts, 2, 15)) x = 1; ->x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) +>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) test() { >test : Symbol(test, Decl(privateNameMethodCallExpression.ts, 3, 10)) diff --git a/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols.diff b/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols.diff index 302a50c03d..24ff8d8f84 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols.diff @@ -7,10 +7,10 @@ ->#method : Symbol(AA.#method, Decl(privateNameMethodCallExpression.ts, 0, 10)) ->this.x : Symbol(AA.x, Decl(privateNameMethodCallExpression.ts, 2, 25)) +>#method : Symbol(#method, Decl(privateNameMethodCallExpression.ts, 0, 10)) -+>this.x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) ++>this.x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) >this : Symbol(AA, Decl(privateNameMethodCallExpression.ts, 0, 0)) ->x : Symbol(AA.x, Decl(privateNameMethodCallExpression.ts, 2, 25)) -+>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) ++>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) #method2(a, ...b) {}; ->#method2 : Symbol(AA.#method2, Decl(privateNameMethodCallExpression.ts, 1, 31)) @@ -20,7 +20,7 @@ x = 1; ->x : Symbol(AA.x, Decl(privateNameMethodCallExpression.ts, 2, 25)) -+>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) ++>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) test() { ->test : Symbol(AA.test, Decl(privateNameMethodCallExpression.ts, 3, 10)) diff --git a/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols b/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols index d810fd9f56..269f1e1311 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols +++ b/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols @@ -6,9 +6,9 @@ class AA { static #method() { this.x = 10; }; >#method : Symbol(#method, Decl(privateNameStaticMethodCallExpression.ts, 0, 10)) ->this.x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) +>this.x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) >this : Symbol(AA, Decl(privateNameStaticMethodCallExpression.ts, 0, 0)) ->x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) +>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) static #method2(a, ...b) {}; >#method2 : Symbol(#method2, Decl(privateNameStaticMethodCallExpression.ts, 1, 38)) @@ -16,7 +16,7 @@ class AA { >b : Symbol(b, Decl(privateNameStaticMethodCallExpression.ts, 2, 22)) static x = 1; ->x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) +>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) test() { >test : Symbol(test, Decl(privateNameStaticMethodCallExpression.ts, 3, 17)) diff --git a/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols.diff b/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols.diff index 5c372137f2..7da5ca836d 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols.diff @@ -7,10 +7,10 @@ ->#method : Symbol(AA.#method, Decl(privateNameStaticMethodCallExpression.ts, 0, 10)) ->this.x : Symbol(AA.x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) +>#method : Symbol(#method, Decl(privateNameStaticMethodCallExpression.ts, 0, 10)) -+>this.x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) ++>this.x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) >this : Symbol(AA, Decl(privateNameStaticMethodCallExpression.ts, 0, 0)) ->x : Symbol(AA.x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) -+>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) ++>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) static #method2(a, ...b) {}; ->#method2 : Symbol(AA.#method2, Decl(privateNameStaticMethodCallExpression.ts, 1, 38)) @@ -20,7 +20,7 @@ static x = 1; ->x : Symbol(AA.x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) -+>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) ++>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) test() { ->test : Symbol(AA.test, Decl(privateNameStaticMethodCallExpression.ts, 3, 17)) diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt index 324b43eef1..a6b6c3d618 100644 --- a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt @@ -1,9 +1,8 @@ -readonlyConstructorAssignment.ts(13,14): error TS2540: Cannot assign to 'x' because it is a read-only property. 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'. -==== readonlyConstructorAssignment.ts (2 errors) ==== +==== readonlyConstructorAssignment.ts (1 errors) ==== // Tests that readonly parameter properties behave like regular readonly properties class A { @@ -17,8 +16,6 @@ readonlyConstructorAssignment.ts(33,7): error TS2415: Class 'E' incorrectly exte super(x); // Fails, x is readonly this.x = 1; - ~ -!!! error TS2540: Cannot assign to 'x' because it is a read-only property. } } diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt.diff new file mode 100644 index 0000000000..33d2b08402 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt.diff @@ -0,0 +1,22 @@ +--- old.readonlyConstructorAssignment.errors.txt ++++ new.readonlyConstructorAssignment.errors.txt +@@= skipped -0, +0 lines =@@ +-readonlyConstructorAssignment.ts(13,14): error TS2540: Cannot assign to 'x' because it is a read-only property. + 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'. + + +-==== readonlyConstructorAssignment.ts (2 errors) ==== ++==== readonlyConstructorAssignment.ts (1 errors) ==== + // Tests that readonly parameter properties behave like regular readonly properties + + class A { +@@= skipped -16, +15 lines =@@ + super(x); + // Fails, x is readonly + this.x = 1; +- ~ +-!!! error TS2540: Cannot assign to 'x' because it is a read-only property. + } + } + diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols index 4a793fbca5..42d1feff7c 100644 --- a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols +++ b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols @@ -29,9 +29,9 @@ class B extends A { // Fails, x is readonly this.x = 1; ->this.x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 3, 16)) +>this.x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 10, 17)) >this : Symbol(B, Decl(readonlyConstructorAssignment.ts, 6, 1)) ->x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 3, 16)) +>x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 10, 17)) } } diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols.diff b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols.diff index 459527c70e..af1ffa61b3 100644 --- a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols.diff @@ -21,10 +21,10 @@ // Fails, x is readonly this.x = 1; ->this.x : Symbol(A.x, Decl(readonlyConstructorAssignment.ts, 3, 16)) -+>this.x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 3, 16)) ++>this.x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 10, 17)) >this : Symbol(B, Decl(readonlyConstructorAssignment.ts, 6, 1)) ->x : Symbol(A.x, Decl(readonlyConstructorAssignment.ts, 3, 16)) -+>x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 3, 16)) ++>x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 10, 17)) } } diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types index 9820fd91f0..0fafbef3a1 100644 --- a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types +++ b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types @@ -33,9 +33,9 @@ class B extends A { // Fails, x is readonly this.x = 1; >this.x = 1 : 1 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types.diff b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types.diff new file mode 100644 index 0000000000..1fe7c9ec3a --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types.diff @@ -0,0 +1,14 @@ +--- old.readonlyConstructorAssignment.types ++++ new.readonlyConstructorAssignment.types +@@= skipped -32, +32 lines =@@ + // Fails, x is readonly + this.x = 1; + >this.x = 1 : 1 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >1 : 1 + } + } diff --git a/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.errors.txt b/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.errors.txt deleted file mode 100644 index d052558419..0000000000 --- a/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.errors.txt +++ /dev/null @@ -1,76 +0,0 @@ -bug25127.js(3,14): error TS2339: Property 'c' does not exist on type 'Entry'. -bug25127.js(15,14): error TS2339: Property 'd' does not exist on type 'Group'. -bug25127.js(27,41): error TS2339: Property 'c' does not exist on type 'Entry'. -bug25127.js(27,51): error TS2339: Property 'd' does not exist on type 'Group'. - - -==== bug25127.js (4 errors) ==== - class Entry { - constructor() { - this.c = 1 - ~ -!!! error TS2339: Property 'c' does not exist on type 'Entry'. - } - /** - * @param {any} x - * @return {this is Entry} - */ - isInit(x) { - return true - } - } - class Group { - constructor() { - this.d = 'no' - ~ -!!! error TS2339: Property 'd' does not exist on type 'Group'. - } - /** - * @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 TS2339: Property 'c' does not exist on type 'Entry'. - ~ -!!! error TS2339: Property 'd' does not exist on type 'Group'. - 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/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.symbols b/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.symbols index 62dda0ebe8..d709687d8f 100644 --- a/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.symbols +++ b/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.symbols @@ -6,7 +6,9 @@ class Entry { constructor() { this.c = 1 +>this.c : Symbol(c, Decl(bug25127.js, 1, 19)) >this : Symbol(Entry, Decl(bug25127.js, 0, 0)) +>c : Symbol(c, Decl(bug25127.js, 1, 19)) } /** * @param {any} x @@ -24,7 +26,9 @@ class Group { constructor() { this.d = 'no' +>this.d : Symbol(d, Decl(bug25127.js, 13, 19)) >this : Symbol(Group, Decl(bug25127.js, 11, 1)) +>d : Symbol(d, Decl(bug25127.js, 13, 19)) } /** * @param {any} x @@ -48,8 +52,12 @@ function f(chunk) { >chunk : Symbol(chunk, Decl(bug25127.js, 25, 11)) >isInit : Symbol(isInit, Decl(bug25127.js, 3, 5), Decl(bug25127.js, 15, 5)) >chunk : Symbol(chunk, Decl(bug25127.js, 25, 11)) +>chunk.c : Symbol(c, Decl(bug25127.js, 1, 19)) >chunk : Symbol(chunk, Decl(bug25127.js, 25, 11)) +>c : Symbol(c, Decl(bug25127.js, 1, 19)) +>chunk.d : Symbol(d, Decl(bug25127.js, 13, 19)) >chunk : Symbol(chunk, Decl(bug25127.js, 25, 11)) +>d : Symbol(d, Decl(bug25127.js, 13, 19)) return x >x : Symbol(x, Decl(bug25127.js, 26, 7)) diff --git a/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.symbols.diff b/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.symbols.diff index 1d4c21c5a9..8fea5e1851 100644 --- a/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.symbols.diff @@ -5,8 +5,10 @@ constructor() { this.c = 1 ->this.c : Symbol(Entry.c, Decl(bug25127.js, 1, 19)) ++>this.c : Symbol(c, Decl(bug25127.js, 1, 19)) >this : Symbol(Entry, Decl(bug25127.js, 0, 0)) ->c : Symbol(Entry.c, Decl(bug25127.js, 1, 19)) ++>c : Symbol(c, Decl(bug25127.js, 1, 19)) } /** * @param {any} x @@ -18,13 +20,15 @@ >x : Symbol(x, Decl(bug25127.js, 8, 11)) return true -@@= skipped -20, +18 lines =@@ +@@= skipped -20, +20 lines =@@ constructor() { this.d = 'no' ->this.d : Symbol(Group.d, Decl(bug25127.js, 13, 19)) ++>this.d : Symbol(d, Decl(bug25127.js, 13, 19)) >this : Symbol(Group, Decl(bug25127.js, 11, 1)) ->d : Symbol(Group.d, Decl(bug25127.js, 13, 19)) ++>d : Symbol(d, Decl(bug25127.js, 13, 19)) } /** * @param {any} x @@ -36,16 +40,20 @@ >x : Symbol(x, Decl(bug25127.js, 20, 11)) return false -@@= skipped -26, +24 lines =@@ +@@= skipped -26, +26 lines =@@ >chunk : Symbol(chunk, Decl(bug25127.js, 25, 11)) >isInit : Symbol(isInit, Decl(bug25127.js, 3, 5), Decl(bug25127.js, 15, 5)) >chunk : Symbol(chunk, Decl(bug25127.js, 25, 11)) ->chunk.c : Symbol(Entry.c, Decl(bug25127.js, 1, 19)) ++>chunk.c : Symbol(c, Decl(bug25127.js, 1, 19)) >chunk : Symbol(chunk, Decl(bug25127.js, 25, 11)) ->c : Symbol(Entry.c, Decl(bug25127.js, 1, 19)) ->chunk.d : Symbol(Group.d, Decl(bug25127.js, 13, 19)) ++>c : Symbol(c, Decl(bug25127.js, 1, 19)) ++>chunk.d : Symbol(d, Decl(bug25127.js, 13, 19)) >chunk : Symbol(chunk, Decl(bug25127.js, 25, 11)) ->d : Symbol(Group.d, Decl(bug25127.js, 13, 19)) ++>d : Symbol(d, Decl(bug25127.js, 13, 19)) return x >x : Symbol(x, Decl(bug25127.js, 26, 7)) diff --git a/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.types b/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.types index 09933f5301..7cb6a15282 100644 --- a/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.types +++ b/testdata/baselines/reference/submodule/conformance/returnTagTypeGuard.types @@ -7,9 +7,9 @@ class Entry { constructor() { this.c = 1 >this.c = 1 : 1 ->this.c : any +>this.c : number >this : this ->c : any +>c : number >1 : 1 } /** @@ -30,9 +30,9 @@ class Group { constructor() { this.d = 'no' >this.d = 'no' : "no" ->this.d : any +>this.d : string >this : this ->d : any +>d : string >'no' : "no" } /** @@ -49,26 +49,26 @@ class Group { } /** @param {Entry | Group} chunk */ function f(chunk) { ->f : (chunk: Entry | Group) => any +>f : (chunk: Entry | Group) => string | number >chunk : Entry | Group let x = chunk.isInit(chunk) ? chunk.c : chunk.d ->x : any ->chunk.isInit(chunk) ? chunk.c : chunk.d : any +>x : string | number +>chunk.isInit(chunk) ? chunk.c : chunk.d : string | number >chunk.isInit(chunk) : boolean >chunk.isInit : ((x: any) => this is Entry) | ((x: any) => false) >chunk : Entry | Group >isInit : ((x: any) => this is Entry) | ((x: any) => false) >chunk : Entry | Group ->chunk.c : any +>chunk.c : number >chunk : Entry ->c : any ->chunk.d : any +>c : number +>chunk.d : string >chunk : Group ->d : any +>d : string return x ->x : any +>x : string | number } /** diff --git a/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt b/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt index 8de9048f48..92cf666363 100644 --- a/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt @@ -1,9 +1,8 @@ scannerClass2.ts(1,43): error TS2304: Cannot find name 'ILogger'. scannerClass2.ts(2,37): error TS2304: Cannot find name 'ILogger'. -scannerClass2.ts(3,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. -==== scannerClass2.ts (3 errors) ==== +==== scannerClass2.ts (2 errors) ==== export class LoggerAdapter implements ILogger { ~~~~~~~ !!! error TS2304: Cannot find name 'ILogger'. @@ -11,7 +10,5 @@ scannerClass2.ts(3,18): error TS2339: Property '_information' does not exist on ~~~~~~~ !!! error TS2304: Cannot find name 'ILogger'. this._information = this.logger.information(); - ~~~~~~~~~~~~ -!!! error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt.diff new file mode 100644 index 0000000000..cd5cb048ff --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt.diff @@ -0,0 +1,21 @@ +--- old.scannerClass2.errors.txt ++++ new.scannerClass2.errors.txt +@@= skipped -0, +0 lines =@@ + scannerClass2.ts(1,43): error TS2304: Cannot find name 'ILogger'. + scannerClass2.ts(2,37): error TS2304: Cannot find name 'ILogger'. +-scannerClass2.ts(3,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. + + +-==== scannerClass2.ts (3 errors) ==== ++==== scannerClass2.ts (2 errors) ==== + export class LoggerAdapter implements ILogger { + ~~~~~~~ + !!! error TS2304: Cannot find name 'ILogger'. +@@= skipped -10, +9 lines =@@ + ~~~~~~~ + !!! error TS2304: Cannot find name 'ILogger'. + this._information = this.logger.information(); +- ~~~~~~~~~~~~ +-!!! error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. + } + } diff --git a/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols b/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols index 2cc283d643..039c2ffc14 100644 --- a/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols +++ b/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols @@ -9,7 +9,9 @@ >ILogger : Symbol(ILogger) this._information = this.logger.information(); +>this._information : Symbol(_information, Decl(scannerClass2.ts, 1, 46)) >this : Symbol(LoggerAdapter, Decl(scannerClass2.ts, 0, 0)) +>_information : Symbol(_information, Decl(scannerClass2.ts, 1, 46)) >this.logger : Symbol(logger, Decl(scannerClass2.ts, 1, 21)) >this : Symbol(LoggerAdapter, Decl(scannerClass2.ts, 0, 0)) >logger : Symbol(logger, Decl(scannerClass2.ts, 1, 21)) diff --git a/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols.diff b/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols.diff index 2145b3ee77..67848d8e3b 100644 --- a/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols.diff @@ -9,8 +9,10 @@ >ILogger : Symbol(ILogger) this._information = this.logger.information(); ++>this._information : Symbol(_information, Decl(scannerClass2.ts, 1, 46)) >this : Symbol(LoggerAdapter, Decl(scannerClass2.ts, 0, 0)) ->this.logger : Symbol(LoggerAdapter.logger, Decl(scannerClass2.ts, 1, 21)) ++>_information : Symbol(_information, Decl(scannerClass2.ts, 1, 46)) +>this.logger : Symbol(logger, Decl(scannerClass2.ts, 1, 21)) >this : Symbol(LoggerAdapter, Decl(scannerClass2.ts, 0, 0)) ->logger : Symbol(LoggerAdapter.logger, Decl(scannerClass2.ts, 1, 21)) diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.errors.txt b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.errors.txt deleted file mode 100644 index 46b1cf415f..0000000000 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.errors.txt +++ /dev/null @@ -1,33 +0,0 @@ -thisPropertyAssignmentCircular.js(3,14): error TS2339: Property 'foo' does not exist on type 'Foo'. -thisPropertyAssignmentCircular.js(6,14): error TS2339: Property 'foo' does not exist on type 'Foo'. -thisPropertyAssignmentCircular.js(6,25): error TS2339: Property 'foo' does not exist on type 'Foo'. -thisPropertyAssignmentCircular.js(9,14): error TS2339: Property 'foo' does not exist on type 'Foo'. - - -==== thisPropertyAssignmentCircular.js (4 errors) ==== - export class Foo { - constructor() { - this.foo = "Hello"; - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'Foo'. - } - slicey() { - this.foo = this.foo.slice(); - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'Foo'. - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'Foo'. - } - m() { - this.foo - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'Foo'. - } - } - - /** @class */ - function C() { - this.x = 0; - this.x = function() { this.x.toString(); } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols index 3083dc3052..2aa868c996 100644 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols @@ -6,20 +6,28 @@ export class Foo { constructor() { this.foo = "Hello"; +>this.foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) >this : Symbol(Foo, Decl(thisPropertyAssignmentCircular.js, 0, 0)) +>foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) } slicey() { >slicey : Symbol(slicey, Decl(thisPropertyAssignmentCircular.js, 3, 5)) this.foo = this.foo.slice(); +>this.foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) >this : Symbol(Foo, Decl(thisPropertyAssignmentCircular.js, 0, 0)) +>foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) +>this.foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) >this : Symbol(Foo, Decl(thisPropertyAssignmentCircular.js, 0, 0)) +>foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) } m() { >m : Symbol(m, Decl(thisPropertyAssignmentCircular.js, 6, 5)) this.foo +>this.foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) >this : Symbol(Foo, Decl(thisPropertyAssignmentCircular.js, 0, 0)) +>foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) } } diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols.diff b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols.diff index db6da26ea9..77746fee55 100644 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols.diff @@ -5,8 +5,10 @@ constructor() { this.foo = "Hello"; ->this.foo : Symbol(Foo.foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ++>this.foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) >this : Symbol(Foo, Decl(thisPropertyAssignmentCircular.js, 0, 0)) ->foo : Symbol(Foo.foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ++>foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) } slicey() { ->slicey : Symbol(Foo.slicey, Decl(thisPropertyAssignmentCircular.js, 3, 5)) @@ -14,13 +16,17 @@ this.foo = this.foo.slice(); ->this.foo : Symbol(Foo.foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ++>this.foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) >this : Symbol(Foo, Decl(thisPropertyAssignmentCircular.js, 0, 0)) ->foo : Symbol(Foo.foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ->this.foo.slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --)) ->this.foo : Symbol(Foo.foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ++>foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ++>this.foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) >this : Symbol(Foo, Decl(thisPropertyAssignmentCircular.js, 0, 0)) ->foo : Symbol(Foo.foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ->slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --)) ++>foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) } m() { ->m : Symbol(Foo.m, Decl(thisPropertyAssignmentCircular.js, 6, 5)) @@ -28,12 +34,14 @@ this.foo ->this.foo : Symbol(Foo.foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ++>this.foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) >this : Symbol(Foo, Decl(thisPropertyAssignmentCircular.js, 0, 0)) ->foo : Symbol(Foo.foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ++>foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) } } -@@= skipped -32, +22 lines =@@ +@@= skipped -32, +30 lines =@@ >C : Symbol(C, Decl(thisPropertyAssignmentCircular.js, 10, 1)) this.x = 0; diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.errors.txt b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.errors.txt new file mode 100644 index 0000000000..f482f36b24 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.errors.txt @@ -0,0 +1,28 @@ +thisPropertyAssignmentInherited.js(13,7): error TS7023: 'innerHTML' 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. +thisPropertyAssignmentInherited.js(14,25): error TS7022: 'textContent' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. + + +==== thisPropertyAssignmentInherited.js (2 errors) ==== + export class Element { + /** + * @returns {String} + */ + get textContent() { + return '' + } + set textContent(x) {} + cloneNode() { return this} + } + export class HTMLElement extends Element {} + export class TextElement extends HTMLElement { + get innerHTML() { return this.textContent; } + ~~~~~~~~~ +!!! error TS7023: 'innerHTML' 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. + set innerHTML(html) { this.textContent = html; } + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7022: 'textContent' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. + toString() { + } + } + + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.symbols b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.symbols index 728a149e64..ccad4a0f29 100644 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.symbols +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.symbols @@ -30,16 +30,16 @@ export class TextElement extends HTMLElement { get innerHTML() { return this.textContent; } >innerHTML : Symbol(innerHTML, Decl(thisPropertyAssignmentInherited.js, 11, 46), Decl(thisPropertyAssignmentInherited.js, 12, 46)) ->this.textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 0, 22), Decl(thisPropertyAssignmentInherited.js, 6, 3)) +>this.textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 13, 23)) >this : Symbol(TextElement, Decl(thisPropertyAssignmentInherited.js, 10, 43)) ->textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 0, 22), Decl(thisPropertyAssignmentInherited.js, 6, 3)) +>textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 13, 23)) set innerHTML(html) { this.textContent = html; } >innerHTML : Symbol(innerHTML, Decl(thisPropertyAssignmentInherited.js, 11, 46), Decl(thisPropertyAssignmentInherited.js, 12, 46)) >html : Symbol(html, Decl(thisPropertyAssignmentInherited.js, 13, 16)) ->this.textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 0, 22), Decl(thisPropertyAssignmentInherited.js, 6, 3)) +>this.textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 13, 23)) >this : Symbol(TextElement, Decl(thisPropertyAssignmentInherited.js, 10, 43)) ->textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 0, 22), Decl(thisPropertyAssignmentInherited.js, 6, 3)) +>textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 13, 23)) >html : Symbol(html, Decl(thisPropertyAssignmentInherited.js, 13, 16)) toString() { diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.symbols.diff b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.symbols.diff index cda53121a9..1ba792d295 100644 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.symbols.diff @@ -27,20 +27,20 @@ ->innerHTML : Symbol(TextElement.innerHTML, Decl(thisPropertyAssignmentInherited.js, 11, 46), Decl(thisPropertyAssignmentInherited.js, 12, 46)) ->this.textContent : Symbol(Element.textContent, Decl(thisPropertyAssignmentInherited.js, 0, 22), Decl(thisPropertyAssignmentInherited.js, 6, 3)) +>innerHTML : Symbol(innerHTML, Decl(thisPropertyAssignmentInherited.js, 11, 46), Decl(thisPropertyAssignmentInherited.js, 12, 46)) -+>this.textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 0, 22), Decl(thisPropertyAssignmentInherited.js, 6, 3)) ++>this.textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 13, 23)) >this : Symbol(TextElement, Decl(thisPropertyAssignmentInherited.js, 10, 43)) ->textContent : Symbol(Element.textContent, Decl(thisPropertyAssignmentInherited.js, 0, 22), Decl(thisPropertyAssignmentInherited.js, 6, 3)) -+>textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 0, 22), Decl(thisPropertyAssignmentInherited.js, 6, 3)) ++>textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 13, 23)) set innerHTML(html) { this.textContent = html; } ->innerHTML : Symbol(TextElement.innerHTML, Decl(thisPropertyAssignmentInherited.js, 11, 46), Decl(thisPropertyAssignmentInherited.js, 12, 46)) +>innerHTML : Symbol(innerHTML, Decl(thisPropertyAssignmentInherited.js, 11, 46), Decl(thisPropertyAssignmentInherited.js, 12, 46)) >html : Symbol(html, Decl(thisPropertyAssignmentInherited.js, 13, 16)) ->this.textContent : Symbol(Element.textContent, Decl(thisPropertyAssignmentInherited.js, 0, 22), Decl(thisPropertyAssignmentInherited.js, 6, 3)) -+>this.textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 0, 22), Decl(thisPropertyAssignmentInherited.js, 6, 3)) ++>this.textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 13, 23)) >this : Symbol(TextElement, Decl(thisPropertyAssignmentInherited.js, 10, 43)) ->textContent : Symbol(TextElement.textContent, Decl(thisPropertyAssignmentInherited.js, 13, 23)) -+>textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 0, 22), Decl(thisPropertyAssignmentInherited.js, 6, 3)) ++>textContent : Symbol(textContent, Decl(thisPropertyAssignmentInherited.js, 13, 23)) >html : Symbol(html, Decl(thisPropertyAssignmentInherited.js, 13, 16)) toString() { diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.types b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.types index c2d9c2495b..1ed258c2af 100644 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.types +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.types @@ -30,19 +30,19 @@ export class TextElement extends HTMLElement { >HTMLElement : HTMLElement get innerHTML() { return this.textContent; } ->innerHTML : String ->this.textContent : String +>innerHTML : any +>this.textContent : any >this : this ->textContent : String +>textContent : any set innerHTML(html) { this.textContent = html; } ->innerHTML : String ->html : String ->this.textContent = html : String ->this.textContent : String +>innerHTML : any +>html : any +>this.textContent = html : any +>this.textContent : any >this : this ->textContent : String ->html : String +>textContent : any +>html : any toString() { >toString : () => void diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyOverridesAccessors.symbols b/testdata/baselines/reference/submodule/conformance/thisPropertyOverridesAccessors.symbols index f35a5c47c0..75c4884c63 100644 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyOverridesAccessors.symbols +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyOverridesAccessors.symbols @@ -22,9 +22,9 @@ class Bar extends Foo { >super : Symbol(Foo, Decl(foo.ts, 0, 0)) this.p = 2 ->this.p : Symbol(p, Decl(foo.ts, 0, 11), Decl(foo.ts, 1, 24)) +>this.p : Symbol(p, Decl(bar.js, 2, 15)) >this : Symbol(Bar, Decl(bar.js, 0, 0)) ->p : Symbol(p, Decl(foo.ts, 0, 11), Decl(foo.ts, 1, 24)) +>p : Symbol(p, Decl(bar.js, 2, 15)) } } diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyOverridesAccessors.symbols.diff b/testdata/baselines/reference/submodule/conformance/thisPropertyOverridesAccessors.symbols.diff index 268b6fb215..b45633430b 100644 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyOverridesAccessors.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyOverridesAccessors.symbols.diff @@ -18,10 +18,10 @@ this.p = 2 ->this.p : Symbol(Bar.p, Decl(bar.js, 2, 15)) -+>this.p : Symbol(p, Decl(foo.ts, 0, 11), Decl(foo.ts, 1, 24)) ++>this.p : Symbol(p, Decl(bar.js, 2, 15)) >this : Symbol(Bar, Decl(bar.js, 0, 0)) ->p : Symbol(Bar.p, Decl(bar.js, 2, 15)) -+>p : Symbol(p, Decl(foo.ts, 0, 11), Decl(foo.ts, 1, 24)) ++>p : Symbol(p, Decl(bar.js, 2, 15)) } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromContextualThisType.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromContextualThisType.errors.txt new file mode 100644 index 0000000000..204843acf2 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/typeFromContextualThisType.errors.txt @@ -0,0 +1,24 @@ +bug25926.js(4,18): error TS7006: Parameter 'n' implicitly has an 'any' type. +bug25926.js(11,27): error TS7006: Parameter 'm' implicitly has an 'any' type. + + +==== bug25926.js (2 errors) ==== + /** @type {{ a(): void; b?(n: number): number; }} */ + const o1 = { + a() { + this.b = n => n; + ~ +!!! error TS7006: Parameter 'n' implicitly has an 'any' type. + } + }; + + /** @type {{ d(): void; e?(n: number): number; f?(n: number): number; g?: number }} */ + const o2 = { + d() { + this.e = this.f = m => this.g || m; + ~ +!!! error TS7006: Parameter 'm' implicitly has an 'any' type. + } + }; + + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typeFromContextualThisType.types b/testdata/baselines/reference/submodule/conformance/typeFromContextualThisType.types index 50cfe60739..2888b58b31 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromContextualThisType.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromContextualThisType.types @@ -10,13 +10,13 @@ const o1 = { >a : () => void this.b = n => n; ->this.b = n => n : (n: number) => number +>this.b = n => n : (n: any) => any >this.b : ((n: number) => number) | undefined >this : { a: () => void; b?: ((n: number) => number) | undefined; } >b : ((n: number) => number) | undefined ->n => n : (n: number) => number ->n : number ->n : number +>n => n : (n: any) => any +>n : any +>n : any } }; @@ -29,21 +29,21 @@ const o2 = { >d : () => void this.e = this.f = m => this.g || m; ->this.e = this.f = m => this.g || m : (m: number) => number +>this.e = this.f = m => this.g || m : (m: any) => any >this.e : ((n: number) => number) | undefined >this : { d: () => void; e?: ((n: number) => number) | undefined; f?: ((n: number) => number) | undefined; g?: number | undefined; } >e : ((n: number) => number) | undefined ->this.f = m => this.g || m : (m: number) => number +>this.f = m => this.g || m : (m: any) => any >this.f : ((n: number) => number) | undefined >this : { d: () => void; e?: ((n: number) => number) | undefined; f?: ((n: number) => number) | undefined; g?: number | undefined; } >f : ((n: number) => number) | undefined ->m => this.g || m : (m: number) => number ->m : number ->this.g || m : number +>m => this.g || m : (m: any) => any +>m : any +>this.g || m : any >this.g : number | undefined >this : { d: () => void; e?: ((n: number) => number) | undefined; f?: ((n: number) => number) | undefined; g?: number | undefined; } >g : number | undefined ->m : number +>m : any } }; diff --git a/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.errors.txt index 02ad976dc2..e8effaa456 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.errors.txt @@ -1,14 +1,9 @@ a.js(3,13): error TS2749: 'A' refers to a value, but is being used as a type here. Did you mean 'typeof A'? -b-ext.js(3,14): error TS2339: Property 'x' does not exist on type 'B'. b.js(3,13): error TS2749: 'B' refers to a value, but is being used as a type here. Did you mean 'typeof B'? c.js(3,13): error TS2749: 'C' refers to a value, but is being used as a type here. Did you mean 'typeof C'? d.js(3,13): error TS2749: 'D' refers to a value, but is being used as a type here. Did you mean 'typeof D'? -e-ext.js(3,14): error TS2339: Property 'x' does not exist on type 'E'. -e.js(4,19): error TS2339: Property 'x' does not exist on type 'E'. f.js(5,13): error TS2749: 'F' refers to a value, but is being used as a type here. Did you mean 'typeof F'? g.js(5,13): error TS2749: 'G' refers to a value, but is being used as a type here. Did you mean 'typeof G'? -h.js(3,14): error TS2339: Property 'x' does not exist on type 'H'. -h.js(8,19): error TS2339: Property 'x' does not exist on type 'H'. ==== node.d.ts (0 errors) ==== @@ -28,12 +23,10 @@ h.js(8,19): error TS2339: Property 'x' does not exist on type 'H'. !!! error TS2749: 'A' refers to a value, but is being used as a type here. Did you mean 'typeof A'? function a(p) { p.x; } -==== b-ext.js (1 errors) ==== +==== b-ext.js (0 errors) ==== exports.B = class { constructor() { this.x = 1; - ~ -!!! error TS2339: Property 'x' does not exist on type 'B'. } }; @@ -71,22 +64,18 @@ h.js(8,19): error TS2339: Property 'x' does not exist on type 'H'. !!! error TS2749: 'D' refers to a value, but is being used as a type here. Did you mean 'typeof D'? function d(p) { p.x; } -==== e-ext.js (1 errors) ==== +==== e-ext.js (0 errors) ==== export class E { constructor() { this.x = 1; - ~ -!!! error TS2339: Property 'x' does not exist on type 'E'. } } -==== e.js (1 errors) ==== +==== e.js (0 errors) ==== const { E } = require("./e-ext"); /** @param {E} p */ function e(p) { p.x; } - ~ -!!! error TS2339: Property 'x' does not exist on type 'E'. ==== f.js (1 errors) ==== var F = function () { @@ -108,16 +97,12 @@ h.js(8,19): error TS2339: Property 'x' does not exist on type 'H'. !!! error TS2749: 'G' refers to a value, but is being used as a type here. Did you mean 'typeof G'? function g(p) { p.x; } -==== h.js (2 errors) ==== +==== h.js (0 errors) ==== class H { constructor() { this.x = 1; - ~ -!!! error TS2339: Property 'x' does not exist on type 'H'. } } /** @param {H} p */ - function h(p) { p.x; } - ~ -!!! error TS2339: Property 'x' does not exist on type 'H'. \ No newline at end of file + function h(p) { p.x; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.symbols b/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.symbols index 0546668f70..0823c35805 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.symbols @@ -38,7 +38,9 @@ exports.B = class { constructor() { this.x = 1; +>this.x : Symbol(x, Decl(b-ext.js, 1, 19)) >this : Symbol(B, Decl(b-ext.js, 0, 11)) +>x : Symbol(x, Decl(b-ext.js, 1, 19)) } }; @@ -98,7 +100,9 @@ export class E { constructor() { this.x = 1; +>this.x : Symbol(x, Decl(e-ext.js, 1, 19)) >this : Symbol(E, Decl(e-ext.js, 0, 0)) +>x : Symbol(x, Decl(e-ext.js, 1, 19)) } } @@ -112,7 +116,9 @@ const { E } = require("./e-ext"); function e(p) { p.x; } >e : Symbol(e, Decl(e.js, 0, 33)) >p : Symbol(p, Decl(e.js, 3, 11)) +>p.x : Symbol(x, Decl(e-ext.js, 1, 19)) >p : Symbol(p, Decl(e.js, 3, 11)) +>x : Symbol(x, Decl(e-ext.js, 1, 19)) === f.js === var F = function () { @@ -146,7 +152,9 @@ class H { constructor() { this.x = 1; +>this.x : Symbol(x, Decl(h.js, 1, 19)) >this : Symbol(H, Decl(h.js, 0, 0)) +>x : Symbol(x, Decl(h.js, 1, 19)) } } @@ -154,5 +162,7 @@ class H { function h(p) { p.x; } >h : Symbol(h, Decl(h.js, 4, 1)) >p : Symbol(p, Decl(h.js, 7, 11)) +>p.x : Symbol(x, Decl(h.js, 1, 19)) >p : Symbol(p, Decl(h.js, 7, 11)) +>x : Symbol(x, Decl(h.js, 1, 19)) diff --git a/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.symbols.diff index ec5bd3ddee..4722c4ebb9 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.symbols.diff @@ -34,12 +34,14 @@ constructor() { this.x = 1; ->this.x : Symbol(B.x, Decl(b-ext.js, 1, 19)) ++>this.x : Symbol(x, Decl(b-ext.js, 1, 19)) >this : Symbol(B, Decl(b-ext.js, 0, 11)) ->x : Symbol(B.x, Decl(b-ext.js, 1, 19)) ++>x : Symbol(x, Decl(b-ext.js, 1, 19)) } }; -@@= skipped -28, +24 lines =@@ +@@= skipped -28, +26 lines =@@ function b(p) { p.x; } >b : Symbol(b, Decl(b.js, 0, 33)) >p : Symbol(p, Decl(b.js, 3, 11)) @@ -93,18 +95,22 @@ constructor() { this.x = 1; ->this.x : Symbol(E.x, Decl(e-ext.js, 1, 19)) ++>this.x : Symbol(x, Decl(e-ext.js, 1, 19)) >this : Symbol(E, Decl(e-ext.js, 0, 0)) ->x : Symbol(E.x, Decl(e-ext.js, 1, 19)) ++>x : Symbol(x, Decl(e-ext.js, 1, 19)) } } -@@= skipped -16, +14 lines =@@ +@@= skipped -16, +16 lines =@@ function e(p) { p.x; } >e : Symbol(e, Decl(e.js, 0, 33)) >p : Symbol(p, Decl(e.js, 3, 11)) ->p.x : Symbol(E.x, Decl(e-ext.js, 1, 19)) ++>p.x : Symbol(x, Decl(e-ext.js, 1, 19)) >p : Symbol(p, Decl(e.js, 3, 11)) ->x : Symbol(E.x, Decl(e-ext.js, 1, 19)) ++>x : Symbol(x, Decl(e-ext.js, 1, 19)) === f.js === var F = function () { @@ -145,21 +151,25 @@ === h.js === class H { -@@= skipped -47, +34 lines =@@ +@@= skipped -47, +36 lines =@@ constructor() { this.x = 1; ->this.x : Symbol(H.x, Decl(h.js, 1, 19)) ++>this.x : Symbol(x, Decl(h.js, 1, 19)) >this : Symbol(H, Decl(h.js, 0, 0)) ->x : Symbol(H.x, Decl(h.js, 1, 19)) ++>x : Symbol(x, Decl(h.js, 1, 19)) } } -@@= skipped -10, +8 lines =@@ +@@= skipped -10, +10 lines =@@ function h(p) { p.x; } >h : Symbol(h, Decl(h.js, 4, 1)) >p : Symbol(p, Decl(h.js, 7, 11)) ->p.x : Symbol(H.x, Decl(h.js, 1, 19)) ++>p.x : Symbol(x, Decl(h.js, 1, 19)) >p : Symbol(p, Decl(h.js, 7, 11)) ->x : Symbol(H.x, Decl(h.js, 1, 19)) ++>x : Symbol(x, Decl(h.js, 1, 19)) diff --git a/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.types b/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.types index f3a738cd84..dc6ac8e7e5 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromParamTagForFunction.types @@ -52,9 +52,9 @@ exports.B = class { constructor() { this.x = 1; >this.x = 1 : 1 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >1 : 1 } }; @@ -137,9 +137,9 @@ export class E { constructor() { this.x = 1; >this.x = 1 : 1 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >1 : 1 } } @@ -155,9 +155,9 @@ const { E } = require("./e-ext"); function e(p) { p.x; } >e : (p: E) => void >p : E ->p.x : any +>p.x : number >p : E ->x : any +>x : number === f.js === var F = function () { @@ -208,9 +208,9 @@ class H { constructor() { this.x = 1; >this.x = 1 : 1 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >1 : 1 } } @@ -219,7 +219,7 @@ class H { function h(p) { p.x; } >h : (p: H) => void >p : H ->p.x : any +>p.x : number >p : H ->x : any +>x : number diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.errors.txt index 12557bce5a..c21a2f0d69 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.errors.txt @@ -1,12 +1,11 @@ main.js(4,12): error TS2503: Cannot find namespace 'Outer'. -someview.js(10,14): error TS2339: Property 'y' does not exist on type 'Inner'. ==== module.js (0 errors) ==== var Outer = Outer || {}; Outer.app = Outer.app || {}; -==== someview.js (1 errors) ==== +==== someview.js (0 errors) ==== Outer.app.SomeView = (function () { var SomeView = function() { var me = this; @@ -17,8 +16,6 @@ someview.js(10,14): error TS2339: Property 'y' does not exist on type 'Inner'. constructor() { /** @type {number} */ this.y = 12; - ~ -!!! error TS2339: Property 'y' does not exist on type 'Inner'. } } var example = new Outer.app.Inner(); diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.symbols b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.symbols index 245814017b..3ec750850b 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.symbols @@ -29,7 +29,9 @@ Outer.app.Inner = class { constructor() { /** @type {number} */ this.y = 12; +>this.y : Symbol(y, Decl(someview.js, 7, 19)) >this : Symbol(Inner, Decl(someview.js, 6, 17)) +>y : Symbol(y, Decl(someview.js, 7, 19)) } } var example = new Outer.app.Inner(); diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.symbols.diff index 44b0b2ebd1..9dafaf6ac7 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.symbols.diff @@ -45,8 +45,10 @@ /** @type {number} */ this.y = 12; ->this.y : Symbol(Inner.y, Decl(someview.js, 7, 19)) ++>this.y : Symbol(y, Decl(someview.js, 7, 19)) >this : Symbol(Inner, Decl(someview.js, 6, 17)) ->y : Symbol(Inner.y, Decl(someview.js, 7, 19)) ++>y : Symbol(y, Decl(someview.js, 7, 19)) } } var example = new Outer.app.Inner(); @@ -74,7 +76,7 @@ >k : Symbol(k, Decl(someview.js, 15, 32)) return k ** k; -@@= skipped -42, +26 lines =@@ +@@= skipped -42, +28 lines =@@ } === application.js === Outer.app.Application = (function () { diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.types index 67ced614c7..7363d5cd1e 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.types @@ -55,9 +55,9 @@ Outer.app.Inner = class { /** @type {number} */ this.y = 12; >this.y = 12 : 12 ->this.y : any +>this.y : number >this : this ->y : any +>y : number >12 : 12 } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.errors.txt index 4c083f927a..4bad2fe72d 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.errors.txt @@ -1,12 +1,11 @@ main.js(4,12): error TS2503: Cannot find namespace 'Outer'. -someview.js(10,14): error TS2339: Property 'y' does not exist on type 'Inner'. ==== module.js (0 errors) ==== var Outer = Outer ?? {}; Outer.app = Outer.app ?? {}; -==== someview.js (1 errors) ==== +==== someview.js (0 errors) ==== Outer.app.SomeView = (function () { var SomeView = function() { var me = this; @@ -17,8 +16,6 @@ someview.js(10,14): error TS2339: Property 'y' does not exist on type 'Inner'. constructor() { /** @type {number} */ this.y = 12; - ~ -!!! error TS2339: Property 'y' does not exist on type 'Inner'. } } var example = new Outer.app.Inner(); diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.symbols b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.symbols index 63081f04a6..6ff0c255e4 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.symbols @@ -29,7 +29,9 @@ Outer.app.Inner = class { constructor() { /** @type {number} */ this.y = 12; +>this.y : Symbol(y, Decl(someview.js, 7, 19)) >this : Symbol(Inner, Decl(someview.js, 6, 17)) +>y : Symbol(y, Decl(someview.js, 7, 19)) } } var example = new Outer.app.Inner(); diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.symbols.diff index 0f305687de..95e8553763 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.symbols.diff @@ -45,8 +45,10 @@ /** @type {number} */ this.y = 12; ->this.y : Symbol(Inner.y, Decl(someview.js, 7, 19)) ++>this.y : Symbol(y, Decl(someview.js, 7, 19)) >this : Symbol(Inner, Decl(someview.js, 6, 17)) ->y : Symbol(Inner.y, Decl(someview.js, 7, 19)) ++>y : Symbol(y, Decl(someview.js, 7, 19)) } } var example = new Outer.app.Inner(); @@ -74,7 +76,7 @@ >k : Symbol(k, Decl(someview.js, 15, 32)) return k ** k; -@@= skipped -42, +26 lines =@@ +@@= skipped -42, +28 lines =@@ } === application.js === Outer.app.Application = (function () { diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.types index ddca325660..0c16f71985 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.types @@ -55,9 +55,9 @@ Outer.app.Inner = class { /** @type {number} */ this.y = 12; >this.y = 12 : 12 ->this.y : any +>this.y : number >this : this ->y : any +>y : number >12 : 12 } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.errors.txt index fb4921e205..80ee28806b 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.errors.txt @@ -1,10 +1,9 @@ a.js(3,7): error TS2339: Property 'Inner' does not exist on type '{}'. -a.js(5,14): error TS2339: Property 'x' does not exist on type 'Inner'. a.js(10,12): error TS2503: Cannot find namespace 'Outer'. a.js(14,22): error TS2339: Property 'Inner' does not exist on type '{}'. -==== a.js (4 errors) ==== +==== a.js (3 errors) ==== var Outer = {}; Outer.Inner = class { @@ -12,8 +11,6 @@ a.js(14,22): error TS2339: Property 'Inner' does not exist on type '{}'. !!! error TS2339: Property 'Inner' does not exist on type '{}'. constructor() { this.x = 1 - ~ -!!! error TS2339: Property 'x' does not exist on type 'Inner'. } m() { } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.symbols b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.symbols index 82a5049f1d..b72639295b 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.symbols @@ -9,7 +9,9 @@ Outer.Inner = class { constructor() { this.x = 1 +>this.x : Symbol(x, Decl(a.js, 3, 19)) >this : Symbol(Inner, Decl(a.js, 2, 13)) +>x : Symbol(x, Decl(a.js, 3, 19)) } m() { } >m : Symbol(m, Decl(a.js, 5, 5)) diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.symbols.diff index 81f9e7b249..78b65ebd12 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.symbols.diff @@ -16,8 +16,10 @@ constructor() { this.x = 1 ->this.x : Symbol(Inner.x, Decl(a.js, 3, 19)) ++>this.x : Symbol(x, Decl(a.js, 3, 19)) >this : Symbol(Inner, Decl(a.js, 2, 13)) ->x : Symbol(Inner.x, Decl(a.js, 3, 19)) ++>x : Symbol(x, Decl(a.js, 3, 19)) } m() { } ->m : Symbol(Inner.m, Decl(a.js, 5, 5)) @@ -25,7 +27,7 @@ } /** @type {Outer.Inner} */ -@@= skipped -22, +18 lines =@@ +@@= skipped -22, +20 lines =@@ >inner : Symbol(inner, Decl(a.js, 10, 3)) inner.x diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.types index e7fe47d659..e709df1c8b 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment15.types @@ -15,9 +15,9 @@ Outer.Inner = class { constructor() { this.x = 1 >this.x = 1 : 1 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >1 : 1 } m() { } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.errors.txt index 8cb50e996a..6226eec805 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.errors.txt @@ -1,17 +1,14 @@ -a.js(6,14): error TS2339: Property 'x' does not exist on type 'I'. a.js(9,12): error TS2749: 'Outer' refers to a value, but is being used as a type here. Did you mean 'typeof Outer'? a.js(12,12): error TS2503: Cannot find namespace 'Outer'. -==== a.js (3 errors) ==== +==== a.js (2 errors) ==== function Outer() { this.y = 2 } Outer.Inner = class I { constructor() { this.x = 1 - ~ -!!! error TS2339: Property 'x' does not exist on type 'I'. } } /** @type {Outer} */ diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.symbols b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.symbols index 41f1079b35..284b3190e6 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.symbols @@ -14,7 +14,9 @@ Outer.Inner = class I { constructor() { this.x = 1 +>this.x : Symbol(x, Decl(a.js, 4, 19)) >this : Symbol(I, Decl(a.js, 3, 13)) +>x : Symbol(x, Decl(a.js, 4, 19)) } } /** @type {Outer} */ diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.symbols.diff index c4d72be909..886dcf9a29 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.symbols.diff @@ -24,12 +24,14 @@ constructor() { this.x = 1 ->this.x : Symbol(I.x, Decl(a.js, 4, 19)) ++>this.x : Symbol(x, Decl(a.js, 4, 19)) >this : Symbol(I, Decl(a.js, 3, 13)) ->x : Symbol(I.x, Decl(a.js, 4, 19)) ++>x : Symbol(x, Decl(a.js, 4, 19)) } } /** @type {Outer} */ -@@= skipped -25, +20 lines =@@ +@@= skipped -25, +22 lines =@@ >ok : Symbol(ok, Decl(a.js, 9, 3)) ok.y diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.types index 5d2d486285..1eec3db803 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment2.types @@ -22,9 +22,9 @@ Outer.Inner = class I { constructor() { this.x = 1 >this.x = 1 : 1 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.errors.txt index 71b92542fe..6db0b0a65a 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.errors.txt @@ -1,14 +1,11 @@ -a.js(3,14): error TS2339: Property 'n' does not exist on type 'B'. a.js(23,18): error TS2339: Property 'identifier' does not exist on type 'Module'. a.js(24,18): error TS2339: Property 'size' does not exist on type 'Module'. -==== a.js (3 errors) ==== +==== a.js (2 errors) ==== class B { constructor () { this.n = 1 - ~ -!!! error TS2339: Property 'n' does not exist on type 'B'. } foo() { } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.symbols b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.symbols index edf27e33b0..12b378454d 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.symbols @@ -6,7 +6,9 @@ class B { constructor () { this.n = 1 +>this.n : Symbol(n, Decl(a.js, 1, 20)) >this : Symbol(B, Decl(a.js, 0, 0)) +>n : Symbol(n, Decl(a.js, 1, 20)) } foo() { >foo : Symbol(foo, Decl(a.js, 3, 5)) diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.symbols.diff index d360f0b292..8a864f54f7 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.symbols.diff @@ -5,8 +5,10 @@ constructor () { this.n = 1 ->this.n : Symbol(B.n, Decl(a.js, 1, 20)) ++>this.n : Symbol(n, Decl(a.js, 1, 20)) >this : Symbol(B, Decl(a.js, 0, 0)) ->n : Symbol(B.n, Decl(a.js, 1, 20)) ++>n : Symbol(n, Decl(a.js, 1, 20)) } foo() { ->foo : Symbol(B.foo, Decl(a.js, 3, 5)) @@ -14,7 +16,7 @@ } } -@@= skipped -15, +13 lines =@@ +@@= skipped -15, +15 lines =@@ // this override should be fine (even if it's a little odd) C.prototype.foo = function() { diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.types index 6e83a0b9b0..df7e6a503a 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment23.types @@ -7,9 +7,9 @@ class B { constructor () { this.n = 1 >this.n = 1 : 1 ->this.n : any +>this.n : number >this : this ->n : any +>n : number >1 : 1 } foo() { diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.errors.txt index f186f4cf4a..9e77b28dc2 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.errors.txt @@ -1,21 +1,17 @@ bug24703.js(2,8): error TS2339: Property 'I' does not exist on type '{}'. -bug24703.js(4,14): error TS2339: Property 'i' does not exist on type 'I'. bug24703.js(7,8): error TS2339: Property 'O' does not exist on type '{}'. bug24703.js(7,33): error TS2339: Property 'I' does not exist on type '{}'. -bug24703.js(10,14): error TS2339: Property 'o' does not exist on type 'O'. bug24703.js(13,20): error TS2339: Property 'O' does not exist on type '{}'. bug24703.js(14,20): error TS2339: Property 'I' does not exist on type '{}'. -==== bug24703.js (7 errors) ==== +==== bug24703.js (5 errors) ==== var Common = {}; Common.I = class { ~ !!! error TS2339: Property 'I' does not exist on type '{}'. constructor() { this.i = 1 - ~ -!!! error TS2339: Property 'i' does not exist on type 'I'. } } Common.O = class extends Common.I { @@ -26,8 +22,6 @@ bug24703.js(14,20): error TS2339: Property 'I' does not exist on type '{}'. constructor() { super() this.o = 2 - ~ -!!! error TS2339: Property 'o' does not exist on type 'O'. } } var o = new Common.O() diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.symbols b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.symbols index cf3b688388..43bb363825 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.symbols @@ -9,7 +9,9 @@ Common.I = class { constructor() { this.i = 1 +>this.i : Symbol(i, Decl(bug24703.js, 2, 19)) >this : Symbol(I, Decl(bug24703.js, 1, 10)) +>i : Symbol(i, Decl(bug24703.js, 2, 19)) } } Common.O = class extends Common.I { @@ -19,7 +21,9 @@ Common.O = class extends Common.I { constructor() { super() this.o = 2 +>this.o : Symbol(o, Decl(bug24703.js, 8, 15)) >this : Symbol(O, Decl(bug24703.js, 6, 10)) +>o : Symbol(o, Decl(bug24703.js, 8, 15)) } } var o = new Common.O() diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.symbols.diff index 8bbb074aca..3bc8b79490 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.symbols.diff @@ -16,8 +16,10 @@ constructor() { this.i = 1 ->this.i : Symbol(I.i, Decl(bug24703.js, 2, 19)) ++>this.i : Symbol(i, Decl(bug24703.js, 2, 19)) >this : Symbol(I, Decl(bug24703.js, 1, 10)) ->i : Symbol(I.i, Decl(bug24703.js, 2, 19)) ++>i : Symbol(i, Decl(bug24703.js, 2, 19)) } } Common.O = class extends Common.I { @@ -36,8 +38,10 @@ - this.o = 2 ->this.o : Symbol(O.o, Decl(bug24703.js, 8, 15)) ++>this.o : Symbol(o, Decl(bug24703.js, 8, 15)) >this : Symbol(O, Decl(bug24703.js, 6, 10)) ->o : Symbol(O.o, Decl(bug24703.js, 8, 15)) ++>o : Symbol(o, Decl(bug24703.js, 8, 15)) } } var o = new Common.O() diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.types index 115c097f11..d5060eb909 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment25.types @@ -15,9 +15,9 @@ Common.I = class { constructor() { this.i = 1 >this.i = 1 : 1 ->this.i : any +>this.i : number >this : this ->i : any +>i : number >1 : 1 } } @@ -38,9 +38,9 @@ Common.O = class extends Common.I { this.o = 2 >this.o = 2 : 2 ->this.o : any +>this.o : number >this : this ->o : any +>o : number >2 : 2 } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.errors.txt index 7b2ad59df7..0364a0e7ca 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.errors.txt @@ -1,5 +1,4 @@ bug24730.js(2,4): error TS2339: Property 'TreeElement' does not exist on type '{}'. -bug24730.js(4,14): error TS2339: Property 'treeOutline' does not exist on type 'TreeElement'. bug24730.js(7,4): error TS2339: Property 'context' does not exist on type '{}'. bug24730.js(7,21): error TS2339: Property 'TreeElement' does not exist on type '{}'. bug24730.js(9,20): error TS2339: Property 'TreeElement' does not exist on type '{}'. @@ -7,15 +6,13 @@ bug24730.js(11,14): error TS2339: Property 'doesNotExist' does not exist on type bug24730.js(12,14): error TS2339: Property 'treeOutline' does not exist on type 'C'. -==== bug24730.js (7 errors) ==== +==== bug24730.js (6 errors) ==== var UI = {} UI.TreeElement = class { ~~~~~~~~~~~ !!! error TS2339: Property 'TreeElement' does not exist on type '{}'. constructor() { this.treeOutline = 12 - ~~~~~~~~~~~ -!!! error TS2339: Property 'treeOutline' does not exist on type 'TreeElement'. } }; UI.context = new UI.TreeElement() diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.symbols b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.symbols index 7ce203f8cb..cf4fb9c73c 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.symbols @@ -9,7 +9,9 @@ UI.TreeElement = class { constructor() { this.treeOutline = 12 +>this.treeOutline : Symbol(treeOutline, Decl(bug24730.js, 2, 19)) >this : Symbol(TreeElement, Decl(bug24730.js, 1, 16)) +>treeOutline : Symbol(treeOutline, Decl(bug24730.js, 2, 19)) } }; UI.context = new UI.TreeElement() diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.symbols.diff index 39ab15063c..3bf7701059 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.symbols.diff @@ -16,8 +16,10 @@ constructor() { this.treeOutline = 12 ->this.treeOutline : Symbol(TreeElement.treeOutline, Decl(bug24730.js, 2, 19)) ++>this.treeOutline : Symbol(treeOutline, Decl(bug24730.js, 2, 19)) >this : Symbol(TreeElement, Decl(bug24730.js, 1, 16)) ->treeOutline : Symbol(TreeElement.treeOutline, Decl(bug24730.js, 2, 19)) ++>treeOutline : Symbol(treeOutline, Decl(bug24730.js, 2, 19)) } }; UI.context = new UI.TreeElement() diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.types index 2cb2a3dc86..e8f5b7d6b0 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment26.types @@ -15,9 +15,9 @@ UI.TreeElement = class { constructor() { this.treeOutline = 12 >this.treeOutline = 12 : 12 ->this.treeOutline : any +>this.treeOutline : number >this : this ->treeOutline : any +>treeOutline : number >12 : 12 } }; diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.errors.txt index e458c31d4a..5d83645e1e 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.errors.txt @@ -1,23 +1,20 @@ -a.js(2,32): error TS2339: Property 'p' does not exist on type 'C'. -a.js(10,3): error TS2339: Property 'p' does not exist on type 'C'. +a.js(7,17): error TS2353: Object literal may only specify known properties, and 'q' does not exist in type 'C'. a.js(11,3): error TS2339: Property 'q' does not exist on type 'C'. -==== a.js (3 errors) ==== +==== a.js (2 errors) ==== // mixed prototype-assignment+class declaration class C { constructor() { this.p = 1; } } - ~ -!!! error TS2339: Property 'p' does not exist on type 'C'. // Property assignment does nothing. // You have to use Object.defineProperty(C, "prototype", { q: 2 }) // and that only works on classes with no superclass. // (Object.defineProperty isn't recognised as a JS special assignment right now.) C.prototype = { q: 2 }; + ~ +!!! error TS2353: Object literal may only specify known properties, and 'q' does not exist in type 'C'. const c = new C() c.p - ~ -!!! error TS2339: Property 'p' does not exist on type 'C'. c.q ~ !!! error TS2339: Property 'q' does not exist on type 'C'. diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.symbols b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.symbols index 93cbd1f400..63ba4b054b 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.symbols @@ -4,7 +4,9 @@ // mixed prototype-assignment+class declaration class C { constructor() { this.p = 1; } } >C : Symbol(C, Decl(a.js, 0, 0)) +>this.p : Symbol(p, Decl(a.js, 1, 25)) >this : Symbol(C, Decl(a.js, 0, 0)) +>p : Symbol(p, Decl(a.js, 1, 25)) // Property assignment does nothing. // You have to use Object.defineProperty(C, "prototype", { q: 2 }) @@ -21,7 +23,9 @@ const c = new C() >C : Symbol(C, Decl(a.js, 0, 0)) c.p +>c.p : Symbol(p, Decl(a.js, 1, 25)) >c : Symbol(c, Decl(a.js, 8, 5)) +>p : Symbol(p, Decl(a.js, 1, 25)) c.q >c : Symbol(c, Decl(a.js, 8, 5)) diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.symbols.diff index 3af9919a45..64d6a51d55 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.symbols.diff @@ -9,7 +9,9 @@ ->this : Symbol(C, Decl(a.js, 0, 0), Decl(a.js, 1, 41)) ->p : Symbol(C.p, Decl(a.js, 1, 25)) +>C : Symbol(C, Decl(a.js, 0, 0)) ++>this.p : Symbol(p, Decl(a.js, 1, 25)) +>this : Symbol(C, Decl(a.js, 0, 0)) ++>p : Symbol(p, Decl(a.js, 1, 25)) // Property assignment does nothing. // You have to use Object.defineProperty(C, "prototype", { q: 2 }) @@ -31,8 +33,10 @@ c.p ->c.p : Symbol(C.p, Decl(a.js, 1, 25)) ++>c.p : Symbol(p, Decl(a.js, 1, 25)) >c : Symbol(c, Decl(a.js, 8, 5)) ->p : Symbol(C.p, Decl(a.js, 1, 25)) ++>p : Symbol(p, Decl(a.js, 1, 25)) c.q >c : Symbol(c, Decl(a.js, 8, 5)) diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.types index 26dfba157c..cbb7b8cbf3 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment28.types @@ -5,9 +5,9 @@ class C { constructor() { this.p = 1; } } >C : C >this.p = 1 : 1 ->this.p : any +>this.p : number >this : this ->p : any +>p : number >1 : 1 // Property assignment does nothing. @@ -29,9 +29,9 @@ const c = new C() >C : typeof C c.p ->c.p : any +>c.p : number >c : C ->p : any +>p : number c.q >c.q : any diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.errors.txt index f02f8f9f4d..c20cd846a1 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.errors.txt @@ -1,10 +1,9 @@ a.js(4,7): error TS2339: Property 'Inner' does not exist on type '() => void'. -a.js(6,14): error TS2339: Property 'x' does not exist on type 'I'. a.js(9,12): error TS2749: 'Outer' refers to a value, but is being used as a type here. Did you mean 'typeof Outer'? a.js(12,12): error TS2503: Cannot find namespace 'Outer'. -==== a.js (4 errors) ==== +==== a.js (3 errors) ==== var Outer = function O() { this.y = 2 } @@ -13,8 +12,6 @@ a.js(12,12): error TS2503: Cannot find namespace 'Outer'. !!! error TS2339: Property 'Inner' does not exist on type '() => void'. constructor() { this.x = 1 - ~ -!!! error TS2339: Property 'x' does not exist on type 'I'. } } /** @type {Outer} */ diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.symbols b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.symbols index 8ae2703315..d1ec3c0cea 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.symbols @@ -13,7 +13,9 @@ Outer.Inner = class I { constructor() { this.x = 1 +>this.x : Symbol(x, Decl(a.js, 4, 19)) >this : Symbol(I, Decl(a.js, 3, 13)) +>x : Symbol(x, Decl(a.js, 4, 19)) } } /** @type {Outer} */ diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.symbols.diff index 4cc9c15a50..ddb6ab8135 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.symbols.diff @@ -23,12 +23,14 @@ constructor() { this.x = 1 ->this.x : Symbol(I.x, Decl(a.js, 4, 19)) ++>this.x : Symbol(x, Decl(a.js, 4, 19)) >this : Symbol(I, Decl(a.js, 3, 13)) ->x : Symbol(I.x, Decl(a.js, 4, 19)) ++>x : Symbol(x, Decl(a.js, 4, 19)) } } /** @type {Outer} */ -@@= skipped -26, +19 lines =@@ +@@= skipped -26, +21 lines =@@ >ja : Symbol(ja, Decl(a.js, 9, 3)) ja.y diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.types index 66b50f5dd7..59ead3dd20 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment3.types @@ -24,9 +24,9 @@ Outer.Inner = class I { constructor() { this.x = 1 >this.x = 1 : 1 ->this.x : any +>this.x : number >this : this ->x : any +>x : number >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.errors.txt index 13dca3e156..5b0afce0fd 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.errors.txt @@ -2,11 +2,10 @@ bug26877.js(1,13): error TS2503: Cannot find namespace 'Emu'. bug26877.js(4,23): error TS2339: Property 'D' does not exist on type '{}'. bug26877.js(5,19): error TS2339: Property 'D' does not exist on type '{}'. bug26877.js(7,5): error TS2339: Property 'D' does not exist on type '{}'. -bug26877.js(9,14): error TS2339: Property '_model' does not exist on type 'D'. second.js(3,5): error TS2339: Property 'D' does not exist on type '{}'. -==== bug26877.js (5 errors) ==== +==== bug26877.js (4 errors) ==== /** @param {Emu.D} x */ ~~~ !!! error TS2503: Cannot find namespace 'Emu'. @@ -24,8 +23,6 @@ second.js(3,5): error TS2339: Property 'D' does not exist on type '{}'. !!! error TS2339: Property 'D' does not exist on type '{}'. constructor() { this._model = 1 - ~~~~~~ -!!! error TS2339: Property '_model' does not exist on type 'D'. } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.symbols b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.symbols index c05ee1d298..9a198b939d 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.symbols @@ -22,7 +22,9 @@ Emu.D = class { constructor() { this._model = 1 +>this._model : Symbol(_model, Decl(bug26877.js, 7, 19)) >this : Symbol(D, Decl(bug26877.js, 6, 7)) +>_model : Symbol(_model, Decl(bug26877.js, 7, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.symbols.diff index aefc2a1a08..38521c2bf4 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.symbols.diff @@ -33,8 +33,10 @@ constructor() { this._model = 1 ->this._model : Symbol(D._model, Decl(bug26877.js, 7, 19)) ++>this._model : Symbol(_model, Decl(bug26877.js, 7, 19)) >this : Symbol(D, Decl(bug26877.js, 6, 7)) ->_model : Symbol(D._model, Decl(bug26877.js, 7, 19)) ++>_model : Symbol(_model, Decl(bug26877.js, 7, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.types index 1bac114802..8d338e2403 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment35.types @@ -36,9 +36,9 @@ Emu.D = class { constructor() { this._model = 1 >this._model = 1 : 1 ->this._model : any +>this._model : number >this : this ->_model : any +>_model : number >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.errors.txt index 3b644b682e..1b87c06947 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.errors.txt @@ -1,5 +1,4 @@ a.js(1,7): error TS2339: Property 'Inner' does not exist on type '{}'. -a.js(4,14): error TS2339: Property 'y' does not exist on type 'Inner'. a.js(8,12): error TS2503: Cannot find namespace 'Outer'. a.js(11,23): error TS2339: Property 'Inner' does not exist on type '{}'. b.js(1,12): error TS2503: Cannot find namespace 'Outer'. @@ -9,15 +8,13 @@ b.js(4,19): error TS2339: Property 'Inner' does not exist on type '{}'. ==== def.js (0 errors) ==== var Outer = {}; -==== a.js (4 errors) ==== +==== a.js (3 errors) ==== Outer.Inner = class { ~~~~~ !!! error TS2339: Property 'Inner' does not exist on type '{}'. constructor() { /** @type {number} */ this.y = 12 - ~ -!!! error TS2339: Property 'y' does not exist on type 'Inner'. } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.symbols b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.symbols index e43878404f..8dc72ff9e5 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.symbols @@ -11,7 +11,9 @@ Outer.Inner = class { constructor() { /** @type {number} */ this.y = 12 +>this.y : Symbol(y, Decl(a.js, 1, 19)) >this : Symbol(Inner, Decl(a.js, 0, 13)) +>y : Symbol(y, Decl(a.js, 1, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.symbols.diff index 4d4bc9d648..1e15658809 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.symbols.diff @@ -18,12 +18,14 @@ /** @type {number} */ this.y = 12 ->this.y : Symbol(Inner.y, Decl(a.js, 1, 19)) ++>this.y : Symbol(y, Decl(a.js, 1, 19)) >this : Symbol(Inner, Decl(a.js, 0, 13)) ->y : Symbol(Inner.y, Decl(a.js, 1, 19)) ++>y : Symbol(y, Decl(a.js, 1, 19)) } } -@@= skipped -22, +18 lines =@@ +@@= skipped -22, +20 lines =@@ >local : Symbol(local, Decl(a.js, 8, 3)) local.y diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.types index a431f9b7a0..bb86ae2b3b 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.types @@ -17,9 +17,9 @@ Outer.Inner = class { /** @type {number} */ this.y = 12 >this.y = 12 : 12 ->this.y : any +>this.y : number >this : this ->y : any +>y : number >12 : 12 } } diff --git a/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt b/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt index f2f7d82423..392b07ceef 100644 --- a/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt @@ -1,11 +1,8 @@ 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'. -typeRelationships.ts(35,9): error TS2739: Type 'C' is missing the following properties from type 'D': self1, self2, self3, d, bar -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'. -==== typeRelationships.ts (3 errors) ==== +==== typeRelationships.ts (1 errors) ==== class C { self = this; c = new C(); @@ -44,12 +41,7 @@ typeRelationships.ts(36,9): error TS2322: Type 'D' is not assignable to type 'th 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 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/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt.diff new file mode 100644 index 0000000000..b18942bf28 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt.diff @@ -0,0 +1,28 @@ +--- old.typeRelationships.errors.txt ++++ new.typeRelationships.errors.txt +@@= skipped -0, +0 lines =@@ + 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'. +-typeRelationships.ts(35,9): error TS2739: Type 'C' is missing the following properties from type 'D': self1, self2, self3, d, bar +-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'. + + +-==== typeRelationships.ts (3 errors) ==== ++==== typeRelationships.ts (1 errors) ==== + class C { + self = this; + c = new C(); +@@= skipped -43, +40 lines =@@ + 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 + 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/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols b/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols index f556aa23b3..ffb87d9a37 100644 --- a/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols @@ -87,9 +87,9 @@ class D extends C { self2 = this.self; >self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) ->this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) self3 = this.foo(); >self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) @@ -105,25 +105,25 @@ class D extends C { >bar : Symbol(bar, Decl(typeRelationships.ts, 25, 16)) this.self = this.self1; ->this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this.self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) this.self = this.self2; ->this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this.self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) this.self = this.self3; ->this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this.self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) @@ -132,54 +132,54 @@ class D extends C { >this.self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) ->this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) this.self2 = this.self; >this.self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) ->this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) this.self3 = this.self; >this.self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) ->this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) this.d = this.self; >this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) ->this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) this.d = this.c; // Error >this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) ->this.c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) +>this.c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) +>c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) this.self = this.d; // Error ->this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) this.c = this.d; ->this.c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) +>this.c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) +>c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) >this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) diff --git a/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols.diff index 82f312e4ba..ae84f28578 100644 --- a/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols.diff @@ -109,10 +109,10 @@ ->self2 : Symbol(D.self2, Decl(typeRelationships.ts, 22, 17)) ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) +>self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) self3 = this.foo(); ->self3 : Symbol(D.self3, Decl(typeRelationships.ts, 23, 22)) @@ -134,11 +134,11 @@ this.self = this.self1; ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) ->this.self1 : Symbol(D.self1, Decl(typeRelationships.ts, 21, 19)) -+>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self1 : Symbol(D.self1, Decl(typeRelationships.ts, 21, 19)) @@ -146,11 +146,11 @@ this.self = this.self2; ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) ->this.self2 : Symbol(D.self2, Decl(typeRelationships.ts, 22, 17)) -+>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self2 : Symbol(D.self2, Decl(typeRelationships.ts, 22, 17)) @@ -158,11 +158,11 @@ this.self = this.self3; ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) ->this.self3 : Symbol(D.self3, Decl(typeRelationships.ts, 23, 22)) -+>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self3 : Symbol(D.self3, Decl(typeRelationships.ts, 23, 22)) @@ -175,10 +175,10 @@ ->self1 : Symbol(D.self1, Decl(typeRelationships.ts, 21, 19)) ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) +>self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) this.self2 = this.self; ->this.self2 : Symbol(D.self2, Decl(typeRelationships.ts, 22, 17)) @@ -187,10 +187,10 @@ ->self2 : Symbol(D.self2, Decl(typeRelationships.ts, 22, 17)) ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) +>self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) this.self3 = this.self; ->this.self3 : Symbol(D.self3, Decl(typeRelationships.ts, 23, 22)) @@ -199,10 +199,10 @@ ->self3 : Symbol(D.self3, Decl(typeRelationships.ts, 23, 22)) ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) +>self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) this.d = this.self; ->this.d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) @@ -211,10 +211,10 @@ ->d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) +>d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) this.d = this.c; // Error ->this.d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) @@ -223,18 +223,18 @@ ->d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) ->this.c : Symbol(C.c, Decl(typeRelationships.ts, 1, 16)) +>d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) -+>this.c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) ++>this.c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->c : Symbol(C.c, Decl(typeRelationships.ts, 1, 16)) -+>c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) ++>c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) this.self = this.d; // Error ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) ->this.d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) -+>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) ++>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) @@ -242,11 +242,11 @@ this.c = this.d; ->this.c : Symbol(C.c, Decl(typeRelationships.ts, 1, 16)) -+>this.c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) ++>this.c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->c : Symbol(C.c, Decl(typeRelationships.ts, 1, 16)) ->this.d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) -+>c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) ++>c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) +>this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) diff --git a/testdata/baselines/reference/submodule/conformance/typeRelationships.types b/testdata/baselines/reference/submodule/conformance/typeRelationships.types index 7f9d5d240c..034651cbb3 100644 --- a/testdata/baselines/reference/submodule/conformance/typeRelationships.types +++ b/testdata/baselines/reference/submodule/conformance/typeRelationships.types @@ -91,10 +91,10 @@ class D extends C { >this : this self2 = this.self; ->self2 : this ->this.self : this +>self2 : any +>this.self : any >this : this ->self : this +>self : any self3 = this.foo(); >self3 : this @@ -113,90 +113,90 @@ class D extends C { this.self = this.self1; >this.self = this.self1 : this ->this.self : this +>this.self : any >this : this ->self : this +>self : any >this.self1 : this >this : this >self1 : this this.self = this.self2; ->this.self = this.self2 : this ->this.self : this +>this.self = this.self2 : any +>this.self : any >this : this ->self : this ->this.self2 : this +>self : any +>this.self2 : any >this : this ->self2 : this +>self2 : any this.self = this.self3; >this.self = this.self3 : this ->this.self : this +>this.self : any >this : this ->self : this +>self : any >this.self3 : this >this : this >self3 : this this.self1 = this.self; ->this.self1 = this.self : this +>this.self1 = this.self : any >this.self1 : this >this : this >self1 : this ->this.self : this +>this.self : any >this : this ->self : this +>self : any this.self2 = this.self; ->this.self2 = this.self : this ->this.self2 : this +>this.self2 = this.self : any +>this.self2 : any >this : this ->self2 : this ->this.self : this +>self2 : any +>this.self : any >this : this ->self : this +>self : any this.self3 = this.self; ->this.self3 = this.self : this +>this.self3 = this.self : any >this.self3 : this >this : this >self3 : this ->this.self : this +>this.self : any >this : this ->self : this +>self : any this.d = this.self; ->this.d = this.self : this +>this.d = this.self : any >this.d : D >this : this >d : D ->this.self : this +>this.self : any >this : this ->self : this +>self : any this.d = this.c; // Error ->this.d = this.c : C +>this.d = this.c : D >this.d : D >this : this >d : D ->this.c : C +>this.c : D >this : this ->c : C +>c : D this.self = this.d; // Error >this.self = this.d : D ->this.self : this +>this.self : any >this : this ->self : this +>self : any >this.d : D >this : this >d : D this.c = this.d; >this.c = this.d : D ->this.c : C +>this.c : D >this : this ->c : C +>c : D >this.d : D >this : this >d : D diff --git a/testdata/baselines/reference/submodule/conformance/typeRelationships.types.diff b/testdata/baselines/reference/submodule/conformance/typeRelationships.types.diff new file mode 100644 index 0000000000..67b9381e12 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/typeRelationships.types.diff @@ -0,0 +1,137 @@ +--- old.typeRelationships.types ++++ new.typeRelationships.types +@@= skipped -90, +90 lines =@@ + >this : this + + self2 = this.self; +->self2 : this +->this.self : this ++>self2 : any ++>this.self : any + >this : this +->self : this ++>self : any + + self3 = this.foo(); + >self3 : this +@@= skipped -22, +22 lines =@@ + + this.self = this.self1; + >this.self = this.self1 : this +->this.self : this ++>this.self : any + >this : this +->self : this ++>self : any + >this.self1 : this + >this : this + >self1 : this + + this.self = this.self2; +->this.self = this.self2 : this +->this.self : this ++>this.self = this.self2 : any ++>this.self : any + >this : this +->self : this +->this.self2 : this ++>self : any ++>this.self2 : any + >this : this +->self2 : this ++>self2 : any + + this.self = this.self3; + >this.self = this.self3 : this +->this.self : this ++>this.self : any + >this : this +->self : this ++>self : any + >this.self3 : this + >this : this + >self3 : this + + this.self1 = this.self; +->this.self1 = this.self : this ++>this.self1 = this.self : any + >this.self1 : this + >this : this + >self1 : this +->this.self : this ++>this.self : any + >this : this +->self : this ++>self : any + + this.self2 = this.self; +->this.self2 = this.self : this +->this.self2 : this ++>this.self2 = this.self : any ++>this.self2 : any + >this : this +->self2 : this +->this.self : this ++>self2 : any ++>this.self : any + >this : this +->self : this ++>self : any + + this.self3 = this.self; +->this.self3 = this.self : this ++>this.self3 = this.self : any + >this.self3 : this + >this : this + >self3 : this +->this.self : this ++>this.self : any + >this : this +->self : this ++>self : any + + this.d = this.self; +->this.d = this.self : this ++>this.d = this.self : any + >this.d : D + >this : this + >d : D +->this.self : this ++>this.self : any + >this : this +->self : this ++>self : any + + this.d = this.c; // Error +->this.d = this.c : C ++>this.d = this.c : D + >this.d : D + >this : this + >d : D +->this.c : C ++>this.c : D + >this : this +->c : C ++>c : D + + this.self = this.d; // Error + >this.self = this.d : D +->this.self : this ++>this.self : any + >this : this +->self : this ++>self : any + >this.d : D + >this : this + >d : D + + this.c = this.d; + >this.c = this.d : D +->this.c : C ++>this.c : D + >this : this +->c : C ++>c : D + >this.d : D + >this : this + >d : D diff --git a/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.errors.txt b/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.errors.txt deleted file mode 100644 index f90e977bf7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.errors.txt +++ /dev/null @@ -1,41 +0,0 @@ -ex.js(4,14): error TS2339: Property 'n' does not exist on type 'Crunch'. -ex.js(7,21): error TS2339: Property 'n' does not exist on type 'Crunch'. -use.js(5,8): error TS2339: Property 'n' does not exist on type 'Crunch'. -use.js(13,10): error TS2339: Property 'n' does not exist on type 'Crunch'. - - -==== use.js (2 errors) ==== - var ex = require('./ex') - - // values work - var crunch = new ex.Crunch(1); - crunch.n - ~ -!!! error TS2339: Property 'n' does not exist on type 'Crunch'. - - - // types work - /** - * @param {ex.Crunch} wrap - */ - function f(wrap) { - wrap.n - ~ -!!! error TS2339: Property 'n' does not exist on type 'Crunch'. - } - -==== ex.js (2 errors) ==== - export class Crunch { - /** @param {number} n */ - constructor(n) { - this.n = n - ~ -!!! error TS2339: Property 'n' does not exist on type 'Crunch'. - } - m() { - return this.n - ~ -!!! error TS2339: Property 'n' does not exist on type 'Crunch'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.symbols b/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.symbols index cdb9a8ed34..5bd7b88632 100644 --- a/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.symbols +++ b/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.symbols @@ -14,7 +14,9 @@ var crunch = new ex.Crunch(1); >Crunch : Symbol(Crunch, Decl(ex.js, 0, 0)) crunch.n +>crunch.n : Symbol(n, Decl(ex.js, 2, 20)) >crunch : Symbol(crunch, Decl(use.js, 3, 3)) +>n : Symbol(n, Decl(ex.js, 2, 20)) // types work @@ -26,7 +28,9 @@ function f(wrap) { >wrap : Symbol(wrap, Decl(use.js, 11, 11)) wrap.n +>wrap.n : Symbol(n, Decl(ex.js, 2, 20)) >wrap : Symbol(wrap, Decl(use.js, 11, 11)) +>n : Symbol(n, Decl(ex.js, 2, 20)) } === ex.js === @@ -38,14 +42,18 @@ export class Crunch { >n : Symbol(n, Decl(ex.js, 2, 16)) this.n = n +>this.n : Symbol(n, Decl(ex.js, 2, 20)) >this : Symbol(Crunch, Decl(ex.js, 0, 0)) +>n : Symbol(n, Decl(ex.js, 2, 20)) >n : Symbol(n, Decl(ex.js, 2, 16)) } m() { >m : Symbol(m, Decl(ex.js, 4, 5)) return this.n +>this.n : Symbol(n, Decl(ex.js, 2, 20)) >this : Symbol(Crunch, Decl(ex.js, 0, 0)) +>n : Symbol(n, Decl(ex.js, 2, 20)) } } diff --git a/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.symbols.diff b/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.symbols.diff index 5f6c7a4876..e5968461dd 100644 --- a/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.symbols.diff @@ -18,28 +18,34 @@ crunch.n ->crunch.n : Symbol(ex.Crunch.n, Decl(ex.js, 2, 20)) ++>crunch.n : Symbol(n, Decl(ex.js, 2, 20)) >crunch : Symbol(crunch, Decl(use.js, 3, 3)) ->n : Symbol(ex.Crunch.n, Decl(ex.js, 2, 20)) ++>n : Symbol(n, Decl(ex.js, 2, 20)) // types work -@@= skipped -24, +22 lines =@@ +@@= skipped -24, +24 lines =@@ >wrap : Symbol(wrap, Decl(use.js, 11, 11)) wrap.n ->wrap.n : Symbol(ex.Crunch.n, Decl(ex.js, 2, 20)) ++>wrap.n : Symbol(n, Decl(ex.js, 2, 20)) >wrap : Symbol(wrap, Decl(use.js, 11, 11)) ->n : Symbol(ex.Crunch.n, Decl(ex.js, 2, 20)) ++>n : Symbol(n, Decl(ex.js, 2, 20)) } === ex.js === -@@= skipped -14, +12 lines =@@ +@@= skipped -14, +14 lines =@@ >n : Symbol(n, Decl(ex.js, 2, 16)) this.n = n ->this.n : Symbol(Crunch.n, Decl(ex.js, 2, 20)) ++>this.n : Symbol(n, Decl(ex.js, 2, 20)) >this : Symbol(Crunch, Decl(ex.js, 0, 0)) ->n : Symbol(Crunch.n, Decl(ex.js, 2, 20)) ++>n : Symbol(n, Decl(ex.js, 2, 20)) >n : Symbol(n, Decl(ex.js, 2, 16)) } m() { @@ -48,8 +54,10 @@ return this.n ->this.n : Symbol(Crunch.n, Decl(ex.js, 2, 20)) ++>this.n : Symbol(n, Decl(ex.js, 2, 20)) >this : Symbol(Crunch, Decl(ex.js, 0, 0)) ->n : Symbol(Crunch.n, Decl(ex.js, 2, 20)) ++>n : Symbol(n, Decl(ex.js, 2, 20)) } } diff --git a/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.types b/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.types index 01d67fd8f5..2532b0f6d1 100644 --- a/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.types +++ b/testdata/baselines/reference/submodule/conformance/varRequireFromJavascript.types @@ -17,9 +17,9 @@ var crunch = new ex.Crunch(1); >1 : 1 crunch.n ->crunch.n : any +>crunch.n : number >crunch : Crunch ->n : any +>n : number // types work @@ -31,9 +31,9 @@ function f(wrap) { >wrap : Crunch wrap.n ->wrap.n : any +>wrap.n : number >wrap : Crunch ->n : any +>n : number } === ex.js === @@ -46,18 +46,18 @@ export class Crunch { this.n = n >this.n = n : number ->this.n : any +>this.n : number >this : this ->n : any +>n : number >n : number } m() { ->m : () => any +>m : () => number return this.n ->this.n : any +>this.n : number >this : this ->n : any +>n : number } } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/allowJscheckJsTypeParameterNoCrash.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/allowJscheckJsTypeParameterNoCrash.types.diff index 2b98cffb26..566a11fe4b 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/allowJscheckJsTypeParameterNoCrash.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/allowJscheckJsTypeParameterNoCrash.types.diff @@ -5,13 +5,13 @@ >vextend({ watch: { data1(val) { this.data2 = 1; }, data2(val) { }, }}) : void >vextend : (options: ComponentOptions<{}>) => void ->{ watch: { data1(val) { this.data2 = 1; }, data2(val) { }, }} : { watch: { data1(val: any): void; }; } -+>{ watch: { data1(val) { this.data2 = 1; }, data2(val) { }, }} : { watch: { data1: (val: any) => void; data2: (val: any) => void; }; } ++>{ watch: { data1(val) { this.data2 = 1; }, data2(val) { }, }} : { watch: { data1: (val: any) => void; data2: any; }; } watch: { ->watch : { data1(val: any): void; } ->{ data1(val) { this.data2 = 1; }, data2(val) { }, } : { data1(val: any): void; } -+>watch : { data1: (val: any) => void; data2: (val: any) => void; } -+>{ data1(val) { this.data2 = 1; }, data2(val) { }, } : { data1: (val: any) => void; data2: (val: any) => void; } ++>watch : { data1: (val: any) => void; data2: any; } ++>{ data1(val) { this.data2 = 1; }, data2(val) { }, } : { data1: (val: any) => void; data2: any; } data1(val) { >data1 : (val: any) => void @@ -28,9 +28,3 @@ >1 : 1 }, - data2(val) { }, -->data2 : any -+>data2 : (val: any) => void - >val : any - } - }); diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.errors.txt.diff deleted file mode 100644 index f6c890b4af..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.errors.txt.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- old.argumentsReferenceInConstructor1_Js.errors.txt -+++ new.argumentsReferenceInConstructor1_Js.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+/a.js(11,8): error TS2339: Property 'arguments' does not exist on type 'A'. -+ -+ -+==== /a.js (1 errors) ==== -+ class A { -+ /** -+ * Constructor -+ * -+ * @param {object} [foo={}] -+ */ -+ constructor(foo = {}) { -+ /** -+ * @type object -+ */ -+ this.arguments = foo; -+ ~~~~~~~~~ -+!!! error TS2339: Property 'arguments' does not exist on type 'A'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.types.diff index e2548a1038..ee016d33b3 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.types.diff @@ -13,11 +13,13 @@ */ this.arguments = foo; ->this.arguments = foo : any +->this.arguments : any +>this.arguments = foo : object - >this.arguments : any ++>this.arguments : object >this : this - >arguments : any +->arguments : any ->foo : any ++>arguments : object +>foo : object } } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor2_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor2_Js.types.diff index 60842c2b62..e6121adb37 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor2_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor2_Js.types.diff @@ -13,8 +13,9 @@ */ this["arguments"] = foo; ->this["arguments"] = foo : any +->this["arguments"] : any +>this["arguments"] = foo : object - >this["arguments"] : any ++>this["arguments"] : object >this : this >"arguments" : "arguments" ->foo : any diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.errors.txt.diff index 65d1d97fb6..47e84f136d 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.errors.txt.diff @@ -3,13 +3,11 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+/a.js(19,8): error TS2339: Property 'foo' does not exist on type 'B'. -+/a.js(24,8): error TS2339: Property 'bar' does not exist on type 'B'. +/a.js(24,20): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. +/a.js(24,30): error TS2339: Property 'foo' does not exist on type '{ bar: {}; }'. + + -+==== /a.js (4 errors) ==== ++==== /a.js (2 errors) ==== + class A { + get arguments() { + return { bar: {} }; @@ -29,15 +27,11 @@ + * @type object + */ + this.foo = foo; -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'B'. + + /** + * @type object + */ + this.bar = super.arguments.foo; -+ ~~~ -+!!! error TS2339: Property 'bar' does not exist on type 'B'. + ~~~~~~~~~ +!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. + ~~~ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.types.diff index 015c013c5a..56f16336bc 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.types.diff @@ -14,11 +14,13 @@ */ this.foo = foo; ->this.foo = foo : any +->this.foo : any +>this.foo = foo : object - >this.foo : any ++>this.foo : object >this : this - >foo : any ->foo : any +->foo : any ++>foo : object +>foo : object /** diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.errors.txt.diff index 4a145d31da..db0537b027 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.errors.txt.diff @@ -1,50 +1,21 @@ --- old.argumentsReferenceInConstructor4_Js.errors.txt +++ new.argumentsReferenceInConstructor4_Js.errors.txt @@= skipped -0, +0 lines =@@ -+/a.js(13,8): error TS2339: Property 'foo' does not exist on type 'A'. /a.js(18,9): 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. -+/a.js(23,8): error TS2339: Property 'bar' does not exist on type 'A'. +/a.js(23,24): error TS2339: Property 'bar' does not exist on type 'object'. -+/a.js(28,8): error TS2339: Property 'baz' does not exist on type 'A'. -+/a.js(33,8): error TS2339: Property 'options' does not exist on type 'A'. -==== /a.js (1 errors) ==== -+==== /a.js (6 errors) ==== ++==== /a.js (2 errors) ==== class A { /** * Constructor -@@= skipped -14, +19 lines =@@ - * @type object - */ - this.foo = foo; -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'A'. - - /** - * @type object -@@= skipped -12, +14 lines =@@ +@@= skipped -26, +27 lines =@@ * @type object */ this.bar = arguments.bar; -+ ~~~ -+!!! error TS2339: Property 'bar' does not exist on type 'A'. + ~~~ +!!! error TS2339: Property 'bar' does not exist on type 'object'. /** * @type object - */ - this.baz = arguments[key]; -+ ~~~ -+!!! error TS2339: Property 'baz' does not exist on type 'A'. - - /** - * @type object - */ - this.options = arguments; -+ ~~~~~~~ -+!!! error TS2339: Property 'options' does not exist on type 'A'. - } - - get arguments() { diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.types.diff index 449dbd05f8..70f1618e20 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.types.diff @@ -14,11 +14,13 @@ */ this.foo = foo; ->this.foo = foo : any +->this.foo : any +>this.foo = foo : object - >this.foo : any ++>this.foo : object >this : this - >foo : any ->foo : any +->foo : any ++>foo : object +>foo : object /** @@ -52,11 +54,13 @@ */ this.options = arguments; ->this.options = arguments : any +->this.options : any +>this.options = arguments : object - >this.options : any ++>this.options : object >this : this - >options : any +->options : any ->arguments : any ++>options : object +>arguments : object } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.errors.txt.diff deleted file mode 100644 index 47efc635a9..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.errors.txt.diff +++ /dev/null @@ -1,37 +0,0 @@ ---- old.argumentsReferenceInConstructor5_Js.errors.txt -+++ new.argumentsReferenceInConstructor5_Js.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+/a.js(15,8): error TS2339: Property 'foo' does not exist on type 'A'. -+/a.js(20,8): error TS2339: Property 'bar' does not exist on type 'A'. -+ -+ -+==== /a.js (2 errors) ==== -+ const bar = { -+ arguments: {} -+ } -+ -+ class A { -+ /** -+ * Constructor -+ * -+ * @param {object} [foo={}] -+ */ -+ constructor(foo = {}) { -+ /** -+ * @type object -+ */ -+ this.foo = foo; -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'A'. -+ -+ /** -+ * @type object -+ */ -+ this.bar = bar.arguments; -+ ~~~ -+!!! error TS2339: Property 'bar' does not exist on type 'A'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.types.diff index 0dd69b0a71..e6f0dc6acb 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.types.diff @@ -13,12 +13,25 @@ */ this.foo = foo; ->this.foo = foo : any +->this.foo : any +>this.foo = foo : object - >this.foo : any ++>this.foo : object >this : this - >foo : any ->foo : any +->foo : any ++>foo : object +>foo : object /** * @type object + */ + this.bar = bar.arguments; + >this.bar = bar.arguments : {} +->this.bar : any ++>this.bar : {} + >this : this +->bar : any ++>bar : {} + >bar.arguments : {} + >bar : { arguments: {}; } + >arguments : {} diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.errors.txt.diff deleted file mode 100644 index 4492843f92..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.argumentsReferenceInConstructor6_Js.errors.txt -+++ new.argumentsReferenceInConstructor6_Js.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+/a.js(6,8): error TS2339: Property 'foo' does not exist on type 'A'. -+ -+ -+==== /a.js (1 errors) ==== -+ class A { -+ constructor() { -+ /** -+ * @type object -+ */ -+ this.foo = arguments; -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'A'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.types.diff new file mode 100644 index 0000000000..1ba5dc752f --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.types.diff @@ -0,0 +1,14 @@ +--- old.argumentsReferenceInConstructor6_Js.types ++++ new.argumentsReferenceInConstructor6_Js.types +@@= skipped -9, +9 lines =@@ + */ + this.foo = arguments; + >this.foo = arguments : IArguments +->this.foo : any ++>this.foo : IArguments + >this : this +->foo : any ++>foo : IArguments + >arguments : IArguments + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.errors.txt.diff deleted file mode 100644 index d5b8ad5b44..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.argumentsReferenceInConstructor7_Js.errors.txt -+++ new.argumentsReferenceInConstructor7_Js.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+/a.js(6,8): error TS2339: Property 'callee' does not exist on type 'A'. -+ -+ -+==== /a.js (1 errors) ==== -+ class A { -+ constructor() { -+ /** -+ * @type Function -+ */ -+ this.callee = arguments.callee; -+ ~~~~~~ -+!!! error TS2339: Property 'callee' does not exist on type 'A'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.types.diff deleted file mode 100644 index c393b95282..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.types.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.argumentsReferenceInConstructor7_Js.types -+++ new.argumentsReferenceInConstructor7_Js.types -@@= skipped -9, +9 lines =@@ - */ - this.callee = arguments.callee; - >this.callee = arguments.callee : Function -->this.callee : Function -+>this.callee : any - >this : this -->callee : Function -+>callee : any - >arguments.callee : Function - >arguments : IArguments - >callee : Function diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.errors.txt.diff deleted file mode 100644 index 214f225632..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.argumentsReferenceInMethod1_Js.errors.txt -+++ new.argumentsReferenceInMethod1_Js.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+/a.js(9,8): error TS2339: Property 'arguments' does not exist on type 'A'. -+ -+ -+==== /a.js (1 errors) ==== -+ class A { -+ /** -+ * @param {object} [foo={}] -+ */ -+ m(foo = {}) { -+ /** -+ * @type object -+ */ -+ this.arguments = foo; -+ ~~~~~~~~~ -+!!! error TS2339: Property 'arguments' does not exist on type 'A'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.types.diff index afc0903395..e30424bbe3 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.types.diff @@ -13,11 +13,13 @@ */ this.arguments = foo; ->this.arguments = foo : any +->this.arguments : any +>this.arguments = foo : object - >this.arguments : any ++>this.arguments : object >this : this - >arguments : any +->arguments : any ->foo : any ++>arguments : object +>foo : object } } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod2_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod2_Js.types.diff index 0b6bfccd7d..d185f54223 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod2_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod2_Js.types.diff @@ -13,8 +13,9 @@ */ this["arguments"] = foo; ->this["arguments"] = foo : any +->this["arguments"] : any +>this["arguments"] = foo : object - >this["arguments"] : any ++>this["arguments"] : object >this : this >"arguments" : "arguments" ->foo : any diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.errors.txt.diff index 807a754e0d..5f50ed7b7a 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.errors.txt.diff @@ -3,12 +3,10 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+/a.js(15,8): error TS2339: Property 'x' does not exist on type 'B'. -+/a.js(20,8): error TS2339: Property 'y' does not exist on type 'B'. +/a.js(20,18): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. + + -+==== /a.js (3 errors) ==== ++==== /a.js (1 errors) ==== + class A { + get arguments() { + return { bar: {} }; @@ -24,15 +22,11 @@ + * @type object + */ + this.x = foo; -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'B'. + + /** + * @type object + */ + this.y = super.arguments.bar; -+ ~ -+!!! error TS2339: Property 'y' does not exist on type 'B'. + ~~~~~~~~~ +!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.types.diff index c5176342a1..70ae70d4dc 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.types.diff @@ -13,12 +13,25 @@ */ this.x = foo; ->this.x = foo : any +->this.x : any +>this.x = foo : object - >this.x : any ++>this.x : object >this : this - >x : any +->x : any ->foo : any ++>x : object +>foo : object /** * @type object + */ + this.y = super.arguments.bar; + >this.y = super.arguments.bar : {} +->this.y : any ++>this.y : {} + >this : this +->y : any ++>y : {} + >super.arguments.bar : {} + >super.arguments : { bar: {}; } + >super : A diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.errors.txt.diff index 8a1b1f64d1..e11a7e09d2 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.errors.txt.diff @@ -1,50 +1,21 @@ --- old.argumentsReferenceInMethod4_Js.errors.txt +++ new.argumentsReferenceInMethod4_Js.errors.txt @@= skipped -0, +0 lines =@@ -+/a.js(11,8): error TS2339: Property 'foo' does not exist on type 'A'. /a.js(16,9): 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. -+/a.js(21,8): error TS2339: Property 'bar' does not exist on type 'A'. +/a.js(21,24): error TS2339: Property 'bar' does not exist on type 'object'. -+/a.js(26,8): error TS2339: Property 'baz' does not exist on type 'A'. -+/a.js(31,8): error TS2339: Property 'options' does not exist on type 'A'. -==== /a.js (1 errors) ==== -+==== /a.js (6 errors) ==== ++==== /a.js (2 errors) ==== class A { /** * @param {object} [foo={}] -@@= skipped -12, +17 lines =@@ - * @type object - */ - this.foo = foo; -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'A'. - - /** - * @type object -@@= skipped -12, +14 lines =@@ +@@= skipped -24, +25 lines =@@ * @type object */ this.bar = arguments.bar; -+ ~~~ -+!!! error TS2339: Property 'bar' does not exist on type 'A'. + ~~~ +!!! error TS2339: Property 'bar' does not exist on type 'object'. /** * @type object - */ - this.baz = arguments[key]; -+ ~~~ -+!!! error TS2339: Property 'baz' does not exist on type 'A'. - - /** - * @type object - */ - this.options = arguments; -+ ~~~~~~~ -+!!! error TS2339: Property 'options' does not exist on type 'A'. - } - - get arguments() { diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.types.diff index 1a227db627..10dcf2ca26 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.types.diff @@ -14,11 +14,13 @@ */ this.foo = foo; ->this.foo = foo : any +->this.foo : any +>this.foo = foo : object - >this.foo : any ++>this.foo : object >this : this - >foo : any ->foo : any +->foo : any ++>foo : object +>foo : object /** @@ -52,11 +54,13 @@ */ this.options = arguments; ->this.options = arguments : any +->this.options : any +>this.options = arguments : object - >this.options : any ++>this.options : object >this : this - >options : any +->options : any ->arguments : any ++>options : object +>arguments : object } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.errors.txt.diff deleted file mode 100644 index d9297d6214..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.errors.txt.diff +++ /dev/null @@ -1,35 +0,0 @@ ---- old.argumentsReferenceInMethod5_Js.errors.txt -+++ new.argumentsReferenceInMethod5_Js.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+/a.js(13,8): error TS2339: Property 'foo' does not exist on type 'A'. -+/a.js(18,8): error TS2339: Property 'bar' does not exist on type 'A'. -+ -+ -+==== /a.js (2 errors) ==== -+ const bar = { -+ arguments: {} -+ } -+ -+ class A { -+ /** -+ * @param {object} [foo={}] -+ */ -+ m(foo = {}) { -+ /** -+ * @type object -+ */ -+ this.foo = foo; -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'A'. -+ -+ /** -+ * @type object -+ */ -+ this.bar = bar.arguments; -+ ~~~ -+!!! error TS2339: Property 'bar' does not exist on type 'A'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.types.diff index 3727d48396..0c5ac3432c 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.types.diff @@ -13,12 +13,25 @@ */ this.foo = foo; ->this.foo = foo : any +->this.foo : any +>this.foo = foo : object - >this.foo : any ++>this.foo : object >this : this - >foo : any ->foo : any +->foo : any ++>foo : object +>foo : object /** * @type object + */ + this.bar = bar.arguments; + >this.bar = bar.arguments : {} +->this.bar : any ++>this.bar : {} + >this : this +->bar : any ++>bar : {} + >bar.arguments : {} + >bar : { arguments: {}; } + >arguments : {} diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.errors.txt.diff deleted file mode 100644 index cc2b2052e6..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.argumentsReferenceInMethod6_Js.errors.txt -+++ new.argumentsReferenceInMethod6_Js.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+/a.js(6,8): error TS2339: Property 'foo' does not exist on type 'A'. -+ -+ -+==== /a.js (1 errors) ==== -+ class A { -+ m() { -+ /** -+ * @type object -+ */ -+ this.foo = arguments; -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'A'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.types.diff index e3426ff4e0..5f1055f001 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.types.diff @@ -9,3 +9,14 @@ /** * @type object + */ + this.foo = arguments; + >this.foo = arguments : IArguments +->this.foo : any ++>this.foo : IArguments + >this : this +->foo : any ++>foo : IArguments + >arguments : IArguments + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.errors.txt.diff deleted file mode 100644 index bbdc754bf7..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.argumentsReferenceInMethod7_Js.errors.txt -+++ new.argumentsReferenceInMethod7_Js.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+/a.js(6,8): error TS2339: Property 'callee' does not exist on type 'A'. -+ -+ -+==== /a.js (1 errors) ==== -+ class A { -+ m() { -+ /** -+ * @type Function -+ */ -+ this.callee = arguments.callee; -+ ~~~~~~ -+!!! error TS2339: Property 'callee' does not exist on type 'A'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.types.diff index 97257caab8..b6ff642ec4 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.types.diff @@ -9,14 +9,3 @@ /** * @type Function - */ - this.callee = arguments.callee; - >this.callee = arguments.callee : Function -->this.callee : Function -+>this.callee : any - >this : this -->callee : Function -+>callee : any - >arguments.callee : Function - >arguments : IArguments - >callee : Function diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/checkIndexConstraintOfJavascriptClassExpression.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/checkIndexConstraintOfJavascriptClassExpression.types.diff new file mode 100644 index 0000000000..cfd0ee8214 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/checkIndexConstraintOfJavascriptClassExpression.types.diff @@ -0,0 +1,14 @@ +--- old.checkIndexConstraintOfJavascriptClassExpression.types ++++ new.checkIndexConstraintOfJavascriptClassExpression.types +@@= skipped -24, +24 lines =@@ + + this.foo = "bar"; + >this.foo = "bar" : "bar" +->this.foo : any ++>this.foo : string + >this : this +->foo : any ++>foo : string + >"bar" : "bar" + } + _render(error) { diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.errors.txt.diff index 99fc3f7545..f4826197ae 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.errors.txt.diff @@ -3,22 +3,16 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+a.js(4,8): error TS2339: Property 'a' does not exist on type 'C'. -+a.js(5,8): error TS2339: Property 'a' does not exist on type 'C'. -+a.js(5,19): error TS2339: Property 'a' does not exist on type 'C'. ++a.js(4,3): error TS7022: 'a' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. + + -+==== a.js (3 errors) ==== ++==== a.js (1 errors) ==== + class C { + constructor() { + /** @type {boolean} */ + this.a = true; -+ ~ -+!!! error TS2339: Property 'a' does not exist on type 'C'. ++ ~~~~~~~~~~~~~ ++!!! error TS7022: 'a' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. + this.a = !!this.a; -+ ~ -+!!! error TS2339: Property 'a' does not exist on type 'C'. -+ ~ -+!!! error TS2339: Property 'a' does not exist on type 'C'. + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/checkSuperCallBeforeThisAccessing9.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/checkSuperCallBeforeThisAccessing9.errors.txt.diff deleted file mode 100644 index 6fc674b0e3..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/checkSuperCallBeforeThisAccessing9.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.checkSuperCallBeforeThisAccessing9.errors.txt -+++ new.checkSuperCallBeforeThisAccessing9.errors.txt -@@= skipped -0, +0 lines =@@ -+noSuperInJSDocExtends.js(6,14): error TS2339: Property 'x' does not exist on type 'Derived'. - noSuperInJSDocExtends.js(14,9): error TS2335: 'super' can only be referenced in a derived class. - - --==== noSuperInJSDocExtends.js (1 errors) ==== -+==== noSuperInJSDocExtends.js (2 errors) ==== - class Based { } - /** @extends {Based} */ - class Derived { - constructor() { - this; - this.x = 10; -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'Derived'. - var that = this; - } - } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/checkSuperCallBeforeThisAccessing9.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/checkSuperCallBeforeThisAccessing9.types.diff new file mode 100644 index 0000000000..51ab181366 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/checkSuperCallBeforeThisAccessing9.types.diff @@ -0,0 +1,14 @@ +--- old.checkSuperCallBeforeThisAccessing9.types ++++ new.checkSuperCallBeforeThisAccessing9.types +@@= skipped -13, +13 lines =@@ + + this.x = 10; + >this.x = 10 : 10 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >10 : 10 + + var that = this; diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/classExtendingAny.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/classExtendingAny.types.diff index 01bd582ee1..41e194d8eb 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/classExtendingAny.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/classExtendingAny.types.diff @@ -11,15 +11,15 @@ m() { >m : () => void -@@= skipped -33, +33 lines =@@ - >f : () => void +@@= skipped -24, +24 lines =@@ - this.wat -->this.wat : number -+>this.wat : any + this.wat = 12 + >this.wat = 12 : 12 +->this.wat : any ++>this.wat : number >this : this -->wat : number -+>wat : any - - this.wit - >this.wit : any +->wat : any ++>wat : number + >12 : 12 + } + f() { diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.errors.txt.diff index 6a8ee8aff2..464eba577e 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.errors.txt.diff @@ -5,26 +5,16 @@ -index.js(23,22): error TS2855: Class field 'foo' defined by the parent class is not accessible in the child class via super. -index.js(26,22): error TS2855: Class field 'justProp' defined by the parent class is not accessible in the child class via super. -index.js(29,22): error TS2855: Class field ''literalElementAccess'' defined by the parent class is not accessible in the child class via super. -+index.js(5,14): error TS2339: Property 'roots' does not exist on type 'YaddaBase'. +index.js(7,14): error TS2339: Property 'justProp' does not exist on type 'YaddaBase'. +index.js(9,9): error TS7053: Element implicitly has an 'any' type because expression of type '"literalElementAccess"' can't be used to index type 'YaddaBase'. + Property 'literalElementAccess' does not exist on type 'YaddaBase'. -+index.js(14,14): error TS2339: Property 'foo' does not exist on type 'YaddaBase'. -+index.js(20,22): error TS2339: Property 'roots' does not exist on type 'YaddaBase'. -+index.js(23,22): error TS2339: Property 'foo' does not exist on type 'YaddaBase'. +index.js(26,22): error TS2339: Property 'justProp' does not exist on type 'YaddaBase'. +index.js(29,22): error TS2339: Property 'literalElementAccess' does not exist on type 'YaddaBase'. --==== index.js (4 errors) ==== -+==== index.js (8 errors) ==== - // https://github.com/microsoft/TypeScript/issues/55884 - - class YaddaBase { - constructor() { + ==== index.js (4 errors) ==== +@@= skipped -11, +12 lines =@@ this.roots = "hi"; -+ ~~~~~ -+!!! error TS2339: Property 'roots' does not exist on type 'YaddaBase'. /** @type number */ this.justProp; + ~~~~~~~~ @@ -37,25 +27,17 @@ this.b() } - accessor b = () => { - this.foo = 10 -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'YaddaBase'. - } - } - -@@= skipped -25, +39 lines =@@ +@@= skipped -13, +18 lines =@@ + class DerivedYadda extends YaddaBase { get rootTests() { return super.roots; - ~~~~~ +- ~~~~~ -!!! error TS2855: Class field 'roots' defined by the parent class is not accessible in the child class via super. -+!!! error TS2339: Property 'roots' does not exist on type 'YaddaBase'. } get fooTests() { return super.foo; - ~~~ +- ~~~ -!!! error TS2855: Class field 'foo' defined by the parent class is not accessible in the child class via super. -+!!! error TS2339: Property 'foo' does not exist on type 'YaddaBase'. } get justPropTests() { return super.justProp; diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.types.diff index 0ee378f75a..c935348128 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.types.diff @@ -1,6 +1,15 @@ --- old.classFieldSuperNotAccessibleJs.types +++ new.classFieldSuperNotAccessibleJs.types -@@= skipped -15, +15 lines =@@ +@@= skipped -8, +8 lines =@@ + constructor() { + this.roots = "hi"; + >this.roots = "hi" : "hi" +->this.roots : any ++>this.roots : string + >this : this +->roots : any ++>roots : string + >"hi" : "hi" /** @type number */ this.justProp; @@ -12,42 +21,31 @@ /** @type string */ this['literalElementAccess']; -@@= skipped -22, +22 lines =@@ +@@= skipped -29, +29 lines =@@ this.foo = 10 >this.foo = 10 : 10 ->this.foo : number | undefined -+>this.foo : any ++>this.foo : number >this : this ->foo : number | undefined -+>foo : any ++>foo : number >10 : 10 } } -@@= skipped -12, +12 lines =@@ - >YaddaBase : YaddaBase - - get rootTests() { -->rootTests : string -+>rootTests : any - - return super.roots; -->super.roots : string -+>super.roots : any - >super : YaddaBase -->roots : string -+>roots : any +@@= skipped -20, +20 lines =@@ + >roots : string } get fooTests() { ->fooTests : number | undefined -+>fooTests : any ++>fooTests : number return super.foo; ->super.foo : number | undefined -+>super.foo : any ++>super.foo : number >super : YaddaBase ->foo : number | undefined -+>foo : any ++>foo : number } get justPropTests() { ->justPropTests : number diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/constructorPropertyJs.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/constructorPropertyJs.types.diff deleted file mode 100644 index 8fa7d90b65..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/constructorPropertyJs.types.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.constructorPropertyJs.types -+++ new.constructorPropertyJs.types -@@= skipped -12, +12 lines =@@ - - this.constructor = a; - >this.constructor = a : any -->this.constructor : any -+>this.constructor : Function - >this : this -->constructor : any -+>constructor : Function - >a : any - } - } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/javascriptThisAssignmentInStaticBlock.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/javascriptThisAssignmentInStaticBlock.errors.txt.diff deleted file mode 100644 index 5203f0bdb3..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/javascriptThisAssignmentInStaticBlock.errors.txt.diff +++ /dev/null @@ -1,32 +0,0 @@ ---- old.javascriptThisAssignmentInStaticBlock.errors.txt -+++ new.javascriptThisAssignmentInStaticBlock.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+/src/a.js(3,14): error TS2339: Property 'doSomething' does not exist on type 'typeof Thing'. -+/src/a.js(7,7): error TS2339: Property 'doSomething' does not exist on type 'typeof Thing'. -+ -+ -+==== /src/a.js (2 errors) ==== -+ class Thing { -+ static { -+ this.doSomething = () => {}; -+ ~~~~~~~~~~~ -+!!! error TS2339: Property 'doSomething' does not exist on type 'typeof Thing'. -+ } -+ } -+ -+ Thing.doSomething(); -+ ~~~~~~~~~~~ -+!!! error TS2339: Property 'doSomething' does not exist on type 'typeof Thing'. -+ -+ // GH#46468 -+ class ElementsArray extends Array { -+ static { -+ const superisArray = super.isArray; -+ const customIsArray = (arg)=> superisArray(arg); -+ this.isArray = customIsArray; -+ } -+ } -+ -+ ElementsArray.isArray(new ElementsArray()); diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/javascriptThisAssignmentInStaticBlock.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/javascriptThisAssignmentInStaticBlock.types.diff deleted file mode 100644 index 0d09585b1d..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/javascriptThisAssignmentInStaticBlock.types.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- old.javascriptThisAssignmentInStaticBlock.types -+++ new.javascriptThisAssignmentInStaticBlock.types -@@= skipped -6, +6 lines =@@ - static { - this.doSomething = () => {}; - >this.doSomething = () => {} : () => void -->this.doSomething : () => void -+>this.doSomething : any - >this : typeof Thing -->doSomething : () => void -+>doSomething : any - >() => {} : () => void - } - } - - Thing.doSomething(); -->Thing.doSomething() : void -->Thing.doSomething : () => void -+>Thing.doSomething() : any -+>Thing.doSomething : any - >Thing : typeof Thing -->doSomething : () => void -+>doSomething : any - - // GH#46468 - class ElementsArray extends Array { diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsDeclarationEmitDoesNotRenameImport.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsDeclarationEmitDoesNotRenameImport.errors.txt.diff deleted file mode 100644 index 2d7908b73d..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsDeclarationEmitDoesNotRenameImport.errors.txt.diff +++ /dev/null @@ -1,40 +0,0 @@ ---- old.jsDeclarationEmitDoesNotRenameImport.errors.txt -+++ new.jsDeclarationEmitDoesNotRenameImport.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+index.js(15,18): error TS2339: Property 'test' does not exist on type 'X'. -+ -+ -+==== test/Test.js (0 errors) ==== -+ /** @module test/Test */ -+ class Test {} -+ export default Test; -+==== Test.js (0 errors) ==== -+ /** @module Test */ -+ class Test {} -+ export default Test; -+==== index.js (1 errors) ==== -+ import Test from './test/Test.js' -+ -+ /** -+ * @typedef {Object} Options -+ * @property {typeof import("./Test.js").default} [test] -+ */ -+ -+ class X extends Test { -+ /** -+ * @param {Options} options -+ */ -+ constructor(options) { -+ super(); -+ if (options.test) { -+ this.test = new options.test(); -+ ~~~~ -+!!! error TS2339: Property 'test' does not exist on type 'X'. -+ } -+ } -+ } -+ -+ export default X; -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType.errors.txt.diff deleted file mode 100644 index 36c3e93859..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType.errors.txt.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- old.jsFileClassPropertyType.errors.txt -+++ new.jsFileClassPropertyType.errors.txt -@@= skipped -0, +0 lines =@@ --bar.ts(1,1): error TS2322: Type 'string' is not assignable to type 'number'. -+bar.ts(1,11): error TS2339: Property 'p' does not exist on type 'C'. -+foo.js(3,12): error TS2339: Property 'p' does not exist on type 'C'. - - --==== foo.js (0 errors) ==== -+==== foo.js (1 errors) ==== - class C { - constructor () { - this.p = 0; -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'C'. - } - } - - ==== bar.ts (1 errors) ==== - (new C()).p = "string"; -- ~~~~~~~~~~~ --!!! error TS2322: Type 'string' is not assignable to type 'number'. -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'C'. - diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType.types.diff index 8b50b81101..4ce55277bd 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType.types.diff @@ -1,15 +1,14 @@ --- old.jsFileClassPropertyType.types +++ new.jsFileClassPropertyType.types -@@= skipped -16, +16 lines =@@ - === bar.ts === - (new C()).p = "string"; - >(new C()).p = "string" : "string" -->(new C()).p : number -+>(new C()).p : any - >(new C()) : C - >new C() : C - >C : typeof C -->p : number -+>p : any - >"string" : "string" - +@@= skipped -6, +6 lines =@@ + constructor () { + this.p = 0; + >this.p = 0 : 0 +->this.p : any ++>this.p : number + >this : this +->p : any ++>p : number + >0 : 0 + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.errors.txt.diff index 81de66038a..0b9c566de4 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.errors.txt.diff @@ -1,26 +1,21 @@ --- old.jsFileClassPropertyType2.errors.txt +++ new.jsFileClassPropertyType2.errors.txt -@@= skipped -0, +0 lines =@@ +@@= skipped -0, +-1 lines =@@ -bar.ts(1,18): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -+bar.ts(1,11): error TS2339: Property 'p' does not exist on type 'C'. -+foo.js(4,12): error TS2339: Property 'p' does not exist on type 'C'. - - +- +- -==== foo.js (0 errors) ==== -+==== foo.js (1 errors) ==== - class C { - constructor() { - /** @type {number[]}*/ - this.p = []; -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'C'. - } - } - - ==== bar.ts (1 errors) ==== - (new C()).p.push("string"); +- class C { +- constructor() { +- /** @type {number[]}*/ +- this.p = []; +- } +- } +- +-==== bar.ts (1 errors) ==== +- (new C()).p.push("string"); - ~~~~~~~~ -!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'C'. - +- +@@= skipped --1, +1 lines =@@ ++ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.types.diff index bdf055db49..164d8805d1 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.types.diff @@ -5,28 +5,27 @@ this.p = []; >this.p = [] : undefined[] ->this.p : number[] -+>this.p : any ++>this.p : any[] >this : this ->p : number[] -+>p : any ++>p : any[] >[] : undefined[] } } - +@@= skipped -10, +10 lines =@@ === bar.ts === (new C()).p.push("string"); -->(new C()).p.push("string") : number + >(new C()).p.push("string") : number ->(new C()).p.push : (...items: number[]) => number ->(new C()).p : number[] -+>(new C()).p.push("string") : any -+>(new C()).p.push : any -+>(new C()).p : any ++>(new C()).p.push : (...items: any[]) => number ++>(new C()).p : any[] >(new C()) : C >new C() : C >C : typeof C ->p : number[] ->push : (...items: number[]) => number -+>p : any -+>push : any ++>p : any[] ++>push : (...items: any[]) => number >"string" : "string" diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType3.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType3.errors.txt.diff index cbb0b5a76b..4454b21c14 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType3.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType3.errors.txt.diff @@ -1,36 +1,17 @@ --- old.jsFileClassPropertyType3.errors.txt +++ new.jsFileClassPropertyType3.errors.txt @@= skipped -0, +0 lines =@@ --bar.ts(1,1): error TS2322: Type 'string' is not assignable to type 'number'. -+bar.ts(1,11): error TS2339: Property 'p' does not exist on type 'C'. + bar.ts(1,1): error TS2322: Type 'string' is not assignable to type 'number'. +foo.js(3,13): error TS2304: Cannot find name 'cond'. -+foo.js(4,18): error TS2339: Property 'p' does not exist on type 'C'. -+foo.js(7,18): error TS2339: Property 'p' does not exist on type 'C'. -==== foo.js (0 errors) ==== -+==== foo.js (3 errors) ==== ++==== foo.js (1 errors) ==== class C { constructor() { if (cond) { + ~~~~ +!!! error TS2304: Cannot find name 'cond'. this.p = null; -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'C'. } else { - this.p = 0; -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'C'. - } - } - } - - ==== bar.ts (1 errors) ==== - (new C()).p = "string"; // Error -- ~~~~~~~~~~~ --!!! error TS2322: Type 'string' is not assignable to type 'number'. -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'C'. - diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType3.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType3.types.diff index 599c5984e1..2ee7e07884 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType3.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType3.types.diff @@ -1,15 +1,23 @@ --- old.jsFileClassPropertyType3.types +++ new.jsFileClassPropertyType3.types -@@= skipped -27, +27 lines =@@ - === bar.ts === - (new C()).p = "string"; // Error - >(new C()).p = "string" : "string" -->(new C()).p : number -+>(new C()).p : any - >(new C()) : C - >new C() : C - >C : typeof C -->p : number -+>p : any - >"string" : "string" +@@= skipped -9, +9 lines =@@ + this.p = null; + >this.p = null : null +->this.p : any ++>this.p : number + >this : this +->p : any ++>p : number + } + else { + this.p = 0; + >this.p = 0 : 0 +->this.p : any ++>this.p : number + >this : this +->p : any ++>p : number + >0 : 0 + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassSelfReferencedProperty.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassSelfReferencedProperty.errors.txt.diff deleted file mode 100644 index 7394fe829d..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassSelfReferencedProperty.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.jsFileClassSelfReferencedProperty.errors.txt -+++ new.jsFileClassSelfReferencedProperty.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+foo.js(3,10): error TS2339: Property 'testStackOverflow' does not exist on type 'StackOverflowTest'. -+foo.js(3,35): error TS2339: Property 'testStackOverflow' does not exist on type 'StackOverflowTest'. -+ -+ -+==== foo.js (2 errors) ==== -+ export class StackOverflowTest { -+ constructor () { -+ this.testStackOverflow = this.testStackOverflow.bind(this) -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'testStackOverflow' does not exist on type 'StackOverflowTest'. -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'testStackOverflow' does not exist on type 'StackOverflowTest'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads.errors.txt.diff deleted file mode 100644 index 3111d5f6b7..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads.errors.txt.diff +++ /dev/null @@ -1,67 +0,0 @@ ---- old.jsFileMethodOverloads.errors.txt -+++ new.jsFileMethodOverloads.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+jsFileMethodOverloads.js(9,10): error TS2339: Property 'value' does not exist on type 'Example'. -+jsFileMethodOverloads.js(26,24): error TS2339: Property 'value' does not exist on type 'Example'. -+jsFileMethodOverloads.js(44,25): error TS2339: Property 'value' does not exist on type 'Example'. -+jsFileMethodOverloads.js(44,39): error TS2339: Property 'value' does not exist on type 'Example'. -+ -+ -+==== jsFileMethodOverloads.js (4 errors) ==== -+ /** -+ * @template T -+ */ -+ class Example { -+ /** -+ * @param {T} value -+ */ -+ constructor(value) { -+ this.value = value; -+ ~~~~~ -+!!! error TS2339: Property 'value' does not exist on type 'Example'. -+ } -+ -+ /** -+ * @overload -+ * @param {Example} this -+ * @returns {'number'} -+ */ -+ /** -+ * @overload -+ * @param {Example} this -+ * @returns {'string'} -+ */ -+ /** -+ * @returns {string} -+ */ -+ getTypeName() { -+ return typeof this.value; -+ ~~~~~ -+!!! error TS2339: Property 'value' does not exist on type 'Example'. -+ } -+ -+ /** -+ * @template U -+ * @overload -+ * @param {(y: T) => U} fn -+ * @returns {U} -+ */ -+ /** -+ * @overload -+ * @returns {T} -+ */ -+ /** -+ * @param {(y: T) => unknown} [fn] -+ * @returns {unknown} -+ */ -+ transform(fn) { -+ return fn ? fn(this.value) : this.value; -+ ~~~~~ -+!!! error TS2339: Property 'value' does not exist on type 'Example'. -+ ~~~~~ -+!!! error TS2339: Property 'value' does not exist on type 'Example'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads.types.diff index 884f20ef67..995e8442c7 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads.types.diff @@ -1,6 +1,19 @@ --- old.jsFileMethodOverloads.types +++ new.jsFileMethodOverloads.types -@@= skipped -34, +34 lines =@@ +@@= skipped -14, +14 lines =@@ + + this.value = value; + >this.value = value : T +->this.value : any ++>this.value : T + >this : this +->value : any + >value : T ++>value : T + } + + /** +@@= skipped -20, +20 lines =@@ * @returns {string} */ getTypeName() { @@ -9,14 +22,6 @@ return typeof this.value; >typeof this.value : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" -->this.value : T -+>this.value : any - >this : this -->value : T -+>value : any - } - - /** @@= skipped -24, +24 lines =@@ * @returns {unknown} */ @@ -26,21 +31,3 @@ >fn : (y: T) => unknown return fn ? fn(this.value) : this.value; -->fn ? fn(this.value) : this.value : unknown -+>fn ? fn(this.value) : this.value : any - >fn : (y: T) => unknown - >fn(this.value) : unknown - >fn : (y: T) => unknown -->this.value : T -+>this.value : any - >this : this -->value : T -->this.value : T -+>value : any -+>this.value : any - >this : this -->value : T -+>value : any - } - } - diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads2.errors.txt.diff deleted file mode 100644 index fd3edaeb41..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads2.errors.txt.diff +++ /dev/null @@ -1,64 +0,0 @@ ---- old.jsFileMethodOverloads2.errors.txt -+++ new.jsFileMethodOverloads2.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+jsFileMethodOverloads2.js(10,10): error TS2339: Property 'value' does not exist on type 'Example'. -+jsFileMethodOverloads2.js(25,24): error TS2339: Property 'value' does not exist on type 'Example'. -+jsFileMethodOverloads2.js(41,25): error TS2339: Property 'value' does not exist on type 'Example'. -+jsFileMethodOverloads2.js(41,39): error TS2339: Property 'value' does not exist on type 'Example'. -+ -+ -+==== jsFileMethodOverloads2.js (4 errors) ==== -+ // Also works if all @overload tags are combined in one comment. -+ /** -+ * @template T -+ */ -+ class Example { -+ /** -+ * @param {T} value -+ */ -+ constructor(value) { -+ this.value = value; -+ ~~~~~ -+!!! error TS2339: Property 'value' does not exist on type 'Example'. -+ } -+ -+ /** -+ * @overload -+ * @param {Example} this -+ * @returns {'number'} -+ * -+ * @overload -+ * @param {Example} this -+ * @returns {'string'} -+ * -+ * @returns {string} -+ */ -+ getTypeName() { -+ return typeof this.value; -+ ~~~~~ -+!!! error TS2339: Property 'value' does not exist on type 'Example'. -+ } -+ -+ /** -+ * @template U -+ * @overload -+ * @param {(y: T) => U} fn -+ * @returns {U} -+ * -+ * @overload -+ * @returns {T} -+ * -+ * @param {(y: T) => unknown} [fn] -+ * @returns {unknown} -+ */ -+ transform(fn) { -+ return fn ? fn(this.value) : this.value; -+ ~~~~~ -+!!! error TS2339: Property 'value' does not exist on type 'Example'. -+ ~~~~~ -+!!! error TS2339: Property 'value' does not exist on type 'Example'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads2.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads2.types.diff index 290a461452..ddbd504609 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads2.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads2.types.diff @@ -1,6 +1,19 @@ --- old.jsFileMethodOverloads2.types +++ new.jsFileMethodOverloads2.types -@@= skipped -33, +33 lines =@@ +@@= skipped -15, +15 lines =@@ + + this.value = value; + >this.value = value : T +->this.value : any ++>this.value : T + >this : this +->value : any + >value : T ++>value : T + } + + /** +@@= skipped -18, +18 lines =@@ * @returns {string} */ getTypeName() { @@ -9,14 +22,6 @@ return typeof this.value; >typeof this.value : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" -->this.value : T -+>this.value : any - >this : this -->value : T -+>value : any - } - - /** @@= skipped -22, +22 lines =@@ * @returns {unknown} */ @@ -26,21 +31,3 @@ >fn : (y: T) => unknown return fn ? fn(this.value) : this.value; -->fn ? fn(this.value) : this.value : unknown -+>fn ? fn(this.value) : this.value : any - >fn : (y: T) => unknown - >fn(this.value) : unknown - >fn : (y: T) => unknown -->this.value : T -+>this.value : any - >this : this -->value : T -->this.value : T -+>value : any -+>this.value : any - >this : this -->value : T -+>value : any - } - } - diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/superNoModifiersCrash.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/superNoModifiersCrash.errors.txt.diff index 79ac931973..6fd0f8ad56 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/superNoModifiersCrash.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/superNoModifiersCrash.errors.txt.diff @@ -5,13 +5,12 @@ @@= skipped --1, +1 lines =@@ +File.js(3,9): error TS2335: 'super' can only be referenced in a derived class. +File.js(3,29): error TS2461: Type 'IArguments' is not an array type. -+File.js(4,21): error TS2339: Property 'asdf' does not exist on type 'Parent'. +File.js(9,5): error TS2416: Property 'initialize' in type 'Child' is not assignable to the same property in base type 'Parent'. + Type '() => void' is not assignable to type '() => string'. + Type 'void' is not assignable to type 'string'. + + -+==== File.js (4 errors) ==== ++==== File.js (3 errors) ==== + class Parent { + initialize() { + super.initialize(...arguments) @@ -20,8 +19,6 @@ + ~~~~~~~~~ +!!! error TS2461: Type 'IArguments' is not an array type. + return this.asdf = '' -+ ~~~~ -+!!! error TS2339: Property 'asdf' does not exist on type 'Parent'. + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/superNoModifiersCrash.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/superNoModifiersCrash.types.diff index d550bf46ca..bb26ff4220 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/superNoModifiersCrash.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/superNoModifiersCrash.types.diff @@ -15,15 +15,3 @@ >super : any >initialize : any >...arguments : any -@@= skipped -12, +12 lines =@@ - - return this.asdf = '' - >this.asdf = '' : "" -->this.asdf : string -+>this.asdf : any - >this : this -->asdf : string -+>asdf : any - >'' : "" - } - } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.errors.txt.diff index ce16c58996..8cea03ac5f 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.errors.txt.diff @@ -1,49 +1,18 @@ --- old.thisInFunctionCallJs.errors.txt +++ new.thisInFunctionCallJs.errors.txt @@= skipped -0, +0 lines =@@ -+/a.js(4,14): error TS2339: Property 'data' does not exist on type 'Test'. -+/a.js(8,14): error TS2339: Property 'data' does not exist on type 'Test'. /a.js(9,26): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. -+/a.js(14,14): error TS2339: Property 'data' does not exist on type 'Test'. /a.js(15,31): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. -+/a.js(20,14): error TS2339: Property 'data' does not exist on type 'Test'. +/a.js(23,31): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. -+/a.js(28,14): error TS2339: Property 'data' does not exist on type 'Test'. +/a.js(31,26): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. -==== /a.js (2 errors) ==== -+==== /a.js (9 errors) ==== ++==== /a.js (4 errors) ==== class Test { constructor() { /** @type {number[]} */ - this.data = [1, 2, 3]; -+ ~~~~ -+!!! error TS2339: Property 'data' does not exist on type 'Test'. - } - - finderRaw() { - this.data.find(function (d) { -+ ~~~~ -+!!! error TS2339: Property 'data' does not exist on type 'Test'. - return d === this.data.length - ~~~~ - !!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. -@@= skipped -19, +30 lines =@@ - - forEacherRaw() { - this.data.forEach(function (d) { -+ ~~~~ -+!!! error TS2339: Property 'data' does not exist on type 'Test'. - console.log(d === this.data.length) - ~~~~ - !!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. -@@= skipped -9, +11 lines =@@ - - forEacher() { - this.data.forEach( -+ ~~~~ -+!!! error TS2339: Property 'data' does not exist on type 'Test'. +@@= skipped -31, +33 lines =@@ /** @this {Test} */ function (d) { console.log(d === this.data.length) @@ -53,10 +22,7 @@ }, this) } - finder() { - this.data.find( -+ ~~~~ -+!!! error TS2339: Property 'data' does not exist on type 'Test'. +@@= skipped -8, +11 lines =@@ /** @this {Test} */ function (d) { return d === this.data.length diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.types.diff index 7c52993b34..7ec2055462 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.types.diff @@ -1,111 +1,23 @@ --- old.thisInFunctionCallJs.types +++ new.thisInFunctionCallJs.types -@@= skipped -7, +7 lines =@@ - /** @type {number[]} */ - this.data = [1, 2, 3]; - >this.data = [1, 2, 3] : number[] -->this.data : number[] -+>this.data : any - >this : this -->data : number[] -+>data : any - >[1, 2, 3] : number[] - >1 : 1 - >2 : 2 -@@= skipped -13, +13 lines =@@ - >finderRaw : () => void - - this.data.find(function (d) { -->this.data.find(function (d) { return d === this.data.length }) : number -->this.data.find : { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; } -->this.data : number[] -+>this.data.find(function (d) { return d === this.data.length }) : any -+>this.data.find : any -+>this.data : any - >this : this -->data : number[] -->find : { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; } -->function (d) { return d === this.data.length } : (d: number) => boolean -->d : number -+>data : any -+>find : any -+>function (d) { return d === this.data.length } : (d: any) => boolean -+>d : any - - return d === this.data.length - >d === this.data.length : boolean -->d : number -+>d : any - >this.data.length : any - >this.data : any - >this : any -@@= skipped -25, +25 lines =@@ - >forEacherRaw : () => void - - this.data.forEach(function (d) { -->this.data.forEach(function (d) { console.log(d === this.data.length) }) : void -->this.data.forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void -->this.data : number[] -+>this.data.forEach(function (d) { console.log(d === this.data.length) }) : any -+>this.data.forEach : any -+>this.data : any - >this : this -->data : number[] -->forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void -->function (d) { console.log(d === this.data.length) } : (d: number) => void -->d : number -+>data : any -+>forEach : any -+>function (d) { console.log(d === this.data.length) } : (d: any) => void -+>d : any - - console.log(d === this.data.length) - >console.log(d === this.data.length) : void -@@= skipped -15, +15 lines =@@ - >console : Console - >log : (...data: any[]) => void - >d === this.data.length : boolean -->d : number -+>d : any - >this.data.length : any - >this.data : any - >this : any -@@= skipped -14, +14 lines =@@ - >forEacher : () => void - - this.data.forEach( -->this.data.forEach( /** @this {Test} */ function (d) { console.log(d === this.data.length) }, this) : void -->this.data.forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void -->this.data : number[] -+>this.data.forEach( /** @this {Test} */ function (d) { console.log(d === this.data.length) }, this) : any -+>this.data.forEach : any -+>this.data : any - >this : this -->data : number[] -->forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void -+>data : any -+>forEach : any +@@= skipped -83, +83 lines =@@ /** @this {Test} */ function (d) { ->function (d) { console.log(d === this.data.length) } : (this: Test, d: number) => void -->d : number -+>function (d) { console.log(d === this.data.length) } : (d: any) => void -+>d : any ++>function (d) { console.log(d === this.data.length) } : (d: number) => void + >d : number console.log(d === this.data.length) - >console.log(d === this.data.length) : void -@@= skipped -18, +18 lines =@@ - >console : Console +@@= skipped -10, +10 lines =@@ >log : (...data: any[]) => void >d === this.data.length : boolean -->d : number + >d : number ->this.data.length : number ->this.data : number[] ->this : Test ->data : number[] ->length : number -+>d : any +>this.data.length : any +>this.data : any +>this : any @@ -114,38 +26,22 @@ }, this) >this : this -@@= skipped -15, +15 lines =@@ - >finder : () => void - - this.data.find( -->this.data.find( /** @this {Test} */ function (d) { return d === this.data.length }, this) : number -->this.data.find : { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; } -->this.data : number[] -+>this.data.find( /** @this {Test} */ function (d) { return d === this.data.length }, this) : any -+>this.data.find : any -+>this.data : any - >this : this -->data : number[] -->find : { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; } -+>data : any -+>find : any +@@= skipped -23, +23 lines =@@ /** @this {Test} */ function (d) { ->function (d) { return d === this.data.length } : (this: Test, d: number) => boolean -->d : number -+>function (d) { return d === this.data.length } : (d: any) => boolean -+>d : any ++>function (d) { return d === this.data.length } : (d: number) => boolean + >d : number return d === this.data.length >d === this.data.length : boolean -->d : number + >d : number ->this.data.length : number ->this.data : number[] ->this : Test ->data : number[] ->length : number -+>d : any +>this.data.length : any +>this.data : any +>this : any diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.errors.txt.diff deleted file mode 100644 index f37fb445fb..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.errors.txt.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- old.annotatedThisPropertyInitializerDoesntNarrow.errors.txt -+++ new.annotatedThisPropertyInitializerDoesntNarrow.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+Compilation.js(8,14): error TS2339: Property 'assets' does not exist on type 'C'. -+Compilation.js(11,20): error TS2339: Property 'assets' does not exist on type 'C'. -+ -+ -+==== Compilation.js (2 errors) ==== -+ // from webpack/lib/Compilation.js and filed at #26427 -+ /** @param {{ [s: string]: number }} map */ -+ function mappy(map) {} -+ -+ export class C { -+ constructor() { -+ /** @type {{ [assetName: string]: number}} */ -+ this.assets = {}; -+ ~~~~~~ -+!!! error TS2339: Property 'assets' does not exist on type 'C'. -+ } -+ m() { -+ mappy(this.assets) -+ ~~~~~~ -+!!! error TS2339: Property 'assets' does not exist on type 'C'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.types.diff index f997643453..2dc80f0c66 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.types.diff @@ -5,10 +5,10 @@ this.assets = {}; >this.assets = {} : {} ->this.assets : { [assetName: string]: number; } -+>this.assets : any ++>this.assets : {} >this : this ->assets : { [assetName: string]: number; } -+>assets : any ++>assets : {} >{} : {} } m() { @@ -17,10 +17,10 @@ >mappy(this.assets) : void >mappy : (map: { [s: string]: number; }) => void ->this.assets : { [assetName: string]: number; } -+>this.assets : any ++>this.assets : {} >this : this ->assets : { [assetName: string]: number; } -+>assets : any ++>assets : {} } } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/classCanExtendConstructorFunction.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/classCanExtendConstructorFunction.errors.txt.diff index f31a7d73d3..0690112a30 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/classCanExtendConstructorFunction.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/classCanExtendConstructorFunction.errors.txt.diff @@ -6,10 +6,8 @@ - Type '(files: string[], format: "csv" | "json" | "xmlolololol") => void' is not assignable to type '(supplies?: any[]) => void'. - Target signature provides too few arguments. Expected 2 or more, but got 1. +first.js(21,19): error TS2507: Type '{ (numberOxen: number): void; circle: (wagons: any) => any; }' is not a constructor function type. -+first.js(24,14): error TS2339: Property 'foonly' does not exist on type 'Sql'. +first.js(27,21): error TS8020: JSDoc types can only be used inside documentation comments. +first.js(44,4): error TS2339: Property 'numberOxen' does not exist on type 'Sql'. -+first.js(44,20): error TS2339: Property 'foonly' does not exist on type 'Sql'. first.js(47,24): error TS2507: Type '(numberEaten: number) => void' is not a constructor function type. -generic.js(19,19): error TS2554: Expected 1 arguments, but got 0. -generic.js(20,32): error TS2345: Argument of type 'number' is not assignable to parameter of type '{ claim: "ignorant" | "malicious"; }'. @@ -31,11 +29,11 @@ -==== first.js (3 errors) ==== -+==== first.js (6 errors) ==== ++==== first.js (4 errors) ==== /** * @constructor * @param {number} numberOxen -@@= skipped -36, +35 lines =@@ +@@= skipped -36, +33 lines =@@ } // ok class Sql extends Wagon { @@ -47,8 +45,6 @@ -!!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 first.js:5:16: An argument for 'numberOxen' was not provided. this.foonly = 12 -+ ~~~~~~ -+!!! error TS2339: Property 'foonly' does not exist on type 'Sql'. } /** * @param {Array.} files @@ -65,18 +61,16 @@ if (format === "xmlolololol") { throw new Error("please do not use XML. It was a joke."); } -@@= skipped -30, +29 lines =@@ +@@= skipped -30, +27 lines =@@ } var db = new Sql(); db.numberOxen = db.foonly + ~~~~~~~~~~ +!!! error TS2339: Property 'numberOxen' does not exist on type 'Sql'. -+ ~~~~~~ -+!!! error TS2339: Property 'foonly' does not exist on type 'Sql'. // error, can't extend a TS constructor function class Drakkhen extends Dragon { -@@= skipped -25, +29 lines =@@ +@@= skipped -25, +27 lines =@@ } // ok class Conestoga extends Wagon { diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/classCanExtendConstructorFunction.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/classCanExtendConstructorFunction.types.diff index aacabb3616..8f63a615f4 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/classCanExtendConstructorFunction.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/classCanExtendConstructorFunction.types.diff @@ -127,6 +127,14 @@ this.foonly = 12 >this.foonly = 12 : 12 +->this.foonly : any ++>this.foonly : number + >this : this +->foonly : any ++>foonly : number + >12 : 12 + } + /** @@= skipped -38, +38 lines =@@ * This is not assignable, so should have a type error */ @@ -162,26 +170,19 @@ >0 : 0 // ???????????????????????? -@@= skipped -24, +24 lines =@@ - >Sql : typeof Sql +@@= skipped -25, +25 lines =@@ db.numberOxen = db.foonly -->db.numberOxen = db.foonly : number + >db.numberOxen = db.foonly : number ->db.numberOxen : number -+>db.numberOxen = db.foonly : any +>db.numberOxen : any >db : Sql ->numberOxen : number -->db.foonly : number +>numberOxen : any -+>db.foonly : any + >db.foonly : number >db : Sql -->foonly : number -+>foonly : any - - // error, can't extend a TS constructor function - class Drakkhen extends Dragon { -@@= skipped -44, +44 lines =@@ + >foonly : number +@@= skipped -43, +43 lines =@@ // ok class Conestoga extends Wagon { >Conestoga : Conestoga diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff index e272d3b2a9..38e237ae55 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff @@ -9,9 +9,7 @@ +test.js(14,4): error TS2339: Property 'x' does not exist on type '{}'. +test.js(16,7): error TS7006: Parameter 'n' implicitly has an 'any' type. +test.js(18,4): error TS2339: Property 'x' does not exist on type '{}'. -+test.js(25,14): error TS2339: Property 's' does not exist on type 'Thing'. +test.js(27,15): error TS7006: Parameter 'n' implicitly has an 'any' type. -+test.js(32,14): error TS2339: Property 's' does not exist on type 'Thing'. +test.js(34,15): error TS7006: Parameter 'n' implicitly has an 'any' type. +test.js(42,1): 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. +test.js(44,7): error TS7006: Parameter 'n' implicitly has an 'any' type. @@ -23,7 +21,7 @@ +test.js(69,7): error TS7006: Parameter 'n' implicitly has an 'any' type. + + -+==== test.js (17 errors) ==== ++==== test.js (15 errors) ==== + /** @typedef {{ + status: 'done' + m(n: number): void @@ -59,8 +57,6 @@ + constructor() { + /** @type {DoneStatus} */ + this.s = { -+ ~ -+!!! error TS2339: Property 's' does not exist on type 'Thing'. + status: 'done', + m(n) { } + ~ @@ -70,8 +66,6 @@ + + fail() { + this.s = { -+ ~ -+!!! error TS2339: Property 's' does not exist on type 'Thing'. + status: 'done', + m(n) { } + ~ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff index 15d15c6db1..af7c8c22e8 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff @@ -73,11 +73,11 @@ ->this.s = { status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } ->this.s : DoneStatus +>this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } -+>this.s : any ++>this.s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } >this : this ->s : DoneStatus ->{ status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } -+>s : any ++>s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } +>{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } status: 'done', @@ -100,11 +100,11 @@ ->this.s = { status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } ->this.s : DoneStatus +>this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } -+>this.s : any ++>this.s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } >this : this ->s : DoneStatus ->{ status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } -+>s : any ++>s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } +>{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } status: 'done', diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/exportNestedNamespaces.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/exportNestedNamespaces.errors.txt.diff index 56ba5a5321..e07be6c6a1 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/exportNestedNamespaces.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/exportNestedNamespaces.errors.txt.diff @@ -3,12 +3,11 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+mod.js(7,14): error TS2339: Property 'p' does not exist on type 'Classic'. +use.js(8,15): error TS2694: Namespace '"mod"' has no exported member 'n'. +use.js(9,13): error TS2749: 's.Classic' refers to a value, but is being used as a type here. Did you mean 'typeof s.Classic'? + + -+==== mod.js (1 errors) ==== ++==== mod.js (0 errors) ==== + exports.n = {}; + exports.n.K = function () { + this.x = 10; @@ -16,8 +15,6 @@ + exports.Classic = class { + constructor() { + this.p = 1 -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'Classic'. + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/exportNestedNamespaces.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/exportNestedNamespaces.types.diff index 61bfaad816..15f364246a 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/exportNestedNamespaces.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/exportNestedNamespaces.types.diff @@ -36,7 +36,18 @@ >x : any >10 : 10 } -@@= skipped -41, +41 lines =@@ +@@= skipped -32, +32 lines =@@ + constructor() { + this.p = 1 + >this.p = 1 : 1 +->this.p : any ++>this.p : number + >this : this +->p : any ++>p : number + >1 : 1 + } + } === use.js === import * as s from './mod' diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff index c0ae73e18c..2d218405ef 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff @@ -4,276 +4,122 @@ -a.js(14,13): error TS7008: Member 'inMethodNullable' implicitly has an 'any' type. -a.js(20,9): error TS2322: Type 'string' is not assignable to type 'number'. -a.js(39,9): error TS2322: Type 'boolean' is not assignable to type 'number'. -+a.js(4,18): error TS2339: Property 'inConstructor' does not exist on type 'C'. -+a.js(7,18): error TS2339: Property 'inConstructor' does not exist on type 'C'. -+a.js(9,14): error TS2339: Property 'inMultiple' does not exist on type 'C'. -+a.js(13,18): error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -+a.js(14,18): error TS2339: Property 'inMethodNullable' does not exist on type 'C'. -+a.js(17,18): error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -+a.js(18,18): error TS2339: Property 'inMethodNullable' does not exist on type 'C'. -+a.js(20,14): error TS2339: Property 'inMultiple' does not exist on type 'C'. -+a.js(21,14): error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. -+a.js(25,22): error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. -+a.js(28,22): error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. -+a.js(34,18): error TS2339: Property 'inGetter' does not exist on type 'C'. -+a.js(37,18): error TS2339: Property 'inGetter' does not exist on type 'C'. -+a.js(39,14): error TS2339: Property 'inMultiple' does not exist on type 'C'. -+a.js(40,14): error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. -+a.js(44,18): error TS2339: Property 'inSetter' does not exist on type 'C'. -+a.js(47,18): error TS2339: Property 'inSetter' does not exist on type 'C'. -+a.js(52,18): error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. -+a.js(55,18): error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. -+a.js(60,18): error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. -+a.js(63,18): error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. -+a.js(68,22): error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. -+a.js(71,22): error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. -+a.js(77,18): error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. -+a.js(80,18): error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. -+a.js(85,18): error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. -+a.js(88,18): error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. -+a.js(93,18): error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. -+a.js(96,18): error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. -+b.ts(4,24): error TS2339: Property 'inConstructor' does not exist on type 'C'. -+b.ts(8,35): error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -+b.ts(9,35): error TS2339: Property 'inGetter' does not exist on type 'C'. -+b.ts(10,35): error TS2339: Property 'inSetter' does not exist on type 'C'. -+b.ts(11,35): error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. -+b.ts(12,35): error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. -+b.ts(17,16): error TS2339: Property 'inMultiple' does not exist on type 'C'. -+b.ts(19,36): error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. -+b.ts(21,13): error TS2339: Property 'inMethodNullable' does not exist on type 'C'. -+b.ts(24,35): error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. -+b.ts(25,35): error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. -+b.ts(26,35): error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. -+b.ts(27,35): error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. -+b.ts(28,35): error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. ++b.ts(8,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++b.ts(9,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++b.ts(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++b.ts(11,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++b.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++b.ts(17,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'number' must be of type 'number', but here has type 'string | number | boolean'. ++b.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrBooleanOrUndefined' must be of type 'string | boolean | undefined', but here has type 'string | boolean'. ++b.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'any' must be of type 'any', but here has type 'null | undefined'. ++b.ts(24,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++b.ts(25,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++b.ts(26,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++b.ts(27,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++b.ts(28,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -==== a.js (3 errors) ==== -+==== a.js (29 errors) ==== ++==== a.js (0 errors) ==== class C { constructor() { if (Math.random()) { - this.inConstructor = 0; -+ ~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inConstructor' does not exist on type 'C'. - } - else { - this.inConstructor = "string" -+ ~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inConstructor' does not exist on type 'C'. - } - this.inMultiple = 0; -+ ~~~~~~~~~~ -+!!! error TS2339: Property 'inMultiple' does not exist on type 'C'. - } - method() { +@@= skipped -17, +27 lines =@@ if (Math.random()) { this.inMethod = 0; -+ ~~~~~~~~ -+!!! error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -+!!! related TS2728 a.js:11:5: 'method' is declared here. this.inMethodNullable = null; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS7008: Member 'inMethodNullable' implicitly has an 'any' type. -+ ~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inMethodNullable' does not exist on type 'C'. } else { this.inMethod = "string" -+ ~~~~~~~~ -+!!! error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -+!!! related TS2728 a.js:11:5: 'method' is declared here. this.inMethodNullable = undefined; -+ ~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inMethodNullable' does not exist on type 'C'. } this.inMultiple = "string"; - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'string' is not assignable to type 'number'. -+ ~~~~~~~~~~ -+!!! error TS2339: Property 'inMultiple' does not exist on type 'C'. this.inMultipleMethods = "string"; -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. var action = () => { - if (Math.random()) { - this.inNestedArrowFunction = 0; -+ ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. - } - else { - this.inNestedArrowFunction = "string" -+ ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. - } - }; - } - get() { - if (Math.random()) { - this.inGetter = 0; -+ ~~~~~~~~ -+!!! error TS2339: Property 'inGetter' does not exist on type 'C'. - } - else { +@@= skipped -29, +25 lines =@@ this.inGetter = "string" -+ ~~~~~~~~ -+!!! error TS2339: Property 'inGetter' does not exist on type 'C'. } this.inMultiple = false; - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. -+ ~~~~~~~~~~ -+!!! error TS2339: Property 'inMultiple' does not exist on type 'C'. this.inMultipleMethods = false; -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. } set() { - if (Math.random()) { - this.inSetter = 0; -+ ~~~~~~~~ -+!!! error TS2339: Property 'inSetter' does not exist on type 'C'. - } - else { - this.inSetter = "string" -+ ~~~~~~~~ -+!!! error TS2339: Property 'inSetter' does not exist on type 'C'. - } - } - prop = () => { - if (Math.random()) { - this.inPropertyDeclaration = 0; -+ ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. - } - else { - this.inPropertyDeclaration = "string" -+ ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. - } - } - static method() { - if (Math.random()) { - this.inStaticMethod = 0; -+ ~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. - } - else { - this.inStaticMethod = "string" -+ ~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. - } - - var action = () => { - if (Math.random()) { - this.inStaticNestedArrowFunction = 0; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. - } - else { - this.inStaticNestedArrowFunction = "string" -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. - } - }; - } - static get() { - if (Math.random()) { - this.inStaticGetter = 0; -+ ~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. - } - else { - this.inStaticGetter = "string" -+ ~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. - } - } - static set() { - if (Math.random()) { - this.inStaticSetter = 0; -+ ~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. - } - else { - this.inStaticSetter = "string" -+ ~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. - } - } - static prop = () => { - if (Math.random()) { - this.inStaticPropertyDeclaration = 0; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. - } - else { - this.inStaticPropertyDeclaration = "string" -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. - } +@@= skipped -63, +61 lines =@@ } } -==== b.ts (0 errors) ==== -+==== b.ts (14 errors) ==== ++==== b.ts (13 errors) ==== var c = new C(); var stringOrNumber: string | number; - var stringOrNumber = c.inConstructor; -+ ~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inConstructor' does not exist on type 'C'. - +@@= skipped -9, +9 lines =@@ var stringOrNumberOrUndefined: string | number | undefined; var stringOrNumberOrUndefined = c.inMethod; -+ ~~~~~~~~ -+!!! error TS2551: Property 'inMethod' does not exist on type 'C'. Did you mean 'method'? -+!!! related TS2728 a.js:11:5: 'method' is declared here. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inGetter; -+ ~~~~~~~~ -+!!! error TS2339: Property 'inGetter' does not exist on type 'C'. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inSetter; -+ ~~~~~~~~ -+!!! error TS2339: Property 'inSetter' does not exist on type 'C'. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inPropertyDeclaration; -+ ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inPropertyDeclaration' does not exist on type 'C'. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inNestedArrowFunction -+ ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inNestedArrowFunction' does not exist on type 'C'. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrBoolean: string | number | boolean; var number: number; var number = c.inMultiple; -+ ~~~~~~~~~~ -+!!! error TS2339: Property 'inMultiple' does not exist on type 'C'. ++ ~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'number' must be of type 'number', but here has type 'string | number | boolean'. ++!!! related TS6203 b.ts:16:5: 'number' was also declared here. var stringOrBooleanOrUndefined : string | boolean | undefined; var stringOrBooleanOrUndefined = c.inMultipleMethods; -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inMultipleMethods' does not exist on type 'C'. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrBooleanOrUndefined' must be of type 'string | boolean | undefined', but here has type 'string | boolean'. ++!!! related TS6203 b.ts:18:5: 'stringOrBooleanOrUndefined' was also declared here. var any: any; var any = c.inMethodNullable; -+ ~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inMethodNullable' does not exist on type 'C'. ++ ~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'any' must be of type 'any', but here has type 'null | undefined'. ++!!! related TS6203 b.ts:20:5: 'any' was also declared here. var stringOrNumberOrUndefined = C.inStaticMethod; -+ ~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticMethod' does not exist on type 'typeof C'. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticGetter; -+ ~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticGetter' does not exist on type 'typeof C'. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticSetter; -+ ~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticSetter' does not exist on type 'typeof C'. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticPropertyDeclaration' does not exist on type 'typeof C'. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'inStaticNestedArrowFunction' does not exist on type 'typeof C'. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. ++!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff index 89688ad869..5c0264f690 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff @@ -1,69 +1,112 @@ --- old.inferringClassMembersFromAssignments.types +++ new.inferringClassMembersFromAssignments.types -@@= skipped -43, +43 lines =@@ +@@= skipped -12, +12 lines =@@ + + this.inConstructor = 0; + >this.inConstructor = 0 : 0 +->this.inConstructor : any ++>this.inConstructor : string | number + >this : this +->inConstructor : any ++>inConstructor : string | number + >0 : 0 + } + else { + this.inConstructor = "string" + >this.inConstructor = "string" : "string" +->this.inConstructor : any ++>this.inConstructor : string | number + >this : this +->inConstructor : any ++>inConstructor : string | number + >"string" : "string" + } + this.inMultiple = 0; + >this.inMultiple = 0 : 0 +->this.inMultiple : any ++>this.inMultiple : string | number | boolean + >this : this +->inMultiple : any ++>inMultiple : string | number | boolean + >0 : 0 + } + method() { +@@= skipped -31, +31 lines =@@ this.inMethod = 0; >this.inMethod = 0 : 0 ->this.inMethod : string | number | undefined -+>this.inMethod : any ++>this.inMethod : string | number >this : this ->inMethod : string | number | undefined -+>inMethod : any ++>inMethod : string | number >0 : 0 this.inMethodNullable = null; -@@= skipped -14, +14 lines =@@ + >this.inMethodNullable = null : null +->this.inMethodNullable : any ++>this.inMethodNullable : null | undefined + >this : this +->inMethodNullable : any ++>inMethodNullable : null | undefined + } else { this.inMethod = "string" >this.inMethod = "string" : "string" ->this.inMethod : string | number | undefined -+>this.inMethod : any ++>this.inMethod : string | number >this : this ->inMethod : string | number | undefined -+>inMethod : any ++>inMethod : string | number >"string" : "string" this.inMethodNullable = undefined; -@@= skipped -14, +14 lines =@@ + >this.inMethodNullable = undefined : undefined +->this.inMethodNullable : any ++>this.inMethodNullable : null | undefined + >this : this +->inMethodNullable : any ++>inMethodNullable : null | undefined + >undefined : undefined } this.inMultiple = "string"; >this.inMultiple = "string" : "string" ->this.inMultiple : number -+>this.inMultiple : any ++>this.inMultiple : string | number | boolean >this : this ->inMultiple : number -+>inMultiple : any ++>inMultiple : string | number | boolean >"string" : "string" this.inMultipleMethods = "string"; >this.inMultipleMethods = "string" : "string" ->this.inMultipleMethods : string | boolean | undefined -+>this.inMultipleMethods : any ++>this.inMultipleMethods : string | boolean >this : this ->inMultipleMethods : string | boolean | undefined -+>inMultipleMethods : any ++>inMultipleMethods : string | boolean >"string" : "string" var action = () => { -@@= skipped -24, +24 lines =@@ +@@= skipped -52, +52 lines =@@ this.inNestedArrowFunction = 0; >this.inNestedArrowFunction = 0 : 0 ->this.inNestedArrowFunction : string | number | undefined -+>this.inNestedArrowFunction : any ++>this.inNestedArrowFunction : string | number >this : this ->inNestedArrowFunction : string | number | undefined -+>inNestedArrowFunction : any ++>inNestedArrowFunction : string | number >0 : 0 } else { this.inNestedArrowFunction = "string" >this.inNestedArrowFunction = "string" : "string" ->this.inNestedArrowFunction : string | number | undefined -+>this.inNestedArrowFunction : any ++>this.inNestedArrowFunction : string | number >this : this ->inNestedArrowFunction : string | number | undefined -+>inNestedArrowFunction : any ++>inNestedArrowFunction : string | number >"string" : "string" } }; @@ -72,38 +115,38 @@ this.inGetter = 0; >this.inGetter = 0 : 0 ->this.inGetter : string | number | undefined -+>this.inGetter : any ++>this.inGetter : string | number >this : this ->inGetter : string | number | undefined -+>inGetter : any ++>inGetter : string | number >0 : 0 } else { this.inGetter = "string" >this.inGetter = "string" : "string" ->this.inGetter : string | number | undefined -+>this.inGetter : any ++>this.inGetter : string | number >this : this ->inGetter : string | number | undefined -+>inGetter : any ++>inGetter : string | number >"string" : "string" } this.inMultiple = false; >this.inMultiple = false : false ->this.inMultiple : number -+>this.inMultiple : any ++>this.inMultiple : string | number | boolean >this : this ->inMultiple : number -+>inMultiple : any ++>inMultiple : string | number | boolean >false : false this.inMultipleMethods = false; >this.inMultipleMethods = false : false ->this.inMultipleMethods : string | boolean | undefined -+>this.inMultipleMethods : any ++>this.inMultipleMethods : string | boolean >this : this ->inMultipleMethods : string | boolean | undefined -+>inMultipleMethods : any ++>inMultipleMethods : string | boolean >false : false } set() { @@ -112,20 +155,20 @@ this.inSetter = 0; >this.inSetter = 0 : 0 ->this.inSetter : string | number | undefined -+>this.inSetter : any ++>this.inSetter : string | number >this : this ->inSetter : string | number | undefined -+>inSetter : any ++>inSetter : string | number >0 : 0 } else { this.inSetter = "string" >this.inSetter = "string" : "string" ->this.inSetter : string | number | undefined -+>this.inSetter : any ++>this.inSetter : string | number >this : this ->inSetter : string | number | undefined -+>inSetter : any ++>inSetter : string | number >"string" : "string" } } @@ -134,20 +177,20 @@ this.inPropertyDeclaration = 0; >this.inPropertyDeclaration = 0 : 0 ->this.inPropertyDeclaration : string | number | undefined -+>this.inPropertyDeclaration : any ++>this.inPropertyDeclaration : string | number >this : this ->inPropertyDeclaration : string | number | undefined -+>inPropertyDeclaration : any ++>inPropertyDeclaration : string | number >0 : 0 } else { this.inPropertyDeclaration = "string" >this.inPropertyDeclaration = "string" : "string" ->this.inPropertyDeclaration : string | number | undefined -+>this.inPropertyDeclaration : any ++>this.inPropertyDeclaration : string | number >this : this ->inPropertyDeclaration : string | number | undefined -+>inPropertyDeclaration : any ++>inPropertyDeclaration : string | number >"string" : "string" } } @@ -156,20 +199,20 @@ this.inStaticMethod = 0; >this.inStaticMethod = 0 : 0 ->this.inStaticMethod : string | number | undefined -+>this.inStaticMethod : any ++>this.inStaticMethod : string | number >this : typeof C ->inStaticMethod : string | number | undefined -+>inStaticMethod : any ++>inStaticMethod : string | number >0 : 0 } else { this.inStaticMethod = "string" >this.inStaticMethod = "string" : "string" ->this.inStaticMethod : string | number | undefined -+>this.inStaticMethod : any ++>this.inStaticMethod : string | number >this : typeof C ->inStaticMethod : string | number | undefined -+>inStaticMethod : any ++>inStaticMethod : string | number >"string" : "string" } @@ -178,20 +221,20 @@ this.inStaticNestedArrowFunction = 0; >this.inStaticNestedArrowFunction = 0 : 0 ->this.inStaticNestedArrowFunction : string | number | undefined -+>this.inStaticNestedArrowFunction : any ++>this.inStaticNestedArrowFunction : string | number >this : typeof C ->inStaticNestedArrowFunction : string | number | undefined -+>inStaticNestedArrowFunction : any ++>inStaticNestedArrowFunction : string | number >0 : 0 } else { this.inStaticNestedArrowFunction = "string" >this.inStaticNestedArrowFunction = "string" : "string" ->this.inStaticNestedArrowFunction : string | number | undefined -+>this.inStaticNestedArrowFunction : any ++>this.inStaticNestedArrowFunction : string | number >this : typeof C ->inStaticNestedArrowFunction : string | number | undefined -+>inStaticNestedArrowFunction : any ++>inStaticNestedArrowFunction : string | number >"string" : "string" } }; @@ -200,20 +243,20 @@ this.inStaticGetter = 0; >this.inStaticGetter = 0 : 0 ->this.inStaticGetter : string | number | undefined -+>this.inStaticGetter : any ++>this.inStaticGetter : string | number >this : typeof C ->inStaticGetter : string | number | undefined -+>inStaticGetter : any ++>inStaticGetter : string | number >0 : 0 } else { this.inStaticGetter = "string" >this.inStaticGetter = "string" : "string" ->this.inStaticGetter : string | number | undefined -+>this.inStaticGetter : any ++>this.inStaticGetter : string | number >this : typeof C ->inStaticGetter : string | number | undefined -+>inStaticGetter : any ++>inStaticGetter : string | number >"string" : "string" } } @@ -222,20 +265,20 @@ this.inStaticSetter = 0; >this.inStaticSetter = 0 : 0 ->this.inStaticSetter : string | number | undefined -+>this.inStaticSetter : any ++>this.inStaticSetter : string | number >this : typeof C ->inStaticSetter : string | number | undefined -+>inStaticSetter : any ++>inStaticSetter : string | number >0 : 0 } else { this.inStaticSetter = "string" >this.inStaticSetter = "string" : "string" ->this.inStaticSetter : string | number | undefined -+>this.inStaticSetter : any ++>this.inStaticSetter : string | number >this : typeof C ->inStaticSetter : string | number | undefined -+>inStaticSetter : any ++>inStaticSetter : string | number >"string" : "string" } } @@ -244,87 +287,76 @@ this.inStaticPropertyDeclaration = 0; >this.inStaticPropertyDeclaration = 0 : 0 ->this.inStaticPropertyDeclaration : string | number | undefined -+>this.inStaticPropertyDeclaration : any ++>this.inStaticPropertyDeclaration : string | number >this : typeof C ->inStaticPropertyDeclaration : string | number | undefined -+>inStaticPropertyDeclaration : any ++>inStaticPropertyDeclaration : string | number >0 : 0 } else { this.inStaticPropertyDeclaration = "string" >this.inStaticPropertyDeclaration = "string" : "string" ->this.inStaticPropertyDeclaration : string | number | undefined -+>this.inStaticPropertyDeclaration : any ++>this.inStaticPropertyDeclaration : string | number >this : typeof C ->inStaticPropertyDeclaration : string | number | undefined -+>inStaticPropertyDeclaration : any ++>inStaticPropertyDeclaration : string | number >"string" : "string" } } -@@= skipped -27, +27 lines =@@ - - var stringOrNumber = c.inConstructor; - >stringOrNumber : string | number -->c.inConstructor : string | number -+>c.inConstructor : any - >c : C -->inConstructor : string | number -+>inConstructor : any - - var stringOrNumberOrUndefined: string | number | undefined; - >stringOrNumberOrUndefined : string | number | undefined +@@= skipped -36, +36 lines =@@ var stringOrNumberOrUndefined = c.inMethod; >stringOrNumberOrUndefined : string | number | undefined ->c.inMethod : string | number | undefined -+>c.inMethod : any ++>c.inMethod : string | number >c : C ->inMethod : string | number | undefined -+>inMethod : any ++>inMethod : string | number var stringOrNumberOrUndefined = c.inGetter; >stringOrNumberOrUndefined : string | number | undefined ->c.inGetter : string | number | undefined -+>c.inGetter : any ++>c.inGetter : string | number >c : C ->inGetter : string | number | undefined -+>inGetter : any ++>inGetter : string | number var stringOrNumberOrUndefined = c.inSetter; >stringOrNumberOrUndefined : string | number | undefined ->c.inSetter : string | number | undefined -+>c.inSetter : any ++>c.inSetter : string | number >c : C ->inSetter : string | number | undefined -+>inSetter : any ++>inSetter : string | number var stringOrNumberOrUndefined = c.inPropertyDeclaration; >stringOrNumberOrUndefined : string | number | undefined ->c.inPropertyDeclaration : string | number | undefined -+>c.inPropertyDeclaration : any ++>c.inPropertyDeclaration : string | number >c : C ->inPropertyDeclaration : string | number | undefined -+>inPropertyDeclaration : any ++>inPropertyDeclaration : string | number var stringOrNumberOrUndefined = c.inNestedArrowFunction >stringOrNumberOrUndefined : string | number | undefined ->c.inNestedArrowFunction : string | number | undefined -+>c.inNestedArrowFunction : any ++>c.inNestedArrowFunction : string | number >c : C ->inNestedArrowFunction : string | number | undefined -+>inNestedArrowFunction : any ++>inNestedArrowFunction : string | number var stringOrNumberOrBoolean: string | number | boolean; >stringOrNumberOrBoolean : string | number | boolean -@@= skipped -45, +45 lines =@@ +@@= skipped -36, +36 lines =@@ var number = c.inMultiple; >number : number ->c.inMultiple : number -+>c.inMultiple : any ++>c.inMultiple : string | number | boolean >c : C ->inMultiple : number -+>inMultiple : any ++>inMultiple : string | number | boolean var stringOrBooleanOrUndefined : string | boolean | undefined; >stringOrBooleanOrUndefined : string | boolean | undefined @@ -332,52 +364,60 @@ var stringOrBooleanOrUndefined = c.inMultipleMethods; >stringOrBooleanOrUndefined : string | boolean | undefined ->c.inMultipleMethods : string | boolean | undefined -+>c.inMultipleMethods : any ++>c.inMultipleMethods : string | boolean >c : C ->inMultipleMethods : string | boolean | undefined -+>inMultipleMethods : any ++>inMultipleMethods : string | boolean var any: any; >any : any -@@= skipped -25, +25 lines =@@ + + var any = c.inMethodNullable; + >any : any +->c.inMethodNullable : any ++>c.inMethodNullable : null | undefined + >c : C +->inMethodNullable : any ++>inMethodNullable : null | undefined + var stringOrNumberOrUndefined = C.inStaticMethod; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticMethod : string | number | undefined -+>C.inStaticMethod : any ++>C.inStaticMethod : string | number >C : typeof C ->inStaticMethod : string | number | undefined -+>inStaticMethod : any ++>inStaticMethod : string | number var stringOrNumberOrUndefined = C.inStaticGetter; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticGetter : string | number | undefined -+>C.inStaticGetter : any ++>C.inStaticGetter : string | number >C : typeof C ->inStaticGetter : string | number | undefined -+>inStaticGetter : any ++>inStaticGetter : string | number var stringOrNumberOrUndefined = C.inStaticSetter; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticSetter : string | number | undefined -+>C.inStaticSetter : any ++>C.inStaticSetter : string | number >C : typeof C ->inStaticSetter : string | number | undefined -+>inStaticSetter : any ++>inStaticSetter : string | number var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticPropertyDeclaration : string | number | undefined -+>C.inStaticPropertyDeclaration : any ++>C.inStaticPropertyDeclaration : string | number >C : typeof C ->inStaticPropertyDeclaration : string | number | undefined -+>inStaticPropertyDeclaration : any ++>inStaticPropertyDeclaration : string | number var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticNestedArrowFunction : string | number | undefined -+>C.inStaticNestedArrowFunction : any ++>C.inStaticNestedArrowFunction : string | number >C : typeof C ->inStaticNestedArrowFunction : string | number | undefined -+>inStaticNestedArrowFunction : any ++>inStaticNestedArrowFunction : string | number diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments3.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments3.errors.txt.diff deleted file mode 100644 index 5698f63863..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments3.errors.txt.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- old.inferringClassMembersFromAssignments3.errors.txt -+++ new.inferringClassMembersFromAssignments3.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+a.js(3,14): error TS2339: Property 'p' does not exist on type 'Base'. -+a.js(8,14): error TS2339: Property 'p' does not exist on type 'Derived'. -+ -+ -+==== a.js (2 errors) ==== -+ class Base { -+ constructor() { -+ this.p = 1 -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'Base'. -+ } -+ } -+ class Derived extends Base { -+ m() { -+ this.p = 1 -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'Derived'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments3.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments3.types.diff index f5fb882238..ca519459dc 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments3.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments3.types.diff @@ -1,14 +1,14 @@ --- old.inferringClassMembersFromAssignments3.types +++ new.inferringClassMembersFromAssignments3.types -@@= skipped -21, +21 lines =@@ - +@@= skipped -6, +6 lines =@@ + constructor() { this.p = 1 >this.p = 1 : 1 -->this.p : number -+>this.p : any +->this.p : any ++>this.p : number >this : this -->p : number -+>p : any +->p : any ++>p : number >1 : 1 } } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.errors.txt.diff deleted file mode 100644 index f3b80de9f3..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.errors.txt.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- old.inferringClassMembersFromAssignments4.errors.txt -+++ new.inferringClassMembersFromAssignments4.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+a.js(3,14): error TS2339: Property 'p' does not exist on type 'Base'. -+a.js(9,14): error TS2339: Property 'p' does not exist on type 'Derived'. -+ -+ -+==== a.js (2 errors) ==== -+ class Base { -+ m() { -+ this.p = 1 -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'Base'. -+ } -+ } -+ class Derived extends Base { -+ m() { -+ // should be OK, and p should have type number | undefined from its base -+ this.p = 1 -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'Derived'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.types.diff index 852a57769a..db04574201 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.types.diff @@ -5,10 +5,10 @@ this.p = 1 >this.p = 1 : 1 ->this.p : number | undefined -+>this.p : any ++>this.p : number >this : this ->p : number | undefined -+>p : any ++>p : number >1 : 1 } } @@ -17,10 +17,10 @@ this.p = 1 >this.p = 1 : 1 ->this.p : number | undefined -+>this.p : any ++>this.p : number >this : this ->p : number | undefined -+>p : any ++>p : number >1 : 1 } } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.errors.txt.diff deleted file mode 100644 index e0a01be094..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.errors.txt.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- old.inferringClassMembersFromAssignments5.errors.txt -+++ new.inferringClassMembersFromAssignments5.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+a.js(3,14): error TS2339: Property 'p' does not exist on type 'Base'. -+a.js(10,14): error TS2339: Property 'p' does not exist on type 'Derived'. -+a.js(13,21): error TS2339: Property 'p' does not exist on type 'Derived'. -+ -+ -+==== a.js (3 errors) ==== -+ class Base { -+ m() { -+ this.p = 1 -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'Base'. -+ } -+ } -+ class Derived extends Base { -+ constructor() { -+ super(); -+ // should be OK, and p should have type number from this assignment -+ this.p = 1 -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'Derived'. -+ } -+ test() { -+ return this.p -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'Derived'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.types.diff index 91e6ea876f..819c368e37 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.types.diff @@ -5,26 +5,22 @@ this.p = 1 >this.p = 1 : 1 ->this.p : number | undefined -+>this.p : any ++>this.p : number >this : this ->p : number | undefined -+>p : any ++>p : number >1 : 1 } } -@@= skipped -24, +24 lines =@@ +@@= skipped -18, +18 lines =@@ + // should be OK, and p should have type number from this assignment + this.p = 1 + >this.p = 1 : 1 +->this.p : any ++>this.p : number + >this : this +->p : any ++>p : number >1 : 1 } test() { -->test : () => number -+>test : () => any - - return this.p -->this.p : number -+>this.p : any - >this : this -->p : number -+>p : any - } - } - diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsClasses.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsClasses.errors.txt.diff index 1bec95b21f..f3b1f341e3 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsClasses.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsClasses.errors.txt.diff @@ -3,16 +3,10 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+index.js(138,14): error TS2339: Property 'p1' does not exist on type 'K'. -+index.js(139,14): error TS2339: Property 'p2' does not exist on type 'K'. -+index.js(143,21): error TS2339: Property 'p1' does not exist on type 'K'. -+index.js(151,14): error TS2339: Property 'prop' does not exist on type 'M'. -+index.js(165,14): error TS2339: Property 'another' does not exist on type 'N'. +index.js(173,24): error TS2314: Generic type 'N' requires 1 type argument(s). -+index.js(179,14): error TS2339: Property 'another2' does not exist on type 'O'. + + -+==== index.js (7 errors) ==== ++==== index.js (1 errors) ==== + export class A {} + + export class B { @@ -151,17 +145,11 @@ + export class K { + constructor() { + this.p1 = 12; -+ ~~ -+!!! error TS2339: Property 'p1' does not exist on type 'K'. + this.p2 = "ok"; -+ ~~ -+!!! error TS2339: Property 'p2' does not exist on type 'K'. + } + + method() { + return this.p1; -+ ~~ -+!!! error TS2339: Property 'p1' does not exist on type 'K'. + } + } + @@ -170,8 +158,6 @@ + export class M extends null { + constructor() { + this.prop = 12; -+ ~~~~ -+!!! error TS2339: Property 'prop' does not exist on type 'M'. + } + } + @@ -186,8 +172,6 @@ + constructor(param) { + super(); + this.another = param; -+ ~~~~~~~ -+!!! error TS2339: Property 'another' does not exist on type 'N'. + } + } + @@ -204,8 +188,6 @@ + constructor(param) { + super(param); + this.another2 = param; -+ ~~~~~~~~ -+!!! error TS2339: Property 'another2' does not exist on type 'O'. + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsClasses.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsClasses.types.diff index 0d9c718bdb..cd305ca105 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsClasses.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsClasses.types.diff @@ -16,23 +16,52 @@ /** * @param {U} _p -@@= skipped -147, +148 lines =@@ - } +@@= skipped -133, +134 lines =@@ + constructor() { + this.p1 = 12; + >this.p1 = 12 : 12 +->this.p1 : any ++>this.p1 : number + >this : this +->p1 : any ++>p1 : number + >12 : 12 - method() { -->method : () => number -+>method : () => any + this.p2 = "ok"; + >this.p2 = "ok" : "ok" +->this.p2 : any ++>this.p2 : string + >this : this +->p2 : any ++>p2 : string + >"ok" : "ok" + } - return this.p1; -->this.p1 : number -+>this.p1 : any +@@= skipped -33, +33 lines =@@ + constructor() { + this.prop = 12; + >this.prop = 12 : 12 +->this.prop : any ++>this.prop : number >this : this -->p1 : number -+>p1 : any +->prop : any ++>prop : number + >12 : 12 } } +@@= skipped -27, +27 lines =@@ -@@= skipped -59, +59 lines =@@ + this.another = param; + >this.another = param : T +->this.another : any ++>this.another : T + >this : this +->another : any ++>another : T + >param : T + } + } +@@= skipped -13, +13 lines =@@ */ export class O extends N { >O : O @@ -50,6 +79,15 @@ >param : U this.another2 = param; + >this.another2 = param : U +->this.another2 : any ++>this.another2 : U + >this : this +->another2 : any ++>another2 : U + >param : U + } + } @@= skipped -15, +15 lines =@@ var x = /** @type {*} */(null); >x : any diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpression.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpression.errors.txt.diff deleted file mode 100644 index 288a40cae0..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpression.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.jsDeclarationsExportAssignedClassExpression.errors.txt -+++ new.jsDeclarationsExportAssignedClassExpression.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+index.js(6,14): error TS2339: Property 't' does not exist on type 'Thing'. -+ -+ -+==== index.js (1 errors) ==== -+ module.exports = class Thing { -+ /** -+ * @param {number} p -+ */ -+ constructor(p) { -+ this.t = 12 + p; -+ ~ -+!!! error TS2339: Property 't' does not exist on type 'Thing'. -+ } -+ } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpression.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpression.types.diff index 3153f160e4..449736e092 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpression.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpression.types.diff @@ -19,3 +19,15 @@ /** * @param {number} p +@@= skipped -15, +15 lines =@@ + + this.t = 12 + p; + >this.t = 12 + p : number +->this.t : any ++>this.t : number + >this : this +->t : any ++>t : number + >12 + p : number + >12 : 12 + >p : number diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.errors.txt.diff deleted file mode 100644 index 0e5f5cccca..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.jsDeclarationsExportAssignedClassExpressionAnonymous.errors.txt -+++ new.jsDeclarationsExportAssignedClassExpressionAnonymous.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+index.js(6,14): error TS2339: Property 't' does not exist on type 'exports'. -+ -+ -+==== index.js (1 errors) ==== -+ module.exports = class { -+ /** -+ * @param {number} p -+ */ -+ constructor(p) { -+ this.t = 12 + p; -+ ~ -+!!! error TS2339: Property 't' does not exist on type 'exports'. -+ } -+ } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.types.diff index 2d6648eddc..10ae4e655f 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymous.types.diff @@ -17,3 +17,15 @@ /** * @param {number} p +@@= skipped -14, +14 lines =@@ + + this.t = 12 + p; + >this.t = 12 + p : number +->this.t : any ++>this.t : number + >this : this +->t : any ++>t : number + >12 + p : number + >12 : 12 + >p : number diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.errors.txt.diff index 612c1b8ec9..04c4c672f5 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.errors.txt.diff @@ -4,12 +4,10 @@ - @@= skipped --1, +1 lines =@@ +index.js(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -+index.js(6,14): error TS2339: Property 't' does not exist on type 'exports'. +index.js(9,16): error TS2339: Property 'Sub' does not exist on type 'typeof exports'. -+index.js(11,14): error TS2339: Property 'instance' does not exist on type 'Sub'. + + -+==== index.js (4 errors) ==== ++==== index.js (2 errors) ==== + module.exports = class { + ~~~~~~~~~~~~~~~~~~~~~~~~ + /** @@ -22,8 +20,6 @@ + ~~~~~~~~~~~~~~~~~~~~ + this.t = 12 + p; + ~~~~~~~~~~~~~~~~~~~~~~~~ -+ ~ -+!!! error TS2339: Property 't' does not exist on type 'exports'. + } + ~~~~~ + } @@ -34,8 +30,6 @@ +!!! error TS2339: Property 'Sub' does not exist on type 'typeof exports'. + constructor() { + this.instance = new module.exports(10); -+ ~~~~~~~~ -+!!! error TS2339: Property 'instance' does not exist on type 'Sub'. + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types.diff index 8e8fe32d4f..7b8df37871 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.types.diff @@ -17,7 +17,19 @@ /** * @param {number} p -@@= skipped -24, +24 lines =@@ +@@= skipped -14, +14 lines =@@ + + this.t = 12 + p; + >this.t = 12 + p : number +->this.t : any ++>this.t : number + >this : this +->t : any ++>t : number + >12 + p : number + >12 : 12 + >p : number +@@= skipped -10, +10 lines =@@ } module.exports.Sub = class { >module.exports.Sub = class { constructor() { this.instance = new module.exports(10); }} : typeof Sub @@ -36,14 +48,16 @@ constructor() { this.instance = new module.exports(10); ->this.instance = new module.exports(10) : import("index") +->this.instance : any +>this.instance = new module.exports(10) : exports - >this.instance : any ++>this.instance : exports >this : this - >instance : any +->instance : any ->new module.exports(10) : import("index") ->module.exports : typeof import("index") ->module : { exports: typeof import("index"); } ->exports : typeof import("index") ++>instance : exports +>new module.exports(10) : exports +>module.exports : typeof exports +>module : { exports: typeof exports; } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.errors.txt.diff index 276eb00680..96bfa9a047 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.errors.txt.diff @@ -4,11 +4,10 @@ - @@= skipped --1, +1 lines =@@ +index.js(7,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -+index.js(9,14): error TS2339: Property 'x' does not exist on type 'Q'. +index.js(12,16): error TS2339: Property 'Another' does not exist on type 'typeof Q'. + + -+==== index.js (3 errors) ==== ++==== index.js (2 errors) ==== + class A { + member = new Q(); + } @@ -21,8 +20,6 @@ + ~~~~~~~~~~~~~~~~~~~ + this.x = new A(); + ~~~~~~~~~~~~~~~~~~~~~~~~~ -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'Q'. + } + ~~~~~ + } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.types.diff index f92d4274cb..3e102ccd7d 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.types.diff @@ -19,7 +19,15 @@ constructor() { this.x = new A(); -@@= skipped -19, +19 lines =@@ + >this.x = new A() : A +->this.x : any ++>this.x : A + >this : this +->x : any ++>x : A + >new A() : A + >A : typeof A + } } module.exports.Another = Q; >module.exports.Another = Q : typeof Q diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedVisibility.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedVisibility.errors.txt.diff deleted file mode 100644 index 2aec7c2868..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedVisibility.errors.txt.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- old.jsDeclarationsExportAssignedVisibility.errors.txt -+++ new.jsDeclarationsExportAssignedVisibility.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+index.js(5,14): error TS2339: Property 'usage' does not exist on type 'Container'. -+obj.js(3,14): error TS2339: Property 'x' does not exist on type 'Obj'. -+ -+ -+==== index.js (1 errors) ==== -+ const Obj = require("./obj"); -+ -+ class Container { -+ constructor() { -+ this.usage = new Obj(); -+ ~~~~~ -+!!! error TS2339: Property 'usage' does not exist on type 'Container'. -+ } -+ } -+ -+ module.exports = Container; -+==== obj.js (1 errors) ==== -+ module.exports = class Obj { -+ constructor() { -+ this.x = 12; -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'Obj'. -+ } -+ } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedVisibility.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedVisibility.types.diff index 3831550e5e..733cb00018 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedVisibility.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsExportAssignedVisibility.types.diff @@ -1,6 +1,18 @@ --- old.jsDeclarationsExportAssignedVisibility.types +++ new.jsDeclarationsExportAssignedVisibility.types -@@= skipped -23, +23 lines =@@ +@@= skipped -12, +12 lines =@@ + constructor() { + this.usage = new Obj(); + >this.usage = new Obj() : Obj +->this.usage : any ++>this.usage : Obj + >this : this +->usage : any ++>usage : Obj + >new Obj() : Obj + >Obj : typeof Obj + } +@@= skipped -11, +11 lines =@@ module.exports = Container; >module.exports = Container : typeof Container >module.exports : typeof Container @@ -26,3 +38,12 @@ constructor() { this.x = 12; + >this.x = 12 : 12 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >12 : 12 + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.errors.txt.diff deleted file mode 100644 index 7d4cf65626..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.errors.txt.diff +++ /dev/null @@ -1,46 +0,0 @@ ---- old.jsDeclarationsFunctionJSDoc.errors.txt -+++ new.jsDeclarationsFunctionJSDoc.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+source.js(21,14): error TS2339: Property 'field' does not exist on type 'Aleph'. -+ -+ -+==== source.js (1 errors) ==== -+ /** -+ * Foos a bar together using an `a` and a `b` -+ * @param {number} a -+ * @param {string} b -+ */ -+ export function foo(a, b) {} -+ -+ /** -+ * Legacy - DO NOT USE -+ */ -+ export class Aleph { -+ /** -+ * Impossible to construct. -+ * @param {Aleph} a -+ * @param {null} b -+ */ -+ constructor(a, b) { -+ /** -+ * Field is always null -+ */ -+ this.field = b; -+ ~~~~~ -+!!! error TS2339: Property 'field' does not exist on type 'Aleph'. -+ } -+ -+ /** -+ * Doesn't actually do anything -+ * @returns {void} -+ */ -+ doIt() {} -+ } -+ -+ /** -+ * Not the speed of light -+ */ -+ export const c = 12; -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.types.diff new file mode 100644 index 0000000000..a4402124a3 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.types.diff @@ -0,0 +1,14 @@ +--- old.jsDeclarationsFunctionJSDoc.types ++++ new.jsDeclarationsFunctionJSDoc.types +@@= skipped -30, +30 lines =@@ + */ + this.field = b; + >this.field = b : null +->this.field : any ++>this.field : null + >this : this +->field : any ++>field : null + >b : null + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt.diff index 5027c64965..a44d110a97 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt.diff @@ -3,20 +3,15 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+index.js(9,14): error TS2339: Property 'objects' does not exist on type 'Render'. +index.js(14,18): error TS2749: 'Rectangle' refers to a value, but is being used as a type here. Did you mean 'typeof Rectangle'? -+index.js(18,14): error TS2339: Property 'objects' does not exist on type 'Render'. -+test.js(5,31): error TS2339: Property 'objects' does not exist on type 'Render'. + + -+==== test.js (1 errors) ==== ++==== test.js (0 errors) ==== + const {Render} = require("./index"); + let render = new Render(); + + render.addRectangle(); + console.log("Objects", render.objects); -+ ~~~~~~~ -+!!! error TS2339: Property 'objects' does not exist on type 'Render'. +==== rectangle.js (0 errors) ==== + class Rectangle { + constructor() { @@ -25,7 +20,7 @@ + } + + module.exports = { Rectangle }; -+==== index.js (3 errors) ==== ++==== index.js (1 errors) ==== + const {Rectangle} = require('./rectangle'); + + class Render { @@ -35,8 +30,6 @@ + * @type {Rectangle[]} + */ + this.objects = []; -+ ~~~~~~~ -+!!! error TS2339: Property 'objects' does not exist on type 'Render'. + } + /** + * Adds a rectangle @@ -48,8 +41,6 @@ + addRectangle() { + const obj = new Rectangle(); + this.objects.push(obj); -+ ~~~~~~~ -+!!! error TS2339: Property 'objects' does not exist on type 'Render'. + return obj; + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types.diff index 58686a8ded..c96146a0bd 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types.diff @@ -28,10 +28,10 @@ >log : (...data: any[]) => void >"Objects" : "Objects" ->render.objects : import("rectangle").Rectangle[] -+>render.objects : any ++>render.objects : any[] >render : Render ->objects : import("rectangle").Rectangle[] -+>objects : any ++>objects : any[] === rectangle.js === class Rectangle { @@ -63,32 +63,30 @@ this.objects = []; >this.objects = [] : undefined[] ->this.objects : Rectangle[] -+>this.objects : any ++>this.objects : any[] >this : this ->objects : Rectangle[] -+>objects : any ++>objects : any[] >[] : undefined[] } /** -@@= skipped -19, +19 lines =@@ - >Rectangle : typeof Rectangle +@@= skipped -20, +20 lines =@@ this.objects.push(obj); -->this.objects.push(obj) : number + >this.objects.push(obj) : number ->this.objects.push : (...items: Rectangle[]) => number ->this.objects : Rectangle[] -+>this.objects.push(obj) : any -+>this.objects.push : any -+>this.objects : any ++>this.objects.push : (...items: any[]) => number ++>this.objects : any[] >this : this ->objects : Rectangle[] ->push : (...items: Rectangle[]) => number -+>objects : any -+>push : any ++>objects : any[] ++>push : (...items: any[]) => number >obj : Rectangle return obj; -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ } module.exports = { Render }; diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt.diff index b57df579ed..b0283331e6 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt.diff @@ -4,8 +4,6 @@ - @@= skipped --1, +1 lines =@@ +conn.js(11,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -+usage.js(10,14): error TS2339: Property 'connItem' does not exist on type 'Wrap'. -+usage.js(12,14): error TS2339: Property 'another' does not exist on type 'Wrap'. +usage.js(16,1): error TS2309: An export assignment cannot be used in a module with other exported elements. + + @@ -24,7 +22,7 @@ + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. + -+==== usage.js (3 errors) ==== ++==== usage.js (1 errors) ==== + /** + * @typedef {import("./conn")} Conn + */ @@ -35,12 +33,8 @@ + */ + constructor(c) { + this.connItem = c.item; -+ ~~~~~~~~ -+!!! error TS2339: Property 'connItem' does not exist on type 'Wrap'. + /** @type {import("./conn").Whatever} */ + this.another = ""; -+ ~~~~~~~ -+!!! error TS2339: Property 'another' does not exist on type 'Wrap'. + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.types.diff index 486a0fd3c3..e7cb4630d5 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.types.diff @@ -18,9 +18,11 @@ this.connItem = c.item; >this.connItem = c.item : number -@@= skipped -8, +8 lines =@@ +->this.connItem : any ++>this.connItem : number >this : this - >connItem : any +->connItem : any ++>connItem : number >c.item : number ->c : import("conn") +>c : Conn @@ -30,10 +32,10 @@ this.another = ""; >this.another = "" : "" ->this.another : import("conn").Whatever -+>this.another : any ++>this.another : string >this : this ->another : import("conn").Whatever -+>another : any ++>another : string >"" : "" } } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff index 285849b668..3a70960907 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff @@ -4,18 +4,17 @@ - @@= skipped --1, +1 lines =@@ +a.js(2,10): error TS2339: Property 'a' does not exist on type '{}'. -+a.js(7,14): error TS2339: Property 'member' does not exist on type 'C'. -+a.js(8,14): error TS2339: Property 'member' does not exist on type 'C'. ++a.js(8,21): error TS2339: Property 'a' does not exist on type '{}'. +a.js(16,14): error TS2339: Property 'a' does not exist on type '{}'. +b.ts(1,10): error TS2339: Property 'a' does not exist on type '{}'. -+b.ts(2,11): error TS2339: Property 'member' does not exist on type 'C'. ++b.ts(2,18): error TS2339: Property 'a' does not exist on type '{}'. +b.ts(3,29): error TS2339: Property 'a' does not exist on type '{}'. +b.ts(4,14): error TS2339: Property 'a' does not exist on type '{}'. +b.ts(5,8): error TS2339: Property 'a' does not exist on type '{}'. +b.ts(6,10): error TS2339: Property 'a' does not exist on type '{}'. + + -+==== a.js (4 errors) ==== ++==== a.js (3 errors) ==== + var variable = {}; + variable.a = 0; + ~ @@ -25,11 +24,9 @@ + initializedMember = {}; + constructor() { + this.member = {}; -+ ~~~~~~ -+!!! error TS2339: Property 'member' does not exist on type 'C'. + this.member.a = 0; -+ ~~~~~~ -+!!! error TS2339: Property 'member' does not exist on type 'C'. ++ ~ ++!!! error TS2339: Property 'a' does not exist on type '{}'. + } + } + @@ -53,8 +50,8 @@ + ~ +!!! error TS2339: Property 'a' does not exist on type '{}'. + (new C()).member.a = 1; -+ ~~~~~~ -+!!! error TS2339: Property 'member' does not exist on type 'C'. ++ ~ ++!!! error TS2339: Property 'a' does not exist on type '{}'. + (new C()).initializedMember.a = 1; + ~ +!!! error TS2339: Property 'a' does not exist on type '{}'. diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.types.diff index 19dfb2b60b..8bfa8cd7b1 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.types.diff @@ -19,21 +19,25 @@ >0 : 0 class C { -@@= skipped -27, +27 lines =@@ +@@= skipped -20, +20 lines =@@ + constructor() { + this.member = {}; + >this.member = {} : {} +->this.member : any ++>this.member : {} + >this : this +->member : any ++>member : {} + >{} : {} this.member.a = 0; >this.member.a = 0 : 0 ->this.member.a : error -->this.member : {} +>this.member.a : any -+>this.member : any + >this.member : {} >this : this -->member : {} -+>member : any - >a : any - >0 : 0 - } -@@= skipped -21, +21 lines =@@ + >member : {} +@@= skipped -28, +28 lines =@@ obj.property.a = 0; >obj.property.a = 0 : 0 @@ -55,15 +59,3 @@ >1 : 1 (new C()).member.a = 1; - >(new C()).member.a = 1 : 1 - >(new C()).member.a : any -->(new C()).member : {} -+>(new C()).member : any - >(new C()) : C - >new C() : C - >C : typeof C -->member : {} -+>member : any - >a : any - >1 : 1 - diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTags.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTags.errors.txt.diff index d88a415633..a9461e2374 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTags.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTags.errors.txt.diff @@ -1,6 +1,6 @@ --- old.jsdocAccessibilityTags.errors.txt +++ new.jsdocAccessibilityTags.errors.txt -@@= skipped -0, +0 lines =@@ +@@= skipped -0, +-1 lines =@@ -jsdocAccessibilityTag.js(50,14): error TS2341: Property 'priv' is private and only accessible within class 'A'. -jsdocAccessibilityTag.js(55,14): error TS2341: Property 'priv2' is private and only accessible within class 'C'. -jsdocAccessibilityTag.js(58,9): error TS2341: Property 'priv' is private and only accessible within class 'A'. @@ -11,98 +11,90 @@ -jsdocAccessibilityTag.js(60,25): error TS2445: Property 'prot2' is protected and only accessible within class 'C' and its subclasses. -jsdocAccessibilityTag.js(61,9): error TS2341: Property 'priv2' is private and only accessible within class 'C'. -jsdocAccessibilityTag.js(61,25): error TS2445: Property 'prot2' is protected and only accessible within class 'C' and its subclasses. -+jsdocAccessibilityTag.js(32,14): error TS2339: Property 'priv2' does not exist on type 'C'. -+jsdocAccessibilityTag.js(38,14): error TS2339: Property 'prot2' does not exist on type 'C'. -+jsdocAccessibilityTag.js(44,14): error TS2339: Property 'pub2' does not exist on type 'C'. -+jsdocAccessibilityTag.js(46,23): error TS2339: Property 'priv2' does not exist on type 'C'. -+jsdocAccessibilityTag.js(55,14): error TS2339: Property 'priv2' does not exist on type 'D'. -+jsdocAccessibilityTag.js(55,27): error TS2339: Property 'prot2' does not exist on type 'D'. -+jsdocAccessibilityTag.js(55,40): error TS2339: Property 'pub2' does not exist on type 'D'. -+jsdocAccessibilityTag.js(60,9): error TS2339: Property 'priv2' does not exist on type 'C'. -+jsdocAccessibilityTag.js(60,25): error TS2339: Property 'prot2' does not exist on type 'C'. -+jsdocAccessibilityTag.js(60,41): error TS2339: Property 'pub2' does not exist on type 'C'. -+jsdocAccessibilityTag.js(61,9): error TS2339: Property 'priv2' does not exist on type 'D'. -+jsdocAccessibilityTag.js(61,25): error TS2339: Property 'prot2' does not exist on type 'D'. -+jsdocAccessibilityTag.js(61,41): error TS2339: Property 'pub2' does not exist on type 'D'. - - +- +- -==== jsdocAccessibilityTag.js (10 errors) ==== -+==== jsdocAccessibilityTag.js (13 errors) ==== - class A { - /** - * Ap docs -@@= skipped -42, +45 lines =@@ - * @private - */ - this.priv2 = 1; -+ ~~~~~ -+!!! error TS2339: Property 'priv2' does not exist on type 'C'. - /** - * Cq docs - * - * @protected - */ - this.prot2 = 2; -+ ~~~~~ -+!!! error TS2339: Property 'prot2' does not exist on type 'C'. - /** - * Cr docs - * - * @public - */ - this.pub2 = 3; -+ ~~~~ -+!!! error TS2339: Property 'pub2' does not exist on type 'C'. - } - h() { return this.priv2 } -+ ~~~~~ -+!!! error TS2339: Property 'priv2' does not exist on type 'C'. - } - class B extends A { - m() { - this.priv + this.prot + this.pub +- class A { +- /** +- * Ap docs +- * +- * @private +- */ +- priv = 4; +- /** +- * Aq docs +- * +- * @protected +- */ +- prot = 5; +- /** +- * Ar docs +- * +- * @public +- */ +- pub = 6; +- /** @public */ +- get ack() { return this.priv } +- /** @private */ +- set ack(value) { } +- } +- class C { +- constructor() { +- /** +- * Cp docs +- * +- * @private +- */ +- this.priv2 = 1; +- /** +- * Cq docs +- * +- * @protected +- */ +- this.prot2 = 2; +- /** +- * Cr docs +- * +- * @public +- */ +- this.pub2 = 3; +- } +- h() { return this.priv2 } +- } +- class B extends A { +- m() { +- this.priv + this.prot + this.pub - ~~~~ -!!! error TS2341: Property 'priv' is private and only accessible within class 'A'. - } - } - class D extends C { - n() { - this.priv2 + this.prot2 + this.pub2 - ~~~~~ +- } +- } +- class D extends C { +- n() { +- this.priv2 + this.prot2 + this.pub2 +- ~~~~~ -!!! error TS2341: Property 'priv2' is private and only accessible within class 'C'. -+!!! error TS2339: Property 'priv2' does not exist on type 'D'. -+ ~~~~~ -+!!! error TS2339: Property 'prot2' does not exist on type 'D'. -+ ~~~~ -+!!! error TS2339: Property 'pub2' does not exist on type 'D'. - } - } - new A().priv + new A().prot + new A().pub +- } +- } +- new A().priv + new A().prot + new A().pub - ~~~~ -!!! error TS2341: Property 'priv' is private and only accessible within class 'A'. - ~~~~ -!!! error TS2445: Property 'prot' is protected and only accessible within class 'A' and its subclasses. - new B().priv + new B().prot + new B().pub +- new B().priv + new B().prot + new B().pub - ~~~~ -!!! error TS2341: Property 'priv' is private and only accessible within class 'A'. - ~~~~ -!!! error TS2445: Property 'prot' is protected and only accessible within class 'A' and its subclasses. - new C().priv2 + new C().prot2 + new C().pub2 - ~~~~~ +- new C().priv2 + new C().prot2 + new C().pub2 +- ~~~~~ -!!! error TS2341: Property 'priv2' is private and only accessible within class 'C'. -+!!! error TS2339: Property 'priv2' does not exist on type 'C'. - ~~~~~ +- ~~~~~ -!!! error TS2445: Property 'prot2' is protected and only accessible within class 'C' and its subclasses. -+!!! error TS2339: Property 'prot2' does not exist on type 'C'. -+ ~~~~ -+!!! error TS2339: Property 'pub2' does not exist on type 'C'. - new D().priv2 + new D().prot2 + new D().pub2 - ~~~~~ +- new D().priv2 + new D().prot2 + new D().pub2 +- ~~~~~ -!!! error TS2341: Property 'priv2' is private and only accessible within class 'C'. -+!!! error TS2339: Property 'priv2' does not exist on type 'D'. - ~~~~~ +- ~~~~~ -!!! error TS2445: Property 'prot2' is protected and only accessible within class 'C' and its subclasses. -+!!! error TS2339: Property 'prot2' does not exist on type 'D'. -+ ~~~~ -+!!! error TS2339: Property 'pub2' does not exist on type 'D'. - +- +@@= skipped --1, +1 lines =@@ ++ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTags.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTags.types.diff index 29f27d053a..d086697409 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTags.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTags.types.diff @@ -1,93 +1,38 @@ --- old.jsdocAccessibilityTags.types +++ new.jsdocAccessibilityTags.types -@@= skipped -83, +83 lines =@@ - >3 : 3 - } - h() { return this.priv2 } -->h : () => number -->this.priv2 : number -+>h : () => any -+>this.priv2 : any +@@= skipped -53, +53 lines =@@ + */ + this.priv2 = 1; + >this.priv2 = 1 : 1 +->this.priv2 : any ++>this.priv2 : number >this : this -->priv2 : number -+>priv2 : any - } - class B extends A { - >B : B -@@= skipped -34, +34 lines =@@ - >n : () => void +->priv2 : any ++>priv2 : number + >1 : 1 - this.priv2 + this.prot2 + this.pub2 -->this.priv2 + this.prot2 + this.pub2 : number -->this.priv2 + this.prot2 : number -->this.priv2 : number -+>this.priv2 + this.prot2 + this.pub2 : any -+>this.priv2 + this.prot2 : any -+>this.priv2 : any + /** +@@= skipped -12, +12 lines =@@ + */ + this.prot2 = 2; + >this.prot2 = 2 : 2 +->this.prot2 : any ++>this.prot2 : number >this : this -->priv2 : number -->this.prot2 : number -+>priv2 : any -+>this.prot2 : any - >this : this -->prot2 : number -->this.pub2 : number -+>prot2 : any -+>this.pub2 : any +->prot2 : any ++>prot2 : number + >2 : 2 + + /** +@@= skipped -12, +12 lines =@@ + */ + this.pub2 = 3; + >this.pub2 = 3 : 3 +->this.pub2 : any ++>this.pub2 : number >this : this -->pub2 : number -+>pub2 : any +->pub2 : any ++>pub2 : number + >3 : 3 } - } - new A().priv + new A().prot + new A().pub -@@= skipped -46, +46 lines =@@ - >pub : number - - new C().priv2 + new C().prot2 + new C().pub2 -->new C().priv2 + new C().prot2 + new C().pub2 : number -->new C().priv2 + new C().prot2 : number -->new C().priv2 : number -+>new C().priv2 + new C().prot2 + new C().pub2 : any -+>new C().priv2 + new C().prot2 : any -+>new C().priv2 : any - >new C() : C - >C : typeof C -->priv2 : number -->new C().prot2 : number -+>priv2 : any -+>new C().prot2 : any - >new C() : C - >C : typeof C -->prot2 : number -->new C().pub2 : number -+>prot2 : any -+>new C().pub2 : any - >new C() : C - >C : typeof C -->pub2 : number -+>pub2 : any - - new D().priv2 + new D().prot2 + new D().pub2 -->new D().priv2 + new D().prot2 + new D().pub2 : number -->new D().priv2 + new D().prot2 : number -->new D().priv2 : number -+>new D().priv2 + new D().prot2 + new D().pub2 : any -+>new D().priv2 + new D().prot2 : any -+>new D().priv2 : any - >new D() : D - >D : typeof D -->priv2 : number -->new D().prot2 : number -+>priv2 : any -+>new D().prot2 : any - >new D() : D - >D : typeof D -->prot2 : number -->new D().pub2 : number -+>prot2 : any -+>new D().pub2 : any - >new D() : D - >D : typeof D -->pub2 : number -+>pub2 : any - + h() { return this.priv2 } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTagsDeclarations.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTagsDeclarations.errors.txt.diff deleted file mode 100644 index 0d06a20026..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTagsDeclarations.errors.txt.diff +++ /dev/null @@ -1,70 +0,0 @@ ---- old.jsdocAccessibilityTagsDeclarations.errors.txt -+++ new.jsdocAccessibilityTagsDeclarations.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+jsdocAccessibilityTagDeclarations.js(5,14): error TS2339: Property 'c' does not exist on type 'Protected'. -+jsdocAccessibilityTagDeclarations.js(9,21): error TS2339: Property 'c' does not exist on type 'Protected'. -+jsdocAccessibilityTagDeclarations.js(12,27): error TS2339: Property 'c' does not exist on type 'Protected'. -+jsdocAccessibilityTagDeclarations.js(14,25): error TS2339: Property 'c' does not exist on type 'Protected'. -+jsdocAccessibilityTagDeclarations.js(21,14): error TS2339: Property 'c' does not exist on type 'Private'. -+jsdocAccessibilityTagDeclarations.js(25,21): error TS2339: Property 'c' does not exist on type 'Private'. -+jsdocAccessibilityTagDeclarations.js(28,27): error TS2339: Property 'c' does not exist on type 'Private'. -+jsdocAccessibilityTagDeclarations.js(30,25): error TS2339: Property 'c' does not exist on type 'Private'. -+ -+ -+==== jsdocAccessibilityTagDeclarations.js (8 errors) ==== -+ class Protected { -+ /** @protected */ -+ constructor(c) { -+ /** @protected */ -+ this.c = c -+ ~ -+!!! error TS2339: Property 'c' does not exist on type 'Protected'. -+ } -+ /** @protected */ -+ m() { -+ return this.c -+ ~ -+!!! error TS2339: Property 'c' does not exist on type 'Protected'. -+ } -+ /** @protected */ -+ get p() { return this.c } -+ ~ -+!!! error TS2339: Property 'c' does not exist on type 'Protected'. -+ /** @protected */ -+ set p(value) { this.c = value } -+ ~ -+!!! error TS2339: Property 'c' does not exist on type 'Protected'. -+ } -+ -+ class Private { -+ /** @private */ -+ constructor(c) { -+ /** @private */ -+ this.c = c -+ ~ -+!!! error TS2339: Property 'c' does not exist on type 'Private'. -+ } -+ /** @private */ -+ m() { -+ return this.c -+ ~ -+!!! error TS2339: Property 'c' does not exist on type 'Private'. -+ } -+ /** @private */ -+ get p() { return this.c } -+ ~ -+!!! error TS2339: Property 'c' does not exist on type 'Private'. -+ /** @private */ -+ set p(value) { this.c = value } -+ ~ -+!!! error TS2339: Property 'c' does not exist on type 'Private'. -+ } -+ -+ // https://github.com/microsoft/TypeScript/issues/38401 -+ class C { -+ constructor(/** @public */ x, /** @protected */ y, /** @private */ z) { -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugmentsMissingType.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugmentsMissingType.errors.txt.diff index 9de5bef435..0a817b657d 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugmentsMissingType.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugmentsMissingType.errors.txt.diff @@ -1,22 +1,25 @@ --- old.jsdocAugmentsMissingType.errors.txt +++ new.jsdocAugmentsMissingType.errors.txt -@@= skipped -0, +0 lines =@@ +@@= skipped -0, +-1 lines =@@ -/a.js(2,14): error TS1003: Identifier expected. -/a.js(2,14): error TS8023: JSDoc '@augments ' does not match the 'extends A' clause. -+/a.js(1,32): error TS2339: Property 'x' does not exist on type 'A'. - /a.js(5,14): error TS2339: Property 'x' does not exist on type 'B'. - - +-/a.js(5,14): error TS2339: Property 'x' does not exist on type 'B'. +- +- -==== /a.js (3 errors) ==== -+==== /a.js (2 errors) ==== - class A { constructor() { this.x = 0; } } -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'A'. - /** @augments */ +- class A { constructor() { this.x = 0; } } +- /** @augments */ - -!!! error TS1003: Identifier expected. - -!!! error TS8023: JSDoc '@augments ' does not match the 'extends A' clause. - class B extends A { - m() { - this.x +- class B extends A { +- m() { +- this.x +- ~ +-!!! error TS2339: Property 'x' does not exist on type 'B'. +- } +- } +- +@@= skipped --1, +1 lines =@@ ++ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugmentsMissingType.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugmentsMissingType.types.diff index 0f8d40e0f0..a853c79c01 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugmentsMissingType.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugmentsMissingType.types.diff @@ -1,6 +1,16 @@ --- old.jsdocAugmentsMissingType.types +++ new.jsdocAugmentsMissingType.types -@@= skipped -11, +11 lines =@@ +@@= skipped -3, +3 lines =@@ + class A { constructor() { this.x = 0; } } + >A : A + >this.x = 0 : 0 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >0 : 0 + /** @augments */ class B extends A { >B : B @@ -9,3 +19,13 @@ m() { >m : () => void + + this.x +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugments_noExtends.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugments_noExtends.errors.txt.diff deleted file mode 100644 index 6442fadc8c..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugments_noExtends.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.jsdocAugments_noExtends.errors.txt -+++ new.jsdocAugments_noExtends.errors.txt -@@= skipped -0, +0 lines =@@ -+/b.js(1,32): error TS2339: Property 'x' does not exist on type 'A'. - /b.js(6,21): error TS2339: Property 'x' does not exist on type 'B'. - - --==== /b.js (1 errors) ==== -+==== /b.js (2 errors) ==== - class A { constructor() { this.x = 0; } } -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'A'. - - /** @augments A */ - class B { diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugments_noExtends.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugments_noExtends.types.diff new file mode 100644 index 0000000000..df81e3d526 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAugments_noExtends.types.diff @@ -0,0 +1,14 @@ +--- old.jsdocAugments_noExtends.types ++++ new.jsdocAugments_noExtends.types +@@= skipped -3, +3 lines =@@ + class A { constructor() { this.x = 0; } } + >A : A + >this.x = 0 : 0 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >0 : 0 + + /** @augments A */ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocFunctionType.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocFunctionType.errors.txt.diff index 4dfb3b025c..b1a3774884 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocFunctionType.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocFunctionType.errors.txt.diff @@ -8,7 +8,6 @@ +functions.js(9,23): error TS7006: Parameter 'n' implicitly has an 'any' type. +functions.js(13,13): error TS2552: Cannot find name 'function'. Did you mean 'Function'? +functions.js(15,14): error TS7006: Parameter 'c' implicitly has an 'any' type. -+functions.js(22,14): error TS2339: Property 'length' does not exist on type 'C'. +functions.js(30,12): error TS2552: Cannot find name 'function'. Did you mean 'Function'? +functions.js(31,19): error TS7006: Parameter 'ab' implicitly has an 'any' type. +functions.js(31,23): error TS7006: Parameter 'onetwo' implicitly has an 'any' type. @@ -18,7 +17,7 @@ -==== functions.js (1 errors) ==== -+==== functions.js (12 errors) ==== ++==== functions.js (11 errors) ==== /** * @param {function(this: string, number): number} c is just passing on through * @return {function(this: string, number): number} @@ -49,16 +48,7 @@ return c } -@@= skipped -24, +46 lines =@@ - /** @param {number} n */ - constructor(n) { - this.length = n; -+ ~~~~~~ -+!!! error TS2339: Property 'length' does not exist on type 'C'. - } - } - -@@= skipped -8, +10 lines =@@ +@@= skipped -32, +53 lines =@@ z.length; /** @type {function ("a" | "b", 1 | 2): 3 | 4} */ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocFunctionType.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocFunctionType.types.diff index 99cde71581..4e884e2d45 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocFunctionType.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocFunctionType.types.diff @@ -52,7 +52,17 @@ } class C { -@@= skipped -48, +48 lines =@@ +@@= skipped -40, +40 lines =@@ + + this.length = n; + >this.length = n : number +->this.length : any ++>this.length : number + >this : this +->length : any ++>length : number + >n : number + } } var y = id2(C); @@ -98,7 +108,7 @@ >"a" : "a" >3 : 3 >4 : 4 -@@= skipped -35, +35 lines =@@ +@@= skipped -43, +43 lines =@@ * @param {number} n */ function D(n) { diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_missingType.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_missingType.errors.txt.diff index 0734814354..502ab88f73 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_missingType.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_missingType.errors.txt.diff @@ -1,17 +1,16 @@ --- old.jsdocImplements_missingType.errors.txt +++ new.jsdocImplements_missingType.errors.txt -@@= skipped -0, +0 lines =@@ +@@= skipped -0, +-1 lines =@@ -/a.js(2,16): error TS1003: Identifier expected. -+/a.js(1,32): error TS2339: Property 'x' does not exist on type 'A'. - - - ==== /a.js (1 errors) ==== - class A { constructor() { this.x = 0; } } -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'A'. - /** @implements */ +- +- +-==== /a.js (1 errors) ==== +- class A { constructor() { this.x = 0; } } +- /** @implements */ - -!!! error TS1003: Identifier expected. - class B { - } - +- class B { +- } +- +@@= skipped --1, +1 lines =@@ ++ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_missingType.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_missingType.types.diff new file mode 100644 index 0000000000..7945a3a74d --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_missingType.types.diff @@ -0,0 +1,14 @@ +--- old.jsdocImplements_missingType.types ++++ new.jsdocImplements_missingType.types +@@= skipped -3, +3 lines =@@ + class A { constructor() { this.x = 0; } } + >A : A + >this.x = 0 : 0 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >0 : 0 + + /** @implements */ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_properties.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_properties.errors.txt.diff index 7479ac4f94..31394dd836 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_properties.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_properties.errors.txt.diff @@ -1,31 +1,28 @@ --- old.jsdocImplements_properties.errors.txt +++ new.jsdocImplements_properties.errors.txt -@@= skipped -0, +0 lines =@@ +@@= skipped -0, +-1 lines =@@ -/a.js(3,7): error TS2720: Class 'B' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? - Property 'x' is missing in type 'B' but required in type 'A'. -+/a.js(1,32): error TS2339: Property 'x' does not exist on type 'A'. -+/a.js(12,26): error TS2339: Property 'x' does not exist on type 'B3'. - - +- +- -==== /a.js (1 errors) ==== -+==== /a.js (2 errors) ==== - class A { constructor() { this.x = 0; } } -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'A'. - /** @implements A*/ - class B {} +- class A { constructor() { this.x = 0; } } +- /** @implements A*/ +- class B {} - ~ -!!! error TS2720: Class 'B' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? -!!! error TS2720: Property 'x' is missing in type 'B' but required in type 'A'. -!!! related TS2728 /a.js:1:27: 'x' is declared here. - - /** @implements A*/ - class B2 { -@@= skipped -18, +16 lines =@@ - /** @implements {A}*/ - class B3 { - constructor() { this.x = 10 } -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'B3'. - } - +- +- /** @implements A*/ +- class B2 { +- x = 10 +- } +- +- /** @implements {A}*/ +- class B3 { +- constructor() { this.x = 10 } +- } +- +@@= skipped --1, +1 lines =@@ ++ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_properties.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_properties.types.diff new file mode 100644 index 0000000000..81b5f8ca21 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImplements_properties.types.diff @@ -0,0 +1,26 @@ +--- old.jsdocImplements_properties.types ++++ new.jsdocImplements_properties.types +@@= skipped -3, +3 lines =@@ + class A { constructor() { this.x = 0; } } + >A : A + >this.x = 0 : 0 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >0 : 0 + + /** @implements A*/ +@@= skipped -24, +24 lines =@@ + + constructor() { this.x = 10 } + >this.x = 10 : 10 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >10 : 10 + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType.errors.txt.diff deleted file mode 100644 index 03bb8c02fb..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType.errors.txt.diff +++ /dev/null @@ -1,41 +0,0 @@ ---- old.jsdocImportType.errors.txt -+++ new.jsdocImportType.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+mod1.js(4,14): error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+use.js(5,3): error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+use.js(10,3): error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+ -+ -+==== use.js (2 errors) ==== -+ /// -+ /** @typedef {import("./mod1")} C -+ * @type {C} */ -+ var c; -+ c.chunk; -+ ~~~~~ -+!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+ -+ const D = require("./mod1"); -+ /** @type {D} */ -+ var d; -+ d.chunk; -+ ~~~~~ -+!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+ -+==== types.d.ts (0 errors) ==== -+ declare function require(name: string): any; -+ declare var exports: any; -+ declare var module: { exports: any }; -+==== mod1.js (1 errors) ==== -+ /// -+ class Chunk { -+ constructor() { -+ this.chunk = 1; -+ ~~~~~ -+!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+ } -+ } -+ module.exports = Chunk; -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType.types.diff index e8fd4b4a33..dee5d74d63 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType.types.diff @@ -8,12 +8,10 @@ +>c : Chunk c.chunk; -->c.chunk : number + >c.chunk : number ->c : D -->chunk : number -+>c.chunk : any +>c : Chunk -+>chunk : any + >chunk : number const D = require("./mod1"); ->D : typeof D @@ -29,16 +27,24 @@ +>d : Chunk d.chunk; -->d.chunk : number + >d.chunk : number ->d : D -->chunk : number -+>d.chunk : any +>d : Chunk -+>chunk : any + >chunk : number === types.d.ts === - declare function require(name: string): any; -@@= skipped -51, +51 lines =@@ +@@= skipped -42, +42 lines =@@ + constructor() { + this.chunk = 1; + >this.chunk = 1 : 1 +->this.chunk : any ++>this.chunk : number + >this : this +->chunk : any ++>chunk : number + >1 : 1 + } + } module.exports = Chunk; >module.exports = Chunk : typeof Chunk >module.exports : typeof Chunk diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType2.errors.txt.diff deleted file mode 100644 index 12f4ebdfcd..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType2.errors.txt.diff +++ /dev/null @@ -1,40 +0,0 @@ ---- old.jsdocImportType2.errors.txt -+++ new.jsdocImportType2.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+mod1.js(4,14): error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+use.js(5,3): error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+use.js(10,3): error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+ -+ -+==== use.js (2 errors) ==== -+ /// -+ /** @typedef {import("./mod1")} C -+ * @type {C} */ -+ var c; -+ c.chunk; -+ ~~~~~ -+!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+ -+ const D = require("./mod1"); -+ /** @type {D} */ -+ var d; -+ d.chunk; -+ ~~~~~ -+!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+ -+==== types.d.ts (0 errors) ==== -+ declare function require(name: string): any; -+ declare var exports: any; -+ declare var module: { exports: any }; -+==== mod1.js (1 errors) ==== -+ /// -+ module.exports = class Chunk { -+ constructor() { -+ this.chunk = 1; -+ ~~~~~ -+!!! error TS2339: Property 'chunk' does not exist on type 'Chunk'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType2.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType2.types.diff index c7fb6a7a42..348a393d5a 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType2.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocImportType2.types.diff @@ -8,12 +8,10 @@ +>c : Chunk c.chunk; -->c.chunk : number + >c.chunk : number ->c : D -->chunk : number -+>c.chunk : any +>c : Chunk -+>chunk : any + >chunk : number const D = require("./mod1"); ->D : typeof D @@ -29,15 +27,12 @@ +>d : Chunk d.chunk; -->d.chunk : number + >d.chunk : number ->d : D -->chunk : number -+>d.chunk : any +>d : Chunk -+>chunk : any + >chunk : number === types.d.ts === - declare function require(name: string): any; @@= skipped -37, +37 lines =@@ === mod1.js === /// @@ -57,3 +52,12 @@ constructor() { this.chunk = 1; + >this.chunk = 1 : 1 +->this.chunk : any ++>this.chunk : number + >this : this +->chunk : any ++>chunk : number + >1 : 1 + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonly.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonly.errors.txt.diff index a632495de8..3b894ef5e5 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonly.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonly.errors.txt.diff @@ -1,22 +1,35 @@ --- old.jsdocReadonly.errors.txt +++ new.jsdocReadonly.errors.txt -@@= skipped -0, +0 lines =@@ +@@= skipped -0, +-1 lines =@@ -jsdocReadonly.js(23,3): error TS2540: Cannot assign to 'y' because it is a read-only property. -+jsdocReadonly.js(18,14): error TS2339: Property 'ka' does not exist on type 'LOL'. - - - ==== jsdocReadonly.js (1 errors) ==== -@@= skipped -19, +19 lines =@@ - this.y = 2 - /** @readonly ok */ - this.ka = 2 -+ ~~ -+!!! error TS2339: Property 'ka' does not exist on type 'LOL'. - } - } - - var l = new LOL() - l.y = 12 +- +- +-==== jsdocReadonly.js (1 errors) ==== +- class LOL { +- /** +- * @readonly +- * @private +- * @type {number} +- * Order rules do not apply to JSDoc +- */ +- x = 1 +- /** @readonly */ +- y = 2 +- /** @readonly Definitely not here */ +- static z = 3 +- /** @readonly This is OK too */ +- constructor() { +- /** ok */ +- this.y = 2 +- /** @readonly ok */ +- this.ka = 2 +- } +- } +- +- var l = new LOL() +- l.y = 12 - ~ -!!! error TS2540: Cannot assign to 'y' because it is a read-only property. - +- +@@= skipped --1, +1 lines =@@ ++ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonly.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonly.types.diff index 00845af177..f8ea83fb4c 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonly.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonly.types.diff @@ -27,6 +27,16 @@ >2 : 2 /** @readonly ok */ + this.ka = 2 + >this.ka = 2 : 2 +->this.ka : any ++>this.ka : number + >this : this +->ka : any ++>ka : number + >2 : 2 + } + } @@= skipped -22, +22 lines =@@ l.y = 12 diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.errors.txt.diff index b9ffe7522a..052053481b 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.errors.txt.diff @@ -3,11 +3,10 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+jsdocReadonlyDeclarations.js(11,14): error TS2339: Property 'y' does not exist on type 'C'. +jsdocReadonlyDeclarations.js(14,1): error TS2554: Expected 1 arguments, but got 0. + + -+==== jsdocReadonlyDeclarations.js (2 errors) ==== ++==== jsdocReadonlyDeclarations.js (1 errors) ==== + class C { + /** @readonly */ + x = 6 @@ -19,8 +18,6 @@ + * @type {number} + */ + this.y = n -+ ~ -+!!! error TS2339: Property 'y' does not exist on type 'C'. + } + } + new C().x diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateClass.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateClass.errors.txt.diff deleted file mode 100644 index cd447865f2..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateClass.errors.txt.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- old.jsdocTemplateClass.errors.txt -+++ new.jsdocTemplateClass.errors.txt -@@= skipped -0, +0 lines =@@ --templateTagOnClasses.js(25,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -+templateTagOnClasses.js(10,14): error TS2339: Property 'a' does not exist on type 'Foo'. -+templateTagOnClasses.js(25,3): error TS2339: Property 'a' does not exist on type 'Foo'. -+templateTagOnClasses.js(25,9): error TS2339: Property 'a' does not exist on type 'Foo'. - - --==== templateTagOnClasses.js (1 errors) ==== -+==== templateTagOnClasses.js (3 errors) ==== - /** - * @template T - * @typedef {(t: T) => T} Id -@@= skipped -11, +13 lines =@@ - /** @param {T} x */ - constructor (x) { - this.a = x -+ ~ -+!!! error TS2339: Property 'a' does not exist on type 'Foo'. - } - /** - * -@@= skipped -15, +17 lines =@@ - var f = new Foo(1) - var g = new Foo(false) - f.a = g.a -- ~~~ --!!! error TS2322: Type 'boolean' is not assignable to type 'number'. -+ ~ -+!!! error TS2339: Property 'a' does not exist on type 'Foo'. -+ ~ -+!!! error TS2339: Property 'a' does not exist on type 'Foo'. - diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateClass.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateClass.types.diff index 8037c04cb3..ae5f814716 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateClass.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateClass.types.diff @@ -1,6 +1,18 @@ --- old.jsdocTemplateClass.types +++ new.jsdocTemplateClass.types -@@= skipped -28, +28 lines =@@ +@@= skipped -15, +15 lines =@@ + + this.a = x + >this.a = x : T +->this.a : any ++>this.a : T + >this : this +->a : any ++>a : T + >x : T + } + /** +@@= skipped -13, +13 lines =@@ * @return {T} */ foo(x, y, alpha) { @@ -20,20 +32,3 @@ >x : T } } -@@= skipped -26, +26 lines =@@ - >false : false - - f.a = g.a -->f.a = g.a : boolean -->f.a : number -+>f.a = g.a : any -+>f.a : any - >f : Foo -->a : number -->g.a : boolean -+>a : any -+>g.a : any - >g : Foo -->a : boolean -+>a : any - diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfClassExpression.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfClassExpression.errors.txt.diff index 50c492237b..843b43861f 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfClassExpression.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfClassExpression.errors.txt.diff @@ -4,7 +4,6 @@ - @@= skipped --1, +1 lines =@@ +MC.js(5,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -+MW.js(8,10): error TS2339: Property 'compiler' does not exist on type 'MW'. +MW.js(12,1): error TS2309: An export assignment cannot be used in a module with other exported elements. + + @@ -25,7 +24,7 @@ + ~ +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. + -+==== MW.js (2 errors) ==== ++==== MW.js (1 errors) ==== + /** @typedef {import("./MC")} MC */ + + class MW { @@ -34,8 +33,6 @@ + */ + constructor(compiler) { + this.compiler = compiler; -+ ~~~~~~~~ -+!!! error TS2339: Property 'compiler' does not exist on type 'MW'. + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfClassExpression.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfClassExpression.types.diff index 63eba2591e..e5cedb79c2 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfClassExpression.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfClassExpression.types.diff @@ -28,11 +28,13 @@ this.compiler = compiler; ->this.compiler = compiler : import("MC") +->this.compiler : any +>this.compiler = compiler : MC - >this.compiler : any ++>this.compiler : MC >this : this - >compiler : any +->compiler : any ->compiler : import("MC") ++>compiler : MC +>compiler : MC } } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfFunctionExpression.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfFunctionExpression.errors.txt.diff index a46248685e..869c5b4b5c 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfFunctionExpression.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeReferenceToImportOfFunctionExpression.errors.txt.diff @@ -5,7 +5,6 @@ @@= skipped --1, +1 lines =@@ +MC.js(6,1): error TS2309: An export assignment cannot be used in a module with other exported elements. +MW.js(1,15): error TS1340: Module './MC' does not refer to a type, but is used as a type here. Did you mean 'typeof import('./MC')'? -+MW.js(8,10): error TS2339: Property 'compiler' does not exist on type 'MW'. +MW.js(12,1): error TS2309: An export assignment cannot be used in a module with other exported elements. + + @@ -27,7 +26,7 @@ + ~ +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. + -+==== MW.js (3 errors) ==== ++==== MW.js (2 errors) ==== + /** @typedef {import("./MC")} MC */ + ~~~~~~~~~~~~~~ +!!! error TS1340: Module './MC' does not refer to a type, but is used as a type here. Did you mean 'typeof import('./MC')'? @@ -38,8 +37,6 @@ + */ + constructor(compiler) { + this.compiler = compiler; -+ ~~~~~~~~ -+!!! error TS2339: Property 'compiler' does not exist on type 'MW'. + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.errors.txt.diff index b17750921e..d1a55c0f55 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.errors.txt.diff @@ -15,18 +15,19 @@ - Type 'string | number' is not assignable to type 'number'. - Type 'string' is not assignable to type 'number'. +b.js(4,31): 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. -+b.js(17,14): error TS2339: Property 'p' does not exist on type 'SomeBase'. -+b.js(23,14): error TS2339: Property 'x' does not exist on type 'SomeDerived'. -+b.js(28,14): error TS2339: Property 'q' does not exist on type 'SomeOther'. ++b.js(45,36): error TS2741: Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'. ++b.js(49,42): error TS2739: Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x ++b.js(51,38): error TS2741: Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'. ++b.js(52,38): error TS2741: Property 'q' is missing in type 'SomeBase' but required in type 'SomeOther'. b.js(66,15): error TS1228: A type predicate is only allowed in return type position for functions and methods. b.js(66,38): error TS2454: Variable 'numOrStr' is used before being assigned. b.js(67,2): error TS2322: Type 'string | number' is not assignable to type 'string'. -@@= skipped -20, +11 lines =@@ +@@= skipped -20, +12 lines =@@ ==== a.ts (0 errors) ==== var W: string; -==== b.js (10 errors) ==== -+==== b.js (8 errors) ==== ++==== b.js (9 errors) ==== // @ts-check var W = /** @type {string} */(/** @type {*} */ (4)); @@ -36,38 +37,16 @@ !!! 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. /** @type {*} */ -@@= skipped -20, +20 lines =@@ - class SomeBase { - constructor() { - this.p = 42; -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'SomeBase'. - } - } - class SomeDerived extends SomeBase { - constructor() { - super(); - this.x = 42; -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'SomeDerived'. - } - } - class SomeOther { - constructor() { - this.q = 42; -+ ~ -+!!! error TS2339: Property 'q' does not exist on type 'SomeOther'. - } - } - -@@= skipped -28, +34 lines =@@ +@@= skipped -48, +48 lines =@@ someBase = /** @type {SomeBase} */(someDerived); someBase = /** @type {SomeBase} */(someBase); someBase = /** @type {SomeBase} */(someOther); // Error - ~~~~~~~~ -!!! 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. -!!! error TS2352: Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'. --!!! related TS2728 b.js:17:9: 'p' is declared here. ++ ~~~~~~~~~ ++!!! error TS2741: Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'. + !!! related TS2728 b.js:17:9: 'p' is declared here. someDerived = /** @type {SomeDerived} */(someDerived); someDerived = /** @type {SomeDerived} */(someBase); @@ -75,20 +54,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. -!!! error TS2352: Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x ++ ~~~~~~~~~ ++!!! error TS2739: Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x someOther = /** @type {SomeOther} */(someDerived); // Error - ~~~~~~~~~ -!!! error TS2352: Conversion of type 'SomeDerived' to type 'SomeOther' 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 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'. --!!! related TS2728 b.js:28:9: 'q' is declared here. ++ ~~~~~~~~~~~ ++!!! error TS2741: Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'. + !!! related TS2728 b.js:28:9: 'q' is declared here. someOther = /** @type {SomeOther} */(someBase); // Error - ~~~~~~~~~ -!!! error TS2352: Conversion of type 'SomeBase' to type 'SomeOther' 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 'q' is missing in type 'SomeBase' but required in type 'SomeOther'. --!!! related TS2728 b.js:28:9: 'q' is declared here. ++ ~~~~~~~~ ++!!! error TS2741: Property 'q' is missing in type 'SomeBase' but required in type 'SomeOther'. + !!! related TS2728 b.js:28:9: 'q' is declared here. someOther = /** @type {SomeOther} */(someOther); - someFakeClass = someBase; +@@= skipped -28, +24 lines =@@ someFakeClass = someDerived; someBase = someFakeClass; // Error diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.types.diff index 7f91b86ec1..ee22fd8bb2 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.types.diff @@ -32,7 +32,41 @@ >4 : 4 class SomeBase { -@@= skipped -45, +46 lines =@@ +@@= skipped -8, +9 lines =@@ + constructor() { + this.p = 42; + >this.p = 42 : 42 +->this.p : any ++>this.p : number + >this : this +->p : any ++>p : number + >42 : 42 + } + } +@@= skipped -17, +17 lines =@@ + + this.x = 42; + >this.x = 42 : 42 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >42 : 42 + } + } +@@= skipped -12, +12 lines =@@ + constructor() { + this.q = 42; + >this.q = 42 : 42 +->this.q : any ++>this.q : number + >this : this +->q : any ++>q : number + >42 : 42 + } } function SomeFakeClass() { @@ -51,7 +85,7 @@ >"bar" : "bar" } -@@= skipped -28, +28 lines =@@ +@@= skipped -36, +36 lines =@@ >SomeOther : typeof SomeOther var someFakeClass = new SomeFakeClass(); diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAssignment6.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAssignment6.errors.txt.diff deleted file mode 100644 index b1263e8dd0..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAssignment6.errors.txt.diff +++ /dev/null @@ -1,47 +0,0 @@ ---- old.moduleExportAssignment6.errors.txt -+++ new.moduleExportAssignment6.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+webpackLibNormalModule.js(4,14): error TS2339: Property 'x' does not exist on type 'C'. -+webpackLibNormalModule.js(5,14): error TS2339: Property 'exports' does not exist on type 'C'. -+webpackLibNormalModule.js(9,21): error TS2339: Property 'x' does not exist on type 'C'. -+webpackLibNormalModule.js(14,19): error TS2339: Property 'exports' does not exist on type 'C'. -+webpackLibNormalModule.js(21,23): error TS2339: Property 'exports' does not exist on type 'C'. -+ -+ -+==== webpackLibNormalModule.js (5 errors) ==== -+ class C { -+ /** @param {number} x */ -+ constructor(x) { -+ this.x = x -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'C'. -+ this.exports = [x] -+ ~~~~~~~ -+!!! error TS2339: Property 'exports' does not exist on type 'C'. -+ } -+ /** @param {number} y */ -+ m(y) { -+ return this.x + y -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'C'. -+ } -+ } -+ function exec() { -+ const module = new C(12); -+ return module.exports; // should be fine because `module` is defined locally -+ ~~~~~~~ -+!!! error TS2339: Property 'exports' does not exist on type 'C'. -+ } -+ -+ function tricky() { -+ // (a trickier variant of what webpack does) -+ const module = new C(12); -+ return () => { -+ return module.exports; -+ ~~~~~~~ -+!!! error TS2339: Property 'exports' does not exist on type 'C'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAssignment6.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAssignment6.types.diff index 66151eef5a..5b15cef537 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAssignment6.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAssignment6.types.diff @@ -1,60 +1,23 @@ --- old.moduleExportAssignment6.types +++ new.moduleExportAssignment6.types -@@= skipped -24, +24 lines =@@ - } - /** @param {number} y */ - m(y) { -->m : (y: number) => number -+>m : (y: number) => any - >y : number +@@= skipped -9, +9 lines =@@ - return this.x + y -->this.x + y : number -->this.x : number -+>this.x + y : any -+>this.x : any + this.x = x + >this.x = x : number +->this.x : any ++>this.x : number >this : this -->x : number -+>x : any - >y : number - } - } - function exec() { -->exec : () => number[] -+>exec : () => any - - const module = new C(12); - >module : C -@@= skipped -21, +21 lines =@@ - >12 : 12 - - return module.exports; // should be fine because `module` is defined locally -->module.exports : number[] -+>module.exports : any - >module : C -->exports : number[] -+>exports : any - } - - function tricky() { -->tricky : () => () => number[] -+>tricky : () => () => any - - // (a trickier variant of what webpack does) - const module = new C(12); -@@= skipped -16, +16 lines =@@ - >12 : 12 - - return () => { -->() => { return module.exports; } : () => number[] -+>() => { return module.exports; } : () => any - - return module.exports; -->module.exports : number[] -+>module.exports : any - >module : C -->exports : number[] -+>exports : any +->x : any + >x : number ++>x : number + + this.exports = [x] + >this.exports = [x] : number[] +->this.exports : any ++>this.exports : number[] + >this : this +->exports : any ++>exports : number[] + >[x] : number[] + >x : number } - } - diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportNestedNamespaces.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportNestedNamespaces.errors.txt.diff index 4edb069e91..86fc852a09 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportNestedNamespaces.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportNestedNamespaces.errors.txt.diff @@ -3,12 +3,11 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+mod.js(7,14): error TS2339: Property 'p' does not exist on type 'Classic'. +use.js(8,15): error TS2694: Namespace '"mod"' has no exported member 'n'. +use.js(9,13): error TS2749: 's.Classic' refers to a value, but is being used as a type here. Did you mean 'typeof s.Classic'? + + -+==== mod.js (1 errors) ==== ++==== mod.js (0 errors) ==== + module.exports.n = {}; + module.exports.n.K = function C() { + this.x = 10; @@ -16,8 +15,6 @@ + module.exports.Classic = class { + constructor() { + this.p = 1 -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'Classic'. + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportNestedNamespaces.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportNestedNamespaces.types.diff index 33414ef0ff..8f621d859a 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportNestedNamespaces.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportNestedNamespaces.types.diff @@ -60,7 +60,17 @@ >Classic : typeof Classic >class { constructor() { this.p = 1 }} : typeof Classic -@@= skipped -48, +48 lines =@@ + constructor() { + this.p = 1 + >this.p = 1 : 1 +->this.p : any ++>this.p : number + >this : this +->p : any ++>p : number + >1 : 1 + } + } === use.js === import * as s from './mod' diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/returnTagTypeGuard.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/returnTagTypeGuard.errors.txt.diff deleted file mode 100644 index ccb15f3f75..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/returnTagTypeGuard.errors.txt.diff +++ /dev/null @@ -1,81 +0,0 @@ ---- old.returnTagTypeGuard.errors.txt -+++ new.returnTagTypeGuard.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+bug25127.js(3,14): error TS2339: Property 'c' does not exist on type 'Entry'. -+bug25127.js(15,14): error TS2339: Property 'd' does not exist on type 'Group'. -+bug25127.js(27,41): error TS2339: Property 'c' does not exist on type 'Entry'. -+bug25127.js(27,51): error TS2339: Property 'd' does not exist on type 'Group'. -+ -+ -+==== bug25127.js (4 errors) ==== -+ class Entry { -+ constructor() { -+ this.c = 1 -+ ~ -+!!! error TS2339: Property 'c' does not exist on type 'Entry'. -+ } -+ /** -+ * @param {any} x -+ * @return {this is Entry} -+ */ -+ isInit(x) { -+ return true -+ } -+ } -+ class Group { -+ constructor() { -+ this.d = 'no' -+ ~ -+!!! error TS2339: Property 'd' does not exist on type 'Group'. -+ } -+ /** -+ * @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 TS2339: Property 'c' does not exist on type 'Entry'. -+ ~ -+!!! error TS2339: Property 'd' does not exist on type 'Group'. -+ 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; -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/returnTagTypeGuard.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/returnTagTypeGuard.types.diff index dc262e0a10..79c4038828 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/returnTagTypeGuard.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/returnTagTypeGuard.types.diff @@ -1,41 +1,30 @@ --- old.returnTagTypeGuard.types +++ new.returnTagTypeGuard.types -@@= skipped -48, +48 lines =@@ - } - /** @param {Entry | Group} chunk */ - function f(chunk) { -->f : (chunk: Entry | Group) => string | number -+>f : (chunk: Entry | Group) => any - >chunk : Entry | Group - - let x = chunk.isInit(chunk) ? chunk.c : chunk.d -->x : string | number -->chunk.isInit(chunk) ? chunk.c : chunk.d : string | number -+>x : any -+>chunk.isInit(chunk) ? chunk.c : chunk.d : any - >chunk.isInit(chunk) : boolean - >chunk.isInit : ((x: any) => this is Entry) | ((x: any) => false) - >chunk : Entry | Group - >isInit : ((x: any) => this is Entry) | ((x: any) => false) - >chunk : Entry | Group -->chunk.c : number -+>chunk.c : any - >chunk : Entry -->c : number -->chunk.d : string -+>c : any -+>chunk.d : any - >chunk : Group -->d : string -+>d : any - - return x -->x : string | number -+>x : any - } - - /** -@@= skipped -39, +39 lines =@@ +@@= skipped -6, +6 lines =@@ + constructor() { + this.c = 1 + >this.c = 1 : 1 +->this.c : any ++>this.c : number + >this : this +->c : any ++>c : number + >1 : 1 + } + /** +@@= skipped -23, +23 lines =@@ + constructor() { + this.d = 'no' + >this.d = 'no' : "no" +->this.d : any ++>this.d : string + >this : this +->d : any ++>d : string + >'no' : "no" + } + /** +@@= skipped -58, +58 lines =@@ /** @param {boolean | number} val */ function foo(val) { diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentCircular.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentCircular.errors.txt.diff deleted file mode 100644 index 10ab890446..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentCircular.errors.txt.diff +++ /dev/null @@ -1,38 +0,0 @@ ---- old.thisPropertyAssignmentCircular.errors.txt -+++ new.thisPropertyAssignmentCircular.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+thisPropertyAssignmentCircular.js(3,14): error TS2339: Property 'foo' does not exist on type 'Foo'. -+thisPropertyAssignmentCircular.js(6,14): error TS2339: Property 'foo' does not exist on type 'Foo'. -+thisPropertyAssignmentCircular.js(6,25): error TS2339: Property 'foo' does not exist on type 'Foo'. -+thisPropertyAssignmentCircular.js(9,14): error TS2339: Property 'foo' does not exist on type 'Foo'. -+ -+ -+==== thisPropertyAssignmentCircular.js (4 errors) ==== -+ export class Foo { -+ constructor() { -+ this.foo = "Hello"; -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'Foo'. -+ } -+ slicey() { -+ this.foo = this.foo.slice(); -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'Foo'. -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'Foo'. -+ } -+ m() { -+ this.foo -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'Foo'. -+ } -+ } -+ -+ /** @class */ -+ function C() { -+ this.x = 0; -+ this.x = function() { this.x.toString(); } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.errors.txt.diff new file mode 100644 index 0000000000..0612a29992 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.errors.txt.diff @@ -0,0 +1,33 @@ +--- old.thisPropertyAssignmentInherited.errors.txt ++++ new.thisPropertyAssignmentInherited.errors.txt +@@= skipped -0, +-1 lines =@@ +- +@@= skipped --1, +1 lines =@@ ++thisPropertyAssignmentInherited.js(13,7): error TS7023: 'innerHTML' 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. ++thisPropertyAssignmentInherited.js(14,25): error TS7022: 'textContent' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. ++ ++ ++==== thisPropertyAssignmentInherited.js (2 errors) ==== ++ export class Element { ++ /** ++ * @returns {String} ++ */ ++ get textContent() { ++ return '' ++ } ++ set textContent(x) {} ++ cloneNode() { return this} ++ } ++ export class HTMLElement extends Element {} ++ export class TextElement extends HTMLElement { ++ get innerHTML() { return this.textContent; } ++ ~~~~~~~~~ ++!!! error TS7023: 'innerHTML' 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. ++ set innerHTML(html) { this.textContent = html; } ++ ~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS7022: 'textContent' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. ++ toString() { ++ } ++ } ++ ++ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.types.diff index 8684595695..df3a68dc6a 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.types.diff @@ -24,26 +24,26 @@ get innerHTML() { return this.textContent; } ->innerHTML : string ->this.textContent : string -+>innerHTML : String -+>this.textContent : String ++>innerHTML : any ++>this.textContent : any >this : this ->textContent : string -+>textContent : String ++>textContent : any set innerHTML(html) { this.textContent = html; } ->innerHTML : string ->html : string ->this.textContent = html : string ->this.textContent : string -+>innerHTML : String -+>html : String -+>this.textContent = html : String -+>this.textContent : String ++>innerHTML : any ++>html : any ++>this.textContent = html : any ++>this.textContent : any >this : this ->textContent : string ->html : string -+>textContent : String -+>html : String ++>textContent : any ++>html : any toString() { >toString : () => void diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromContextualThisType.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromContextualThisType.errors.txt.diff new file mode 100644 index 0000000000..025e58a5f6 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromContextualThisType.errors.txt.diff @@ -0,0 +1,29 @@ +--- old.typeFromContextualThisType.errors.txt ++++ new.typeFromContextualThisType.errors.txt +@@= skipped -0, +-1 lines =@@ +- +@@= skipped --1, +1 lines =@@ ++bug25926.js(4,18): error TS7006: Parameter 'n' implicitly has an 'any' type. ++bug25926.js(11,27): error TS7006: Parameter 'm' implicitly has an 'any' type. ++ ++ ++==== bug25926.js (2 errors) ==== ++ /** @type {{ a(): void; b?(n: number): number; }} */ ++ const o1 = { ++ a() { ++ this.b = n => n; ++ ~ ++!!! error TS7006: Parameter 'n' implicitly has an 'any' type. ++ } ++ }; ++ ++ /** @type {{ d(): void; e?(n: number): number; f?(n: number): number; g?: number }} */ ++ const o2 = { ++ d() { ++ this.e = this.f = m => this.g || m; ++ ~ ++!!! error TS7006: Parameter 'm' implicitly has an 'any' type. ++ } ++ }; ++ ++ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromContextualThisType.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromContextualThisType.types.diff index 896712e42f..77ee36967c 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromContextualThisType.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromContextualThisType.types.diff @@ -11,16 +11,22 @@ a() { >a : () => void -@@= skipped -9, +9 lines =@@ + this.b = n => n; - >this.b = n => n : (n: number) => number +->this.b = n => n : (n: number) => number ++>this.b = n => n : (n: any) => any >this.b : ((n: number) => number) | undefined ->this : { a(): void; b?(n: number): number; } +>this : { a: () => void; b?: ((n: number) => number) | undefined; } >b : ((n: number) => number) | undefined - >n => n : (n: number) => number - >n : number -@@= skipped -10, +10 lines =@@ +->n => n : (n: number) => number +->n : number +->n : number ++>n => n : (n: any) => any ++>n : any ++>n : any + } + }; /** @type {{ d(): void; e?(n: number): number; f?(n: number): number; g?: number }} */ const o2 = { @@ -31,24 +37,32 @@ d() { >d : () => void -@@= skipped -9, +9 lines =@@ + this.e = this.f = m => this.g || m; - >this.e = this.f = m => this.g || m : (m: number) => number +->this.e = this.f = m => this.g || m : (m: number) => number ++>this.e = this.f = m => this.g || m : (m: any) => any >this.e : ((n: number) => number) | undefined ->this : { d(): void; e?(n: number): number; f?(n: number): number; g?: number; } +>this : { d: () => void; e?: ((n: number) => number) | undefined; f?: ((n: number) => number) | undefined; g?: number | undefined; } >e : ((n: number) => number) | undefined - >this.f = m => this.g || m : (m: number) => number +->this.f = m => this.g || m : (m: number) => number ++>this.f = m => this.g || m : (m: any) => any >this.f : ((n: number) => number) | undefined ->this : { d(): void; e?(n: number): number; f?(n: number): number; g?: number; } +>this : { d: () => void; e?: ((n: number) => number) | undefined; f?: ((n: number) => number) | undefined; g?: number | undefined; } >f : ((n: number) => number) | undefined - >m => this.g || m : (m: number) => number - >m : number - >this.g || m : number +->m => this.g || m : (m: number) => number +->m : number +->this.g || m : number ++>m => this.g || m : (m: any) => any ++>m : any ++>this.g || m : any >this.g : number | undefined ->this : { d(): void; e?(n: number): number; f?(n: number): number; g?: number; } +>this : { d: () => void; e?: ((n: number) => number) | undefined; f?: ((n: number) => number) | undefined; g?: number | undefined; } >g : number | undefined - >m : number +->m : number ++>m : any } + }; + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromParamTagForFunction.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromParamTagForFunction.errors.txt.diff index a117e7e07e..5565e16b7b 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromParamTagForFunction.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromParamTagForFunction.errors.txt.diff @@ -4,16 +4,11 @@ - @@= skipped --1, +1 lines =@@ +a.js(3,13): error TS2749: 'A' refers to a value, but is being used as a type here. Did you mean 'typeof A'? -+b-ext.js(3,14): error TS2339: Property 'x' does not exist on type 'B'. +b.js(3,13): error TS2749: 'B' refers to a value, but is being used as a type here. Did you mean 'typeof B'? +c.js(3,13): error TS2749: 'C' refers to a value, but is being used as a type here. Did you mean 'typeof C'? +d.js(3,13): error TS2749: 'D' refers to a value, but is being used as a type here. Did you mean 'typeof D'? -+e-ext.js(3,14): error TS2339: Property 'x' does not exist on type 'E'. -+e.js(4,19): error TS2339: Property 'x' does not exist on type 'E'. +f.js(5,13): error TS2749: 'F' refers to a value, but is being used as a type here. Did you mean 'typeof F'? +g.js(5,13): error TS2749: 'G' refers to a value, but is being used as a type here. Did you mean 'typeof G'? -+h.js(3,14): error TS2339: Property 'x' does not exist on type 'H'. -+h.js(8,19): error TS2339: Property 'x' does not exist on type 'H'. + + +==== node.d.ts (0 errors) ==== @@ -33,12 +28,10 @@ +!!! error TS2749: 'A' refers to a value, but is being used as a type here. Did you mean 'typeof A'? + function a(p) { p.x; } + -+==== b-ext.js (1 errors) ==== ++==== b-ext.js (0 errors) ==== + exports.B = class { + constructor() { + this.x = 1; -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'B'. + } + }; + @@ -76,22 +69,18 @@ +!!! error TS2749: 'D' refers to a value, but is being used as a type here. Did you mean 'typeof D'? + function d(p) { p.x; } + -+==== e-ext.js (1 errors) ==== ++==== e-ext.js (0 errors) ==== + export class E { + constructor() { + this.x = 1; -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'E'. + } + } + -+==== e.js (1 errors) ==== ++==== e.js (0 errors) ==== + const { E } = require("./e-ext"); + + /** @param {E} p */ + function e(p) { p.x; } -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'E'. + +==== f.js (1 errors) ==== + var F = function () { @@ -113,16 +102,12 @@ +!!! error TS2749: 'G' refers to a value, but is being used as a type here. Did you mean 'typeof G'? + function g(p) { p.x; } + -+==== h.js (2 errors) ==== ++==== h.js (0 errors) ==== + class H { + constructor() { + this.x = 1; -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'H'. + } + } + + /** @param {H} p */ + function h(p) { p.x; } -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'H'. diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromParamTagForFunction.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromParamTagForFunction.types.diff index 73a750af67..b43de322b0 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromParamTagForFunction.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromParamTagForFunction.types.diff @@ -43,7 +43,19 @@ === b-ext.js === exports.B = class { -@@= skipped -33, +33 lines =@@ +@@= skipped -15, +15 lines =@@ + constructor() { + this.x = 1; + >this.x = 1 : 1 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >1 : 1 + } + }; +@@= skipped -18, +18 lines =@@ function b(p) { p.x; } >b : (p: B) => void >p : B @@ -120,15 +132,19 @@ === e-ext.js === export class E { -@@= skipped -29, +29 lines =@@ - function e(p) { p.x; } - >e : (p: E) => void - >p : E -->p.x : number -+>p.x : any - >p : E -->x : number -+>x : any +@@= skipped -11, +11 lines =@@ + constructor() { + this.x = 1; + >this.x = 1 : 1 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >1 : 1 + } + } +@@= skipped -24, +24 lines =@@ === f.js === var F = function () { @@ -145,7 +161,7 @@ >x : any >1 : 1 -@@= skipped -22, +22 lines =@@ +@@= skipped -16, +16 lines =@@ function f(p) { p.x; } >f : (p: F) => void >p : F @@ -180,13 +196,15 @@ === h.js === class H { -@@= skipped -22, +22 lines =@@ - function h(p) { p.x; } - >h : (p: H) => void - >p : H -->p.x : number -+>p.x : any - >p : H -->x : number -+>x : any - +@@= skipped -11, +11 lines =@@ + constructor() { + this.x = 1; + >this.x = 1 : 1 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >1 : 1 + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.errors.txt.diff index 97079b8545..dce875e94e 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.errors.txt.diff @@ -4,14 +4,13 @@ - @@= skipped --1, +1 lines =@@ +main.js(4,12): error TS2503: Cannot find namespace 'Outer'. -+someview.js(10,14): error TS2339: Property 'y' does not exist on type 'Inner'. + + +==== module.js (0 errors) ==== + var Outer = Outer || {}; + Outer.app = Outer.app || {}; + -+==== someview.js (1 errors) ==== ++==== someview.js (0 errors) ==== + Outer.app.SomeView = (function () { + var SomeView = function() { + var me = this; @@ -22,8 +21,6 @@ + constructor() { + /** @type {number} */ + this.y = 12; -+ ~ -+!!! error TS2339: Property 'y' does not exist on type 'Inner'. + } + } + var example = new Outer.app.Inner(); diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.types.diff index 73beb34e90..465896f744 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.types.diff @@ -64,15 +64,7 @@ >class { constructor() { /** @type {number} */ this.y = 12; }} : typeof Inner constructor() { - /** @type {number} */ - this.y = 12; - >this.y = 12 : 12 -->this.y : number -+>this.y : any - >this : this -->y : number -+>y : any - >12 : 12 +@@= skipped -18, +18 lines =@@ } } var example = new Outer.app.Inner(); diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.errors.txt.diff index 86f508d4ff..8e4500e4f1 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.errors.txt.diff @@ -4,14 +4,13 @@ - @@= skipped --1, +1 lines =@@ +main.js(4,12): error TS2503: Cannot find namespace 'Outer'. -+someview.js(10,14): error TS2339: Property 'y' does not exist on type 'Inner'. + + +==== module.js (0 errors) ==== + var Outer = Outer ?? {}; + Outer.app = Outer.app ?? {}; + -+==== someview.js (1 errors) ==== ++==== someview.js (0 errors) ==== + Outer.app.SomeView = (function () { + var SomeView = function() { + var me = this; @@ -22,8 +21,6 @@ + constructor() { + /** @type {number} */ + this.y = 12; -+ ~ -+!!! error TS2339: Property 'y' does not exist on type 'Inner'. + } + } + var example = new Outer.app.Inner(); diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.types.diff index b516be9775..0e34dfceae 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.types.diff @@ -64,15 +64,7 @@ >class { constructor() { /** @type {number} */ this.y = 12; }} : typeof Inner constructor() { - /** @type {number} */ - this.y = 12; - >this.y = 12 : 12 -->this.y : number -+>this.y : any - >this : this -->y : number -+>y : any - >12 : 12 +@@= skipped -18, +18 lines =@@ } } var example = new Outer.app.Inner(); diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment15.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment15.errors.txt.diff index 5079f95655..746bccfd0c 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment15.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment15.errors.txt.diff @@ -4,12 +4,11 @@ - @@= skipped --1, +1 lines =@@ +a.js(3,7): error TS2339: Property 'Inner' does not exist on type '{}'. -+a.js(5,14): error TS2339: Property 'x' does not exist on type 'Inner'. +a.js(10,12): error TS2503: Cannot find namespace 'Outer'. +a.js(14,22): error TS2339: Property 'Inner' does not exist on type '{}'. + + -+==== a.js (4 errors) ==== ++==== a.js (3 errors) ==== + var Outer = {}; + + Outer.Inner = class { @@ -17,8 +16,6 @@ +!!! error TS2339: Property 'Inner' does not exist on type '{}'. + constructor() { + this.x = 1 -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'Inner'. + } + m() { } + } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment15.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment15.types.diff index 4f37048588..c6adcf370e 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment15.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment15.types.diff @@ -19,6 +19,16 @@ >class { constructor() { this.x = 1 } m() { }} : typeof Inner constructor() { + this.x = 1 + >this.x = 1 : 1 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >1 : 1 + } + m() { } @@= skipped -27, +27 lines =@@ >inner : Inner diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment2.errors.txt.diff index cca49f15f0..3c5cf0ad24 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment2.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment2.errors.txt.diff @@ -3,20 +3,17 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+a.js(6,14): error TS2339: Property 'x' does not exist on type 'I'. +a.js(9,12): error TS2749: 'Outer' refers to a value, but is being used as a type here. Did you mean 'typeof Outer'? +a.js(12,12): error TS2503: Cannot find namespace 'Outer'. + + -+==== a.js (3 errors) ==== ++==== a.js (2 errors) ==== + function Outer() { + this.y = 2 + } + Outer.Inner = class I { + constructor() { + this.x = 1 -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'I'. + } + } + /** @type {Outer} */ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment2.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment2.types.diff index aea9aa8662..44c0ac1112 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment2.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment2.types.diff @@ -23,7 +23,19 @@ >Inner : typeof I >class I { constructor() { this.x = 1 }} : typeof I >I : typeof I -@@= skipped -31, +31 lines =@@ +@@= skipped -20, +20 lines =@@ + constructor() { + this.x = 1 + >this.x = 1 : 1 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >1 : 1 + } + } +@@= skipped -11, +11 lines =@@ >ok : Outer ok.y diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment23.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment23.errors.txt.diff index a6f98d70c0..642f6dfea5 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment23.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment23.errors.txt.diff @@ -3,17 +3,14 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+a.js(3,14): error TS2339: Property 'n' does not exist on type 'B'. +a.js(23,18): error TS2339: Property 'identifier' does not exist on type 'Module'. +a.js(24,18): error TS2339: Property 'size' does not exist on type 'Module'. + + -+==== a.js (3 errors) ==== ++==== a.js (2 errors) ==== + class B { + constructor () { + this.n = 1 -+ ~ -+!!! error TS2339: Property 'n' does not exist on type 'B'. + } + foo() { + } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment23.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment23.types.diff new file mode 100644 index 0000000000..e9bb1d1870 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment23.types.diff @@ -0,0 +1,14 @@ +--- old.typeFromPropertyAssignment23.types ++++ new.typeFromPropertyAssignment23.types +@@= skipped -6, +6 lines =@@ + constructor () { + this.n = 1 + >this.n = 1 : 1 +->this.n : any ++>this.n : number + >this : this +->n : any ++>n : number + >1 : 1 + } + foo() { diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment25.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment25.errors.txt.diff index 268541e0a7..d918d4e552 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment25.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment25.errors.txt.diff @@ -4,23 +4,19 @@ - @@= skipped --1, +1 lines =@@ +bug24703.js(2,8): error TS2339: Property 'I' does not exist on type '{}'. -+bug24703.js(4,14): error TS2339: Property 'i' does not exist on type 'I'. +bug24703.js(7,8): error TS2339: Property 'O' does not exist on type '{}'. +bug24703.js(7,33): error TS2339: Property 'I' does not exist on type '{}'. -+bug24703.js(10,14): error TS2339: Property 'o' does not exist on type 'O'. +bug24703.js(13,20): error TS2339: Property 'O' does not exist on type '{}'. +bug24703.js(14,20): error TS2339: Property 'I' does not exist on type '{}'. + + -+==== bug24703.js (7 errors) ==== ++==== bug24703.js (5 errors) ==== + var Common = {}; + Common.I = class { + ~ +!!! error TS2339: Property 'I' does not exist on type '{}'. + constructor() { + this.i = 1 -+ ~ -+!!! error TS2339: Property 'i' does not exist on type 'I'. + } + } + Common.O = class extends Common.I { @@ -31,8 +27,6 @@ + constructor() { + super() + this.o = 2 -+ ~ -+!!! error TS2339: Property 'o' does not exist on type 'O'. + } + } + var o = new Common.O() diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment25.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment25.types.diff index 24820c5db5..5c8d171d91 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment25.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment25.types.diff @@ -19,7 +19,15 @@ >class { constructor() { this.i = 1 }} : typeof I constructor() { -@@= skipped -21, +21 lines =@@ + this.i = 1 + >this.i = 1 : 1 +->this.i : any ++>this.i : number + >this : this +->i : any ++>i : number + >1 : 1 + } } Common.O = class extends Common.I { >Common.O = class extends Common.I { constructor() { super() this.o = 2 }} : typeof O @@ -45,7 +53,12 @@ this.o = 2 >this.o = 2 : 2 -@@= skipped -22, +22 lines =@@ +->this.o : any ++>this.o : number + >this : this +->o : any ++>o : number + >2 : 2 } } var o = new Common.O() diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment26.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment26.errors.txt.diff index c76f6f8b07..07a62f154a 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment26.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment26.errors.txt.diff @@ -2,7 +2,6 @@ +++ new.typeFromPropertyAssignment26.errors.txt @@= skipped -0, +0 lines =@@ +bug24730.js(2,4): error TS2339: Property 'TreeElement' does not exist on type '{}'. -+bug24730.js(4,14): error TS2339: Property 'treeOutline' does not exist on type 'TreeElement'. +bug24730.js(7,4): error TS2339: Property 'context' does not exist on type '{}'. +bug24730.js(7,21): error TS2339: Property 'TreeElement' does not exist on type '{}'. +bug24730.js(9,20): error TS2339: Property 'TreeElement' does not exist on type '{}'. @@ -12,15 +11,13 @@ -==== bug24730.js (2 errors) ==== -+==== bug24730.js (7 errors) ==== ++==== bug24730.js (6 errors) ==== var UI = {} UI.TreeElement = class { + ~~~~~~~~~~~ +!!! error TS2339: Property 'TreeElement' does not exist on type '{}'. constructor() { this.treeOutline = 12 -+ ~~~~~~~~~~~ -+!!! error TS2339: Property 'treeOutline' does not exist on type 'TreeElement'. } }; UI.context = new UI.TreeElement() diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment26.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment26.types.diff index 60bc0f361c..cd3edc9a2f 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment26.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment26.types.diff @@ -19,7 +19,14 @@ >class { constructor() { this.treeOutline = 12 }} : typeof TreeElement constructor() { -@@= skipped -20, +20 lines =@@ + this.treeOutline = 12 + >this.treeOutline = 12 : 12 +->this.treeOutline : any ++>this.treeOutline : number + >this : this +->treeOutline : any ++>treeOutline : number + >12 : 12 } }; UI.context = new UI.TreeElement() @@ -51,7 +58,7 @@ onpopulate() { >onpopulate : () => void -@@= skipped -26, +26 lines =@@ +@@= skipped -46, +46 lines =@@ this.treeOutline.doesntExistEither() >this.treeOutline.doesntExistEither() : any >this.treeOutline.doesntExistEither : any diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment28.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment28.errors.txt.diff deleted file mode 100644 index c9054c1fca..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment28.errors.txt.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- old.typeFromPropertyAssignment28.errors.txt -+++ new.typeFromPropertyAssignment28.errors.txt -@@= skipped -0, +0 lines =@@ --a.js(7,17): error TS2353: Object literal may only specify known properties, and 'q' does not exist in type 'C'. -+a.js(2,32): error TS2339: Property 'p' does not exist on type 'C'. -+a.js(10,3): error TS2339: Property 'p' does not exist on type 'C'. - a.js(11,3): error TS2339: Property 'q' does not exist on type 'C'. - - --==== a.js (2 errors) ==== -+==== a.js (3 errors) ==== - // mixed prototype-assignment+class declaration - class C { constructor() { this.p = 1; } } -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'C'. - // Property assignment does nothing. - // You have to use Object.defineProperty(C, "prototype", { q: 2 }) - // and that only works on classes with no superclass. - // (Object.defineProperty isn't recognised as a JS special assignment right now.) - C.prototype = { q: 2 }; -- ~ --!!! error TS2353: Object literal may only specify known properties, and 'q' does not exist in type 'C'. - - const c = new C() - c.p -+ ~ -+!!! error TS2339: Property 'p' does not exist on type 'C'. - c.q - ~ - !!! error TS2339: Property 'q' does not exist on type 'C'. diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment28.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment28.types.diff index 992805689e..640bb1d675 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment28.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment28.types.diff @@ -1,14 +1,14 @@ --- old.typeFromPropertyAssignment28.types +++ new.typeFromPropertyAssignment28.types -@@= skipped -28, +28 lines =@@ - >C : typeof C +@@= skipped -4, +4 lines =@@ + class C { constructor() { this.p = 1; } } + >C : C + >this.p = 1 : 1 +->this.p : any ++>this.p : number + >this : this +->p : any ++>p : number + >1 : 1 - c.p -->c.p : number -+>c.p : any - >c : C -->p : number -+>p : any - - c.q - >c.q : any + // Property assignment does nothing. diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment3.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment3.errors.txt.diff index 4531ff7bdf..6c9abf8626 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment3.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment3.errors.txt.diff @@ -4,12 +4,11 @@ - @@= skipped --1, +1 lines =@@ +a.js(4,7): error TS2339: Property 'Inner' does not exist on type '() => void'. -+a.js(6,14): error TS2339: Property 'x' does not exist on type 'I'. +a.js(9,12): error TS2749: 'Outer' refers to a value, but is being used as a type here. Did you mean 'typeof Outer'? +a.js(12,12): error TS2503: Cannot find namespace 'Outer'. + + -+==== a.js (4 errors) ==== ++==== a.js (3 errors) ==== + var Outer = function O() { + this.y = 2 + } @@ -18,8 +17,6 @@ +!!! error TS2339: Property 'Inner' does not exist on type '() => void'. + constructor() { + this.x = 1 -+ ~ -+!!! error TS2339: Property 'x' does not exist on type 'I'. + } + } + /** @type {Outer} */ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment3.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment3.types.diff index 4ecbd6d9d7..902e60eac1 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment3.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment3.types.diff @@ -30,7 +30,16 @@ >class I { constructor() { this.x = 1 }} : typeof I >I : typeof I -@@= skipped -30, +30 lines =@@ + constructor() { + this.x = 1 + >this.x = 1 : 1 +->this.x : any ++>this.x : number + >this : this +->x : any ++>x : number + >1 : 1 + } } /** @type {Outer} */ var ja diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment35.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment35.errors.txt.diff index 4a037f26e0..3dce4972a1 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment35.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment35.errors.txt.diff @@ -7,11 +7,10 @@ +bug26877.js(4,23): error TS2339: Property 'D' does not exist on type '{}'. +bug26877.js(5,19): error TS2339: Property 'D' does not exist on type '{}'. +bug26877.js(7,5): error TS2339: Property 'D' does not exist on type '{}'. -+bug26877.js(9,14): error TS2339: Property '_model' does not exist on type 'D'. +second.js(3,5): error TS2339: Property 'D' does not exist on type '{}'. + + -+==== bug26877.js (5 errors) ==== ++==== bug26877.js (4 errors) ==== + /** @param {Emu.D} x */ + ~~~ +!!! error TS2503: Cannot find namespace 'Emu'. @@ -29,8 +28,6 @@ +!!! error TS2339: Property 'D' does not exist on type '{}'. + constructor() { + this._model = 1 -+ ~~~~~~ -+!!! error TS2339: Property '_model' does not exist on type 'D'. + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment35.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment35.types.diff index d98fcf8ad9..56860385ac 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment35.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment35.types.diff @@ -47,7 +47,16 @@ >class { constructor() { this._model = 1 }} : typeof D constructor() { -@@= skipped -38, +38 lines =@@ + this._model = 1 + >this._model = 1 : 1 +->this._model : any ++>this._model : number + >this : this +->_model : any ++>_model : number + >1 : 1 + } + } === second.js === var Emu = {} diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.errors.txt.diff index 1160915612..1d81c7e1cf 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.errors.txt.diff @@ -4,7 +4,6 @@ - @@= skipped --1, +1 lines =@@ +a.js(1,7): error TS2339: Property 'Inner' does not exist on type '{}'. -+a.js(4,14): error TS2339: Property 'y' does not exist on type 'Inner'. +a.js(8,12): error TS2503: Cannot find namespace 'Outer'. +a.js(11,23): error TS2339: Property 'Inner' does not exist on type '{}'. +b.js(1,12): error TS2503: Cannot find namespace 'Outer'. @@ -14,15 +13,13 @@ +==== def.js (0 errors) ==== + var Outer = {}; + -+==== a.js (4 errors) ==== ++==== a.js (3 errors) ==== + Outer.Inner = class { + ~~~~~ +!!! error TS2339: Property 'Inner' does not exist on type '{}'. + constructor() { + /** @type {number} */ + this.y = 12 -+ ~ -+!!! error TS2339: Property 'y' does not exist on type 'Inner'. + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.types.diff index 55e3a4920e..8fd02b3d69 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.types.diff @@ -20,17 +20,6 @@ >class { constructor() { /** @type {number} */ this.y = 12 }} : typeof Inner constructor() { - /** @type {number} */ - this.y = 12 - >this.y = 12 : 12 -->this.y : number -+>this.y : any - >this : this -->y : number -+>y : any - >12 : 12 - } - } @@= skipped -27, +27 lines =@@ >local : Inner diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/varRequireFromJavascript.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/varRequireFromJavascript.errors.txt.diff deleted file mode 100644 index a5f749f185..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/varRequireFromJavascript.errors.txt.diff +++ /dev/null @@ -1,46 +0,0 @@ ---- old.varRequireFromJavascript.errors.txt -+++ new.varRequireFromJavascript.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+ex.js(4,14): error TS2339: Property 'n' does not exist on type 'Crunch'. -+ex.js(7,21): error TS2339: Property 'n' does not exist on type 'Crunch'. -+use.js(5,8): error TS2339: Property 'n' does not exist on type 'Crunch'. -+use.js(13,10): error TS2339: Property 'n' does not exist on type 'Crunch'. -+ -+ -+==== use.js (2 errors) ==== -+ var ex = require('./ex') -+ -+ // values work -+ var crunch = new ex.Crunch(1); -+ crunch.n -+ ~ -+!!! error TS2339: Property 'n' does not exist on type 'Crunch'. -+ -+ -+ // types work -+ /** -+ * @param {ex.Crunch} wrap -+ */ -+ function f(wrap) { -+ wrap.n -+ ~ -+!!! error TS2339: Property 'n' does not exist on type 'Crunch'. -+ } -+ -+==== ex.js (2 errors) ==== -+ export class Crunch { -+ /** @param {number} n */ -+ constructor(n) { -+ this.n = n -+ ~ -+!!! error TS2339: Property 'n' does not exist on type 'Crunch'. -+ } -+ m() { -+ return this.n -+ ~ -+!!! error TS2339: Property 'n' does not exist on type 'Crunch'. -+ } -+ } -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/varRequireFromJavascript.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/varRequireFromJavascript.types.diff index de2e7124d9..c16faa9603 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/varRequireFromJavascript.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/varRequireFromJavascript.types.diff @@ -26,15 +26,12 @@ >1 : 1 crunch.n -->crunch.n : number + >crunch.n : number ->crunch : ex.Crunch -->n : number -+>crunch.n : any +>crunch : Crunch -+>n : any + >n : number - // types work @@= skipped -25, +25 lines =@@ * @param {ex.Crunch} wrap */ @@ -45,28 +42,22 @@ +>wrap : Crunch wrap.n -->wrap.n : number + >wrap.n : number ->wrap : ex.Crunch -->n : number -+>wrap.n : any +>wrap : Crunch -+>n : any + >n : number } - === ex.js === -@@= skipped -25, +25 lines =@@ - >n : number - } - m() { -->m : () => number -+>m : () => any +@@= skipped -19, +19 lines =@@ - return this.n -->this.n : number -+>this.n : any + this.n = n + >this.n = n : number +->this.n : any ++>this.n : number >this : this -->n : number -+>n : any +->n : any + >n : number ++>n : number } - } - + m() { + >m : () => number From c387d3d8d4bcaf50c6b4a1920bd768757233d65f Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Fri, 9 May 2025 09:31:50 -0700 Subject: [PATCH 2/8] Reparse type tags on this.p as casts Just like the other places with no type annotation in Typescript. I may eventually add a Type property to these, but only if the results are unacceptable. For getting started they are fine. --- internal/parser/reparser.go | 6 + .../argumentsReferenceInConstructor1_Js.types | 1 + .../argumentsReferenceInConstructor2_Js.types | 1 + .../argumentsReferenceInConstructor3_Js.types | 8 +- .../argumentsReferenceInConstructor4_Js.types | 16 +- .../argumentsReferenceInConstructor5_Js.types | 8 +- .../argumentsReferenceInConstructor6_Js.types | 7 +- .../argumentsReferenceInConstructor7_Js.types | 1 + .../argumentsReferenceInMethod1_Js.types | 1 + .../argumentsReferenceInMethod2_Js.types | 1 + .../argumentsReferenceInMethod3_Js.types | 8 +- .../argumentsReferenceInMethod4_Js.types | 16 +- .../argumentsReferenceInMethod5_Js.types | 8 +- .../argumentsReferenceInMethod6_Js.types | 7 +- .../argumentsReferenceInMethod7_Js.types | 1 + .../submodule/compiler/checkJsFiles7.types | 3 +- ...xpandoFunctionContextualTypesJs.errors.txt | 10 +- .../expandoFunctionContextualTypesJs.types | 49 +++--- .../jsFileClassPropertyType2.errors.txt | 16 ++ .../compiler/jsFileClassPropertyType2.types | 15 +- .../compiler/thisInFunctionCallJs.types | 1 + ...dThisPropertyInitializerDoesntNarrow.types | 11 +- .../conformance/constructorFunctions3.types | 1 + ...ontextualTypedSpecialAssignment.errors.txt | 34 +--- .../contextualTypedSpecialAssignment.types | 104 +++++++------ .../jsDeclarationsFunctionLikeClasses2.types | 3 +- ...ferenceToClassInstanceCrossFile.errors.txt | 5 +- ...onsReferenceToClassInstanceCrossFile.types | 19 +-- ...clarationsTypedefAndImportTypes.errors.txt | 5 +- .../jsDeclarationsTypedefAndImportTypes.types | 7 +- .../jsdocReadonlyDeclarations.types | 7 +- .../conformance/jsdocTemplateTag4.errors.txt | 14 +- .../conformance/jsdocTemplateTag4.types | 9 +- .../conformance/jsdocTemplateTag5.errors.txt | 14 +- .../conformance/jsdocTemplateTag5.types | 9 +- .../jsdocTypeFromChainedAssignment.types | 1 + .../conformance/jsdocTypeTagCast.types | 3 +- ...pertiesOfGenericConstructorFunctions.types | 3 +- ...ropertyAssignmentUseParentType2.errors.txt | 27 ++++ .../propertyAssignmentUseParentType2.types | 6 +- .../thisTypeOfConstructorFunctions.errors.txt | 5 +- .../thisTypeOfConstructorFunctions.types | 1 + .../typeFromPropertyAssignment10.types | 3 +- .../typeFromPropertyAssignment10_1.types | 3 +- .../typeFromPropertyAssignment4.types | 3 +- .../typeTagModuleExports.errors.txt | 9 ++ .../conformance/typeTagModuleExports.types | 9 +- .../typeTagPrototypeAssignment.errors.txt | 11 ++ .../typeTagPrototypeAssignment.types | 11 +- ...mentsReferenceInConstructor1_Js.types.diff | 1 + ...mentsReferenceInConstructor2_Js.types.diff | 1 + ...mentsReferenceInConstructor3_Js.types.diff | 10 +- ...mentsReferenceInConstructor4_Js.types.diff | 27 +++- ...mentsReferenceInConstructor5_Js.types.diff | 9 +- ...mentsReferenceInConstructor6_Js.types.diff | 11 +- ...mentsReferenceInConstructor7_Js.types.diff | 10 ++ .../argumentsReferenceInMethod1_Js.types.diff | 1 + .../argumentsReferenceInMethod2_Js.types.diff | 1 + .../argumentsReferenceInMethod3_Js.types.diff | 9 +- .../argumentsReferenceInMethod4_Js.types.diff | 27 +++- .../argumentsReferenceInMethod5_Js.types.diff | 9 +- .../argumentsReferenceInMethod6_Js.types.diff | 8 +- .../argumentsReferenceInMethod7_Js.types.diff | 8 + .../compiler/checkJsFiles7.types.diff | 7 +- ...oFunctionContextualTypesJs.errors.txt.diff | 10 +- ...xpandoFunctionContextualTypesJs.types.diff | 61 ++++---- .../jsFileClassPropertyType2.errors.txt.diff | 21 --- .../jsFileClassPropertyType2.types.diff | 30 +--- .../compiler/thisInFunctionCallJs.types.diff | 10 +- ...PropertyInitializerDoesntNarrow.types.diff | 25 +-- .../constructorFunctions3.types.diff | 1 + ...tualTypedSpecialAssignment.errors.txt.diff | 34 +--- ...ontextualTypedSpecialAssignment.types.diff | 146 ++++++------------ ...eclarationsFunctionLikeClasses2.types.diff | 8 +- ...ceToClassInstanceCrossFile.errors.txt.diff | 5 +- ...ferenceToClassInstanceCrossFile.types.diff | 35 ++--- ...tionsTypedefAndImportTypes.errors.txt.diff | 5 +- ...clarationsTypedefAndImportTypes.types.diff | 8 +- .../jsdocReadonlyDeclarations.types.diff | 13 +- .../jsdocTemplateTag4.errors.txt.diff | 14 +- .../conformance/jsdocTemplateTag4.types.diff | 18 ++- .../jsdocTemplateTag5.errors.txt.diff | 14 +- .../conformance/jsdocTemplateTag5.types.diff | 18 ++- .../jsdocTypeFromChainedAssignment.types.diff | 1 + .../conformance/jsdocTypeTagCast.types.diff | 6 +- ...esOfGenericConstructorFunctions.types.diff | 6 +- ...tyAssignmentUseParentType2.errors.txt.diff | 47 +++--- ...ropertyAssignmentUseParentType2.types.diff | 18 ++- ...TypeOfConstructorFunctions.errors.txt.diff | 5 +- .../thisTypeOfConstructorFunctions.types.diff | 3 +- .../typeFromPropertyAssignment10.types.diff | 10 +- .../typeFromPropertyAssignment10_1.types.diff | 10 +- .../typeFromPropertyAssignment4.types.diff | 13 +- .../typeTagModuleExports.errors.txt.diff | 19 +-- .../typeTagModuleExports.types.diff | 16 +- ...typeTagPrototypeAssignment.errors.txt.diff | 23 +-- .../typeTagPrototypeAssignment.types.diff | 14 +- 97 files changed, 740 insertions(+), 587 deletions(-) create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAssignmentUseParentType2.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/typeTagModuleExports.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/typeTagPrototypeAssignment.errors.txt create mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.errors.txt.diff diff --git a/internal/parser/reparser.go b/internal/parser/reparser.go index 07b26ce987..2161b008a6 100644 --- a/internal/parser/reparser.go +++ b/internal/parser/reparser.go @@ -117,6 +117,12 @@ func (p *Parser) reparseTags(parent *ast.Node, jsDoc []*ast.Node) { } else if parent.Kind == ast.KindParenthesizedExpression { paren := parent.AsParenthesizedExpression() paren.Expression = p.makeNewTypeAssertion(p.makeNewType(tag.AsJSDocTypeTag().TypeExpression, nil), paren.Expression) + } else if parent.Kind == ast.KindExpressionStatement && + parent.AsExpressionStatement().Expression.Kind == ast.KindBinaryExpression { + bin := parent.AsExpressionStatement().Expression.AsBinaryExpression() + if ast.GetAssignmentDeclarationKind(bin) != ast.JSDeclarationKindNone { + bin.Right = p.makeNewTypeAssertion(p.makeNewType(tag.AsJSDocTypeTag().TypeExpression, nil), bin.Right) + } } case ast.KindJSDocTemplateTag: if fun, ok := getFunctionLikeHost(parent); ok { diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.types index b081eadf8c..475e6a90d6 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor1_Js.types @@ -21,6 +21,7 @@ class A { >this.arguments : object >this : this >arguments : object +>foo : object >foo : object } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.types index 7dd8e53d55..9a03bc3a9d 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor2_Js.types @@ -21,6 +21,7 @@ class A { >this["arguments"] : object >this : this >"arguments" : "arguments" +>foo : object >foo : object } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.types index e99e465644..082c68c644 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.types @@ -39,16 +39,18 @@ class B extends A { >this.foo : object >this : this >foo : object +>foo : object >foo : object /** * @type object */ this.bar = super.arguments.foo; ->this.bar = super.arguments.foo : any ->this.bar : any +>this.bar = super.arguments.foo : object +>this.bar : object >this : this ->bar : any +>bar : object +>super.arguments.foo : object >super.arguments.foo : any >super.arguments : { bar: {}; } >super : A diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.types index 95caa1cbc1..edb1100ba3 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.types @@ -25,6 +25,7 @@ class A { >this.foo : object >this : this >foo : object +>foo : object >foo : object /** @@ -40,10 +41,11 @@ class A { * @type object */ this.bar = arguments.bar; ->this.bar = arguments.bar : any ->this.bar : any +>this.bar = arguments.bar : object +>this.bar : object >this : this ->bar : any +>bar : object +>arguments.bar : object >arguments.bar : any >arguments : object >bar : any @@ -52,10 +54,11 @@ class A { * @type object */ this.baz = arguments[key]; ->this.baz = arguments[key] : any ->this.baz : any +>this.baz = arguments[key] : object +>this.baz : object >this : this ->baz : any +>baz : object +>arguments[key] : object >arguments[key] : any >arguments : object >key : "bar" @@ -68,6 +71,7 @@ class A { >this.options : object >this : this >options : object +>arguments : object >arguments : object } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.types index 4ed2e98577..dfa301b550 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor5_Js.types @@ -30,16 +30,18 @@ class A { >this.foo : object >this : this >foo : object +>foo : object >foo : object /** * @type object */ this.bar = bar.arguments; ->this.bar = bar.arguments : {} ->this.bar : {} +>this.bar = bar.arguments : object +>this.bar : object >this : this ->bar : {} +>bar : object +>bar.arguments : object >bar.arguments : {} >bar : { arguments: {}; } >arguments : {} diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.types index 202c3f0f73..ba59cbd896 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor6_Js.types @@ -9,10 +9,11 @@ class A { * @type object */ this.foo = arguments; ->this.foo = arguments : IArguments ->this.foo : IArguments +>this.foo = arguments : object +>this.foo : object >this : this ->foo : IArguments +>foo : object +>arguments : object >arguments : IArguments } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.types index 25f345353d..047e4449f9 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor7_Js.types @@ -14,6 +14,7 @@ class A { >this : this >callee : Function >arguments.callee : Function +>arguments.callee : Function >arguments : IArguments >callee : Function } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.types index fe819f951d..ca8c602763 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod1_Js.types @@ -20,6 +20,7 @@ class A { >this.arguments : object >this : this >arguments : object +>foo : object >foo : object } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.types index e4750d6b42..5613bd8ad6 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod2_Js.types @@ -20,6 +20,7 @@ class A { >this["arguments"] : object >this : this >"arguments" : "arguments" +>foo : object >foo : object } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.types index 88ae2938f3..8748baadda 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.types @@ -34,16 +34,18 @@ class B extends A { >this.x : object >this : this >x : object +>foo : object >foo : object /** * @type object */ this.y = super.arguments.bar; ->this.y = super.arguments.bar : {} ->this.y : {} +>this.y = super.arguments.bar : object +>this.y : object >this : this ->y : {} +>y : object +>super.arguments.bar : object >super.arguments.bar : {} >super.arguments : { bar: {}; } >super : A diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.types index d4a1d0147f..65a0768939 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.types @@ -24,6 +24,7 @@ class A { >this.foo : object >this : this >foo : object +>foo : object >foo : object /** @@ -39,10 +40,11 @@ class A { * @type object */ this.bar = arguments.bar; ->this.bar = arguments.bar : any ->this.bar : any +>this.bar = arguments.bar : object +>this.bar : object >this : this ->bar : any +>bar : object +>arguments.bar : object >arguments.bar : any >arguments : object >bar : any @@ -51,10 +53,11 @@ class A { * @type object */ this.baz = arguments[key]; ->this.baz = arguments[key] : any ->this.baz : any +>this.baz = arguments[key] : object +>this.baz : object >this : this ->baz : any +>baz : object +>arguments[key] : object >arguments[key] : any >arguments : object >key : "bar" @@ -67,6 +70,7 @@ class A { >this.options : object >this : this >options : object +>arguments : object >arguments : object } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.types index 52dfe258aa..33f2305316 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod5_Js.types @@ -29,16 +29,18 @@ class A { >this.foo : object >this : this >foo : object +>foo : object >foo : object /** * @type object */ this.bar = bar.arguments; ->this.bar = bar.arguments : {} ->this.bar : {} +>this.bar = bar.arguments : object +>this.bar : object >this : this ->bar : {} +>bar : object +>bar.arguments : object >bar.arguments : {} >bar : { arguments: {}; } >arguments : {} diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.types index ac9153d9ac..80ae866adb 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod6_Js.types @@ -11,10 +11,11 @@ class A { * @type object */ this.foo = arguments; ->this.foo = arguments : IArguments ->this.foo : IArguments +>this.foo = arguments : object +>this.foo : object >this : this ->foo : IArguments +>foo : object +>arguments : object >arguments : IArguments } } diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.types b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.types index afae4e22ad..58a1f7ab1e 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.types +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod7_Js.types @@ -16,6 +16,7 @@ class A { >this : this >callee : Function >arguments.callee : Function +>arguments.callee : Function >arguments : IArguments >callee : Function } diff --git a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.types b/testdata/baselines/reference/submodule/compiler/checkJsFiles7.types index 2cabdafba1..396e85db31 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.types +++ b/testdata/baselines/reference/submodule/compiler/checkJsFiles7.types @@ -7,10 +7,11 @@ class C { constructor() { /** @type {boolean} */ this.a = true; ->this.a = true : true +>this.a = true : boolean >this.a : any >this : this >a : any +>true : boolean >true : true this.a = !!this.a; diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJs.errors.txt b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJs.errors.txt index 491f957c42..1960cc42df 100644 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJs.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJs.errors.txt @@ -1,11 +1,8 @@ input.js(5,48): error TS2304: Cannot find name 'P'. input.js(48,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -input.js(52,17): error TS2322: Type '{ color: string; }' is not assignable to type '{ color: "blue" | "red"; }'. - Types of property 'color' are incompatible. - Type 'string' is not assignable to type '"blue" | "red"'. -==== input.js (3 errors) ==== +==== input.js (2 errors) ==== /** @typedef {{ color: "red" | "blue" }} MyComponentProps */ /** @@ -64,9 +61,4 @@ input.js(52,17): error TS2322: Type '{ color: string; }' is not assignable to ty !!! error TS2309: An export assignment cannot be used in a module with other exported elements. expectLiteral({ props: module.exports }); - ~~~~~ -!!! error TS2322: Type '{ color: string; }' is not assignable to type '{ color: "blue" | "red"; }'. -!!! error TS2322: Types of property 'color' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type '"blue" | "red"'. -!!! related TS6500 input.js:32:14: The expected type comes from property 'props' which is declared here on type '{ props: { color: "blue" | "red"; }; }' \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJs.types b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJs.types index 5e0fa52059..ea555dd052 100644 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJs.types +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJs.types @@ -29,21 +29,22 @@ MyComponent.defaultProps = { }; const MyComponent2 = () => null; ->MyComponent2 : { (): any; defaultProps: { color: string; }; } ->() => null : { (): any; defaultProps: { color: string; }; } +>MyComponent2 : { (): any; defaultProps: { color: "blue" | "red"; }; } +>() => null : { (): any; defaultProps: { color: "blue" | "red"; }; } /** * @type {MyComponentProps} */ MyComponent2.defaultProps = { ->MyComponent2.defaultProps = { color: "red"} : { color: string; } ->MyComponent2.defaultProps : { color: string; } ->MyComponent2 : { (): any; defaultProps: { color: string; }; } ->defaultProps : { color: string; } ->{ color: "red"} : { color: string; } +>MyComponent2.defaultProps = { color: "red"} : { color: "blue" | "red"; } +>MyComponent2.defaultProps : { color: "blue" | "red"; } +>MyComponent2 : { (): any; defaultProps: { color: "blue" | "red"; }; } +>defaultProps : { color: "blue" | "red"; } +>{ color: "red"} : { color: "blue" | "red"; } +>{ color: "red"} : { color: "red"; } color: "red" ->color : string +>color : "red" >"red" : "red" } @@ -52,7 +53,7 @@ MyComponent2.defaultProps = { */ const check = MyComponent2; >check : { (): any; defaultProps?: P; } ->MyComponent2 : { (): any; defaultProps: { color: string; }; } +>MyComponent2 : { (): any; defaultProps: { color: "blue" | "red"; }; } /** * @@ -69,12 +70,13 @@ function foo() { * @type {MyComponentProps} */ this.props = { color: "red" }; ->this.props = { color: "red" } : { color: string; } +>this.props = { color: "red" } : { color: "blue" | "red"; } >this.props : any >this : any >props : any ->{ color: "red" } : { color: string; } ->color : string +>{ color: "red" } : { color: "blue" | "red"; } +>{ color: "red" } : { color: "red"; } +>color : "red" >"red" : "red" expectLiteral(this); @@ -87,23 +89,24 @@ function foo() { * @type {MyComponentProps} */ module.exports = { ->module.exports = { color: "red"} : { color: string; } ->module.exports : { color: string; } ->module : { export=: { color: string; }; } ->exports : { color: string; } ->{ color: "red"} : { color: string; } +>module.exports = { color: "red"} : { color: "blue" | "red"; } +>module.exports : { color: "blue" | "red"; } +>module : { export=: { color: "blue" | "red"; }; } +>exports : { color: "blue" | "red"; } +>{ color: "red"} : { color: "blue" | "red"; } +>{ color: "red"} : { color: "red"; } color: "red" ->color : string +>color : "red" >"red" : "red" } expectLiteral({ props: module.exports }); >expectLiteral({ props: module.exports }) : void >expectLiteral : (p: { props: { color: "blue" | "red"; }; }) => void ->{ props: module.exports } : { props: { color: string; }; } ->props : { color: string; } ->module.exports : { color: string; } ->module : { export=: { color: string; }; } ->exports : { color: string; } +>{ props: module.exports } : { props: { color: "blue" | "red"; }; } +>props : { color: "blue" | "red"; } +>module.exports : { color: "blue" | "red"; } +>module : { export=: { color: "blue" | "red"; }; } +>exports : { color: "blue" | "red"; } diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.errors.txt new file mode 100644 index 0000000000..b54def4ed5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.errors.txt @@ -0,0 +1,16 @@ +bar.ts(1,18): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. + + +==== foo.js (0 errors) ==== + class C { + constructor() { + /** @type {number[]}*/ + this.p = []; + } + } + +==== bar.ts (1 errors) ==== + (new C()).p.push("string"); + ~~~~~~~~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.types b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.types index 8b01de9f4a..0c92826509 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.types +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType2.types @@ -7,10 +7,11 @@ class C { constructor() { /** @type {number[]}*/ this.p = []; ->this.p = [] : undefined[] ->this.p : any[] +>this.p = [] : number[] +>this.p : number[] >this : this ->p : any[] +>p : number[] +>[] : number[] >[] : undefined[] } } @@ -18,12 +19,12 @@ class C { === bar.ts === (new C()).p.push("string"); >(new C()).p.push("string") : number ->(new C()).p.push : (...items: any[]) => number ->(new C()).p : any[] +>(new C()).p.push : (...items: number[]) => number +>(new C()).p : number[] >(new C()) : C >new C() : C >C : typeof C ->p : any[] ->push : (...items: any[]) => number +>p : number[] +>push : (...items: number[]) => number >"string" : "string" diff --git a/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.types b/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.types index aa86beabe2..b43a25561e 100644 --- a/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.types +++ b/testdata/baselines/reference/submodule/compiler/thisInFunctionCallJs.types @@ -12,6 +12,7 @@ class Test { >this : this >data : number[] >[1, 2, 3] : number[] +>[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 diff --git a/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.types b/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.types index 0aa7bbc7b2..5bd2284cdc 100644 --- a/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.types +++ b/testdata/baselines/reference/submodule/conformance/annotatedThisPropertyInitializerDoesntNarrow.types @@ -13,10 +13,11 @@ export class C { constructor() { /** @type {{ [assetName: string]: number}} */ this.assets = {}; ->this.assets = {} : {} ->this.assets : {} +>this.assets = {} : { [assetName: string]: number; } +>this.assets : { [assetName: string]: number; } >this : this ->assets : {} +>assets : { [assetName: string]: number; } +>{} : { [assetName: string]: number; } >{} : {} } m() { @@ -25,9 +26,9 @@ export class C { mappy(this.assets) >mappy(this.assets) : void >mappy : (map: { [s: string]: number; }) => void ->this.assets : {} +>this.assets : { [assetName: string]: number; } >this : this ->assets : {} +>assets : { [assetName: string]: number; } } } diff --git a/testdata/baselines/reference/submodule/conformance/constructorFunctions3.types b/testdata/baselines/reference/submodule/conformance/constructorFunctions3.types index 62fe215033..55d4befb1b 100644 --- a/testdata/baselines/reference/submodule/conformance/constructorFunctions3.types +++ b/testdata/baselines/reference/submodule/conformance/constructorFunctions3.types @@ -68,6 +68,7 @@ function A () { >this : any >second : any >1 : 1 +>1 : 1 } /** @param {number} n */ A.prototype.z = function f(n) { diff --git a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt index b5f6ebd776..cc03230883 100644 --- a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt @@ -1,22 +1,14 @@ -mod.js(5,7): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(9,4): error TS2339: Property 'x' does not exist on type '{}'. -test.js(11,7): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(14,4): error TS2339: Property 'x' does not exist on type '{}'. test.js(16,7): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(18,4): error TS2339: Property 'x' does not exist on type '{}'. -test.js(27,15): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(34,15): error TS7006: Parameter 'n' implicitly has an 'any' type. -test.js(42,1): 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. -test.js(44,7): error TS7006: Parameter 'n' implicitly has an 'any' type. -test.js(49,1): error TS7022: 'y' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -test.js(51,7): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(57,17): error TS2339: Property 'x' does not exist on type 'Thing'. test.js(59,7): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(61,17): error TS2339: Property 'x' does not exist on type 'Thing'. -test.js(69,7): error TS7006: Parameter 'n' implicitly has an 'any' type. -==== test.js (15 errors) ==== +==== test.js (8 errors) ==== /** @typedef {{ status: 'done' m(n: number): void @@ -30,8 +22,6 @@ test.js(69,7): error TS7006: Parameter 'n' implicitly has an 'any' type. !!! error TS2339: Property 'x' does not exist on type '{}'. status: 'done', m(n) { } - ~ -!!! error TS7006: Parameter 'n' implicitly has an 'any' type. } ns.x = { @@ -54,8 +44,6 @@ test.js(69,7): error TS7006: Parameter 'n' implicitly has an 'any' type. this.s = { status: 'done', m(n) { } - ~ -!!! error TS7006: Parameter 'n' implicitly has an 'any' type. } } @@ -73,30 +61,16 @@ test.js(69,7): error TS7006: Parameter 'n' implicitly has an 'any' type. /** @type {DoneStatus} */ exports.x = { - ~~~~~~~~~~~~~ status: "done", - ~~~~~~~~~~~~~~~~~~~ m(n) { } - ~~~~~~~~~~~~ - ~ -!!! error TS7006: Parameter 'n' implicitly has an 'any' type. } - ~ -!!! 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. exports.x /** @type {DoneStatus} */ module.exports.y = { - ~~~~~~~~~~~~~~~~~~~~ status: "done", - ~~~~~~~~~~~~~~~~~~~ m(n) { } - ~~~~~~~~~~~~ - ~ -!!! error TS7006: Parameter 'n' implicitly has an 'any' type. } - ~ -!!! error TS7022: 'y' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. module.exports.y // prototype-property assignment @@ -120,17 +94,13 @@ test.js(69,7): error TS7006: Parameter 'n' implicitly has an 'any' type. F.prototype = { status: "done", m(n) { } - ~ -!!! error TS7006: Parameter 'n' implicitly has an 'any' type. } -==== mod.js (1 errors) ==== +==== mod.js (0 errors) ==== // module.exports assignment /** @type {{ status: 'done', m(n: number): void }} */ module.exports = { status: "done", m(n) { } - ~ -!!! error TS7006: Parameter 'n' implicitly has an 'any' type. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types index a1a9b91653..25ed142005 100644 --- a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types +++ b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types @@ -13,19 +13,20 @@ var ns = {} /** @type {DoneStatus} */ ns.x = { ->ns.x = { status: 'done', m(n) { }} : { status: string; m: (n: any) => void; } +>ns.x = { status: 'done', m(n) { }} : { status: "done"; m: (n: number) => void; } >ns.x : any >ns : {} >x : any ->{ status: 'done', m(n) { }} : { status: string; m: (n: any) => void; } +>{ status: 'done', m(n) { }} : { status: "done"; m: (n: number) => void; } +>{ status: 'done', m(n) { }} : { status: "done"; m: (n: number) => void; } status: 'done', ->status : string +>status : "done" >'done' : "done" m(n) { } ->m : (n: any) => void ->n : any +>m : (n: number) => void +>n : number } ns.x = { @@ -56,19 +57,20 @@ class Thing { constructor() { /** @type {DoneStatus} */ this.s = { ->this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } ->this.s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } +>this.s = { status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } +>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } >this : this ->s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } ->{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } +>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } +>{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } +>{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } status: 'done', ->status : string +>status : "done" >'done' : "done" m(n) { } ->m : (n: any) => void ->n : any +>m : (n: number) => void +>n : number } } @@ -77,9 +79,9 @@ class Thing { this.s = { >this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } ->this.s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } +>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } >this : this ->s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } +>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } >{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } status: 'done', @@ -97,49 +99,51 @@ class Thing { /** @type {DoneStatus} */ exports.x = { ->exports.x = { status: "done", m(n) { }} : { status: string; m: (n: any) => void; } ->exports.x : any +>exports.x = { status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } +>exports.x : { status: "done"; m: (n: number) => void; } >exports : typeof import("test") ->x : any ->{ status: "done", m(n) { }} : { status: string; m: (n: any) => void; } +>x : { status: "done"; m: (n: number) => void; } +>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } +>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } status: "done", ->status : string +>status : "done" >"done" : "done" m(n) { } ->m : (n: any) => void ->n : any +>m : (n: number) => void +>n : number } exports.x ->exports.x : any +>exports.x : { status: "done"; m: (n: number) => void; } >exports : typeof import("test") ->x : any +>x : { status: "done"; m: (n: number) => void; } /** @type {DoneStatus} */ module.exports.y = { ->module.exports.y = { status: "done", m(n) { }} : { status: string; m: (n: any) => void; } ->module.exports.y : any +>module.exports.y = { status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } +>module.exports.y : { status: "done"; m: (n: number) => void; } >module.exports : typeof import("test") >module : { "test": typeof import("test"); } >exports : typeof import("test") ->y : any ->{ status: "done", m(n) { }} : { status: string; m: (n: any) => void; } +>y : { status: "done"; m: (n: number) => void; } +>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } +>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } status: "done", ->status : string +>status : "done" >"done" : "done" m(n) { } ->m : (n: any) => void ->n : any +>m : (n: number) => void +>n : number } module.exports.y ->module.exports.y : any +>module.exports.y : { status: "done"; m: (n: number) => void; } >module.exports : typeof import("test") >module : { "test": typeof import("test"); } >exports : typeof import("test") ->y : any +>y : { status: "done"; m: (n: number) => void; } // prototype-property assignment /** @type {DoneStatus} */ @@ -169,41 +173,43 @@ Thing.prototype.x // prototype assignment function F() { ->F : { (): void; prototype: { status: string; m: (n: any) => void; }; } +>F : { (): void; prototype: { status: "done"; m: (n: number) => void; }; } } /** @type {DoneStatus} */ F.prototype = { ->F.prototype = { status: "done", m(n) { }} : { status: string; m: (n: any) => void; } ->F.prototype : { status: string; m: (n: any) => void; } ->F : { (): void; prototype: { status: string; m: (n: any) => void; }; } ->prototype : { status: string; m: (n: any) => void; } ->{ status: "done", m(n) { }} : { status: string; m: (n: any) => void; } +>F.prototype = { status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } +>F.prototype : { status: "done"; m: (n: number) => void; } +>F : { (): void; prototype: { status: "done"; m: (n: number) => void; }; } +>prototype : { status: "done"; m: (n: number) => void; } +>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } +>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } status: "done", ->status : string +>status : "done" >"done" : "done" m(n) { } ->m : (n: any) => void ->n : any +>m : (n: number) => void +>n : number } === mod.js === // module.exports assignment /** @type {{ status: 'done', m(n: number): void }} */ module.exports = { ->module.exports = { status: "done", m(n) { }} : { status: string; m: (n: any) => void; } ->module.exports : { status: string; m: (n: any) => void; } ->module : { export=: { status: string; m: (n: any) => void; }; } ->exports : { status: string; m: (n: any) => void; } ->{ status: "done", m(n) { }} : { status: string; m: (n: any) => void; } +>module.exports = { status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } +>module.exports : { status: "done"; m: (n: number) => void; } +>module : { export=: { status: "done"; m: (n: number) => void; }; } +>exports : { status: "done"; m: (n: number) => void; } +>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } +>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } status: "done", ->status : string +>status : "done" >"done" : "done" m(n) { } ->m : (n: any) => void ->n : any +>m : (n: number) => void +>n : number } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionLikeClasses2.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionLikeClasses2.types index 28bea0bb21..6c5556c738 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionLikeClasses2.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionLikeClasses2.types @@ -12,10 +12,11 @@ export function Vec(len) { * @type {number[]} */ this.storage = new Array(len); ->this.storage = new Array(len) : any[] +>this.storage = new Array(len) : number[] >this.storage : any >this : any >storage : any +>new Array(len) : number[] >new Array(len) : any[] >Array : ArrayConstructor >len : number diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt index 7661c69146..f263e9f33f 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt @@ -1,3 +1,4 @@ +index.js(7,19): error TS2749: 'Rectangle' refers to a value, but is being used as a type here. Did you mean 'typeof Rectangle'? index.js(14,18): error TS2749: 'Rectangle' refers to a value, but is being used as a type here. Did you mean 'typeof Rectangle'? @@ -15,7 +16,7 @@ index.js(14,18): error TS2749: 'Rectangle' refers to a value, but is being used } module.exports = { Rectangle }; -==== index.js (1 errors) ==== +==== index.js (2 errors) ==== const {Rectangle} = require('./rectangle'); class Render { @@ -23,6 +24,8 @@ index.js(14,18): error TS2749: 'Rectangle' refers to a value, but is being used /** * Object list * @type {Rectangle[]} + ~~~~~~~~~ +!!! error TS2749: 'Rectangle' refers to a value, but is being used as a type here. Did you mean 'typeof Rectangle'? */ this.objects = []; } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types index e8bbdfd39d..2a44271e15 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types @@ -24,9 +24,9 @@ console.log("Objects", render.objects); >console : Console >log : (...data: any[]) => void >"Objects" : "Objects" ->render.objects : any[] +>render.objects : Rectangle[] >render : Render ->objects : any[] +>objects : Rectangle[] === rectangle.js === class Rectangle { @@ -66,10 +66,11 @@ class Render { * @type {Rectangle[]} */ this.objects = []; ->this.objects = [] : undefined[] ->this.objects : any[] +>this.objects = [] : Rectangle[] +>this.objects : Rectangle[] >this : this ->objects : any[] +>objects : Rectangle[] +>[] : Rectangle[] >[] : undefined[] } /** @@ -87,11 +88,11 @@ class Render { this.objects.push(obj); >this.objects.push(obj) : number ->this.objects.push : (...items: any[]) => number ->this.objects : any[] +>this.objects.push : (...items: Rectangle[]) => number +>this.objects : Rectangle[] >this : this ->objects : any[] ->push : (...items: any[]) => number +>objects : Rectangle[] +>push : (...items: Rectangle[]) => number >obj : Rectangle return obj; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt index a68a8b93bb..23837dfb7d 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt @@ -1,4 +1,5 @@ conn.js(11,1): error TS2309: An export assignment cannot be used in a module with other exported elements. +usage.js(11,37): error TS2694: Namespace 'Conn' has no exported member 'Whatever'. usage.js(16,1): error TS2309: An export assignment cannot be used in a module with other exported elements. @@ -17,7 +18,7 @@ usage.js(16,1): error TS2309: An export assignment cannot be used in a module wi ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2309: An export assignment cannot be used in a module with other exported elements. -==== usage.js (1 errors) ==== +==== usage.js (2 errors) ==== /** * @typedef {import("./conn")} Conn */ @@ -29,6 +30,8 @@ usage.js(16,1): error TS2309: An export assignment cannot be used in a module wi constructor(c) { this.connItem = c.item; /** @type {import("./conn").Whatever} */ + ~~~~~~~~ +!!! error TS2694: Namespace 'Conn' has no exported member 'Whatever'. this.another = ""; } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.types index 6d134a4005..c093f43e9d 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefAndImportTypes.types @@ -49,10 +49,11 @@ class Wrap { /** @type {import("./conn").Whatever} */ this.another = ""; ->this.another = "" : "" ->this.another : string +>this.another = "" : any +>this.another : any >this : this ->another : string +>another : any +>"" : any >"" : "" } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.types b/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.types index 49544aba44..f66781d6a4 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.types @@ -25,10 +25,11 @@ class C { * @type {number} */ this.y = n ->this.y = n : any ->this.y : any +>this.y = n : number +>this.y : number >this : this ->y : any +>y : number +>n : number >n : any } } diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag4.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag4.errors.txt index a3e888c58a..b46ac506c2 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag4.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag4.errors.txt @@ -1,14 +1,18 @@ +a.js(8,16): error TS2315: Type 'Object' is not generic. a.js(9,5): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. a.js(16,36): error TS7006: Parameter 'key' implicitly has an 'any' type. +a.js(27,16): error TS2315: Type 'Object' is not generic. a.js(28,5): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. a.js(35,37): error TS7006: Parameter 'key' implicitly has an 'any' type. a.js(46,4): error TS2339: Property 'Multimap3' does not exist on type '{}'. +a.js(47,16): error TS2315: Type 'Object' is not generic. +a.js(47,31): error TS2304: Cannot find name 'V'. a.js(48,10): error TS2339: Property '_map' does not exist on type '{}'. a.js(55,4): error TS2339: Property 'Multimap3' does not exist on type '{}'. a.js(55,40): error TS7006: Parameter 'key' implicitly has an 'any' type. -==== a.js (8 errors) ==== +==== a.js (12 errors) ==== /** * Should work for function declarations * @constructor @@ -17,6 +21,8 @@ a.js(55,40): error TS7006: Parameter 'key' implicitly has an 'any' type. */ function Multimap() { /** @type {Object} TODO: Remove the prototype from the fresh object */ + ~~~~~~~~~~~~~~~~~ +!!! error TS2315: Type 'Object' is not generic. this._map = {}; ~~~~ !!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. @@ -40,6 +46,8 @@ a.js(55,40): error TS7006: Parameter 'key' implicitly has an 'any' type. */ var Multimap2 = function() { /** @type {Object} TODO: Remove the prototype from the fresh object */ + ~~~~~~~~~~~~~~~~~ +!!! error TS2315: Type 'Object' is not generic. this._map = {}; ~~~~ !!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. @@ -66,6 +74,10 @@ a.js(55,40): error TS7006: Parameter 'key' implicitly has an 'any' type. ~~~~~~~~~ !!! error TS2339: Property 'Multimap3' does not exist on type '{}'. /** @type {Object} TODO: Remove the prototype from the fresh object */ + ~~~~~~~~~~~~~~~~~ +!!! error TS2315: Type 'Object' is not generic. + ~ +!!! error TS2304: Cannot find name 'V'. this._map = {}; ~~~~ !!! error TS2339: Property '_map' does not exist on type '{}'. diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag4.types b/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag4.types index 21efece73b..52f157ebd5 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag4.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag4.types @@ -12,10 +12,11 @@ function Multimap() { /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; ->this._map = {} : {} +>this._map = {} : any >this._map : any >this : any >_map : any +>{} : any >{} : {} }; @@ -56,10 +57,11 @@ var Multimap2 = function() { /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; ->this._map = {} : {} +>this._map = {} : any >this._map : any >this : any >_map : any +>{} : any >{} : {} }; @@ -107,10 +109,11 @@ Ns.Multimap3 = function() { /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; ->this._map = {} : {} +>this._map = {} : any >this._map : any >this : {} >_map : any +>{} : any >{} : {} }; diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag5.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag5.errors.txt index 3327c8ae09..da77c9c58d 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag5.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag5.errors.txt @@ -1,18 +1,22 @@ +a.js(8,16): error TS2315: Type 'Object' is not generic. a.js(9,5): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. a.js(14,16): error TS2304: Cannot find name 'K'. a.js(15,18): error TS2304: Cannot find name 'V'. a.js(18,21): error TS2339: Property '_map' does not exist on type '{ get: (key: K) => V; }'. +a.js(29,16): error TS2315: Type 'Object' is not generic. a.js(30,5): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. a.js(35,16): error TS2304: Cannot find name 'K'. a.js(36,18): error TS2304: Cannot find name 'V'. a.js(50,4): error TS2339: Property 'Multimap3' does not exist on type '{}'. +a.js(51,16): error TS2315: Type 'Object' is not generic. +a.js(51,31): error TS2304: Cannot find name 'V'. a.js(52,10): error TS2339: Property '_map' does not exist on type '{}'. a.js(55,4): error TS2339: Property 'Multimap3' does not exist on type '{}'. a.js(57,16): error TS2304: Cannot find name 'K'. a.js(58,18): error TS2304: Cannot find name 'V'. -==== a.js (12 errors) ==== +==== a.js (16 errors) ==== /** * Should work for function declarations * @constructor @@ -21,6 +25,8 @@ a.js(58,18): error TS2304: Cannot find name 'V'. */ function Multimap() { /** @type {Object} TODO: Remove the prototype from the fresh object */ + ~~~~~~~~~~~~~~~~~ +!!! error TS2315: Type 'Object' is not generic. this._map = {}; ~~~~ !!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. @@ -50,6 +56,8 @@ a.js(58,18): error TS2304: Cannot find name 'V'. */ var Multimap2 = function() { /** @type {Object} TODO: Remove the prototype from the fresh object */ + ~~~~~~~~~~~~~~~~~ +!!! error TS2315: Type 'Object' is not generic. this._map = {}; ~~~~ !!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. @@ -80,6 +88,10 @@ a.js(58,18): error TS2304: Cannot find name 'V'. ~~~~~~~~~ !!! error TS2339: Property 'Multimap3' does not exist on type '{}'. /** @type {Object} TODO: Remove the prototype from the fresh object */ + ~~~~~~~~~~~~~~~~~ +!!! error TS2315: Type 'Object' is not generic. + ~ +!!! error TS2304: Cannot find name 'V'. this._map = {}; ~~~~ !!! error TS2339: Property '_map' does not exist on type '{}'. diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag5.types b/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag5.types index 345d3bf137..6c482cf98b 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag5.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocTemplateTag5.types @@ -12,10 +12,11 @@ function Multimap() { /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; ->this._map = {} : {} +>this._map = {} : any >this._map : any >this : any >_map : any +>{} : any >{} : {} }; @@ -58,10 +59,11 @@ var Multimap2 = function() { /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; ->this._map = {} : {} +>this._map = {} : any >this._map : any >this : any >_map : any +>{} : any >{} : {} }; @@ -112,10 +114,11 @@ Ns.Multimap3 = function() { /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; ->this._map = {} : {} +>this._map = {} : any >this._map : any >this : {} >_map : any +>{} : any >{} : {} }; diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeFromChainedAssignment.types b/testdata/baselines/reference/submodule/conformance/jsdocTypeFromChainedAssignment.types index 8ab853edc0..f6e91fd66e 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeFromChainedAssignment.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeFromChainedAssignment.types @@ -18,6 +18,7 @@ function A () { >this : any >first : any >this.second = 1 : 1 +>this.second = 1 : 1 >this.second : any >this : any >second : any diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.types b/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.types index 868c12ce17..0b92e77d84 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.types +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.types @@ -91,10 +91,11 @@ function SomeFakeClass() { /** @type {string|number} */ this.p = "bar"; ->this.p = "bar" : "bar" +>this.p = "bar" : string | number >this.p : any >this : any >p : any +>"bar" : string | number >"bar" : "bar" } diff --git a/testdata/baselines/reference/submodule/conformance/propertiesOfGenericConstructorFunctions.types b/testdata/baselines/reference/submodule/conformance/propertiesOfGenericConstructorFunctions.types index ac0d1e4700..2aa4bbe5f6 100644 --- a/testdata/baselines/reference/submodule/conformance/propertiesOfGenericConstructorFunctions.types +++ b/testdata/baselines/reference/submodule/conformance/propertiesOfGenericConstructorFunctions.types @@ -14,10 +14,11 @@ function Multimap(ik, iv) { /** @type {{ [s: string]: V }} */ this._map = {}; ->this._map = {} : {} +>this._map = {} : { [s: string]: V; } >this._map : any >this : any >_map : any +>{} : { [s: string]: V; } >{} : {} // without type annotation diff --git a/testdata/baselines/reference/submodule/conformance/propertyAssignmentUseParentType2.errors.txt b/testdata/baselines/reference/submodule/conformance/propertyAssignmentUseParentType2.errors.txt new file mode 100644 index 0000000000..a53610938e --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/propertyAssignmentUseParentType2.errors.txt @@ -0,0 +1,27 @@ +propertyAssignmentUseParentType2.js(11,14): error TS2322: Type '{ (): true; nuo: 1000; }' is not assignable to type '{ (): boolean; nuo: 789; }'. + Types of property 'nuo' are incompatible. + Type '1000' is not assignable to type '789'. +propertyAssignmentUseParentType2.js(13,1): error TS2322: Type '1000' is not assignable to type '789'. + + +==== propertyAssignmentUseParentType2.js (2 errors) ==== + /** @type {{ (): boolean; nuo: 789 }} */ + export const inlined = () => true + inlined.nuo = 789 + + /** @type {{ (): boolean; nuo: 789 }} */ + export const duplicated = () => true + /** @type {789} */ + duplicated.nuo = 789 + + /** @type {{ (): boolean; nuo: 789 }} */ + export const conflictingDuplicated = () => true + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ (): true; nuo: 1000; }' is not assignable to type '{ (): boolean; nuo: 789; }'. +!!! error TS2322: Types of property 'nuo' are incompatible. +!!! error TS2322: Type '1000' is not assignable to type '789'. + /** @type {1000} */ + conflictingDuplicated.nuo = 789 + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '1000' is not assignable to type '789'. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/propertyAssignmentUseParentType2.types b/testdata/baselines/reference/submodule/conformance/propertyAssignmentUseParentType2.types index d46c4f4998..f6c85114a5 100644 --- a/testdata/baselines/reference/submodule/conformance/propertyAssignmentUseParentType2.types +++ b/testdata/baselines/reference/submodule/conformance/propertyAssignmentUseParentType2.types @@ -27,18 +27,20 @@ duplicated.nuo = 789 >duplicated : { (): boolean; nuo: 789; } >nuo : 789 >789 : 789 +>789 : 789 /** @type {{ (): boolean; nuo: 789 }} */ export const conflictingDuplicated = () => true >conflictingDuplicated : { (): boolean; nuo: 789; } ->() => true : { (): true; nuo: 789; } +>() => true : { (): true; nuo: 1000; } >true : true /** @type {1000} */ conflictingDuplicated.nuo = 789 ->conflictingDuplicated.nuo = 789 : 789 +>conflictingDuplicated.nuo = 789 : 1000 >conflictingDuplicated.nuo : 789 >conflictingDuplicated : { (): boolean; nuo: 789; } >nuo : 789 +>789 : 1000 >789 : 789 diff --git a/testdata/baselines/reference/submodule/conformance/thisTypeOfConstructorFunctions.errors.txt b/testdata/baselines/reference/submodule/conformance/thisTypeOfConstructorFunctions.errors.txt index 0961be452d..a81db9088a 100644 --- a/testdata/baselines/reference/submodule/conformance/thisTypeOfConstructorFunctions.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/thisTypeOfConstructorFunctions.errors.txt @@ -1,10 +1,11 @@ +thisTypeOfConstructorFunctions.js(7,16): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeOfConstructorFunctions.js(15,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeOfConstructorFunctions.js(38,12): error TS2749: 'Cpp' refers to a value, but is being used as a type here. Did you mean 'typeof Cpp'? thisTypeOfConstructorFunctions.js(41,12): error TS2749: 'Cp' refers to a value, but is being used as a type here. Did you mean 'typeof Cp'? thisTypeOfConstructorFunctions.js(43,12): error TS2749: 'Cp' refers to a value, but is being used as a type here. Did you mean 'typeof Cp'? -==== thisTypeOfConstructorFunctions.js (4 errors) ==== +==== thisTypeOfConstructorFunctions.js (5 errors) ==== /** * @class * @template T @@ -12,6 +13,8 @@ thisTypeOfConstructorFunctions.js(43,12): error TS2749: 'Cp' refers to a value, */ function Cp(t) { /** @type {this} */ + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. this.dit = this this.y = t /** @return {this} */ diff --git a/testdata/baselines/reference/submodule/conformance/thisTypeOfConstructorFunctions.types b/testdata/baselines/reference/submodule/conformance/thisTypeOfConstructorFunctions.types index 2af7c44ddc..8909dd930b 100644 --- a/testdata/baselines/reference/submodule/conformance/thisTypeOfConstructorFunctions.types +++ b/testdata/baselines/reference/submodule/conformance/thisTypeOfConstructorFunctions.types @@ -16,6 +16,7 @@ function Cp(t) { >this.dit : any >this : any >dit : any +>this : any >this : any this.y = t diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.types index 7363d5cd1e..3ed0dfc989 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10.types @@ -54,10 +54,11 @@ Outer.app.Inner = class { constructor() { /** @type {number} */ this.y = 12; ->this.y = 12 : 12 +>this.y = 12 : number >this.y : number >this : this >y : number +>12 : number >12 : 12 } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.types index 0c16f71985..99681bc3cf 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment10_1.types @@ -54,10 +54,11 @@ Outer.app.Inner = class { constructor() { /** @type {number} */ this.y = 12; ->this.y = 12 : 12 +>this.y = 12 : number >this.y : number >this : this >y : number +>12 : number >12 : 12 } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.types b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.types index bb86ae2b3b..0e22f405a4 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.types +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment4.types @@ -16,10 +16,11 @@ Outer.Inner = class { constructor() { /** @type {number} */ this.y = 12 ->this.y = 12 : 12 +>this.y = 12 : number >this.y : number >this : this >y : number +>12 : number >12 : 12 } } diff --git a/testdata/baselines/reference/submodule/conformance/typeTagModuleExports.errors.txt b/testdata/baselines/reference/submodule/conformance/typeTagModuleExports.errors.txt new file mode 100644 index 0000000000..a43429364d --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/typeTagModuleExports.errors.txt @@ -0,0 +1,9 @@ +bug27327.js(2,18): 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. + + +==== bug27327.js (1 errors) ==== + /** @type {string} */ + module.exports = 0; + ~ +!!! 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. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typeTagModuleExports.types b/testdata/baselines/reference/submodule/conformance/typeTagModuleExports.types index 28ef7704b4..e990c4efe1 100644 --- a/testdata/baselines/reference/submodule/conformance/typeTagModuleExports.types +++ b/testdata/baselines/reference/submodule/conformance/typeTagModuleExports.types @@ -3,9 +3,10 @@ === bug27327.js === /** @type {string} */ module.exports = 0; ->module.exports = 0 : 0 ->module.exports : 0 ->module : { export=: 0; } ->exports : 0 +>module.exports = 0 : string +>module.exports : string +>module : { export=: string; } +>exports : string +>0 : string >0 : 0 diff --git a/testdata/baselines/reference/submodule/conformance/typeTagPrototypeAssignment.errors.txt b/testdata/baselines/reference/submodule/conformance/typeTagPrototypeAssignment.errors.txt new file mode 100644 index 0000000000..d2ef86570a --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/typeTagPrototypeAssignment.errors.txt @@ -0,0 +1,11 @@ +bug27327.js(4,15): 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. + + +==== bug27327.js (1 errors) ==== + function C() { + } + /** @type {string} */ + C.prototype = 12 + ~~ +!!! 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. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typeTagPrototypeAssignment.types b/testdata/baselines/reference/submodule/conformance/typeTagPrototypeAssignment.types index 323be462a7..497159aebf 100644 --- a/testdata/baselines/reference/submodule/conformance/typeTagPrototypeAssignment.types +++ b/testdata/baselines/reference/submodule/conformance/typeTagPrototypeAssignment.types @@ -2,13 +2,14 @@ === bug27327.js === function C() { ->C : { (): void; prototype: number; } +>C : { (): void; prototype: string; } } /** @type {string} */ C.prototype = 12 ->C.prototype = 12 : 12 ->C.prototype : number ->C : { (): void; prototype: number; } ->prototype : number +>C.prototype = 12 : string +>C.prototype : string +>C : { (): void; prototype: string; } +>prototype : string +>12 : string >12 : 12 diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.types.diff index ee016d33b3..fbcb074916 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor1_Js.types.diff @@ -20,6 +20,7 @@ ->arguments : any ->foo : any +>arguments : object ++>foo : object +>foo : object } } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor2_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor2_Js.types.diff index e6121adb37..9ebcf3dd83 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor2_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor2_Js.types.diff @@ -19,6 +19,7 @@ >this : this >"arguments" : "arguments" ->foo : any ++>foo : object +>foo : object } } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.types.diff index 56f16336bc..60b76c4e4f 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.types.diff @@ -21,6 +21,7 @@ ->foo : any ->foo : any +>foo : object ++>foo : object +>foo : object /** @@ -28,11 +29,14 @@ */ this.bar = super.arguments.foo; ->this.bar = super.arguments.foo : error -+>this.bar = super.arguments.foo : any - >this.bar : any +->this.bar : any ++>this.bar = super.arguments.foo : object ++>this.bar : object >this : this - >bar : any +->bar : any ->super.arguments.foo : error ++>bar : object ++>super.arguments.foo : object +>super.arguments.foo : any >super.arguments : { bar: {}; } >super : A diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.types.diff index 70f1618e20..b1d895ce0a 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.types.diff @@ -21,6 +21,7 @@ ->foo : any ->foo : any +>foo : object ++>foo : object +>foo : object /** @@ -32,18 +33,35 @@ >this.arguments : { bar: {}; } >this : this >arguments : { bar: {}; } -@@= skipped -24, +24 lines =@@ +@@= skipped -19, +20 lines =@@ + * @type object + */ + this.bar = arguments.bar; +->this.bar = arguments.bar : any +->this.bar : any ++>this.bar = arguments.bar : object ++>this.bar : object >this : this - >bar : any +->bar : any ++>bar : object ++>arguments.bar : object >arguments.bar : any ->arguments : any +>arguments : object >bar : any /** -@@= skipped -12, +12 lines =@@ + * @type object + */ + this.baz = arguments[key]; +->this.baz = arguments[key] : any +->this.baz : any ++>this.baz = arguments[key] : object ++>this.baz : object >this : this - >baz : any +->baz : any ++>baz : object ++>arguments[key] : object >arguments[key] : any ->arguments : any +>arguments : object @@ -61,6 +79,7 @@ ->options : any ->arguments : any +>options : object ++>arguments : object +>arguments : object } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.types.diff index e6f0dc6acb..400bbc0ff9 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor5_Js.types.diff @@ -20,18 +20,21 @@ ->foo : any ->foo : any +>foo : object ++>foo : object +>foo : object /** * @type object */ this.bar = bar.arguments; - >this.bar = bar.arguments : {} +->this.bar = bar.arguments : {} ->this.bar : any -+>this.bar : {} ++>this.bar = bar.arguments : object ++>this.bar : object >this : this ->bar : any -+>bar : {} ++>bar : object ++>bar.arguments : object >bar.arguments : {} >bar : { arguments: {}; } >arguments : {} diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.types.diff index 1ba5dc752f..b8ec1516f8 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor6_Js.types.diff @@ -1,14 +1,17 @@ --- old.argumentsReferenceInConstructor6_Js.types +++ new.argumentsReferenceInConstructor6_Js.types -@@= skipped -9, +9 lines =@@ +@@= skipped -8, +8 lines =@@ + * @type object */ this.foo = arguments; - >this.foo = arguments : IArguments +->this.foo = arguments : IArguments ->this.foo : any -+>this.foo : IArguments ++>this.foo = arguments : object ++>this.foo : object >this : this ->foo : any -+>foo : IArguments ++>foo : object ++>arguments : object >arguments : IArguments } } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.types.diff new file mode 100644 index 0000000000..e2173bfa20 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor7_Js.types.diff @@ -0,0 +1,10 @@ +--- old.argumentsReferenceInConstructor7_Js.types ++++ new.argumentsReferenceInConstructor7_Js.types +@@= skipped -13, +13 lines =@@ + >this : this + >callee : Function + >arguments.callee : Function ++>arguments.callee : Function + >arguments : IArguments + >callee : Function + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.types.diff index e30424bbe3..8718526e22 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod1_Js.types.diff @@ -20,6 +20,7 @@ ->arguments : any ->foo : any +>arguments : object ++>foo : object +>foo : object } } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod2_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod2_Js.types.diff index d185f54223..8fc92c04ca 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod2_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod2_Js.types.diff @@ -19,6 +19,7 @@ >this : this >"arguments" : "arguments" ->foo : any ++>foo : object +>foo : object } } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.types.diff index 70ae70d4dc..b534d76cfc 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.types.diff @@ -20,18 +20,21 @@ ->x : any ->foo : any +>x : object ++>foo : object +>foo : object /** * @type object */ this.y = super.arguments.bar; - >this.y = super.arguments.bar : {} +->this.y = super.arguments.bar : {} ->this.y : any -+>this.y : {} ++>this.y = super.arguments.bar : object ++>this.y : object >this : this ->y : any -+>y : {} ++>y : object ++>super.arguments.bar : object >super.arguments.bar : {} >super.arguments : { bar: {}; } >super : A diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.types.diff index 10dcf2ca26..98604e4de6 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.types.diff @@ -21,6 +21,7 @@ ->foo : any ->foo : any +>foo : object ++>foo : object +>foo : object /** @@ -32,18 +33,35 @@ >this.arguments : { bar: {}; } >this : this >arguments : { bar: {}; } -@@= skipped -24, +24 lines =@@ +@@= skipped -19, +20 lines =@@ + * @type object + */ + this.bar = arguments.bar; +->this.bar = arguments.bar : any +->this.bar : any ++>this.bar = arguments.bar : object ++>this.bar : object >this : this - >bar : any +->bar : any ++>bar : object ++>arguments.bar : object >arguments.bar : any ->arguments : any +>arguments : object >bar : any /** -@@= skipped -12, +12 lines =@@ + * @type object + */ + this.baz = arguments[key]; +->this.baz = arguments[key] : any +->this.baz : any ++>this.baz = arguments[key] : object ++>this.baz : object >this : this - >baz : any +->baz : any ++>baz : object ++>arguments[key] : object >arguments[key] : any ->arguments : any +>arguments : object @@ -61,6 +79,7 @@ ->options : any ->arguments : any +>options : object ++>arguments : object +>arguments : object } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.types.diff index 0c5ac3432c..27685260ee 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod5_Js.types.diff @@ -20,18 +20,21 @@ ->foo : any ->foo : any +>foo : object ++>foo : object +>foo : object /** * @type object */ this.bar = bar.arguments; - >this.bar = bar.arguments : {} +->this.bar = bar.arguments : {} ->this.bar : any -+>this.bar : {} ++>this.bar = bar.arguments : object ++>this.bar : object >this : this ->bar : any -+>bar : {} ++>bar : object ++>bar.arguments : object >bar.arguments : {} >bar : { arguments: {}; } >arguments : {} diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.types.diff index 5f1055f001..e211f4b572 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod6_Js.types.diff @@ -11,12 +11,14 @@ * @type object */ this.foo = arguments; - >this.foo = arguments : IArguments +->this.foo = arguments : IArguments ->this.foo : any -+>this.foo : IArguments ++>this.foo = arguments : object ++>this.foo : object >this : this ->foo : any -+>foo : IArguments ++>foo : object ++>arguments : object >arguments : IArguments } } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.types.diff index b6ff642ec4..eaba37b2ee 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod7_Js.types.diff @@ -9,3 +9,11 @@ /** * @type Function +@@= skipped -11, +11 lines =@@ + >this : this + >callee : Function + >arguments.callee : Function ++>arguments.callee : Function + >arguments : IArguments + >callee : Function + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.types.diff index 5f41e02de1..0250dcc65b 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.types.diff @@ -1,14 +1,17 @@ --- old.checkJsFiles7.types +++ new.checkJsFiles7.types -@@= skipped -7, +7 lines =@@ +@@= skipped -6, +6 lines =@@ + constructor() { /** @type {boolean} */ this.a = true; - >this.a = true : true +->this.a = true : true ->this.a : boolean ++>this.a = true : boolean +>this.a : any >this : this ->a : boolean +>a : any ++>true : boolean >true : true this.a = !!this.a; diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/expandoFunctionContextualTypesJs.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/expandoFunctionContextualTypesJs.errors.txt.diff index 8cc2e3f334..f4dd1f40f7 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/expandoFunctionContextualTypesJs.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/expandoFunctionContextualTypesJs.errors.txt.diff @@ -5,12 +5,9 @@ @@= skipped --1, +1 lines =@@ +input.js(5,48): error TS2304: Cannot find name 'P'. +input.js(48,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -+input.js(52,17): error TS2322: Type '{ color: string; }' is not assignable to type '{ color: "blue" | "red"; }'. -+ Types of property 'color' are incompatible. -+ Type 'string' is not assignable to type '"blue" | "red"'. + + -+==== input.js (3 errors) ==== ++==== input.js (2 errors) ==== + /** @typedef {{ color: "red" | "blue" }} MyComponentProps */ + + /** @@ -69,9 +66,4 @@ +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. + + expectLiteral({ props: module.exports }); -+ ~~~~~ -+!!! error TS2322: Type '{ color: string; }' is not assignable to type '{ color: "blue" | "red"; }'. -+!!! error TS2322: Types of property 'color' are incompatible. -+!!! error TS2322: Type 'string' is not assignable to type '"blue" | "red"'. -+!!! related TS6500 input.js:32:14: The expected type comes from property 'props' which is declared here on type '{ props: { color: "blue" | "red"; }; }' + diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/expandoFunctionContextualTypesJs.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/expandoFunctionContextualTypesJs.types.diff index 785cc885b1..6c3584d294 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/expandoFunctionContextualTypesJs.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/expandoFunctionContextualTypesJs.types.diff @@ -32,8 +32,8 @@ const MyComponent2 = () => null; ->MyComponent2 : { (): any; defaultProps: MyComponentProps; } ->() => null : { (): any; defaultProps: MyComponentProps; } -+>MyComponent2 : { (): any; defaultProps: { color: string; }; } -+>() => null : { (): any; defaultProps: { color: string; }; } ++>MyComponent2 : { (): any; defaultProps: { color: "blue" | "red"; }; } ++>() => null : { (): any; defaultProps: { color: "blue" | "red"; }; } /** * @type {MyComponentProps} @@ -43,27 +43,22 @@ ->MyComponent2.defaultProps : MyComponentProps ->MyComponent2 : { (): any; defaultProps: MyComponentProps; } ->defaultProps : MyComponentProps -->{ color: "red"} : { color: "red"; } -+>MyComponent2.defaultProps = { color: "red"} : { color: string; } -+>MyComponent2.defaultProps : { color: string; } -+>MyComponent2 : { (): any; defaultProps: { color: string; }; } -+>defaultProps : { color: string; } -+>{ color: "red"} : { color: string; } ++>MyComponent2.defaultProps = { color: "red"} : { color: "blue" | "red"; } ++>MyComponent2.defaultProps : { color: "blue" | "red"; } ++>MyComponent2 : { (): any; defaultProps: { color: "blue" | "red"; }; } ++>defaultProps : { color: "blue" | "red"; } ++>{ color: "red"} : { color: "blue" | "red"; } + >{ color: "red"} : { color: "red"; } color: "red" -->color : "red" -+>color : string - >"red" : "red" - } - -@@= skipped -40, +40 lines =@@ +@@= skipped -40, +41 lines =@@ * @type {StatelessComponent} */ const check = MyComponent2; ->check : StatelessComponent ->MyComponent2 : { (): any; defaultProps: MyComponentProps; } +>check : { (): any; defaultProps?: P; } -+>MyComponent2 : { (): any; defaultProps: { color: string; }; } ++>MyComponent2 : { (): any; defaultProps: { color: "blue" | "red"; }; } /** * @@ -87,14 +82,13 @@ ->this.props : MyComponentProps ->this : this ->props : MyComponentProps -->{ color: "red" } : { color: "red"; } -->color : "red" -+>this.props = { color: "red" } : { color: string; } ++>this.props = { color: "red" } : { color: "blue" | "red"; } +>this.props : any +>this : any +>props : any -+>{ color: "red" } : { color: string; } -+>color : string ++>{ color: "red" } : { color: "blue" | "red"; } + >{ color: "red" } : { color: "red"; } + >color : "red" >"red" : "red" expectLiteral(this); @@ -113,18 +107,15 @@ ->module.exports : MyComponentProps ->module : { exports: MyComponentProps; } ->exports : MyComponentProps -->{ color: "red"} : { color: "red"; } -+>module.exports = { color: "red"} : { color: string; } -+>module.exports : { color: string; } -+>module : { export=: { color: string; }; } -+>exports : { color: string; } -+>{ color: "red"} : { color: string; } ++>module.exports = { color: "red"} : { color: "blue" | "red"; } ++>module.exports : { color: "blue" | "red"; } ++>module : { export=: { color: "blue" | "red"; }; } ++>exports : { color: "blue" | "red"; } ++>{ color: "red"} : { color: "blue" | "red"; } + >{ color: "red"} : { color: "red"; } color: "red" -->color : "red" -+>color : string - >"red" : "red" - } +@@= skipped -49, +51 lines =@@ expectLiteral({ props: module.exports }); >expectLiteral({ props: module.exports }) : void @@ -135,9 +126,9 @@ ->module : { exports: MyComponentProps; } ->exports : MyComponentProps +>expectLiteral : (p: { props: { color: "blue" | "red"; }; }) => void -+>{ props: module.exports } : { props: { color: string; }; } -+>props : { color: string; } -+>module.exports : { color: string; } -+>module : { export=: { color: string; }; } -+>exports : { color: string; } ++>{ props: module.exports } : { props: { color: "blue" | "red"; }; } ++>props : { color: "blue" | "red"; } ++>module.exports : { color: "blue" | "red"; } ++>module : { export=: { color: "blue" | "red"; }; } ++>exports : { color: "blue" | "red"; } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.errors.txt.diff deleted file mode 100644 index 0b9c566de4..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.jsFileClassPropertyType2.errors.txt -+++ new.jsFileClassPropertyType2.errors.txt -@@= skipped -0, +-1 lines =@@ --bar.ts(1,18): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -- -- --==== foo.js (0 errors) ==== -- class C { -- constructor() { -- /** @type {number[]}*/ -- this.p = []; -- } -- } -- --==== bar.ts (1 errors) ==== -- (new C()).p.push("string"); -- ~~~~~~~~ --!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -- -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.types.diff index 164d8805d1..899904b372 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType2.types.diff @@ -1,31 +1,15 @@ --- old.jsFileClassPropertyType2.types +++ new.jsFileClassPropertyType2.types -@@= skipped -7, +7 lines =@@ +@@= skipped -6, +6 lines =@@ + constructor() { /** @type {number[]}*/ this.p = []; - >this.p = [] : undefined[] -->this.p : number[] -+>this.p : any[] +->this.p = [] : undefined[] ++>this.p = [] : number[] + >this.p : number[] >this : this -->p : number[] -+>p : any[] + >p : number[] ++>[] : number[] >[] : undefined[] } } -@@= skipped -10, +10 lines =@@ - === bar.ts === - (new C()).p.push("string"); - >(new C()).p.push("string") : number -->(new C()).p.push : (...items: number[]) => number -->(new C()).p : number[] -+>(new C()).p.push : (...items: any[]) => number -+>(new C()).p : any[] - >(new C()) : C - >new C() : C - >C : typeof C -->p : number[] -->push : (...items: number[]) => number -+>p : any[] -+>push : (...items: any[]) => number - >"string" : "string" - diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.types.diff index 7ec2055462..b76f8e5bbe 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/thisInFunctionCallJs.types.diff @@ -1,6 +1,14 @@ --- old.thisInFunctionCallJs.types +++ new.thisInFunctionCallJs.types -@@= skipped -83, +83 lines =@@ +@@= skipped -11, +11 lines =@@ + >this : this + >data : number[] + >[1, 2, 3] : number[] ++>[1, 2, 3] : number[] + >1 : 1 + >2 : 2 + >3 : 3 +@@= skipped -72, +73 lines =@@ /** @this {Test} */ function (d) { diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.types.diff index 2dc80f0c66..fcfa1bd743 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/annotatedThisPropertyInitializerDoesntNarrow.types.diff @@ -1,26 +1,15 @@ --- old.annotatedThisPropertyInitializerDoesntNarrow.types +++ new.annotatedThisPropertyInitializerDoesntNarrow.types -@@= skipped -13, +13 lines =@@ +@@= skipped -12, +12 lines =@@ + constructor() { /** @type {{ [assetName: string]: number}} */ this.assets = {}; - >this.assets = {} : {} -->this.assets : { [assetName: string]: number; } -+>this.assets : {} +->this.assets = {} : {} ++>this.assets = {} : { [assetName: string]: number; } + >this.assets : { [assetName: string]: number; } >this : this -->assets : { [assetName: string]: number; } -+>assets : {} + >assets : { [assetName: string]: number; } ++>{} : { [assetName: string]: number; } >{} : {} } m() { -@@= skipped -11, +11 lines =@@ - mappy(this.assets) - >mappy(this.assets) : void - >mappy : (map: { [s: string]: number; }) => void -->this.assets : { [assetName: string]: number; } -+>this.assets : {} - >this : this -->assets : { [assetName: string]: number; } -+>assets : {} - } - } - diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/constructorFunctions3.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/constructorFunctions3.types.diff index ba0b5aeaed..2760b4af16 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/constructorFunctions3.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/constructorFunctions3.types.diff @@ -90,6 +90,7 @@ +>this : any +>second : any >1 : 1 ++>1 : 1 } /** @param {number} n */ A.prototype.z = function f(n) { diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff index 38e237ae55..64cfd6f246 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff @@ -3,25 +3,17 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+mod.js(5,7): error TS7006: Parameter 'n' implicitly has an 'any' type. +test.js(9,4): error TS2339: Property 'x' does not exist on type '{}'. -+test.js(11,7): error TS7006: Parameter 'n' implicitly has an 'any' type. +test.js(14,4): error TS2339: Property 'x' does not exist on type '{}'. +test.js(16,7): error TS7006: Parameter 'n' implicitly has an 'any' type. +test.js(18,4): error TS2339: Property 'x' does not exist on type '{}'. -+test.js(27,15): error TS7006: Parameter 'n' implicitly has an 'any' type. +test.js(34,15): error TS7006: Parameter 'n' implicitly has an 'any' type. -+test.js(42,1): 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. -+test.js(44,7): error TS7006: Parameter 'n' implicitly has an 'any' type. -+test.js(49,1): error TS7022: 'y' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -+test.js(51,7): error TS7006: Parameter 'n' implicitly has an 'any' type. +test.js(57,17): error TS2339: Property 'x' does not exist on type 'Thing'. +test.js(59,7): error TS7006: Parameter 'n' implicitly has an 'any' type. +test.js(61,17): error TS2339: Property 'x' does not exist on type 'Thing'. -+test.js(69,7): error TS7006: Parameter 'n' implicitly has an 'any' type. + + -+==== test.js (15 errors) ==== ++==== test.js (8 errors) ==== + /** @typedef {{ + status: 'done' + m(n: number): void @@ -35,8 +27,6 @@ +!!! error TS2339: Property 'x' does not exist on type '{}'. + status: 'done', + m(n) { } -+ ~ -+!!! error TS7006: Parameter 'n' implicitly has an 'any' type. + } + + ns.x = { @@ -59,8 +49,6 @@ + this.s = { + status: 'done', + m(n) { } -+ ~ -+!!! error TS7006: Parameter 'n' implicitly has an 'any' type. + } + } + @@ -78,30 +66,16 @@ + + /** @type {DoneStatus} */ + exports.x = { -+ ~~~~~~~~~~~~~ + status: "done", -+ ~~~~~~~~~~~~~~~~~~~ + m(n) { } -+ ~~~~~~~~~~~~ -+ ~ -+!!! error TS7006: Parameter 'n' implicitly has an 'any' type. + } -+ ~ -+!!! 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. + exports.x + + /** @type {DoneStatus} */ + module.exports.y = { -+ ~~~~~~~~~~~~~~~~~~~~ + status: "done", -+ ~~~~~~~~~~~~~~~~~~~ + m(n) { } -+ ~~~~~~~~~~~~ -+ ~ -+!!! error TS7006: Parameter 'n' implicitly has an 'any' type. + } -+ ~ -+!!! error TS7022: 'y' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. + module.exports.y + + // prototype-property assignment @@ -125,17 +99,13 @@ + F.prototype = { + status: "done", + m(n) { } -+ ~ -+!!! error TS7006: Parameter 'n' implicitly has an 'any' type. + } + -+==== mod.js (1 errors) ==== ++==== mod.js (0 errors) ==== + // module.exports assignment + /** @type {{ status: 'done', m(n: number): void }} */ + module.exports = { + status: "done", + m(n) { } -+ ~ -+!!! error TS7006: Parameter 'n' implicitly has an 'any' type. + } + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff index af7c8c22e8..1beca852a9 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff @@ -15,22 +15,16 @@ ->ns : typeof ns ->x : DoneStatus ->{ status: 'done', m(n) { }} : { status: "done"; m(n: number): void; } -+>ns.x = { status: 'done', m(n) { }} : { status: string; m: (n: any) => void; } ++>ns.x = { status: 'done', m(n) { }} : { status: "done"; m: (n: number) => void; } +>ns.x : any +>ns : {} +>x : any -+>{ status: 'done', m(n) { }} : { status: string; m: (n: any) => void; } ++>{ status: 'done', m(n) { }} : { status: "done"; m: (n: number) => void; } ++>{ status: 'done', m(n) { }} : { status: "done"; m: (n: number) => void; } status: 'done', -->status : "done" -+>status : string - >'done' : "done" - - m(n) { } -->m : (n: number) => void -->n : number -+>m : (n: any) => void -+>n : any + >status : "done" +@@= skipped -21, +22 lines =@@ } ns.x = { @@ -66,45 +60,35 @@ // this-property assignment -@@= skipped -48, +48 lines =@@ +@@= skipped -27, +27 lines =@@ constructor() { /** @type {DoneStatus} */ this.s = { ->this.s = { status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } ->this.s : DoneStatus -+>this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } -+>this.s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } ++>this.s = { status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } ++>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } >this : this ->s : DoneStatus ->{ status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } -+>s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } -+>{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } ++>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } ++>{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } ++>{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } status: 'done', -->status : "done" -+>status : string - >'done' : "done" - - m(n) { } -->m : (n: number) => void -->n : number -+>m : (n: any) => void -+>n : any - } - } - -@@= skipped -20, +20 lines =@@ + >status : "done" +@@= skipped -20, +21 lines =@@ >fail : () => void this.s = { ->this.s = { status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } ->this.s : DoneStatus +>this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } -+>this.s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } ++>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } >this : this ->s : DoneStatus ->{ status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } -+>s : { status: string; m: (n: any) => void; } | { status: string; m: (n: any) => void; } ++>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } +>{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } status: 'done', @@ -126,31 +110,26 @@ exports.x = { ->exports.x = { status: "done", m(n) { }} : { status: "done"; m(n: number): void; } ->exports.x : DoneStatus -+>exports.x = { status: "done", m(n) { }} : { status: string; m: (n: any) => void; } -+>exports.x : any ++>exports.x = { status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } ++>exports.x : { status: "done"; m: (n: number) => void; } >exports : typeof import("test") ->x : DoneStatus ->{ status: "done", m(n) { }} : { status: "done"; m(n: number): void; } -+>x : any -+>{ status: "done", m(n) { }} : { status: string; m: (n: any) => void; } ++>x : { status: "done"; m: (n: number) => void; } ++>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } ++>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } status: "done", -->status : "done" -+>status : string - >"done" : "done" - - m(n) { } -->m : (n: number) => void -->n : number -+>m : (n: any) => void -+>n : any + >status : "done" +@@= skipped -15, +16 lines =@@ + >n : number } exports.x ->exports.x : DoneStatus -+>exports.x : any ++>exports.x : { status: "done"; m: (n: number) => void; } >exports : typeof import("test") ->x : DoneStatus -+>x : any ++>x : { status: "done"; m: (n: number) => void; } /** @type {DoneStatus} */ module.exports.y = { @@ -161,24 +140,19 @@ ->exports : typeof module.exports ->y : DoneStatus ->{ status: "done", m(n) { }} : { status: "done"; m(n: number): void; } -+>module.exports.y = { status: "done", m(n) { }} : { status: string; m: (n: any) => void; } -+>module.exports.y : any ++>module.exports.y = { status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } ++>module.exports.y : { status: "done"; m: (n: number) => void; } +>module.exports : typeof import("test") +>module : { "test": typeof import("test"); } +>exports : typeof import("test") -+>y : any -+>{ status: "done", m(n) { }} : { status: string; m: (n: any) => void; } ++>y : { status: "done"; m: (n: number) => void; } ++>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } ++>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } status: "done", -->status : "done" -+>status : string - >"done" : "done" - - m(n) { } -->m : (n: number) => void -->n : number -+>m : (n: any) => void -+>n : any + >status : "done" +@@= skipped -23, +24 lines =@@ + >n : number } module.exports.y ->module.exports.y : DoneStatus @@ -186,11 +160,11 @@ ->module : { exports: typeof module.exports; } ->exports : typeof module.exports ->y : DoneStatus -+>module.exports.y : any ++>module.exports.y : { status: "done"; m: (n: number) => void; } +>module.exports : typeof import("test") +>module : { "test": typeof import("test"); } +>exports : typeof import("test") -+>y : any ++>y : { status: "done"; m: (n: number) => void; } // prototype-property assignment /** @type {DoneStatus} */ @@ -230,7 +204,7 @@ // prototype assignment function F() { ->F : typeof F -+>F : { (): void; prototype: { status: string; m: (n: any) => void; }; } ++>F : { (): void; prototype: { status: "done"; m: (n: number) => void; }; } } /** @type {DoneStatus} */ F.prototype = { @@ -239,25 +213,16 @@ ->F : typeof F ->prototype : DoneStatus ->{ status: "done", m(n) { }} : { status: "done"; m(n: number): void; } -+>F.prototype = { status: "done", m(n) { }} : { status: string; m: (n: any) => void; } -+>F.prototype : { status: string; m: (n: any) => void; } -+>F : { (): void; prototype: { status: string; m: (n: any) => void; }; } -+>prototype : { status: string; m: (n: any) => void; } -+>{ status: "done", m(n) { }} : { status: string; m: (n: any) => void; } ++>F.prototype = { status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } ++>F.prototype : { status: "done"; m: (n: number) => void; } ++>F : { (): void; prototype: { status: "done"; m: (n: number) => void; }; } ++>prototype : { status: "done"; m: (n: number) => void; } ++>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } ++>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } status: "done", -->status : "done" -+>status : string - >"done" : "done" - - m(n) { } -->m : (n: number) => void -->n : number -+>m : (n: any) => void -+>n : any - } - - === mod.js === + >status : "done" +@@= skipped -57, +58 lines =@@ // module.exports assignment /** @type {{ status: 'done', m(n: number): void }} */ module.exports = { @@ -266,21 +231,12 @@ ->module : { exports: { status: "done"; m(n: number): void; }; } ->exports : { status: "done"; m(n: number): void; } ->{ status: "done", m(n) { }} : { status: "done"; m(n: number): void; } -+>module.exports = { status: "done", m(n) { }} : { status: string; m: (n: any) => void; } -+>module.exports : { status: string; m: (n: any) => void; } -+>module : { export=: { status: string; m: (n: any) => void; }; } -+>exports : { status: string; m: (n: any) => void; } -+>{ status: "done", m(n) { }} : { status: string; m: (n: any) => void; } ++>module.exports = { status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } ++>module.exports : { status: "done"; m: (n: number) => void; } ++>module : { export=: { status: "done"; m: (n: number) => void; }; } ++>exports : { status: "done"; m: (n: number) => void; } ++>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } ++>{ status: "done", m(n) { }} : { status: "done"; m: (n: number) => void; } status: "done", -->status : "done" -+>status : string - >"done" : "done" - - m(n) { } -->m : (n: number) => void -->n : number -+>m : (n: any) => void -+>n : any - } - + >status : "done" diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionLikeClasses2.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionLikeClasses2.types.diff index 619f5db210..635bbb36ee 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionLikeClasses2.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionLikeClasses2.types.diff @@ -9,16 +9,18 @@ >len : number /** -@@= skipped -8, +8 lines =@@ + * @type {number[]} */ this.storage = new Array(len); - >this.storage = new Array(len) : any[] +->this.storage = new Array(len) : any[] ->this.storage : number[] ->this : this ->storage : number[] ++>this.storage = new Array(len) : number[] +>this.storage : any +>this : any +>storage : any ++>new Array(len) : number[] >new Array(len) : any[] >Array : ArrayConstructor >len : number @@ -38,7 +40,7 @@ /** * @param {Vec} other -@@= skipped -24, +24 lines =@@ +@@= skipped -32, +33 lines =@@ if (other.storage.length !== this.storage.length) { >other.storage.length !== this.storage.length : boolean diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt.diff index a44d110a97..2cedf9af04 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.errors.txt.diff @@ -3,6 +3,7 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ ++index.js(7,19): error TS2749: 'Rectangle' refers to a value, but is being used as a type here. Did you mean 'typeof Rectangle'? +index.js(14,18): error TS2749: 'Rectangle' refers to a value, but is being used as a type here. Did you mean 'typeof Rectangle'? + + @@ -20,7 +21,7 @@ + } + + module.exports = { Rectangle }; -+==== index.js (1 errors) ==== ++==== index.js (2 errors) ==== + const {Rectangle} = require('./rectangle'); + + class Render { @@ -28,6 +29,8 @@ + /** + * Object list + * @type {Rectangle[]} ++ ~~~~~~~~~ ++!!! error TS2749: 'Rectangle' refers to a value, but is being used as a type here. Did you mean 'typeof Rectangle'? + */ + this.objects = []; + } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types.diff index c96146a0bd..60c94eec5a 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsReferenceToClassInstanceCrossFile.types.diff @@ -28,10 +28,10 @@ >log : (...data: any[]) => void >"Objects" : "Objects" ->render.objects : import("rectangle").Rectangle[] -+>render.objects : any[] ++>render.objects : Rectangle[] >render : Render ->objects : import("rectangle").Rectangle[] -+>objects : any[] ++>objects : Rectangle[] === rectangle.js === class Rectangle { @@ -58,35 +58,20 @@ >require : any >'./rectangle' : "./rectangle" -@@= skipped -24, +24 lines =@@ +@@= skipped -23, +23 lines =@@ + * @type {Rectangle[]} */ this.objects = []; - >this.objects = [] : undefined[] -->this.objects : Rectangle[] -+>this.objects : any[] +->this.objects = [] : undefined[] ++>this.objects = [] : Rectangle[] + >this.objects : Rectangle[] >this : this -->objects : Rectangle[] -+>objects : any[] + >objects : Rectangle[] ++>[] : Rectangle[] >[] : undefined[] } /** -@@= skipped -20, +20 lines =@@ - - this.objects.push(obj); - >this.objects.push(obj) : number -->this.objects.push : (...items: Rectangle[]) => number -->this.objects : Rectangle[] -+>this.objects.push : (...items: any[]) => number -+>this.objects : any[] - >this : this -->objects : Rectangle[] -->push : (...items: Rectangle[]) => number -+>objects : any[] -+>push : (...items: any[]) => number - >obj : Rectangle - - return obj; -@@= skipped -13, +13 lines =@@ +@@= skipped -34, +35 lines =@@ } module.exports = { Render }; diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt.diff index b0283331e6..53df8a3995 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.errors.txt.diff @@ -4,6 +4,7 @@ - @@= skipped --1, +1 lines =@@ +conn.js(11,1): error TS2309: An export assignment cannot be used in a module with other exported elements. ++usage.js(11,37): error TS2694: Namespace 'Conn' has no exported member 'Whatever'. +usage.js(16,1): error TS2309: An export assignment cannot be used in a module with other exported elements. + + @@ -22,7 +23,7 @@ + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. + -+==== usage.js (1 errors) ==== ++==== usage.js (2 errors) ==== + /** + * @typedef {import("./conn")} Conn + */ @@ -34,6 +35,8 @@ + constructor(c) { + this.connItem = c.item; + /** @type {import("./conn").Whatever} */ ++ ~~~~~~~~ ++!!! error TS2694: Namespace 'Conn' has no exported member 'Whatever'. + this.another = ""; + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.types.diff index e7cb4630d5..222e1438b8 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsTypedefAndImportTypes.types.diff @@ -30,12 +30,14 @@ /** @type {import("./conn").Whatever} */ this.another = ""; - >this.another = "" : "" +->this.another = "" : "" ->this.another : import("conn").Whatever -+>this.another : string ++>this.another = "" : any ++>this.another : any >this : this ->another : import("conn").Whatever -+>another : string ++>another : any ++>"" : any >"" : "" } } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.types.diff index 642110391c..b13f2960d9 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.types.diff @@ -21,15 +21,16 @@ >n : any /** -@@= skipped -11, +11 lines =@@ +@@= skipped -10, +10 lines =@@ + * @type {number} */ this.y = n - >this.y = n : any -->this.y : number -+>this.y : any +->this.y = n : any ++>this.y = n : number + >this.y : number >this : this -->y : number -+>y : any + >y : number ++>n : number >n : any } } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag4.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag4.errors.txt.diff index 408189fb82..2b084c41d5 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag4.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag4.errors.txt.diff @@ -3,17 +3,21 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ ++a.js(8,16): error TS2315: Type 'Object' is not generic. +a.js(9,5): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. +a.js(16,36): error TS7006: Parameter 'key' implicitly has an 'any' type. ++a.js(27,16): error TS2315: Type 'Object' is not generic. +a.js(28,5): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. +a.js(35,37): error TS7006: Parameter 'key' implicitly has an 'any' type. +a.js(46,4): error TS2339: Property 'Multimap3' does not exist on type '{}'. ++a.js(47,16): error TS2315: Type 'Object' is not generic. ++a.js(47,31): error TS2304: Cannot find name 'V'. +a.js(48,10): error TS2339: Property '_map' does not exist on type '{}'. +a.js(55,4): error TS2339: Property 'Multimap3' does not exist on type '{}'. +a.js(55,40): error TS7006: Parameter 'key' implicitly has an 'any' type. + + -+==== a.js (8 errors) ==== ++==== a.js (12 errors) ==== + /** + * Should work for function declarations + * @constructor @@ -22,6 +26,8 @@ + */ + function Multimap() { + /** @type {Object} TODO: Remove the prototype from the fresh object */ ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS2315: Type 'Object' is not generic. + this._map = {}; + ~~~~ +!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. @@ -45,6 +51,8 @@ + */ + var Multimap2 = function() { + /** @type {Object} TODO: Remove the prototype from the fresh object */ ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS2315: Type 'Object' is not generic. + this._map = {}; + ~~~~ +!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. @@ -71,6 +79,10 @@ + ~~~~~~~~~ +!!! error TS2339: Property 'Multimap3' does not exist on type '{}'. + /** @type {Object} TODO: Remove the prototype from the fresh object */ ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS2315: Type 'Object' is not generic. ++ ~ ++!!! error TS2304: Cannot find name 'V'. + this._map = {}; + ~~~~ +!!! error TS2339: Property '_map' does not exist on type '{}'. diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag4.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag4.types.diff index 54eaeb9094..355e9af445 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag4.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag4.types.diff @@ -9,17 +9,19 @@ /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; - >this._map = {} : {} +->this._map = {} : {} ->this._map : { [x: string]: V; } ->this : this ->_map : { [x: string]: V; } ++>this._map = {} : any +>this._map : any +>this : any +>_map : any ++>{} : any >{} : {} }; -@@= skipped -17, +17 lines =@@ +@@= skipped -17, +18 lines =@@ * @returns {V} the value ok */ Multimap.prototype.get = function (key) { @@ -62,17 +64,19 @@ /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; - >this._map = {} : {} +->this._map = {} : {} ->this._map : { [x: string]: V; } ->this : this ->_map : { [x: string]: V; } ++>this._map = {} : any +>this._map : any +>this : any +>_map : any ++>{} : any >{} : {} }; -@@= skipped -18, +18 lines =@@ +@@= skipped -18, +19 lines =@@ * @returns {V} the value ok */ Multimap2.prototype.get = function (key) { @@ -127,17 +131,19 @@ /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; - >this._map = {} : {} +->this._map = {} : {} ->this._map : { [x: string]: V; } ->this : this ->_map : { [x: string]: V; } ++>this._map = {} : any +>this._map : any +>this : {} +>_map : any ++>{} : any >{} : {} }; -@@= skipped -21, +21 lines =@@ +@@= skipped -21, +22 lines =@@ * @returns {V} the value ok */ Ns.Multimap3.prototype.get = function (key) { diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag5.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag5.errors.txt.diff index 06a4860016..d42381675a 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag5.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag5.errors.txt.diff @@ -3,21 +3,25 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ ++a.js(8,16): error TS2315: Type 'Object' is not generic. +a.js(9,5): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. +a.js(14,16): error TS2304: Cannot find name 'K'. +a.js(15,18): error TS2304: Cannot find name 'V'. +a.js(18,21): error TS2339: Property '_map' does not exist on type '{ get: (key: K) => V; }'. ++a.js(29,16): error TS2315: Type 'Object' is not generic. +a.js(30,5): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. +a.js(35,16): error TS2304: Cannot find name 'K'. +a.js(36,18): error TS2304: Cannot find name 'V'. +a.js(50,4): error TS2339: Property 'Multimap3' does not exist on type '{}'. ++a.js(51,16): error TS2315: Type 'Object' is not generic. ++a.js(51,31): error TS2304: Cannot find name 'V'. +a.js(52,10): error TS2339: Property '_map' does not exist on type '{}'. +a.js(55,4): error TS2339: Property 'Multimap3' does not exist on type '{}'. +a.js(57,16): error TS2304: Cannot find name 'K'. +a.js(58,18): error TS2304: Cannot find name 'V'. + + -+==== a.js (12 errors) ==== ++==== a.js (16 errors) ==== + /** + * Should work for function declarations + * @constructor @@ -26,6 +30,8 @@ + */ + function Multimap() { + /** @type {Object} TODO: Remove the prototype from the fresh object */ ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS2315: Type 'Object' is not generic. + this._map = {}; + ~~~~ +!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. @@ -55,6 +61,8 @@ + */ + var Multimap2 = function() { + /** @type {Object} TODO: Remove the prototype from the fresh object */ ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS2315: Type 'Object' is not generic. + this._map = {}; + ~~~~ +!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. @@ -85,6 +93,10 @@ + ~~~~~~~~~ +!!! error TS2339: Property 'Multimap3' does not exist on type '{}'. + /** @type {Object} TODO: Remove the prototype from the fresh object */ ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS2315: Type 'Object' is not generic. ++ ~ ++!!! error TS2304: Cannot find name 'V'. + this._map = {}; + ~~~~ +!!! error TS2339: Property '_map' does not exist on type '{}'. diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag5.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag5.types.diff index 711f71b54a..32f57e4740 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag5.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag5.types.diff @@ -9,13 +9,15 @@ /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; - >this._map = {} : {} +->this._map = {} : {} ->this._map : { [x: string]: V; } ->this : this ->_map : { [x: string]: V; } ++>this._map = {} : any +>this._map : any +>this : any +>_map : any ++>{} : any >{} : {} }; @@ -34,7 +36,7 @@ /** * @param {K} key the key ok -@@= skipped -28, +28 lines =@@ +@@= skipped -28, +29 lines =@@ >key : K return this._map[key + '']; @@ -60,13 +62,15 @@ /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; - >this._map = {} : {} +->this._map = {} : {} ->this._map : { [x: string]: V; } ->this : this ->_map : { [x: string]: V; } ++>this._map = {} : any +>this._map : any +>this : any +>_map : any ++>{} : any >{} : {} }; @@ -82,7 +86,7 @@ >{ /** * @param {K} key the key ok * @returns {V} the value ok */ get: function(key) { return this._map[key + '']; }} : { get: (key: K) => V; } /** -@@= skipped -30, +30 lines =@@ +@@= skipped -30, +31 lines =@@ >key : K return this._map[key + '']; @@ -123,13 +127,15 @@ /** @type {Object} TODO: Remove the prototype from the fresh object */ this._map = {}; - >this._map = {} : {} +->this._map = {} : {} ->this._map : { [x: string]: V; } ->this : this ->_map : { [x: string]: V; } ++>this._map = {} : any +>this._map : any +>this : {} +>_map : any ++>{} : any >{} : {} }; @@ -152,7 +158,7 @@ /** * @param {K} key the key ok -@@= skipped -34, +34 lines =@@ +@@= skipped -34, +35 lines =@@ >key : K return this._map[key + '']; diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeFromChainedAssignment.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeFromChainedAssignment.types.diff index 06d7b7c7b0..e24dd20c20 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeFromChainedAssignment.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeFromChainedAssignment.types.diff @@ -28,6 +28,7 @@ ->this.second : 1 ->this : this ->second : 1 ++>this.second = 1 : 1 +>this.second : any +>this : any +>second : any diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.types.diff index ee22fd8bb2..82628278e2 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.types.diff @@ -75,17 +75,19 @@ /** @type {string|number} */ this.p = "bar"; - >this.p = "bar" : "bar" +->this.p = "bar" : "bar" ->this.p : string | number ->this : this ->p : string | number ++>this.p = "bar" : string | number +>this.p : any +>this : any +>p : any ++>"bar" : string | number >"bar" : "bar" } -@@= skipped -36, +36 lines =@@ +@@= skipped -36, +37 lines =@@ >SomeOther : typeof SomeOther var someFakeClass = new SomeFakeClass(); diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/propertiesOfGenericConstructorFunctions.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/propertiesOfGenericConstructorFunctions.types.diff index bca3fe886a..381dc60b78 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/propertiesOfGenericConstructorFunctions.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/propertiesOfGenericConstructorFunctions.types.diff @@ -11,13 +11,15 @@ /** @type {{ [s: string]: V }} */ this._map = {}; - >this._map = {} : {} +->this._map = {} : {} ->this._map : { [s: string]: V; } ->this : this ->_map : { [s: string]: V; } ++>this._map = {} : { [s: string]: V; } +>this._map : any +>this : any +>_map : any ++>{} : { [s: string]: V; } >{} : {} // without type annotation @@ -29,7 +31,7 @@ >_map2 : any >{ [ik]: iv } : { [x: string]: V; } >[ik] : V -@@= skipped -28, +28 lines =@@ +@@= skipped -28, +29 lines =@@ /** @type {Multimap<"a" | "b", number>} with type annotation */ const map = new Multimap("a", 1); >map : Multimap<"a" | "b", number> diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/propertyAssignmentUseParentType2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/propertyAssignmentUseParentType2.errors.txt.diff index 4d69dc31f4..55b5d79fa9 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/propertyAssignmentUseParentType2.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/propertyAssignmentUseParentType2.errors.txt.diff @@ -1,29 +1,28 @@ --- old.propertyAssignmentUseParentType2.errors.txt +++ new.propertyAssignmentUseParentType2.errors.txt -@@= skipped -0, +-1 lines =@@ +@@= skipped -0, +0 lines =@@ -propertyAssignmentUseParentType2.js(11,14): error TS2322: Type '{ (): boolean; nuo: 1000; }' is not assignable to type '{ (): boolean; nuo: 789; }'. -- Types of property 'nuo' are incompatible. -- Type '1000' is not assignable to type '789'. -- -- ++propertyAssignmentUseParentType2.js(11,14): error TS2322: Type '{ (): true; nuo: 1000; }' is not assignable to type '{ (): boolean; nuo: 789; }'. + Types of property 'nuo' are incompatible. + Type '1000' is not assignable to type '789'. ++propertyAssignmentUseParentType2.js(13,1): error TS2322: Type '1000' is not assignable to type '789'. + + -==== propertyAssignmentUseParentType2.js (1 errors) ==== -- /** @type {{ (): boolean; nuo: 789 }} */ -- export const inlined = () => true -- inlined.nuo = 789 -- -- /** @type {{ (): boolean; nuo: 789 }} */ -- export const duplicated = () => true -- /** @type {789} */ -- duplicated.nuo = 789 -- -- /** @type {{ (): boolean; nuo: 789 }} */ -- export const conflictingDuplicated = () => true -- ~~~~~~~~~~~~~~~~~~~~~ ++==== propertyAssignmentUseParentType2.js (2 errors) ==== + /** @type {{ (): boolean; nuo: 789 }} */ + export const inlined = () => true + inlined.nuo = 789 +@@= skipped -15, +16 lines =@@ + /** @type {{ (): boolean; nuo: 789 }} */ + export const conflictingDuplicated = () => true + ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ (): boolean; nuo: 1000; }' is not assignable to type '{ (): boolean; nuo: 789; }'. --!!! error TS2322: Types of property 'nuo' are incompatible. --!!! error TS2322: Type '1000' is not assignable to type '789'. -- /** @type {1000} */ -- conflictingDuplicated.nuo = 789 -- -@@= skipped --1, +1 lines =@@ -+ ++!!! error TS2322: Type '{ (): true; nuo: 1000; }' is not assignable to type '{ (): boolean; nuo: 789; }'. + !!! error TS2322: Types of property 'nuo' are incompatible. + !!! error TS2322: Type '1000' is not assignable to type '789'. + /** @type {1000} */ + conflictingDuplicated.nuo = 789 ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2322: Type '1000' is not assignable to type '789'. + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/propertyAssignmentUseParentType2.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/propertyAssignmentUseParentType2.types.diff index e97de3368c..93ea1410b0 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/propertyAssignmentUseParentType2.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/propertyAssignmentUseParentType2.types.diff @@ -18,12 +18,26 @@ >true : true /** @type {789} */ -@@= skipped -14, +14 lines =@@ +@@= skipped -10, +10 lines =@@ + >duplicated : { (): boolean; nuo: 789; } + >nuo : 789 + >789 : 789 ++>789 : 789 + /** @type {{ (): boolean; nuo: 789 }} */ export const conflictingDuplicated = () => true >conflictingDuplicated : { (): boolean; nuo: 789; } ->() => true : { (): boolean; nuo: 1000; } -+>() => true : { (): true; nuo: 789; } ++>() => true : { (): true; nuo: 1000; } >true : true /** @type {1000} */ + conflictingDuplicated.nuo = 789 +->conflictingDuplicated.nuo = 789 : 789 ++>conflictingDuplicated.nuo = 789 : 1000 + >conflictingDuplicated.nuo : 789 + >conflictingDuplicated : { (): boolean; nuo: 789; } + >nuo : 789 ++>789 : 1000 + >789 : 789 + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/thisTypeOfConstructorFunctions.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/thisTypeOfConstructorFunctions.errors.txt.diff index ad89e66e54..909771290c 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/thisTypeOfConstructorFunctions.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/thisTypeOfConstructorFunctions.errors.txt.diff @@ -3,13 +3,14 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ ++thisTypeOfConstructorFunctions.js(7,16): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeOfConstructorFunctions.js(15,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeOfConstructorFunctions.js(38,12): error TS2749: 'Cpp' refers to a value, but is being used as a type here. Did you mean 'typeof Cpp'? +thisTypeOfConstructorFunctions.js(41,12): error TS2749: 'Cp' refers to a value, but is being used as a type here. Did you mean 'typeof Cp'? +thisTypeOfConstructorFunctions.js(43,12): error TS2749: 'Cp' refers to a value, but is being used as a type here. Did you mean 'typeof Cp'? + + -+==== thisTypeOfConstructorFunctions.js (4 errors) ==== ++==== thisTypeOfConstructorFunctions.js (5 errors) ==== + /** + * @class + * @template T @@ -17,6 +18,8 @@ + */ + function Cp(t) { + /** @type {this} */ ++ ~~~~ ++!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + this.dit = this + this.y = t + /** @return {this} */ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/thisTypeOfConstructorFunctions.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/thisTypeOfConstructorFunctions.types.diff index a6eb6b1c7c..52967f3265 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/thisTypeOfConstructorFunctions.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/thisTypeOfConstructorFunctions.types.diff @@ -19,6 +19,7 @@ +>this.dit : any +>this : any +>dit : any ++>this : any +>this : any this.y = t @@ -80,7 +81,7 @@ } } -@@= skipped -57, +57 lines =@@ +@@= skipped -57, +58 lines =@@ * @param {T} t */ function Cpp(t) { diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.types.diff index 465896f744..7172e6f06d 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10.types.diff @@ -64,7 +64,15 @@ >class { constructor() { /** @type {number} */ this.y = 12; }} : typeof Inner constructor() { -@@= skipped -18, +18 lines =@@ + /** @type {number} */ + this.y = 12; +->this.y = 12 : 12 ++>this.y = 12 : number + >this.y : number + >this : this + >y : number ++>12 : number + >12 : 12 } } var example = new Outer.app.Inner(); diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.types.diff index 0e34dfceae..fda2e90578 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment10_1.types.diff @@ -64,7 +64,15 @@ >class { constructor() { /** @type {number} */ this.y = 12; }} : typeof Inner constructor() { -@@= skipped -18, +18 lines =@@ + /** @type {number} */ + this.y = 12; +->this.y = 12 : 12 ++>this.y = 12 : number + >this.y : number + >this : this + >y : number ++>12 : number + >12 : 12 } } var example = new Outer.app.Inner(); diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.types.diff index 8fd02b3d69..01dc1eae04 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeFromPropertyAssignment4.types.diff @@ -20,7 +20,18 @@ >class { constructor() { /** @type {number} */ this.y = 12 }} : typeof Inner constructor() { -@@= skipped -27, +27 lines =@@ + /** @type {number} */ + this.y = 12 +->this.y = 12 : 12 ++>this.y = 12 : number + >this.y : number + >this : this + >y : number ++>12 : number + >12 : 12 + } + } +@@= skipped -27, +28 lines =@@ >local : Inner local.y diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeTagModuleExports.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeTagModuleExports.errors.txt.diff index 32e45e553e..ec8f208031 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeTagModuleExports.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeTagModuleExports.errors.txt.diff @@ -1,14 +1,15 @@ --- old.typeTagModuleExports.errors.txt +++ new.typeTagModuleExports.errors.txt -@@= skipped -0, +-1 lines =@@ +@@= skipped -0, +0 lines =@@ -bug27327.js(2,1): error TS2322: Type 'number' is not assignable to type 'string'. -- -- --==== bug27327.js (1 errors) ==== -- /** @type {string} */ -- module.exports = 0; ++bug27327.js(2,18): 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. + + + ==== bug27327.js (1 errors) ==== + /** @type {string} */ + module.exports = 0; - ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'number' is not assignable to type 'string'. -- -@@= skipped --1, +1 lines =@@ -+ ++ ~ ++!!! 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. + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeTagModuleExports.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeTagModuleExports.types.diff index 01893d8233..6cbdd937e7 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeTagModuleExports.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeTagModuleExports.types.diff @@ -1,16 +1,12 @@ --- old.typeTagModuleExports.types +++ new.typeTagModuleExports.types -@@= skipped -2, +2 lines =@@ - === bug27327.js === - /** @type {string} */ +@@= skipped -4, +4 lines =@@ module.exports = 0; -->module.exports = 0 : string -->module.exports : string + >module.exports = 0 : string + >module.exports : string ->module : { exports: string; } -->exports : string -+>module.exports = 0 : 0 -+>module.exports : 0 -+>module : { export=: 0; } -+>exports : 0 ++>module : { export=: string; } + >exports : string ++>0 : string >0 : 0 diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeTagPrototypeAssignment.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeTagPrototypeAssignment.errors.txt.diff index f0cf1361a6..7143e647d5 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeTagPrototypeAssignment.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeTagPrototypeAssignment.errors.txt.diff @@ -1,16 +1,17 @@ --- old.typeTagPrototypeAssignment.errors.txt +++ new.typeTagPrototypeAssignment.errors.txt -@@= skipped -0, +-1 lines =@@ +@@= skipped -0, +0 lines =@@ -bug27327.js(4,1): error TS2322: Type 'number' is not assignable to type 'string'. -- -- --==== bug27327.js (1 errors) ==== -- function C() { -- } -- /** @type {string} */ -- C.prototype = 12 ++bug27327.js(4,15): 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. + + + ==== bug27327.js (1 errors) ==== +@@= skipped -5, +5 lines =@@ + } + /** @type {string} */ + C.prototype = 12 - ~~~~~~~~~~~ -!!! error TS2322: Type 'number' is not assignable to type 'string'. -- -@@= skipped --1, +1 lines =@@ -+ ++ ~~ ++!!! 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. + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeTagPrototypeAssignment.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeTagPrototypeAssignment.types.diff index 4f41fb6f66..d91434ebe4 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeTagPrototypeAssignment.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeTagPrototypeAssignment.types.diff @@ -5,16 +5,16 @@ === bug27327.js === function C() { ->C : typeof C -+>C : { (): void; prototype: number; } ++>C : { (): void; prototype: string; } } /** @type {string} */ C.prototype = 12 - >C.prototype = 12 : 12 -->C.prototype : string +->C.prototype = 12 : 12 ++>C.prototype = 12 : string + >C.prototype : string ->C : typeof C -->prototype : string -+>C.prototype : number -+>C : { (): void; prototype: number; } -+>prototype : number ++>C : { (): void; prototype: string; } + >prototype : string ++>12 : string >12 : 12 From 973d9168820e4ad858092fc879234057192896fd Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Fri, 9 May 2025 15:12:45 -0700 Subject: [PATCH 3/8] Add control flow-based inference for this.p in ctor Note that the baselines *still* show a difference for some auto-typed results--Strada says `this.p: any` while Corsa says `this.p: string`, even though both behave as that it's a string when used. I debugged a test to convince myself that indeed both Strada and Corsa believe the example property is a string, though. --- internal/checker/checker.go | 45 +++++-- internal/checker/types.go | 13 ++- .../destructuringParameterProperties2.types | 40 +++---- ...structuringParameterProperties2.types.diff | 90 -------------- .../destructuringParameterProperties3.types | 50 ++++---- ...structuringParameterProperties3.types.diff | 110 ------------------ .../destructuringParameterProperties4.types | 14 +-- ...structuringParameterProperties4.types.diff | 42 ------- ...ringClassMembersFromAssignments.errors.txt | 14 ++- ...inferringClassMembersFromAssignments.types | 16 +-- .../thisPropertyAssignmentCircular.symbols | 2 + ...hisPropertyAssignmentCircular.symbols.diff | 4 +- .../thisPropertyAssignmentCircular.types | 24 ++-- ...lassMembersFromAssignments.errors.txt.diff | 35 ++---- ...ringClassMembersFromAssignments.types.diff | 37 ++---- .../thisPropertyAssignmentCircular.types.diff | 43 ++----- 16 files changed, 155 insertions(+), 424 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types.diff diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 547ea8aecb..18f4f117c2 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -579,6 +579,7 @@ type Checker struct { templateLiteralTypes map[string]*Type stringMappingTypes map[StringMappingKey]*Type uniqueESSymbolTypes map[*ast.Symbol]*Type + constructorOfThisExpandos map[*ast.Symbol]*ast.Node subtypeReductionCache map[string][]*Type cachedTypes map[CachedTypeKey]*Type cachedSignatures map[CachedSignatureKey]*Signature @@ -863,6 +864,7 @@ func NewChecker(program Program) *Checker { c.templateLiteralTypes = make(map[string]*Type) c.stringMappingTypes = make(map[StringMappingKey]*Type) c.uniqueESSymbolTypes = make(map[*ast.Symbol]*Type) + c.constructorOfThisExpandos = make(map[*ast.Symbol]*ast.Node) c.subtypeReductionCache = make(map[string][]*Type) c.cachedTypes = make(map[CachedTypeKey]*Type) c.cachedSignatures = make(map[CachedSignatureKey]*Signature) @@ -10795,9 +10797,9 @@ func (c *Checker) getFlowTypeOfProperty(reference *ast.Node, prop *ast.Symbol) * func (c *Checker) getTypeOfPropertyInBaseClass(property *ast.Symbol) *Type { classType := c.getDeclaringClass(property) if classType != nil { - baseClassType := c.getBaseTypes(classType)[0] - if baseClassType != nil { - return c.getTypeOfPropertyOfType(baseClassType, property.Name) + baseClassTypes := c.getBaseTypes(classType) + if len(baseClassTypes) > 0 { + return c.getTypeOfPropertyOfType(baseClassTypes[0], property.Name) } } return nil @@ -16689,12 +16691,41 @@ func (c *Checker) getTypeOfPrototypeProperty(prototype *ast.Symbol) *Type { func (c *Checker) getWidenedTypeForAssignmentDeclaration(symbol *ast.Symbol) *Type { var types []*Type - for _, declaration := range symbol.Declarations { - if ast.IsBinaryExpression(declaration) { - types = core.AppendIfUnique(types, c.checkExpressionForMutableLocation(declaration.AsBinaryExpression().Right, CheckModeNormal)) + var t *Type + if ctor, ok := c.isConstructorDeclaredThisProperty(symbol); ok { + t = c.getFlowTypeInConstructor(symbol, ctor) + } + if t == nil { + for _, declaration := range symbol.Declarations { + if ast.IsBinaryExpression(declaration) { + types = core.AppendIfUnique(types, c.checkExpressionForMutableLocation(declaration.AsBinaryExpression().Right, CheckModeNormal)) + } } + t = c.getWidenedType(c.getUnionType(types)) + } + return t +} + +func (c *Checker) isConstructorDeclaredThisProperty(symbol *ast.Symbol) (*ast.Node, bool) { + if symbol.ValueDeclaration == nil || !ast.IsBinaryExpression(symbol.ValueDeclaration) { + return nil, false } - return c.getWidenedType(c.getUnionType(types)) + if ctor, ok := c.constructorOfThisExpandos[symbol]; ok { + return ctor, ok + } + ctor := c.getDeclaringConstructor(symbol) + result := ctor != nil && + core.Every(symbol.Declarations, func(declaration *ast.Declaration) bool { + if !ast.IsBinaryExpression(declaration) { + return false + } + bin := declaration.AsBinaryExpression() + return ast.GetAssignmentDeclarationKind(bin) == ast.JSDeclarationKindThisProperty && + (bin.Left.Kind != ast.KindElementAccessExpression || ast.IsStringOrNumericLiteralLike(bin.Left.AsElementAccessExpression().ArgumentExpression)) && + bin.Right.Kind != ast.KindTypeAssertionExpression + }) + c.constructorOfThisExpandos[symbol] = ctor + return ctor, result } func (c *Checker) widenTypeForVariableLikeDeclaration(t *Type, declaration *ast.Node, reportErrors bool) *Type { diff --git a/internal/checker/types.go b/internal/checker/types.go index 767abf2438..bd438bd6a8 100644 --- a/internal/checker/types.go +++ b/internal/checker/types.go @@ -88,12 +88,12 @@ type SymbolReferenceLinks struct { // Links for value symbols type ValueSymbolLinks struct { - resolvedType *Type // Type of value symbol - writeType *Type - target *ast.Symbol - mapper *TypeMapper - nameType *Type - containingType *Type // Mapped type for mapped type property, containing union or intersection type for synthetic property + resolvedType *Type // Type of value symbol + writeType *Type + target *ast.Symbol + mapper *TypeMapper + nameType *Type + containingType *Type // Mapped type for mapped type property, containing union or intersection type for synthetic property } // Additional links for mapped symbols @@ -155,6 +155,7 @@ type TypeAliasLinks struct { declaredType *Type typeParameters []*Type // Type parameters of type alias (undefined if non-generic) instantiations map[string]*Type // Instantiations of generic type alias (undefined if non-generic) + isConstructorDeclaredProperty bool } // Links for declared types (type parameters, class types, interface types, enums) diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types index a8f9ce5b79..bdcf64bed4 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types @@ -35,9 +35,9 @@ class C1 { this.a = a || k; >this.a = a || k : number ->this.a : number +>this.a : any >this : this ->a : number +>a : any >a || k : number >a : number >k : number @@ -45,12 +45,12 @@ class C1 { } public getA() { ->getA : () => number +>getA : () => any return this.a ->this.a : number +>this.a : any >this : this ->a : number +>a : any } public getB() { @@ -83,14 +83,14 @@ var x = new C1(undefined, [0, undefined, ""]); >"" : "" var [x_a, x_b, x_c] = [x.getA(), x.getB(), x.getC()]; ->x_a : number +>x_a : any >x_b : any >x_c : any ->[x.getA(), x.getB(), x.getC()] : [number, any, any] ->x.getA() : number ->x.getA : () => number +>[x.getA(), x.getB(), x.getC()] : [any, any, any] +>x.getA() : any +>x.getA : () => any >x : C1 ->getA : () => number +>getA : () => any >x.getB() : any >x.getB : () => any >x : C1 @@ -111,14 +111,14 @@ var y = new C1(10, [0, "", true]); >true : true var [y_a, y_b, y_c] = [y.getA(), y.getB(), y.getC()]; ->y_a : number +>y_a : any >y_b : any >y_c : any ->[y.getA(), y.getB(), y.getC()] : [number, any, any] ->y.getA() : number ->y.getA : () => number +>[y.getA(), y.getB(), y.getC()] : [any, any, any] +>y.getA() : any +>y.getA : () => any >y : C1 ->getA : () => number +>getA : () => any >y.getB() : any >y.getB : () => any >y : C1 @@ -138,14 +138,14 @@ var z = new C1(10, [undefined, "", null]); >"" : "" var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; ->z_a : number +>z_a : any >z_b : any >z_c : any ->[z.getA(), z.getB(), z.getC()] : [number, any, any] ->z.getA() : number ->z.getA : () => number +>[z.getA(), z.getB(), z.getC()] : [any, any, any] +>z.getA() : any +>z.getA : () => any >z : C1 ->getA : () => number +>getA : () => any >z.getB() : any >z.getB : () => any >z : C1 diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types.diff deleted file mode 100644 index c0d34c5a6c..0000000000 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.types.diff +++ /dev/null @@ -1,90 +0,0 @@ ---- old.destructuringParameterProperties2.types -+++ new.destructuringParameterProperties2.types -@@= skipped -34, +34 lines =@@ - - this.a = a || k; - >this.a = a || k : number -->this.a : any -+>this.a : number - >this : this -->a : any -+>a : number - >a || k : number - >a : number - >k : number -@@= skipped -10, +10 lines =@@ - } - - public getA() { -->getA : () => any -+>getA : () => number - - return this.a -->this.a : any -+>this.a : number - >this : this -->a : any -+>a : number - } - - public getB() { -@@= skipped -38, +38 lines =@@ - >"" : "" - - var [x_a, x_b, x_c] = [x.getA(), x.getB(), x.getC()]; -->x_a : any -+>x_a : number - >x_b : any - >x_c : any -->[x.getA(), x.getB(), x.getC()] : [any, any, any] -->x.getA() : any -->x.getA : () => any -+>[x.getA(), x.getB(), x.getC()] : [number, any, any] -+>x.getA() : number -+>x.getA : () => number - >x : C1 -->getA : () => any -+>getA : () => number - >x.getB() : any - >x.getB : () => any - >x : C1 -@@= skipped -28, +28 lines =@@ - >true : true - - var [y_a, y_b, y_c] = [y.getA(), y.getB(), y.getC()]; -->y_a : any -+>y_a : number - >y_b : any - >y_c : any -->[y.getA(), y.getB(), y.getC()] : [any, any, any] -->y.getA() : any -->y.getA : () => any -+>[y.getA(), y.getB(), y.getC()] : [number, any, any] -+>y.getA() : number -+>y.getA : () => number - >y : C1 -->getA : () => any -+>getA : () => number - >y.getB() : any - >y.getB : () => any - >y : C1 -@@= skipped -27, +27 lines =@@ - >"" : "" - - var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; -->z_a : any -+>z_a : number - >z_b : any - >z_c : any -->[z.getA(), z.getB(), z.getC()] : [any, any, any] -->z.getA() : any -->z.getA : () => any -+>[z.getA(), z.getB(), z.getC()] : [number, any, any] -+>z.getA() : number -+>z.getA : () => number - >z : C1 -->getA : () => any -+>getA : () => number - >z.getB() : any - >z.getB : () => any - >z : C1 diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types index 12616a3c41..ebc55e29b1 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types @@ -35,9 +35,9 @@ class C1 { this.a = a || k; >this.a = a || k : T ->this.a : T +>this.a : any >this : this ->a : T +>a : any >a || k : T >a : T >k : T @@ -45,12 +45,12 @@ class C1 { } public getA() { ->getA : () => T +>getA : () => any return this.a ->this.a : T +>this.a : any >this : this ->a : T +>a : any } public getB() { @@ -83,14 +83,14 @@ var x = new C1(undefined, [0, true, ""]); >"" : "" var [x_a, x_b, x_c] = [x.getA(), x.getB(), x.getC()]; ->x_a : number +>x_a : any >x_b : any >x_c : any ->[x.getA(), x.getB(), x.getC()] : [number, any, any] ->x.getA() : number ->x.getA : () => number +>[x.getA(), x.getB(), x.getC()] : [any, any, any] +>x.getA() : any +>x.getA : () => any >x : C1 ->getA : () => number +>getA : () => any >x.getB() : any >x.getB : () => any >x : C1 @@ -111,14 +111,14 @@ var y = new C1(10, [0, true, true]); >true : true var [y_a, y_b, y_c] = [y.getA(), y.getB(), y.getC()]; ->y_a : number +>y_a : any >y_b : any >y_c : any ->[y.getA(), y.getB(), y.getC()] : [number, any, any] ->y.getA() : number ->y.getA : () => number +>[y.getA(), y.getB(), y.getC()] : [any, any, any] +>y.getA() : any +>y.getA : () => any >y : C1 ->getA : () => number +>getA : () => any >y.getB() : any >y.getB : () => any >y : C1 @@ -139,14 +139,14 @@ var z = new C1(10, [undefined, "", ""]); >"" : "" var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; ->z_a : number +>z_a : any >z_b : any >z_c : any ->[z.getA(), z.getB(), z.getC()] : [number, any, any] ->z.getA() : 10 ->z.getA : () => 10 +>[z.getA(), z.getB(), z.getC()] : [any, any, any] +>z.getA() : any +>z.getA : () => any >z : C1<10, string, string> ->getA : () => 10 +>getA : () => any >z.getB() : any >z.getB : () => any >z : C1<10, string, string> @@ -167,14 +167,14 @@ var w = new C1(10, [undefined, undefined, undefined]); >undefined : undefined var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; ->z_a : number +>z_a : any >z_b : any >z_c : any ->[z.getA(), z.getB(), z.getC()] : [number, any, any] ->z.getA() : 10 ->z.getA : () => 10 +>[z.getA(), z.getB(), z.getC()] : [any, any, any] +>z.getA() : any +>z.getA : () => any >z : C1<10, string, string> ->getA : () => 10 +>getA : () => any >z.getB() : any >z.getB : () => any >z : C1<10, string, string> diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types.diff deleted file mode 100644 index c9c3b16854..0000000000 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.types.diff +++ /dev/null @@ -1,110 +0,0 @@ ---- old.destructuringParameterProperties3.types -+++ new.destructuringParameterProperties3.types -@@= skipped -34, +34 lines =@@ - - this.a = a || k; - >this.a = a || k : T -->this.a : any -+>this.a : T - >this : this -->a : any -+>a : T - >a || k : T - >a : T - >k : T -@@= skipped -10, +10 lines =@@ - } - - public getA() { -->getA : () => any -+>getA : () => T - - return this.a -->this.a : any -+>this.a : T - >this : this -->a : any -+>a : T - } - - public getB() { -@@= skipped -38, +38 lines =@@ - >"" : "" - - var [x_a, x_b, x_c] = [x.getA(), x.getB(), x.getC()]; -->x_a : any -+>x_a : number - >x_b : any - >x_c : any -->[x.getA(), x.getB(), x.getC()] : [any, any, any] -->x.getA() : any -->x.getA : () => any -+>[x.getA(), x.getB(), x.getC()] : [number, any, any] -+>x.getA() : number -+>x.getA : () => number - >x : C1 -->getA : () => any -+>getA : () => number - >x.getB() : any - >x.getB : () => any - >x : C1 -@@= skipped -28, +28 lines =@@ - >true : true - - var [y_a, y_b, y_c] = [y.getA(), y.getB(), y.getC()]; -->y_a : any -+>y_a : number - >y_b : any - >y_c : any -->[y.getA(), y.getB(), y.getC()] : [any, any, any] -->y.getA() : any -->y.getA : () => any -+>[y.getA(), y.getB(), y.getC()] : [number, any, any] -+>y.getA() : number -+>y.getA : () => number - >y : C1 -->getA : () => any -+>getA : () => number - >y.getB() : any - >y.getB : () => any - >y : C1 -@@= skipped -28, +28 lines =@@ - >"" : "" - - var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; -->z_a : any -+>z_a : number - >z_b : any - >z_c : any -->[z.getA(), z.getB(), z.getC()] : [any, any, any] -->z.getA() : any -->z.getA : () => any -+>[z.getA(), z.getB(), z.getC()] : [number, any, any] -+>z.getA() : 10 -+>z.getA : () => 10 - >z : C1<10, string, string> -->getA : () => any -+>getA : () => 10 - >z.getB() : any - >z.getB : () => any - >z : C1<10, string, string> -@@= skipped -28, +28 lines =@@ - >undefined : undefined - - var [z_a, z_b, z_c] = [z.getA(), z.getB(), z.getC()]; -->z_a : any -+>z_a : number - >z_b : any - >z_c : any -->[z.getA(), z.getB(), z.getC()] : [any, any, any] -->z.getA() : any -->z.getA : () => any -+>[z.getA(), z.getB(), z.getC()] : [number, any, any] -+>z.getA() : 10 -+>z.getA : () => 10 - >z : C1<10, string, string> -->getA : () => any -+>getA : () => 10 - >z.getB() : any - >z.getB : () => any - >z : C1<10, string, string> diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types index d27bb633fc..398c982425 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types @@ -35,9 +35,9 @@ class C1 { this.a = a || k; >this.a = a || k : T ->this.a : T +>this.a : any >this : this ->a : T +>a : any >a || k : T >a : T >k : T @@ -45,12 +45,12 @@ class C1 { } public getA() { ->getA : () => T +>getA : () => any return this.a ->this.a : T +>this.a : any >this : this ->a : T +>a : any } public getB() { @@ -81,9 +81,9 @@ class C2 extends C1 { return `${this.a} ${this.b} ${this.c}`; >`${this.a} ${this.b} ${this.c}` : string ->this.a : number +>this.a : any >this : this ->a : number +>a : any >this.b : any >this : this >b : any diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types.diff deleted file mode 100644 index cd971a8520..0000000000 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.types.diff +++ /dev/null @@ -1,42 +0,0 @@ ---- old.destructuringParameterProperties4.types -+++ new.destructuringParameterProperties4.types -@@= skipped -34, +34 lines =@@ - - this.a = a || k; - >this.a = a || k : T -->this.a : any -+>this.a : T - >this : this -->a : any -+>a : T - >a || k : T - >a : T - >k : T -@@= skipped -10, +10 lines =@@ - } - - public getA() { -->getA : () => any -+>getA : () => T - - return this.a -->this.a : any -+>this.a : T - >this : this -->a : any -+>a : T - } - - public getB() { -@@= skipped -36, +36 lines =@@ - - return `${this.a} ${this.b} ${this.c}`; - >`${this.a} ${this.b} ${this.c}` : string -->this.a : any -+>this.a : number - >this : this -->a : any -+>a : number - >this.b : any - >this : this - >b : any diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt index 0e68c75bbf..264985bda1 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt @@ -1,9 +1,10 @@ +a.js(20,9): error TS2322: Type 'string' is not assignable to type 'number'. +a.js(39,9): error TS2322: Type 'boolean' is not assignable to type 'number'. b.ts(8,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. b.ts(9,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. b.ts(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. b.ts(11,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. b.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -b.ts(17,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'number' must be of type 'number', but here has type 'string | number | boolean'. b.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrBooleanOrUndefined' must be of type 'string | boolean | undefined', but here has type 'string | boolean'. b.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'any' must be of type 'any', but here has type 'null | undefined'. b.ts(24,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. @@ -13,7 +14,7 @@ b.ts(27,5): error TS2403: Subsequent variable declarations must have the same ty b.ts(28,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -==== a.js (0 errors) ==== +==== a.js (2 errors) ==== class C { constructor() { if (Math.random()) { @@ -34,6 +35,8 @@ b.ts(28,5): error TS2403: Subsequent variable declarations must have the same ty this.inMethodNullable = undefined; } this.inMultiple = "string"; + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type 'number'. this.inMultipleMethods = "string"; var action = () => { @@ -53,6 +56,8 @@ b.ts(28,5): error TS2403: Subsequent variable declarations must have the same ty this.inGetter = "string" } this.inMultiple = false; + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. this.inMultipleMethods = false; } set() { @@ -114,7 +119,7 @@ b.ts(28,5): error TS2403: Subsequent variable declarations must have the same ty } } -==== b.ts (13 errors) ==== +==== b.ts (12 errors) ==== var c = new C(); var stringOrNumber: string | number; @@ -147,9 +152,6 @@ b.ts(28,5): error TS2403: Subsequent variable declarations must have the same ty var number: number; var number = c.inMultiple; - ~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'number' must be of type 'number', but here has type 'string | number | boolean'. -!!! related TS6203 b.ts:16:5: 'number' was also declared here. var stringOrBooleanOrUndefined : string | boolean | undefined; var stringOrBooleanOrUndefined = c.inMultipleMethods; ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types index 4017809e05..a23aaa2c3e 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types @@ -28,9 +28,9 @@ class C { } this.inMultiple = 0; >this.inMultiple = 0 : 0 ->this.inMultiple : string | number | boolean +>this.inMultiple : number >this : this ->inMultiple : string | number | boolean +>inMultiple : number >0 : 0 } method() { @@ -72,9 +72,9 @@ class C { } this.inMultiple = "string"; >this.inMultiple = "string" : "string" ->this.inMultiple : string | number | boolean +>this.inMultiple : number >this : this ->inMultiple : string | number | boolean +>inMultiple : number >"string" : "string" this.inMultipleMethods = "string"; @@ -137,9 +137,9 @@ class C { } this.inMultiple = false; >this.inMultiple = false : false ->this.inMultiple : string | number | boolean +>this.inMultiple : number >this : this ->inMultiple : string | number | boolean +>inMultiple : number >false : false this.inMultipleMethods = false; @@ -386,9 +386,9 @@ var number: number; var number = c.inMultiple; >number : number ->c.inMultiple : string | number | boolean +>c.inMultiple : number >c : C ->inMultiple : string | number | boolean +>inMultiple : number var stringOrBooleanOrUndefined : string | boolean | undefined; >stringOrBooleanOrUndefined : string | boolean | undefined diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols index 2aa868c996..18e75c88ce 100644 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols @@ -17,9 +17,11 @@ export class Foo { >this.foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) >this : Symbol(Foo, Decl(thisPropertyAssignmentCircular.js, 0, 0)) >foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) +>this.foo.slice : Symbol(slice, Decl(lib.es5.d.ts, --, --)) >this.foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) >this : Symbol(Foo, Decl(thisPropertyAssignmentCircular.js, 0, 0)) >foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) +>slice : Symbol(slice, Decl(lib.es5.d.ts, --, --)) } m() { >m : Symbol(m, Decl(thisPropertyAssignmentCircular.js, 6, 5)) diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols.diff b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols.diff index 77746fee55..bba04cd084 100644 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.symbols.diff @@ -22,11 +22,13 @@ ->this.foo.slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --)) ->this.foo : Symbol(Foo.foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) +>foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ++>this.foo.slice : Symbol(slice, Decl(lib.es5.d.ts, --, --)) +>this.foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) >this : Symbol(Foo, Decl(thisPropertyAssignmentCircular.js, 0, 0)) ->foo : Symbol(Foo.foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ->slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --)) +>foo : Symbol(foo, Decl(thisPropertyAssignmentCircular.js, 1, 19), Decl(thisPropertyAssignmentCircular.js, 4, 14)) ++>slice : Symbol(slice, Decl(lib.es5.d.ts, --, --)) } m() { ->m : Symbol(Foo.m, Decl(thisPropertyAssignmentCircular.js, 6, 5)) @@ -41,7 +43,7 @@ } } -@@= skipped -32, +30 lines =@@ +@@= skipped -32, +32 lines =@@ >C : Symbol(C, Decl(thisPropertyAssignmentCircular.js, 10, 1)) this.x = 0; diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.types b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.types index 43bbad434e..4753256970 100644 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.types +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentCircular.types @@ -7,33 +7,33 @@ export class Foo { constructor() { this.foo = "Hello"; >this.foo = "Hello" : "Hello" ->this.foo : any +>this.foo : string >this : this ->foo : any +>foo : string >"Hello" : "Hello" } slicey() { >slicey : () => void this.foo = this.foo.slice(); ->this.foo = this.foo.slice() : any ->this.foo : any +>this.foo = this.foo.slice() : string +>this.foo : string >this : this ->foo : any ->this.foo.slice() : any ->this.foo.slice : any ->this.foo : any +>foo : string +>this.foo.slice() : string +>this.foo.slice : (start?: number, end?: number) => string +>this.foo : string >this : this ->foo : any ->slice : any +>foo : string +>slice : (start?: number, end?: number) => string } m() { >m : () => void this.foo ->this.foo : any +>this.foo : string >this : this ->foo : any +>foo : string } } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff index 2d218405ef..ba45aca11f 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff @@ -2,14 +2,13 @@ +++ new.inferringClassMembersFromAssignments.errors.txt @@= skipped -0, +0 lines =@@ -a.js(14,13): error TS7008: Member 'inMethodNullable' implicitly has an 'any' type. --a.js(20,9): error TS2322: Type 'string' is not assignable to type 'number'. --a.js(39,9): error TS2322: Type 'boolean' is not assignable to type 'number'. + a.js(20,9): error TS2322: Type 'string' is not assignable to type 'number'. + a.js(39,9): error TS2322: Type 'boolean' is not assignable to type 'number'. +b.ts(8,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(9,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(11,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. +b.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+b.ts(17,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'number' must be of type 'number', but here has type 'string | number | boolean'. +b.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrBooleanOrUndefined' must be of type 'string | boolean | undefined', but here has type 'string | boolean'. +b.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'any' must be of type 'any', but here has type 'null | undefined'. +b.ts(24,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. @@ -20,11 +19,11 @@ -==== a.js (3 errors) ==== -+==== a.js (0 errors) ==== ++==== a.js (2 errors) ==== class C { constructor() { if (Math.random()) { -@@= skipped -17, +27 lines =@@ +@@= skipped -17, +28 lines =@@ if (Math.random()) { this.inMethod = 0; this.inMethodNullable = null; @@ -33,29 +32,12 @@ } else { this.inMethod = "string" - this.inMethodNullable = undefined; - } - this.inMultiple = "string"; -- ~~~~~~~~~~~~~~~ --!!! error TS2322: Type 'string' is not assignable to type 'number'. - this.inMultipleMethods = "string"; - - var action = () => { -@@= skipped -29, +25 lines =@@ - this.inGetter = "string" - } - this.inMultiple = false; -- ~~~~~~~~~~~~~~~ --!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - this.inMultipleMethods = false; - } - set() { -@@= skipped -63, +61 lines =@@ +@@= skipped -92, +90 lines =@@ } } -==== b.ts (0 errors) ==== -+==== b.ts (13 errors) ==== ++==== b.ts (12 errors) ==== var c = new C(); var stringOrNumber: string | number; @@ -85,11 +67,8 @@ var stringOrNumberOrBoolean: string | number | boolean; - var number: number; +@@= skipped -11, +26 lines =@@ var number = c.inMultiple; -+ ~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'number' must be of type 'number', but here has type 'string | number | boolean'. -+!!! related TS6203 b.ts:16:5: 'number' was also declared here. var stringOrBooleanOrUndefined : string | boolean | undefined; var stringOrBooleanOrUndefined = c.inMultipleMethods; + ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff index 5c0264f690..01d44fd593 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff @@ -24,10 +24,10 @@ this.inMultiple = 0; >this.inMultiple = 0 : 0 ->this.inMultiple : any -+>this.inMultiple : string | number | boolean ++>this.inMultiple : number >this : this ->inMultiple : any -+>inMultiple : string | number | boolean ++>inMultiple : number >0 : 0 } method() { @@ -70,13 +70,7 @@ >undefined : undefined } this.inMultiple = "string"; - >this.inMultiple = "string" : "string" -->this.inMultiple : number -+>this.inMultiple : string | number | boolean - >this : this -->inMultiple : number -+>inMultiple : string | number | boolean - >"string" : "string" +@@= skipped -35, +35 lines =@@ this.inMultipleMethods = "string"; >this.inMultipleMethods = "string" : "string" @@ -88,7 +82,7 @@ >"string" : "string" var action = () => { -@@= skipped -52, +52 lines =@@ +@@= skipped -17, +17 lines =@@ this.inNestedArrowFunction = 0; >this.inNestedArrowFunction = 0 : 0 @@ -132,13 +126,7 @@ >"string" : "string" } this.inMultiple = false; - >this.inMultiple = false : false -->this.inMultiple : number -+>this.inMultiple : string | number | boolean - >this : this -->inMultiple : number -+>inMultiple : string | number | boolean - >false : false +@@= skipped -22, +22 lines =@@ this.inMultipleMethods = false; >this.inMultipleMethods = false : false @@ -150,7 +138,7 @@ >false : false } set() { -@@= skipped -38, +38 lines =@@ +@@= skipped -16, +16 lines =@@ this.inSetter = 0; >this.inSetter = 0 : 0 @@ -348,18 +336,7 @@ var stringOrNumberOrBoolean: string | number | boolean; >stringOrNumberOrBoolean : string | number | boolean -@@= skipped -36, +36 lines =@@ - - var number = c.inMultiple; - >number : number -->c.inMultiple : number -+>c.inMultiple : string | number | boolean - >c : C -->inMultiple : number -+>inMultiple : string | number | boolean - - var stringOrBooleanOrUndefined : string | boolean | undefined; - >stringOrBooleanOrUndefined : string | boolean | undefined +@@= skipped -45, +45 lines =@@ var stringOrBooleanOrUndefined = c.inMultipleMethods; >stringOrBooleanOrUndefined : string | boolean | undefined diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentCircular.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentCircular.types.diff index 39b1696704..f3c05ee7d9 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentCircular.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentCircular.types.diff @@ -1,39 +1,18 @@ --- old.thisPropertyAssignmentCircular.types +++ new.thisPropertyAssignmentCircular.types -@@= skipped -15, +15 lines =@@ - >slicey : () => void - - this.foo = this.foo.slice(); -->this.foo = this.foo.slice() : string -->this.foo : string -+>this.foo = this.foo.slice() : any -+>this.foo : any - >this : this -->foo : string -->this.foo.slice() : string -->this.foo.slice : (start?: number, end?: number) => string -->this.foo : string -+>foo : any -+>this.foo.slice() : any -+>this.foo.slice : any -+>this.foo : any - >this : this -->foo : string -->slice : (start?: number, end?: number) => string -+>foo : any -+>slice : any - } - m() { - >m : () => void - - this.foo -->this.foo : string -+>this.foo : any +@@= skipped -6, +6 lines =@@ + constructor() { + this.foo = "Hello"; + >this.foo = "Hello" : "Hello" +->this.foo : any ++>this.foo : string >this : this -->foo : string -+>foo : any +->foo : any ++>foo : string + >"Hello" : "Hello" } - } + slicey() { +@@= skipped -32, +32 lines =@@ /** @class */ function C() { From f2cd403ad057f0aec94ea0a33276070d109a1b8e Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Mon, 12 May 2025 09:57:00 -0700 Subject: [PATCH 4/8] port most of getWidenedTypeForAssignmentDeclaration --- internal/binder/binder.go | 7 +- internal/checker/checker.go | 58 ++- .../abstractPropertyInConstructor.symbols | 50 +-- ...abstractPropertyInConstructor.symbols.diff | 50 +-- .../submodule/compiler/autoLift2.errors.txt | 20 +- .../compiler/autoLift2.errors.txt.diff | 55 --- .../submodule/compiler/autoLift2.symbols | 12 - .../submodule/compiler/autoLift2.symbols.diff | 29 +- .../submodule/compiler/autoLift2.types | 28 +- .../submodule/compiler/autoLift2.types.diff | 73 ---- .../classFieldSuperNotAccessibleJs.types | 10 +- .../divergentAccessorsVisibility1.errors.txt | 88 ++++- ...ergentAccessorsVisibility1.errors.txt.diff | 175 --------- .../divergentAccessorsVisibility1.symbols | 216 +++++------ ...divergentAccessorsVisibility1.symbols.diff | 216 +++++------ .../compiler/es6DeclOrdering.errors.txt | 25 ++ .../compiler/es6DeclOrdering.errors.txt.diff | 30 -- .../compiler/es6DeclOrdering.symbols | 6 - .../compiler/es6DeclOrdering.symbols.diff | 17 - .../submodule/compiler/es6DeclOrdering.types | 14 +- .../compiler/es6DeclOrdering.types.diff | 34 -- ...nstructorPropertyContextualType.errors.txt | 22 -- ...ctorPropertyContextualType.errors.txt.diff | 27 -- ...dConstructorPropertyContextualType.symbols | 4 +- ...tructorPropertyContextualType.symbols.diff | 4 +- ...tedConstructorPropertyContextualType.types | 10 +- ...nstructorPropertyContextualType.types.diff | 20 - .../compiler/propertyOrdering.errors.txt | 8 +- .../compiler/propertyOrdering.errors.txt.diff | 29 -- .../compiler/propertyOrdering.symbols | 6 - .../compiler/propertyOrdering.symbols.diff | 16 - .../submodule/compiler/propertyOrdering.types | 14 +- .../compiler/propertyOrdering.types.diff | 34 -- .../submodule/compiler/protoInIndexer.symbols | 1 - .../compiler/protoInIndexer.symbols.diff | 9 - ...mentInSubclassOfClassExpression.errors.txt | 13 + ...nSubclassOfClassExpression.errors.txt.diff | 18 - ...ignmentInSubclassOfClassExpression.symbols | 4 +- ...ntInSubclassOfClassExpression.symbols.diff | 9 +- ...ssignmentInSubclassOfClassExpression.types | 4 +- ...mentInSubclassOfClassExpression.types.diff | 14 - ...ckExtendedClassInsidePublicMethod2.symbols | 4 +- ...endedClassInsidePublicMethod2.symbols.diff | 4 +- ...heckExtendedClassInsidePublicMethod2.types | 4 +- ...xtendedClassInsidePublicMethod2.types.diff | 14 - ...xtendedClassInsideStaticMethod1.errors.txt | 5 +- ...edClassInsideStaticMethod1.errors.txt.diff | 22 -- ...ckExtendedClassInsideStaticMethod1.symbols | 2 - ...endedClassInsideStaticMethod1.symbols.diff | 6 - ...heckExtendedClassInsideStaticMethod1.types | 4 +- ...xtendedClassInsideStaticMethod1.types.diff | 14 - .../scopeCheckInsideStaticMethod1.errors.txt | 5 +- ...peCheckInsideStaticMethod1.errors.txt.diff | 20 - .../scopeCheckInsideStaticMethod1.symbols | 2 - ...scopeCheckInsideStaticMethod1.symbols.diff | 4 - .../scopeCheckInsideStaticMethod1.types | 4 +- .../scopeCheckInsideStaticMethod1.types.diff | 14 - .../compiler/staticVisibility.errors.txt | 5 +- .../compiler/staticVisibility.errors.txt.diff | 24 -- .../compiler/staticVisibility.symbols | 2 - .../compiler/staticVisibility.symbols.diff | 4 +- .../submodule/compiler/staticVisibility.types | 4 +- .../compiler/staticVisibility.types.diff | 14 - .../compiler/staticVisibility2.errors.txt | 5 +- .../staticVisibility2.errors.txt.diff | 19 - .../compiler/staticVisibility2.symbols | 2 - .../compiler/staticVisibility2.symbols.diff | 8 - .../compiler/staticVisibility2.types | 4 +- .../compiler/staticVisibility2.types.diff | 14 - .../submodule/compiler/statics.errors.txt | 40 ++ .../compiler/statics.errors.txt.diff | 45 --- .../submodule/compiler/statics.symbols | 4 - .../submodule/compiler/statics.symbols.diff | 8 +- .../submodule/compiler/statics.types | 12 +- .../submodule/compiler/statics.types.diff | 34 -- .../compiler/unknownSymbols1.errors.txt | 9 +- .../compiler/unknownSymbols1.errors.txt.diff | 27 -- .../compiler/unknownSymbols1.symbols | 2 - .../compiler/unknownSymbols1.symbols.diff | 9 - ...AndModuleWithSameNameAndCommonRoot.symbols | 12 +- ...duleWithSameNameAndCommonRoot.symbols.diff | 12 +- ...ModuleWithSameNameAndCommonRootES6.symbols | 12 +- ...eWithSameNameAndCommonRootES6.symbols.diff | 12 +- ...eAndClassWithSameNameAndCommonRoot.symbols | 12 +- ...lassWithSameNameAndCommonRoot.symbols.diff | 12 +- .../classExtendingClassLikeType.symbols | 24 +- .../classExtendingClassLikeType.symbols.diff | 24 +- ...cBlockUseBeforeDef2(target=es2022).symbols | 6 +- ...kUseBeforeDef2(target=es2022).symbols.diff | 6 +- ...cBlockUseBeforeDef2(target=esnext).symbols | 6 +- ...kUseBeforeDef2(target=esnext).symbols.diff | 6 +- .../contextualTypedSpecialAssignment.types | 8 +- ...structuringParameterProperties2.errors.txt | 8 +- ...turingParameterProperties2.errors.txt.diff | 34 -- .../destructuringParameterProperties2.symbols | 4 - ...ructuringParameterProperties2.symbols.diff | 15 +- ...structuringParameterProperties3.errors.txt | 8 +- ...turingParameterProperties3.errors.txt.diff | 33 -- .../destructuringParameterProperties3.symbols | 4 - ...ructuringParameterProperties3.symbols.diff | 15 +- ...structuringParameterProperties4.errors.txt | 11 +- ...turingParameterProperties4.errors.txt.diff | 45 --- .../destructuringParameterProperties4.symbols | 6 - ...ructuringParameterProperties4.symbols.diff | 20 +- ...ringClassMembersFromAssignments.errors.txt | 55 +-- ...inferringClassMembersFromAssignments.types | 144 +++---- ...nferringClassMembersFromAssignments4.types | 8 +- ...nferringClassMembersFromAssignments5.types | 4 +- .../jsDeclarationsFunctionJSDoc.types | 4 +- .../keyofAndIndexedAccess2.symbols | 3 - .../keyofAndIndexedAccess2.symbols.diff | 14 - .../conformance/mixinClassesAnnotated.symbols | 4 +- .../mixinClassesAnnotated.symbols.diff | 4 +- .../conformance/mixinClassesAnonymous.symbols | 4 +- .../mixinClassesAnonymous.symbols.diff | 4 +- .../conformance/parserAstSpans1.symbols | 6 +- .../conformance/parserAstSpans1.symbols.diff | 6 +- .../conformance/parserClass2.errors.txt | 5 +- .../conformance/parserClass2.errors.txt.diff | 21 - .../conformance/parserClass2.symbols | 2 - .../conformance/parserClass2.symbols.diff | 2 - .../conformance/parserRealSource11.symbols | 84 ++-- .../parserRealSource11.symbols.diff | 84 ++-- .../conformance/parserRealSource11.types | 74 ++-- .../conformance/parserRealSource11.types.diff | 225 ----------- .../conformance/parserRealSource4.symbols | 2 +- .../parserRealSource4.symbols.diff | 2 +- .../conformance/parserRealSource4.types | 2 +- .../conformance/parserRealSource4.types.diff | 11 - .../privateNameAndIndexSignature.symbols | 1 - .../privateNameAndIndexSignature.symbols.diff | 8 - .../privateNameAndIndexSignature.types | 2 +- .../privateNameAndIndexSignature.types.diff | 11 - .../privateNameMethodCallExpression.symbols | 6 +- ...ivateNameMethodCallExpression.symbols.diff | 6 +- ...vateNameStaticMethodCallExpression.symbols | 6 +- ...ameStaticMethodCallExpression.symbols.diff | 6 +- .../readonlyConstructorAssignment.errors.txt | 5 +- ...donlyConstructorAssignment.errors.txt.diff | 22 -- .../readonlyConstructorAssignment.symbols | 4 +- ...readonlyConstructorAssignment.symbols.diff | 4 +- .../readonlyConstructorAssignment.types | 4 +- .../readonlyConstructorAssignment.types.diff | 14 - .../conformance/scannerClass2.errors.txt | 5 +- .../conformance/scannerClass2.errors.txt.diff | 21 - .../conformance/scannerClass2.symbols | 2 - .../conformance/scannerClass2.symbols.diff | 2 - .../conformance/typeRelationships.errors.txt | 10 +- .../typeRelationships.errors.txt.diff | 28 -- .../conformance/typeRelationships.symbols | 44 +-- .../typeRelationships.symbols.diff | 44 +-- .../conformance/typeRelationships.types | 66 ++-- .../conformance/typeRelationships.types.diff | 137 ------- .../classFieldSuperNotAccessibleJs.types.diff | 27 +- ...ontextualTypedSpecialAssignment.types.diff | 8 +- ...lassMembersFromAssignments.errors.txt.diff | 104 ----- ...ringClassMembersFromAssignments.types.diff | 367 ------------------ ...ingClassMembersFromAssignments4.types.diff | 26 -- ...ingClassMembersFromAssignments5.types.diff | 14 +- .../jsDeclarationsFunctionJSDoc.types.diff | 14 - 160 files changed, 1046 insertions(+), 3003 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/autoLift2.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/propertyOrdering.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/staticVisibility.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/staticVisibility2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/statics.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/statics.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/statics.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource11.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource4.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/typeRelationships.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.types.diff diff --git a/internal/binder/binder.go b/internal/binder/binder.go index 69c3acb659..a29dfeab6f 100644 --- a/internal/binder/binder.go +++ b/internal/binder/binder.go @@ -1046,8 +1046,11 @@ func (b *Binder) bindFunctionPropertyAssignment(node *ast.Node) { } func (b *Binder) bindThisPropertyAssignment(node *ast.Node) { - expr := node.AsBinaryExpression() - if ast.IsPropertyAccessExpression(expr.Left) && ast.IsPrivateIdentifier(expr.Left.AsPropertyAccessExpression().Name()) { + if !ast.IsInJSFile(node) { + return + } + bin := node.AsBinaryExpression() + if ast.IsPropertyAccessExpression(bin.Left) && ast.IsPrivateIdentifier(bin.Left.AsPropertyAccessExpression().Name()) { return } thisContainer := ast.GetThisContainer(node /*includeArrowFunctions*/, false /*includeClassComputedPropertyName*/, false) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 18f4f117c2..f9aa5bd03b 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -16692,40 +16692,64 @@ func (c *Checker) getTypeOfPrototypeProperty(prototype *ast.Symbol) *Type { func (c *Checker) getWidenedTypeForAssignmentDeclaration(symbol *ast.Symbol) *Type { var types []*Type var t *Type - if ctor, ok := c.isConstructorDeclaredThisProperty(symbol); ok { + if ctor := c.isConstructorDeclaredThisProperty(symbol); ctor != nil { t = c.getFlowTypeInConstructor(symbol, ctor) } if t == nil { + nonConstructorDeclaredThis := true for _, declaration := range symbol.Declarations { if ast.IsBinaryExpression(declaration) { + nonConstructorDeclaredThis = nonConstructorDeclaredThis && ast.GetAssignmentDeclarationKind(declaration.AsBinaryExpression()) == ast.JSDeclarationKindThisProperty + // TODO: if declaration.Type() != nil { nonConstructorDeclaredThis = false; t = c.getTypeOfTypeNode(declaration.Type()); break } types = core.AppendIfUnique(types, c.checkExpressionForMutableLocation(declaration.AsBinaryExpression().Right, CheckModeNormal)) } } + if nonConstructorDeclaredThis && len(types) > 0 { + if base := c.getTypeOfPropertyInBaseClass(symbol); base != nil { + t = base + } else if c.strictNullChecks { + types = core.AppendIfUnique(types, c.undefinedOrMissingType) + } + } + } + if t == nil { t = c.getWidenedType(c.getUnionType(types)) } + // report an all-nullable or empty union as an implicit any in JS files + if symbol.ValueDeclaration != nil && ast.IsInJSFile(symbol.ValueDeclaration) && + c.filterType(t, func(c *Type) bool { return c.Flags() & ^TypeFlagsNullable != 0 }) == c.neverType { + c.reportImplicitAny(symbol.ValueDeclaration, c.anyType, WideningKindNormal) + return c.anyType + } return t } -func (c *Checker) isConstructorDeclaredThisProperty(symbol *ast.Symbol) (*ast.Node, bool) { +// A property is considered a constructor declared property when all declaration sites are this.xxx assignments, +// when no declaration sites have JSDoc type annotations, and when at least one declaration site is in the body of +// a class constructor. +func (c *Checker) isConstructorDeclaredThisProperty(symbol *ast.Symbol) *ast.Node { if symbol.ValueDeclaration == nil || !ast.IsBinaryExpression(symbol.ValueDeclaration) { - return nil, false + return nil } if ctor, ok := c.constructorOfThisExpandos[symbol]; ok { - return ctor, ok + return ctor } - ctor := c.getDeclaringConstructor(symbol) - result := ctor != nil && - core.Every(symbol.Declarations, func(declaration *ast.Declaration) bool { - if !ast.IsBinaryExpression(declaration) { - return false - } - bin := declaration.AsBinaryExpression() - return ast.GetAssignmentDeclarationKind(bin) == ast.JSDeclarationKindThisProperty && - (bin.Left.Kind != ast.KindElementAccessExpression || ast.IsStringOrNumericLiteralLike(bin.Left.AsElementAccessExpression().ArgumentExpression)) && - bin.Right.Kind != ast.KindTypeAssertionExpression - }) - c.constructorOfThisExpandos[symbol] = ctor - return ctor, result + untypedConstructorDeclaredThis := core.Every(symbol.Declarations, func(declaration *ast.Declaration) bool { + if !ast.IsBinaryExpression(declaration) { + return false + } + bin := declaration.AsBinaryExpression() + return ast.GetAssignmentDeclarationKind(bin) == ast.JSDeclarationKindThisProperty && + (bin.Left.Kind != ast.KindElementAccessExpression || ast.IsStringOrNumericLiteralLike(bin.Left.AsElementAccessExpression().ArgumentExpression)) && + // TODO: bin.Type() == nil + bin.Right.Kind != ast.KindTypeAssertionExpression + }) + if untypedConstructorDeclaredThis { + c.constructorOfThisExpandos[symbol] = c.getDeclaringConstructor(symbol) + } else { + c.constructorOfThisExpandos[symbol] = nil + } + return c.constructorOfThisExpandos[symbol] } func (c *Checker) widenTypeForVariableLikeDeclaration(t *Type, declaration *ast.Node, reportErrors bool) *Type { diff --git a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols index 2e966a7147..8c6825c0b2 100644 --- a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols +++ b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols @@ -19,18 +19,18 @@ abstract class AbstractClass { let val = this.prop.toLowerCase(); >val : Symbol(val, Decl(abstractPropertyInConstructor.ts, 3, 11)) >this.prop.toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) if (!str) { >str : Symbol(str, Decl(abstractPropertyInConstructor.ts, 1, 16)) this.prop = "Hello World"; ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) } this.cb(str); >this.cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) @@ -43,9 +43,9 @@ abstract class AbstractClass { >innerFunction : Symbol(innerFunction, Decl(abstractPropertyInConstructor.ts, 11, 13)) return this.prop; ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) } // OK, references are to another instance @@ -53,13 +53,13 @@ abstract class AbstractClass { >other.cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 1, 28)) >cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) ->other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 1, 28)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) } abstract prop: string; ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) abstract cb: (s: string) => void; >cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) @@ -71,26 +71,26 @@ abstract class AbstractClass { other = this.prop; >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 22, 39)) ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) fn = () => this.prop; >fn : Symbol(fn, Decl(abstractPropertyInConstructor.ts, 24, 22)) ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) method2() { >method2 : Symbol(method2, Decl(abstractPropertyInConstructor.ts, 25, 25)) this.prop = this.prop + "!"; ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) } } @@ -120,9 +120,9 @@ abstract class DerivedAbstractClass extends AbstractClass { >this : Symbol(DerivedAbstractClass, Decl(abstractPropertyInConstructor.ts, 30, 1)) >cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) >this.prop.toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) ->this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(DerivedAbstractClass, Decl(abstractPropertyInConstructor.ts, 30, 1)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) this.method(1); @@ -135,17 +135,17 @@ abstract class DerivedAbstractClass extends AbstractClass { >other.cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 35, 28)) >cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) ->other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 35, 28)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) yetAnother.cb(yetAnother.prop); >yetAnother.cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) >yetAnother : Symbol(yetAnother, Decl(abstractPropertyInConstructor.ts, 35, 50)) >cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) ->yetAnother.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>yetAnother.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >yetAnother : Symbol(yetAnother, Decl(abstractPropertyInConstructor.ts, 35, 50)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) } } @@ -205,9 +205,9 @@ class User { >AbstractClass : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) a.prop; ->a.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>a.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >a : Symbol(a, Decl(abstractPropertyInConstructor.ts, 63, 16)) ->prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) +>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) a.cb("hi"); >a.cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) diff --git a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols.diff b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols.diff index 894914f32e..0576578ad6 100644 --- a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.symbols.diff @@ -17,11 +17,11 @@ ->this.prop.toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --)) ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>this.prop.toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) if (!str) { @@ -29,10 +29,10 @@ this.prop = "Hello World"; ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) } this.cb(str); ->this.cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) @@ -48,10 +48,10 @@ return this.prop; ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) } // OK, references are to another instance @@ -62,15 +62,15 @@ ->cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) ->other.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) -+>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 1, 28)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) } abstract prop: string; ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) abstract cb: (s: string) => void; ->cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) @@ -86,19 +86,19 @@ ->other : Symbol(AbstractClass.other, Decl(abstractPropertyInConstructor.ts, 22, 39)) ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 22, 39)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) fn = () => this.prop; ->fn : Symbol(AbstractClass.fn, Decl(abstractPropertyInConstructor.ts, 24, 22)) ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>fn : Symbol(fn, Decl(abstractPropertyInConstructor.ts, 24, 22)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) method2() { ->method2 : Symbol(AbstractClass.method2, Decl(abstractPropertyInConstructor.ts, 25, 25)) @@ -106,15 +106,15 @@ this.prop = this.prop + "!"; ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) } } @@ -139,11 +139,11 @@ ->this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) +>this.prop.toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) -+>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>this.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >this : Symbol(DerivedAbstractClass, Decl(abstractPropertyInConstructor.ts, 30, 1)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>toLowerCase : Symbol(toLowerCase, Decl(lib.es5.d.ts, --, --)) this.method(1); @@ -161,10 +161,10 @@ ->cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) ->other.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) -+>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>other.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >other : Symbol(other, Decl(abstractPropertyInConstructor.ts, 35, 28)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) yetAnother.cb(yetAnother.prop); ->yetAnother.cb : Symbol(DerivedAbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) @@ -173,10 +173,10 @@ ->cb : Symbol(DerivedAbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) ->yetAnother.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) +>cb : Symbol(cb, Decl(abstractPropertyInConstructor.ts, 32, 59)) -+>yetAnother.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>yetAnother.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >yetAnother : Symbol(yetAnother, Decl(abstractPropertyInConstructor.ts, 35, 50)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) } } @@ -233,10 +233,10 @@ a.prop; ->a.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>a.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>a.prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) >a : Symbol(a, Decl(abstractPropertyInConstructor.ts, 63, 16)) ->prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) -+>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 5, 19), Decl(abstractPropertyInConstructor.ts, 17, 5), Decl(abstractPropertyInConstructor.ts, 27, 15)) ++>prop : Symbol(prop, Decl(abstractPropertyInConstructor.ts, 17, 5)) a.cb("hi"); ->a.cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 19, 26)) diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt b/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt index 6861a76432..929046f1f9 100644 --- a/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt @@ -1,20 +1,30 @@ +autoLift2.ts(5,14): error TS2339: Property 'foo' does not exist on type 'A'. autoLift2.ts(5,17): error TS1005: ';' expected. autoLift2.ts(5,19): error TS2693: 'any' only refers to a type, but is being used as a value here. +autoLift2.ts(6,14): error TS2339: Property 'bar' does not exist on type 'A'. autoLift2.ts(6,17): error TS1005: ';' expected. autoLift2.ts(6,19): error TS2693: 'any' only refers to a type, but is being used as a value here. +autoLift2.ts(12,11): error TS2339: Property 'foo' does not exist on type 'A'. +autoLift2.ts(14,11): error TS2339: Property 'bar' does not exist on type 'A'. +autoLift2.ts(16,33): error TS2339: Property 'foo' does not exist on type 'A'. +autoLift2.ts(18,33): error TS2339: Property 'bar' does not exist on type 'A'. -==== autoLift2.ts (4 errors) ==== +==== autoLift2.ts (10 errors) ==== class A { constructor() { this.foo: any; + ~~~ +!!! error TS2339: Property 'foo' does not exist on type 'A'. ~ !!! error TS1005: ';' expected. ~~~ !!! error TS2693: 'any' only refers to a type, but is being used as a value here. this.bar: any; + ~~~ +!!! error TS2339: Property 'bar' does not exist on type 'A'. ~ !!! error TS1005: ';' expected. ~~~ @@ -25,12 +35,20 @@ autoLift2.ts(6,19): error TS2693: 'any' only refers to a type, but is being used baz() { this.foo = "foo"; + ~~~ +!!! error TS2339: Property 'foo' does not exist on type 'A'. this.bar = "bar"; + ~~~ +!!! error TS2339: Property 'bar' does not exist on type 'A'. [1, 2].forEach((p) => this.foo); + ~~~ +!!! error TS2339: Property 'foo' does not exist on type 'A'. [1, 2].forEach((p) => this.bar); + ~~~ +!!! error TS2339: Property 'bar' does not exist on type 'A'. } diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt.diff deleted file mode 100644 index c0937b24ee..0000000000 --- a/testdata/baselines/reference/submodule/compiler/autoLift2.errors.txt.diff +++ /dev/null @@ -1,55 +0,0 @@ ---- old.autoLift2.errors.txt -+++ new.autoLift2.errors.txt -@@= skipped -0, +0 lines =@@ --autoLift2.ts(5,14): error TS2339: Property 'foo' does not exist on type 'A'. - autoLift2.ts(5,17): error TS1005: ';' expected. - autoLift2.ts(5,19): error TS2693: 'any' only refers to a type, but is being used as a value here. --autoLift2.ts(6,14): error TS2339: Property 'bar' does not exist on type 'A'. - autoLift2.ts(6,17): error TS1005: ';' expected. - autoLift2.ts(6,19): error TS2693: 'any' only refers to a type, but is being used as a value here. --autoLift2.ts(12,11): error TS2339: Property 'foo' does not exist on type 'A'. --autoLift2.ts(14,11): error TS2339: Property 'bar' does not exist on type 'A'. --autoLift2.ts(16,33): error TS2339: Property 'foo' does not exist on type 'A'. --autoLift2.ts(18,33): error TS2339: Property 'bar' does not exist on type 'A'. - - --==== autoLift2.ts (10 errors) ==== -+==== autoLift2.ts (4 errors) ==== - class A - - { - constructor() { - this.foo: any; -- ~~~ --!!! error TS2339: Property 'foo' does not exist on type 'A'. - ~ - !!! error TS1005: ';' expected. - ~~~ - !!! error TS2693: 'any' only refers to a type, but is being used as a value here. - this.bar: any; -- ~~~ --!!! error TS2339: Property 'bar' does not exist on type 'A'. - ~ - !!! error TS1005: ';' expected. - ~~~ -@@= skipped -34, +24 lines =@@ - baz() { - - this.foo = "foo"; -- ~~~ --!!! error TS2339: Property 'foo' does not exist on type 'A'. - - this.bar = "bar"; -- ~~~ --!!! error TS2339: Property 'bar' does not exist on type 'A'. - - [1, 2].forEach((p) => this.foo); -- ~~~ --!!! error TS2339: Property 'foo' does not exist on type 'A'. - - [1, 2].forEach((p) => this.bar); -- ~~~ --!!! error TS2339: Property 'bar' does not exist on type 'A'. - - } - diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.symbols b/testdata/baselines/reference/submodule/compiler/autoLift2.symbols index 01d4c419bc..8c317b40df 100644 --- a/testdata/baselines/reference/submodule/compiler/autoLift2.symbols +++ b/testdata/baselines/reference/submodule/compiler/autoLift2.symbols @@ -7,14 +7,10 @@ class A { constructor() { this.foo: any; ->this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) ->foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) this.bar: any; ->this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) ->bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) } @@ -22,30 +18,22 @@ class A >baz : Symbol(baz, Decl(autoLift2.ts, 6, 5)) this.foo = "foo"; ->this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) ->foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) this.bar = "bar"; ->this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) ->bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) [1, 2].forEach((p) => this.foo); >[1, 2].forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(autoLift2.ts, 15, 21)) ->this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) ->foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) [1, 2].forEach((p) => this.bar); >[1, 2].forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(autoLift2.ts, 17, 21)) ->this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) ->bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) } diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.symbols.diff b/testdata/baselines/reference/submodule/compiler/autoLift2.symbols.diff index 30f82a59b7..b4f3d58938 100644 --- a/testdata/baselines/reference/submodule/compiler/autoLift2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/autoLift2.symbols.diff @@ -1,18 +1,6 @@ --- old.autoLift2.symbols +++ new.autoLift2.symbols -@@= skipped -6, +6 lines =@@ - { - constructor() { - this.foo: any; -+>this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) - >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) -+>foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) - - this.bar: any; -+>this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) - >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) -+>bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) - } +@@= skipped -14, +14 lines =@@ baz() { @@ -20,14 +8,9 @@ +>baz : Symbol(baz, Decl(autoLift2.ts, 6, 5)) this.foo = "foo"; -+>this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) -+>foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) - - this.bar = "bar"; -+>this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) +@@= skipped -9, +9 lines =@@ >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) -+>bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) [1, 2].forEach((p) => this.foo); ->[1, 2].forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) @@ -35,9 +18,7 @@ +>[1, 2].forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(autoLift2.ts, 15, 21)) -+>this.foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) -+>foo : Symbol(foo, Decl(autoLift2.ts, 9, 9)) [1, 2].forEach((p) => this.bar); ->[1, 2].forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) @@ -45,13 +26,9 @@ +>[1, 2].forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(forEach, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(autoLift2.ts, 17, 21)) -+>this.bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) >this : Symbol(A, Decl(autoLift2.ts, 0, 0)) -+>bar : Symbol(bar, Decl(autoLift2.ts, 11, 22)) - - } -@@= skipped -39, +51 lines =@@ +@@= skipped -22, +22 lines =@@ >A : Symbol(A, Decl(autoLift2.ts, 0, 0)) a.baz(); diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.types b/testdata/baselines/reference/submodule/compiler/autoLift2.types index 16ef2ac4a3..c27de71fcb 100644 --- a/testdata/baselines/reference/submodule/compiler/autoLift2.types +++ b/testdata/baselines/reference/submodule/compiler/autoLift2.types @@ -7,15 +7,15 @@ class A { constructor() { this.foo: any; ->this.foo : string +>this.foo : any >this : this ->foo : string +>foo : any >any : any this.bar: any; ->this.bar : string +>this.bar : any >this : this ->bar : string +>bar : any >any : any } @@ -25,16 +25,16 @@ class A this.foo = "foo"; >this.foo = "foo" : "foo" ->this.foo : string +>this.foo : any >this : this ->foo : string +>foo : any >"foo" : "foo" this.bar = "bar"; >this.bar = "bar" : "bar" ->this.bar : string +>this.bar : any >this : this ->bar : string +>bar : any >"bar" : "bar" [1, 2].forEach((p) => this.foo); @@ -44,11 +44,11 @@ class A >1 : 1 >2 : 2 >forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void ->(p) => this.foo : (p: number) => string +>(p) => this.foo : (p: number) => any >p : number ->this.foo : string +>this.foo : any >this : this ->foo : string +>foo : any [1, 2].forEach((p) => this.bar); >[1, 2].forEach((p) => this.bar) : void @@ -57,11 +57,11 @@ class A >1 : 1 >2 : 2 >forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void ->(p) => this.bar : (p: number) => string +>(p) => this.bar : (p: number) => any >p : number ->this.bar : string +>this.bar : any >this : this ->bar : string +>bar : any } diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.types.diff b/testdata/baselines/reference/submodule/compiler/autoLift2.types.diff deleted file mode 100644 index 02cd9b545e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/autoLift2.types.diff +++ /dev/null @@ -1,73 +0,0 @@ ---- old.autoLift2.types -+++ new.autoLift2.types -@@= skipped -6, +6 lines =@@ - { - constructor() { - this.foo: any; -->this.foo : any -+>this.foo : string - >this : this -->foo : any -+>foo : string - >any : any - - this.bar: any; -->this.bar : any -+>this.bar : string - >this : this -->bar : any -+>bar : string - >any : any - } - -@@= skipped -18, +18 lines =@@ - - this.foo = "foo"; - >this.foo = "foo" : "foo" -->this.foo : any -+>this.foo : string - >this : this -->foo : any -+>foo : string - >"foo" : "foo" - - this.bar = "bar"; - >this.bar = "bar" : "bar" -->this.bar : any -+>this.bar : string - >this : this -->bar : any -+>bar : string - >"bar" : "bar" - - [1, 2].forEach((p) => this.foo); -@@= skipped -19, +19 lines =@@ - >1 : 1 - >2 : 2 - >forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void -->(p) => this.foo : (p: number) => any -+>(p) => this.foo : (p: number) => string - >p : number -->this.foo : any -+>this.foo : string - >this : this -->foo : any -+>foo : string - - [1, 2].forEach((p) => this.bar); - >[1, 2].forEach((p) => this.bar) : void -@@= skipped -13, +13 lines =@@ - >1 : 1 - >2 : 2 - >forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void -->(p) => this.bar : (p: number) => any -+>(p) => this.bar : (p: number) => string - >p : number -->this.bar : any -+>this.bar : string - >this : this -->bar : any -+>bar : string - - } - diff --git a/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.types b/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.types index 6c05bcb8a5..2bb8613110 100644 --- a/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.types +++ b/testdata/baselines/reference/submodule/compiler/classFieldSuperNotAccessibleJs.types @@ -38,9 +38,9 @@ class YaddaBase { this.foo = 10 >this.foo = 10 : 10 ->this.foo : number +>this.foo : number | undefined >this : this ->foo : number +>foo : number | undefined >10 : 10 } } @@ -58,12 +58,12 @@ class DerivedYadda extends YaddaBase { >roots : string } get fooTests() { ->fooTests : number +>fooTests : number | undefined return super.foo; ->super.foo : number +>super.foo : number | undefined >super : YaddaBase ->foo : number +>foo : number | undefined } get justPropTests() { >justPropTests : any diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt index f231306080..ce074f663a 100644 --- a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt @@ -4,8 +4,15 @@ divergentAccessorsVisibility1.ts(20,17): error TS2808: A get accessor must be at divergentAccessorsVisibility1.ts(21,9): error TS2808: A get accessor must be at least as accessible as the setter divergentAccessorsVisibility1.ts(23,17): error TS2808: A get accessor must be at least as accessible as the setter divergentAccessorsVisibility1.ts(24,19): error TS2808: A get accessor must be at least as accessible as the setter -divergentAccessorsVisibility1.ts(62,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. - Property 'PrivatePublic' is private in type 'Base' but not in type 'Derived'. +divergentAccessorsVisibility1.ts(66,14): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(69,14): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(72,14): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(80,19): error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(81,19): error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(82,19): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(86,14): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(89,14): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(92,14): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. divergentAccessorsVisibility1.ts(99,10): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. divergentAccessorsVisibility1.ts(100,10): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. divergentAccessorsVisibility1.ts(102,10): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. @@ -24,9 +31,27 @@ divergentAccessorsVisibility1.ts(122,10): error TS2445: Property 'ProtectedProte divergentAccessorsVisibility1.ts(123,10): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. divergentAccessorsVisibility1.ts(125,10): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. divergentAccessorsVisibility1.ts(126,10): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(129,11): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. +divergentAccessorsVisibility1.ts(130,11): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(132,11): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. +divergentAccessorsVisibility1.ts(133,11): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(135,11): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. +divergentAccessorsVisibility1.ts(136,11): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(141,16): error TS2445: Property 'ProtectedPublic' is protected and only accessible within class 'Base' and its subclasses. +divergentAccessorsVisibility1.ts(142,16): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. +divergentAccessorsVisibility1.ts(143,16): error TS2445: Property 'ProtectedPrivate' is protected and only accessible within class 'Base' and its subclasses. +divergentAccessorsVisibility1.ts(144,16): error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(145,16): error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(146,16): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(149,11): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. +divergentAccessorsVisibility1.ts(150,11): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(152,11): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. +divergentAccessorsVisibility1.ts(153,11): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. +divergentAccessorsVisibility1.ts(155,11): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. +divergentAccessorsVisibility1.ts(156,11): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. -==== divergentAccessorsVisibility1.ts (25 errors) ==== +==== divergentAccessorsVisibility1.ts (51 errors) ==== class Base { get PublicPublic() { return 0; } set PublicPublic(v) { return; } @@ -101,19 +126,22 @@ divergentAccessorsVisibility1.ts(126,10): error TS2341: Property 'PrivatePrivate } class Derived extends Base { - ~~~~~~~ -!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. -!!! error TS2415: Property 'PrivatePublic' is private in type 'Base' but not in type 'Derived'. test2() { this.PublicPublic = 0; this.PublicProtected = 0; this.PublicPrivate = 0; + ~~~~~~~~~~~~~ +!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. this.ProtectedPublic = 0; this.ProtectedProtected = 0; this.ProtectedPrivate = 0; + ~~~~~~~~~~~~~~~~ +!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. this.PrivatePublic = 0; this.PrivateProtected = 0; this.PrivatePrivate = 0; + ~~~~~~~~~~~~~~ +!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. void this.PublicPublic; void this.PublicProtected; @@ -122,18 +150,30 @@ divergentAccessorsVisibility1.ts(126,10): error TS2341: Property 'PrivatePrivate void this.ProtectedProtected; void this.ProtectedPrivate; void this.PrivatePublic; + ~~~~~~~~~~~~~ +!!! error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. void this.PrivateProtected; + ~~~~~~~~~~~~~~~~ +!!! error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. void this.PrivatePrivate; + ~~~~~~~~~~~~~~ +!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. this.PublicPublic += 0; this.PublicProtected += 0; this.PublicPrivate += 0; + ~~~~~~~~~~~~~ +!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. this.ProtectedPublic += 0; this.ProtectedProtected += 0; this.ProtectedPrivate += 0; + ~~~~~~~~~~~~~~~~ +!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. this.PrivatePublic += 0; this.PrivateProtected += 0; this.PrivatePrivate += 0; + ~~~~~~~~~~~~~~ +!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. } } @@ -207,32 +247,68 @@ divergentAccessorsVisibility1.ts(126,10): error TS2341: Property 'PrivatePrivate deriv.PublicPublic = 0; deriv.PublicProtected = 0; + ~~~~~~~~~~~~~~~ +!!! error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.PublicPrivate = 0; + ~~~~~~~~~~~~~ +!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. deriv.ProtectedPublic = 0; deriv.ProtectedProtected = 0; + ~~~~~~~~~~~~~~~~~~ +!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.ProtectedPrivate = 0; + ~~~~~~~~~~~~~~~~ +!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. deriv.PrivatePublic = 0; deriv.PrivateProtected = 0; + ~~~~~~~~~~~~~~~~ +!!! error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.PrivatePrivate = 0; + ~~~~~~~~~~~~~~ +!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. void deriv.PublicPublic; void deriv.PublicProtected; void deriv.PublicPrivate; void deriv.ProtectedPublic; + ~~~~~~~~~~~~~~~ +!!! error TS2445: Property 'ProtectedPublic' is protected and only accessible within class 'Base' and its subclasses. void deriv.ProtectedProtected; + ~~~~~~~~~~~~~~~~~~ +!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. void deriv.ProtectedPrivate; + ~~~~~~~~~~~~~~~~ +!!! error TS2445: Property 'ProtectedPrivate' is protected and only accessible within class 'Base' and its subclasses. void deriv.PrivatePublic; + ~~~~~~~~~~~~~ +!!! error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. void deriv.PrivateProtected; + ~~~~~~~~~~~~~~~~ +!!! error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. void deriv.PrivatePrivate; + ~~~~~~~~~~~~~~ +!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. deriv.PublicPublic += 0; deriv.PublicProtected += 0; + ~~~~~~~~~~~~~~~ +!!! error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.PublicPrivate += 0; + ~~~~~~~~~~~~~ +!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. deriv.ProtectedPublic += 0; deriv.ProtectedProtected += 0; + ~~~~~~~~~~~~~~~~~~ +!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.ProtectedPrivate += 0; + ~~~~~~~~~~~~~~~~ +!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. deriv.PrivatePublic += 0; deriv.PrivateProtected += 0; + ~~~~~~~~~~~~~~~~ +!!! error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. deriv.PrivatePrivate += 0; + ~~~~~~~~~~~~~~ +!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt.diff deleted file mode 100644 index 2c1a674cb1..0000000000 --- a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.errors.txt.diff +++ /dev/null @@ -1,175 +0,0 @@ ---- old.divergentAccessorsVisibility1.errors.txt -+++ new.divergentAccessorsVisibility1.errors.txt -@@= skipped -3, +3 lines =@@ - divergentAccessorsVisibility1.ts(21,9): error TS2808: A get accessor must be at least as accessible as the setter - divergentAccessorsVisibility1.ts(23,17): error TS2808: A get accessor must be at least as accessible as the setter - divergentAccessorsVisibility1.ts(24,19): error TS2808: A get accessor must be at least as accessible as the setter --divergentAccessorsVisibility1.ts(66,14): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(69,14): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(72,14): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(80,19): error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(81,19): error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(82,19): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(86,14): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(89,14): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(92,14): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. -+divergentAccessorsVisibility1.ts(62,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. -+ Property 'PrivatePublic' is private in type 'Base' but not in type 'Derived'. - divergentAccessorsVisibility1.ts(99,10): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. - divergentAccessorsVisibility1.ts(100,10): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. - divergentAccessorsVisibility1.ts(102,10): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. -@@= skipped -27, +20 lines =@@ - divergentAccessorsVisibility1.ts(123,10): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. - divergentAccessorsVisibility1.ts(125,10): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. - divergentAccessorsVisibility1.ts(126,10): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(129,11): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. --divergentAccessorsVisibility1.ts(130,11): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(132,11): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. --divergentAccessorsVisibility1.ts(133,11): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(135,11): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. --divergentAccessorsVisibility1.ts(136,11): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(141,16): error TS2445: Property 'ProtectedPublic' is protected and only accessible within class 'Base' and its subclasses. --divergentAccessorsVisibility1.ts(142,16): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. --divergentAccessorsVisibility1.ts(143,16): error TS2445: Property 'ProtectedPrivate' is protected and only accessible within class 'Base' and its subclasses. --divergentAccessorsVisibility1.ts(144,16): error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(145,16): error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(146,16): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(149,11): error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. --divergentAccessorsVisibility1.ts(150,11): error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(152,11): error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. --divergentAccessorsVisibility1.ts(153,11): error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. --divergentAccessorsVisibility1.ts(155,11): error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. --divergentAccessorsVisibility1.ts(156,11): error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. - - --==== divergentAccessorsVisibility1.ts (51 errors) ==== -+==== divergentAccessorsVisibility1.ts (25 errors) ==== - class Base { - get PublicPublic() { return 0; } - set PublicPublic(v) { return; } -@@= skipped -95, +77 lines =@@ - } - - class Derived extends Base { -+ ~~~~~~~ -+!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. -+!!! error TS2415: Property 'PrivatePublic' is private in type 'Base' but not in type 'Derived'. - test2() { - this.PublicPublic = 0; - this.PublicProtected = 0; - this.PublicPrivate = 0; -- ~~~~~~~~~~~~~ --!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. - this.ProtectedPublic = 0; - this.ProtectedProtected = 0; - this.ProtectedPrivate = 0; -- ~~~~~~~~~~~~~~~~ --!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. - this.PrivatePublic = 0; - this.PrivateProtected = 0; - this.PrivatePrivate = 0; -- ~~~~~~~~~~~~~~ --!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. - - void this.PublicPublic; - void this.PublicProtected; -@@= skipped -24, +21 lines =@@ - void this.ProtectedProtected; - void this.ProtectedPrivate; - void this.PrivatePublic; -- ~~~~~~~~~~~~~ --!!! error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. - void this.PrivateProtected; -- ~~~~~~~~~~~~~~~~ --!!! error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. - void this.PrivatePrivate; -- ~~~~~~~~~~~~~~ --!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. - - this.PublicPublic += 0; - this.PublicProtected += 0; - this.PublicPrivate += 0; -- ~~~~~~~~~~~~~ --!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. - this.ProtectedPublic += 0; - this.ProtectedProtected += 0; - this.ProtectedPrivate += 0; -- ~~~~~~~~~~~~~~~~ --!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. - this.PrivatePublic += 0; - this.PrivateProtected += 0; - this.PrivatePrivate += 0; -- ~~~~~~~~~~~~~~ --!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. - } - } - -@@= skipped -97, +85 lines =@@ - - deriv.PublicPublic = 0; - deriv.PublicProtected = 0; -- ~~~~~~~~~~~~~~~ --!!! error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. - deriv.PublicPrivate = 0; -- ~~~~~~~~~~~~~ --!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. - deriv.ProtectedPublic = 0; - deriv.ProtectedProtected = 0; -- ~~~~~~~~~~~~~~~~~~ --!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. - deriv.ProtectedPrivate = 0; -- ~~~~~~~~~~~~~~~~ --!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. - deriv.PrivatePublic = 0; - deriv.PrivateProtected = 0; -- ~~~~~~~~~~~~~~~~ --!!! error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. - deriv.PrivatePrivate = 0; -- ~~~~~~~~~~~~~~ --!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. - - void deriv.PublicPublic; - void deriv.PublicProtected; - void deriv.PublicPrivate; - void deriv.ProtectedPublic; -- ~~~~~~~~~~~~~~~ --!!! error TS2445: Property 'ProtectedPublic' is protected and only accessible within class 'Base' and its subclasses. - void deriv.ProtectedProtected; -- ~~~~~~~~~~~~~~~~~~ --!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. - void deriv.ProtectedPrivate; -- ~~~~~~~~~~~~~~~~ --!!! error TS2445: Property 'ProtectedPrivate' is protected and only accessible within class 'Base' and its subclasses. - void deriv.PrivatePublic; -- ~~~~~~~~~~~~~ --!!! error TS2341: Property 'PrivatePublic' is private and only accessible within class 'Base'. - void deriv.PrivateProtected; -- ~~~~~~~~~~~~~~~~ --!!! error TS2341: Property 'PrivateProtected' is private and only accessible within class 'Base'. - void deriv.PrivatePrivate; -- ~~~~~~~~~~~~~~ --!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. - - deriv.PublicPublic += 0; - deriv.PublicProtected += 0; -- ~~~~~~~~~~~~~~~ --!!! error TS2445: Property 'PublicProtected' is protected and only accessible within class 'Base' and its subclasses. - deriv.PublicPrivate += 0; -- ~~~~~~~~~~~~~ --!!! error TS2341: Property 'PublicPrivate' is private and only accessible within class 'Base'. - deriv.ProtectedPublic += 0; - deriv.ProtectedProtected += 0; -- ~~~~~~~~~~~~~~~~~~ --!!! error TS2445: Property 'ProtectedProtected' is protected and only accessible within class 'Base' and its subclasses. - deriv.ProtectedPrivate += 0; -- ~~~~~~~~~~~~~~~~ --!!! error TS2341: Property 'ProtectedPrivate' is private and only accessible within class 'Base'. - deriv.PrivatePublic += 0; - deriv.PrivateProtected += 0; -- ~~~~~~~~~~~~~~~~ --!!! error TS2445: Property 'PrivateProtected' is protected and only accessible within class 'Base' and its subclasses. - deriv.PrivatePrivate += 0; -- ~~~~~~~~~~~~~~ --!!! error TS2341: Property 'PrivatePrivate' is private and only accessible within class 'Base'. - } - diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols index f31f0302a5..b4a002dad1 100644 --- a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols +++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols @@ -215,139 +215,139 @@ class Derived extends Base { >test2 : Symbol(test2, Decl(divergentAccessorsVisibility1.ts, 61, 28)) this.PublicPublic = 0; ->this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) this.PublicProtected = 0; ->this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) this.PublicPrivate = 0; ->this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) this.ProtectedPublic = 0; ->this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) this.ProtectedProtected = 0; ->this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) this.ProtectedPrivate = 0; ->this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) this.PrivatePublic = 0; ->this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) this.PrivateProtected = 0; ->this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) this.PrivatePrivate = 0; ->this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) void this.PublicPublic; ->this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) void this.PublicProtected; ->this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) void this.PublicPrivate; ->this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) void this.ProtectedPublic; ->this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) void this.ProtectedProtected; ->this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) void this.ProtectedPrivate; ->this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) void this.PrivatePublic; ->this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) void this.PrivateProtected; ->this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) void this.PrivatePrivate; ->this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) this.PublicPublic += 0; ->this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) this.PublicProtected += 0; ->this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) this.PublicPrivate += 0; ->this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) this.ProtectedPublic += 0; ->this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) this.ProtectedProtected += 0; ->this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) this.ProtectedPrivate += 0; ->this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) this.PrivatePublic += 0; ->this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) this.PrivateProtected += 0; ->this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) this.PrivatePrivate += 0; ->this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) } } @@ -496,138 +496,138 @@ function fn() { >PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) deriv.PublicPublic = 0; ->deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) deriv.PublicProtected = 0; ->deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) deriv.PublicPrivate = 0; ->deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) deriv.ProtectedPublic = 0; ->deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) deriv.ProtectedProtected = 0; ->deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) deriv.ProtectedPrivate = 0; ->deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) deriv.PrivatePublic = 0; ->deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) deriv.PrivateProtected = 0; ->deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) deriv.PrivatePrivate = 0; ->deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) void deriv.PublicPublic; ->deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) void deriv.PublicProtected; ->deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) void deriv.PublicPrivate; ->deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) void deriv.ProtectedPublic; ->deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) void deriv.ProtectedProtected; ->deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) void deriv.ProtectedPrivate; ->deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) void deriv.PrivatePublic; ->deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) void deriv.PrivateProtected; ->deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) void deriv.PrivatePrivate; ->deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) deriv.PublicPublic += 0; ->deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) +>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) deriv.PublicProtected += 0; ->deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) +>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) deriv.PublicPrivate += 0; ->deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) +>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) deriv.ProtectedPublic += 0; ->deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) +>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) deriv.ProtectedProtected += 0; ->deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) +>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) deriv.ProtectedPrivate += 0; ->deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) +>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) deriv.PrivatePublic += 0; ->deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) +>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) deriv.PrivateProtected += 0; ->deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) +>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) deriv.PrivatePrivate += 0; ->deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) +>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) } diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols.diff index b991efd092..731adea620 100644 --- a/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsVisibility1.symbols.diff @@ -288,192 +288,192 @@ this.PublicPublic = 0; ->this.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) this.PublicProtected = 0; ->this.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) this.PublicPrivate = 0; ->this.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) this.ProtectedPublic = 0; ->this.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) this.ProtectedProtected = 0; ->this.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) this.ProtectedPrivate = 0; ->this.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) this.PrivatePublic = 0; ->this.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) this.PrivateProtected = 0; ->this.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) this.PrivatePrivate = 0; ->this.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) void this.PublicPublic; ->this.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) void this.PublicProtected; ->this.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) void this.PublicPrivate; ->this.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) void this.ProtectedPublic; ->this.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) void this.ProtectedProtected; ->this.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) void this.ProtectedPrivate; ->this.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) void this.PrivatePublic; ->this.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) void this.PrivateProtected; ->this.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) void this.PrivatePrivate; ->this.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) this.PublicPublic += 0; ->this.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>this.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) this.PublicProtected += 0; ->this.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>this.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) this.PublicPrivate += 0; ->this.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>this.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) this.ProtectedPublic += 0; ->this.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>this.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) this.ProtectedProtected += 0; ->this.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>this.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) this.ProtectedPrivate += 0; ->this.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>this.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) this.PrivatePublic += 0; ->this.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>this.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) this.PrivateProtected += 0; ->this.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>this.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) this.PrivatePrivate += 0; ->this.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>this.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >this : Symbol(Derived, Decl(divergentAccessorsVisibility1.ts, 59, 1)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) } } @@ -671,191 +671,191 @@ deriv.PublicPublic = 0; ->deriv.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) deriv.PublicProtected = 0; ->deriv.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) deriv.PublicPrivate = 0; ->deriv.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) deriv.ProtectedPublic = 0; ->deriv.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) deriv.ProtectedProtected = 0; ->deriv.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) deriv.ProtectedPrivate = 0; ->deriv.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) deriv.PrivatePublic = 0; ->deriv.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) deriv.PrivateProtected = 0; ->deriv.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) deriv.PrivatePrivate = 0; ->deriv.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) void deriv.PublicPublic; ->deriv.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) void deriv.PublicProtected; ->deriv.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) void deriv.PublicPrivate; ->deriv.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) void deriv.ProtectedPublic; ->deriv.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) void deriv.ProtectedProtected; ->deriv.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) void deriv.ProtectedPrivate; ->deriv.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) void deriv.PrivatePublic; ->deriv.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) void deriv.PrivateProtected; ->deriv.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) void deriv.PrivatePrivate; ->deriv.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) deriv.PublicPublic += 0; ->deriv.PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>deriv.PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPublic : Symbol(Base.PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) -+>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 62, 13)) ++>PublicPublic : Symbol(PublicPublic, Decl(divergentAccessorsVisibility1.ts, 0, 12), Decl(divergentAccessorsVisibility1.ts, 1, 36)) deriv.PublicProtected += 0; ->deriv.PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>deriv.PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicProtected : Symbol(Base.PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) -+>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 63, 30)) ++>PublicProtected : Symbol(PublicProtected, Decl(divergentAccessorsVisibility1.ts, 2, 35), Decl(divergentAccessorsVisibility1.ts, 4, 39)) deriv.PublicPrivate += 0; ->deriv.PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>deriv.PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PublicPrivate : Symbol(Base.PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) -+>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 64, 33)) ++>PublicPrivate : Symbol(PublicPrivate, Decl(divergentAccessorsVisibility1.ts, 5, 48), Decl(divergentAccessorsVisibility1.ts, 7, 37)) deriv.ProtectedPublic += 0; ->deriv.ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>deriv.ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPublic : Symbol(Base.ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) -+>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 65, 31)) ++>ProtectedPublic : Symbol(ProtectedPublic, Decl(divergentAccessorsVisibility1.ts, 8, 44), Decl(divergentAccessorsVisibility1.ts, 10, 49)) deriv.ProtectedProtected += 0; ->deriv.ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>deriv.ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedProtected : Symbol(Base.ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) -+>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 66, 33)) ++>ProtectedProtected : Symbol(ProtectedProtected, Decl(divergentAccessorsVisibility1.ts, 11, 38), Decl(divergentAccessorsVisibility1.ts, 13, 52)) deriv.ProtectedPrivate += 0; ->deriv.ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>deriv.ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->ProtectedPrivate : Symbol(Base.ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) -+>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 67, 36)) ++>ProtectedPrivate : Symbol(ProtectedPrivate, Decl(divergentAccessorsVisibility1.ts, 14, 51), Decl(divergentAccessorsVisibility1.ts, 16, 50)) deriv.PrivatePublic += 0; ->deriv.PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>deriv.PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePublic : Symbol(Base.PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) -+>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 68, 34)) ++>PrivatePublic : Symbol(PrivatePublic, Decl(divergentAccessorsVisibility1.ts, 17, 47), Decl(divergentAccessorsVisibility1.ts, 19, 45)) deriv.PrivateProtected += 0; ->deriv.PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>deriv.PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivateProtected : Symbol(Base.PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) -+>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 69, 31)) ++>PrivateProtected : Symbol(PrivateProtected, Decl(divergentAccessorsVisibility1.ts, 20, 36), Decl(divergentAccessorsVisibility1.ts, 22, 48)) deriv.PrivatePrivate += 0; ->deriv.PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>deriv.PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) >deriv : Symbol(deriv, Decl(divergentAccessorsVisibility1.ts, 95, 25)) ->PrivatePrivate : Symbol(Base.PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) -+>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 70, 34)) ++>PrivatePrivate : Symbol(PrivatePrivate, Decl(divergentAccessorsVisibility1.ts, 23, 49), Decl(divergentAccessorsVisibility1.ts, 25, 46)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt new file mode 100644 index 0000000000..e87eeb37db --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt @@ -0,0 +1,25 @@ +es6DeclOrdering.ts(6,20): error TS2339: Property '_store' does not exist on type 'Bar'. +es6DeclOrdering.ts(11,13): error TS2339: Property '_store' does not exist on type 'Bar'. + + +==== es6DeclOrdering.ts (2 errors) ==== + class Bar { + + //public bar() { } + + public foo() { + return this._store.length; + ~~~~~~ +!!! error TS2339: Property '_store' does not exist on type 'Bar'. + + } + + constructor(store: string) { + this._store = store; // this is an error for some reason? Unresolved symbol store + ~~~~~~ +!!! error TS2339: Property '_store' does not exist on type 'Bar'. + + } + } + + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt.diff deleted file mode 100644 index ff2d7d1734..0000000000 --- a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.errors.txt.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- old.es6DeclOrdering.errors.txt -+++ new.es6DeclOrdering.errors.txt -@@= skipped -0, +-1 lines =@@ --es6DeclOrdering.ts(6,20): error TS2339: Property '_store' does not exist on type 'Bar'. --es6DeclOrdering.ts(11,13): error TS2339: Property '_store' does not exist on type 'Bar'. -- -- --==== es6DeclOrdering.ts (2 errors) ==== -- class Bar { -- -- //public bar() { } -- -- public foo() { -- return this._store.length; -- ~~~~~~ --!!! error TS2339: Property '_store' does not exist on type 'Bar'. -- -- } -- -- constructor(store: string) { -- this._store = store; // this is an error for some reason? Unresolved symbol store -- ~~~~~~ --!!! error TS2339: Property '_store' does not exist on type 'Bar'. -- -- } -- } -- -- -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols index 9a257175c0..1274d3aa85 100644 --- a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols @@ -10,11 +10,7 @@ class Bar { >foo : Symbol(foo, Decl(es6DeclOrdering.ts, 0, 11)) return this._store.length; ->this._store.length : Symbol(length, Decl(lib.es5.d.ts, --, --)) ->this._store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) >this : Symbol(Bar, Decl(es6DeclOrdering.ts, 0, 0)) ->_store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) ->length : Symbol(length, Decl(lib.es5.d.ts, --, --)) } @@ -22,9 +18,7 @@ class Bar { >store : Symbol(store, Decl(es6DeclOrdering.ts, 9, 15)) this._store = store; // this is an error for some reason? Unresolved symbol store ->this._store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) >this : Symbol(Bar, Decl(es6DeclOrdering.ts, 0, 0)) ->_store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) >store : Symbol(store, Decl(es6DeclOrdering.ts, 9, 15)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols.diff b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols.diff index fed37c0b18..e62340e68a 100644 --- a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.symbols.diff @@ -8,21 +8,4 @@ +>foo : Symbol(foo, Decl(es6DeclOrdering.ts, 0, 11)) return this._store.length; -+>this._store.length : Symbol(length, Decl(lib.es5.d.ts, --, --)) -+>this._store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) >this : Symbol(Bar, Decl(es6DeclOrdering.ts, 0, 0)) -+>_store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) -+>length : Symbol(length, Decl(lib.es5.d.ts, --, --)) - - } - -@@= skipped -11, +15 lines =@@ - >store : Symbol(store, Decl(es6DeclOrdering.ts, 9, 15)) - - this._store = store; // this is an error for some reason? Unresolved symbol store -+>this._store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) - >this : Symbol(Bar, Decl(es6DeclOrdering.ts, 0, 0)) -+>_store : Symbol(_store, Decl(es6DeclOrdering.ts, 9, 31)) - >store : Symbol(store, Decl(es6DeclOrdering.ts, 9, 15)) - - } diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types index 766fa55195..57a1384a8a 100644 --- a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types +++ b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types @@ -7,14 +7,14 @@ class Bar { //public bar() { } public foo() { ->foo : () => number +>foo : () => any return this._store.length; ->this._store.length : number ->this._store : string +>this._store.length : any +>this._store : any >this : this ->_store : string ->length : number +>_store : any +>length : any } @@ -23,9 +23,9 @@ class Bar { this._store = store; // this is an error for some reason? Unresolved symbol store >this._store = store : string ->this._store : string +>this._store : any >this : this ->_store : string +>_store : any >store : string } diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types.diff b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types.diff deleted file mode 100644 index a7947ca3e3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.types.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- old.es6DeclOrdering.types -+++ new.es6DeclOrdering.types -@@= skipped -6, +6 lines =@@ - //public bar() { } - - public foo() { -->foo : () => any -+>foo : () => number - - return this._store.length; -->this._store.length : any -->this._store : any -+>this._store.length : number -+>this._store : string - >this : this -->_store : any -->length : any -+>_store : string -+>length : number - - } - -@@= skipped -16, +16 lines =@@ - - this._store = store; // this is an error for some reason? Unresolved symbol store - >this._store = store : string -->this._store : any -+>this._store : string - >this : this -->_store : any -+>_store : string - >store : string - - } diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt deleted file mode 100644 index 46fcfea96d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt +++ /dev/null @@ -1,22 +0,0 @@ -inheritedConstructorPropertyContextualType.ts(7,7): error TS2415: Class 'Assignment' incorrectly extends base class 'Base'. - The types of 'state.version' are incompatible between these types. - Type 'number' is not assignable to type '2'. - - -==== inheritedConstructorPropertyContextualType.ts (1 errors) ==== - interface State { - version: 2 - } - declare class Base { - state: S - } - class Assignment extends Base { - ~~~~~~~~~~ -!!! error TS2415: Class 'Assignment' incorrectly extends base class 'Base'. -!!! error TS2415: The types of 'state.version' are incompatible between these types. -!!! error TS2415: Type 'number' is not assignable to type '2'. - constructor() { - super() - this.state = { version: 2 } - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt.diff deleted file mode 100644 index be4a414ab4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.errors.txt.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.inheritedConstructorPropertyContextualType.errors.txt -+++ new.inheritedConstructorPropertyContextualType.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+inheritedConstructorPropertyContextualType.ts(7,7): error TS2415: Class 'Assignment' incorrectly extends base class 'Base'. -+ The types of 'state.version' are incompatible between these types. -+ Type 'number' is not assignable to type '2'. -+ -+ -+==== inheritedConstructorPropertyContextualType.ts (1 errors) ==== -+ interface State { -+ version: 2 -+ } -+ declare class Base { -+ state: S -+ } -+ class Assignment extends Base { -+ ~~~~~~~~~~ -+!!! error TS2415: Class 'Assignment' incorrectly extends base class 'Base'. -+!!! error TS2415: The types of 'state.version' are incompatible between these types. -+!!! error TS2415: Type 'number' is not assignable to type '2'. -+ constructor() { -+ super() -+ this.state = { version: 2 } -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols index ca1d667450..bff5cb6112 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols @@ -25,9 +25,9 @@ class Assignment extends Base { >super : Symbol(Base, Decl(inheritedConstructorPropertyContextualType.ts, 2, 1)) this.state = { version: 2 } ->this.state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 8, 15)) +>this.state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) >this : Symbol(Assignment, Decl(inheritedConstructorPropertyContextualType.ts, 5, 1)) ->state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 8, 15)) +>state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) >version : Symbol(version, Decl(inheritedConstructorPropertyContextualType.ts, 9, 22)) } } diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols.diff b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols.diff index 224eac7a5f..36c8673f78 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.symbols.diff @@ -22,10 +22,10 @@ this.state = { version: 2 } ->this.state : Symbol(Base.state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) -+>this.state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 8, 15)) ++>this.state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) >this : Symbol(Assignment, Decl(inheritedConstructorPropertyContextualType.ts, 5, 1)) ->state : Symbol(Base.state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) -+>state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 8, 15)) ++>state : Symbol(state, Decl(inheritedConstructorPropertyContextualType.ts, 3, 23)) >version : Symbol(version, Decl(inheritedConstructorPropertyContextualType.ts, 9, 22)) } } diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types index 6e000e290c..a76235c7f2 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types @@ -21,12 +21,12 @@ class Assignment extends Base { >super : typeof Base this.state = { version: 2 } ->this.state = { version: 2 } : { version: number; } ->this.state : { version: number; } +>this.state = { version: 2 } : { version: 2; } +>this.state : State >this : this ->state : { version: number; } ->{ version: 2 } : { version: number; } ->version : number +>state : State +>{ version: 2 } : { version: 2; } +>version : 2 >2 : 2 } } diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types.diff b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types.diff deleted file mode 100644 index 9bad7c90af..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.inheritedConstructorPropertyContextualType.types -+++ new.inheritedConstructorPropertyContextualType.types -@@= skipped -20, +20 lines =@@ - >super : typeof Base - - this.state = { version: 2 } -->this.state = { version: 2 } : { version: 2; } -->this.state : State -+>this.state = { version: 2 } : { version: number; } -+>this.state : { version: number; } - >this : this -->state : State -->{ version: 2 } : { version: 2; } -->version : 2 -+>state : { version: number; } -+>{ version: 2 } : { version: number; } -+>version : number - >2 : 2 - } - } diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt b/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt index 6313e5e403..af49fe3be6 100644 --- a/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt @@ -1,8 +1,10 @@ propertyOrdering.ts(6,23): error TS2301: Initializer of instance member variable '_store' cannot reference identifier 'store' declared in the constructor. propertyOrdering.ts(9,34): error TS2551: Property 'store' does not exist on type 'Foo'. Did you mean '_store'? +propertyOrdering.ts(16,25): error TS2339: Property '_store' does not exist on type 'Bar'. +propertyOrdering.ts(20,14): error TS2339: Property '_store' does not exist on type 'Bar'. -==== propertyOrdering.ts (2 errors) ==== +==== propertyOrdering.ts (4 errors) ==== class Foo { constructor(store: string) { } public foo() { @@ -24,10 +26,14 @@ propertyOrdering.ts(9,34): error TS2551: Property 'store' does not exist on type public foo() { return this._store.length; // shouldn't be an error + ~~~~~~ +!!! error TS2339: Property '_store' does not exist on type 'Bar'. } constructor(store: string) { this._store = store; + ~~~~~~ +!!! error TS2339: Property '_store' does not exist on type 'Bar'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt.diff deleted file mode 100644 index 2bf48c6035..0000000000 --- a/testdata/baselines/reference/submodule/compiler/propertyOrdering.errors.txt.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- old.propertyOrdering.errors.txt -+++ new.propertyOrdering.errors.txt -@@= skipped -0, +0 lines =@@ - propertyOrdering.ts(6,23): error TS2301: Initializer of instance member variable '_store' cannot reference identifier 'store' declared in the constructor. - propertyOrdering.ts(9,34): error TS2551: Property 'store' does not exist on type 'Foo'. Did you mean '_store'? --propertyOrdering.ts(16,25): error TS2339: Property '_store' does not exist on type 'Bar'. --propertyOrdering.ts(20,14): error TS2339: Property '_store' does not exist on type 'Bar'. - - --==== propertyOrdering.ts (4 errors) ==== -+==== propertyOrdering.ts (2 errors) ==== - class Foo { - constructor(store: string) { } - public foo() { -@@= skipped -25, +23 lines =@@ - public foo() { - - return this._store.length; // shouldn't be an error -- ~~~~~~ --!!! error TS2339: Property '_store' does not exist on type 'Bar'. - - } - constructor(store: string) { - this._store = store; -- ~~~~~~ --!!! error TS2339: Property '_store' does not exist on type 'Bar'. - } - } - diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols b/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols index 8c8c7bde9b..9422e77318 100644 --- a/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols +++ b/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols @@ -32,20 +32,14 @@ class Bar { >foo : Symbol(foo, Decl(propertyOrdering.ts, 12, 11)) return this._store.length; // shouldn't be an error ->this._store.length : Symbol(length, Decl(lib.es5.d.ts, --, --)) ->this._store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) >this : Symbol(Bar, Decl(propertyOrdering.ts, 10, 1)) ->_store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) ->length : Symbol(length, Decl(lib.es5.d.ts, --, --)) } constructor(store: string) { >store : Symbol(store, Decl(propertyOrdering.ts, 18, 16)) this._store = store; ->this._store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) >this : Symbol(Bar, Decl(propertyOrdering.ts, 10, 1)) ->_store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) >store : Symbol(store, Decl(propertyOrdering.ts, 18, 16)) } } diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols.diff b/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols.diff index 4155aed8b2..0309e502b7 100644 --- a/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/propertyOrdering.symbols.diff @@ -33,20 +33,4 @@ +>foo : Symbol(foo, Decl(propertyOrdering.ts, 12, 11)) return this._store.length; // shouldn't be an error -+>this._store.length : Symbol(length, Decl(lib.es5.d.ts, --, --)) -+>this._store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) >this : Symbol(Bar, Decl(propertyOrdering.ts, 10, 1)) -+>_store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) -+>length : Symbol(length, Decl(lib.es5.d.ts, --, --)) - - } - constructor(store: string) { - >store : Symbol(store, Decl(propertyOrdering.ts, 18, 16)) - - this._store = store; -+>this._store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) - >this : Symbol(Bar, Decl(propertyOrdering.ts, 10, 1)) -+>_store : Symbol(_store, Decl(propertyOrdering.ts, 18, 32)) - >store : Symbol(store, Decl(propertyOrdering.ts, 18, 16)) - } - } diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.types b/testdata/baselines/reference/submodule/compiler/propertyOrdering.types index 7a3735fc99..bfeea1ec81 100644 --- a/testdata/baselines/reference/submodule/compiler/propertyOrdering.types +++ b/testdata/baselines/reference/submodule/compiler/propertyOrdering.types @@ -34,14 +34,14 @@ class Bar { >Bar : Bar public foo() { ->foo : () => number +>foo : () => any return this._store.length; // shouldn't be an error ->this._store.length : number ->this._store : string +>this._store.length : any +>this._store : any >this : this ->_store : string ->length : number +>_store : any +>length : any } constructor(store: string) { @@ -49,9 +49,9 @@ class Bar { this._store = store; >this._store = store : string ->this._store : string +>this._store : any >this : this ->_store : string +>_store : any >store : string } } diff --git a/testdata/baselines/reference/submodule/compiler/propertyOrdering.types.diff b/testdata/baselines/reference/submodule/compiler/propertyOrdering.types.diff deleted file mode 100644 index 09e3305474..0000000000 --- a/testdata/baselines/reference/submodule/compiler/propertyOrdering.types.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- old.propertyOrdering.types -+++ new.propertyOrdering.types -@@= skipped -33, +33 lines =@@ - >Bar : Bar - - public foo() { -->foo : () => any -+>foo : () => number - - return this._store.length; // shouldn't be an error -->this._store.length : any -->this._store : any -+>this._store.length : number -+>this._store : string - >this : this -->_store : any -->length : any -+>_store : string -+>length : number - - } - constructor(store: string) { -@@= skipped -15, +15 lines =@@ - - this._store = store; - >this._store = store : string -->this._store : any -+>this._store : string - >this : this -->_store : any -+>_store : string - >store : string - } - } diff --git a/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols b/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols index 219d1f0af3..376b9ea6df 100644 --- a/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols +++ b/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols @@ -7,6 +7,5 @@ class X { constructor() { this['__proto__'] = null; // used to cause ICE >this : Symbol(X, Decl(protoInIndexer.ts, 0, 0)) ->'__proto__' : Symbol(__proto__, Decl(protoInIndexer.ts, 1, 19)) } } diff --git a/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols.diff b/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols.diff deleted file mode 100644 index 7a258511d9..0000000000 --- a/testdata/baselines/reference/submodule/compiler/protoInIndexer.symbols.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- old.protoInIndexer.symbols -+++ new.protoInIndexer.symbols -@@= skipped -6, +6 lines =@@ - constructor() { - this['__proto__'] = null; // used to cause ICE - >this : Symbol(X, Decl(protoInIndexer.ts, 0, 0)) -+>'__proto__' : Symbol(__proto__, Decl(protoInIndexer.ts, 1, 19)) - } - } diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt new file mode 100644 index 0000000000..ece87dc999 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt @@ -0,0 +1,13 @@ +readonlyAssignmentInSubclassOfClassExpression.ts(4,14): error TS2540: Cannot assign to 'attrib' because it is a read-only property. + + +==== readonlyAssignmentInSubclassOfClassExpression.ts (1 errors) ==== + class C extends (class {} as new () => Readonly<{ attrib: number }>) { + constructor() { + super() + this.attrib = 2 + ~~~~~~ +!!! error TS2540: Cannot assign to 'attrib' because it is a read-only property. + } + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt.diff deleted file mode 100644 index b10e43db02..0000000000 --- a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.readonlyAssignmentInSubclassOfClassExpression.errors.txt -+++ new.readonlyAssignmentInSubclassOfClassExpression.errors.txt -@@= skipped -0, +-1 lines =@@ --readonlyAssignmentInSubclassOfClassExpression.ts(4,14): error TS2540: Cannot assign to 'attrib' because it is a read-only property. -- -- --==== readonlyAssignmentInSubclassOfClassExpression.ts (1 errors) ==== -- class C extends (class {} as new () => Readonly<{ attrib: number }>) { -- constructor() { -- super() -- this.attrib = 2 -- ~~~~~~ --!!! error TS2540: Cannot assign to 'attrib' because it is a read-only property. -- } -- } -- -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols index 0dbdd091e1..a0ee4d5686 100644 --- a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols +++ b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols @@ -11,9 +11,9 @@ class C extends (class {} as new () => Readonly<{ attrib: number }>) { >super : Symbol((Anonymous type), Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 28)) this.attrib = 2 ->this.attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 2, 15)) +>this.attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 49)) >this : Symbol(C, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 0)) ->attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 2, 15)) +>attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 49)) } } diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols.diff b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols.diff index 61cdf8abbb..9c341797a2 100644 --- a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.symbols.diff @@ -8,11 +8,4 @@ +>super : Symbol((Anonymous type), Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 28)) this.attrib = 2 -->this.attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 49)) -+>this.attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 2, 15)) - >this : Symbol(C, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 0)) -->attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 49)) -+>attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 2, 15)) - } - } - + >this.attrib : Symbol(attrib, Decl(readonlyAssignmentInSubclassOfClassExpression.ts, 0, 49)) diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types index 4d2b000c26..d17d413d3b 100644 --- a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types +++ b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types @@ -15,9 +15,9 @@ class C extends (class {} as new () => Readonly<{ attrib: number }>) { this.attrib = 2 >this.attrib = 2 : 2 ->this.attrib : number +>this.attrib : any >this : this ->attrib : number +>attrib : any >2 : 2 } } diff --git a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types.diff b/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types.diff deleted file mode 100644 index d2c7a428c5..0000000000 --- a/testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.types.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.readonlyAssignmentInSubclassOfClassExpression.types -+++ new.readonlyAssignmentInSubclassOfClassExpression.types -@@= skipped -14, +14 lines =@@ - - this.attrib = 2 - >this.attrib = 2 : 2 -->this.attrib : any -+>this.attrib : number - >this : this -->attrib : any -+>attrib : number - >2 : 2 - } - } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols index 443796de78..befe1abcb8 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols @@ -16,9 +16,9 @@ class D extends C { v = 1; this.p = 1; ->this.p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 3, 12)) +>this.p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) >this : Symbol(D, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 42)) ->p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 3, 12)) +>p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) s = 1; } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols.diff index b21f7a6231..26f1f96c28 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.symbols.diff @@ -22,10 +22,10 @@ v = 1; this.p = 1; ->this.p : Symbol(C.p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) -+>this.p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 3, 12)) ++>this.p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) >this : Symbol(D, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 42)) ->p : Symbol(C.p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) -+>p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 3, 12)) ++>p : Symbol(p, Decl(scopeCheckExtendedClassInsidePublicMethod2.ts, 0, 20)) s = 1; } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types index a4f81a8132..6578619fba 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types @@ -21,9 +21,9 @@ class D extends C { this.p = 1; >this.p = 1 : 1 ->this.p : number +>this.p : any >this : this ->p : number +>p : any >1 : 1 s = 1; diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types.diff deleted file mode 100644 index 6fcf57deb0..0000000000 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsidePublicMethod2.types.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.scopeCheckExtendedClassInsidePublicMethod2.types -+++ new.scopeCheckExtendedClassInsidePublicMethod2.types -@@= skipped -20, +20 lines =@@ - - this.p = 1; - >this.p = 1 : 1 -->this.p : any -+>this.p : number - >this : this -->p : any -+>p : number - >1 : 1 - - s = 1; diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt index 3bec1ec139..3db23f9143 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt @@ -1,8 +1,9 @@ scopeCheckExtendedClassInsideStaticMethod1.ts(4,7): error TS2304: Cannot find name 'v'. +scopeCheckExtendedClassInsideStaticMethod1.ts(5,12): error TS2339: Property 'p' does not exist on type 'typeof D'. scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? -==== scopeCheckExtendedClassInsideStaticMethod1.ts (2 errors) ==== +==== scopeCheckExtendedClassInsideStaticMethod1.ts (3 errors) ==== class C { private v; public p; static s; } class D extends C { static c() { @@ -10,6 +11,8 @@ scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error TS2662: Cannot find na ~ !!! error TS2304: Cannot find name 'v'. this.p = 1; + ~ +!!! error TS2339: Property 'p' does not exist on type 'typeof D'. s = 1; ~ !!! error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt.diff deleted file mode 100644 index 75e3573376..0000000000 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.scopeCheckExtendedClassInsideStaticMethod1.errors.txt -+++ new.scopeCheckExtendedClassInsideStaticMethod1.errors.txt -@@= skipped -0, +0 lines =@@ - scopeCheckExtendedClassInsideStaticMethod1.ts(4,7): error TS2304: Cannot find name 'v'. --scopeCheckExtendedClassInsideStaticMethod1.ts(5,12): error TS2339: Property 'p' does not exist on type 'typeof D'. - scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? - - --==== scopeCheckExtendedClassInsideStaticMethod1.ts (3 errors) ==== -+==== scopeCheckExtendedClassInsideStaticMethod1.ts (2 errors) ==== - class C { private v; public p; static s; } - class D extends C { - static c() { -@@= skipped -10, +9 lines =@@ - ~ - !!! error TS2304: Cannot find name 'v'. - this.p = 1; -- ~ --!!! error TS2339: Property 'p' does not exist on type 'typeof D'. - s = 1; - ~ - !!! error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols index 98dcfd4906..08bcededef 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols @@ -16,9 +16,7 @@ class D extends C { v = 1; this.p = 1; ->this.p : Symbol(p, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 3, 12)) >this : Symbol(D, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 0, 42)) ->p : Symbol(p, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 3, 12)) s = 1; } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols.diff index e100b26e3b..a728125224 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.symbols.diff @@ -21,9 +21,3 @@ v = 1; this.p = 1; -+>this.p : Symbol(p, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 3, 12)) - >this : Symbol(D, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 0, 42)) -+>p : Symbol(p, Decl(scopeCheckExtendedClassInsideStaticMethod1.ts, 3, 12)) - - s = 1; - } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types index 83b8d9a6af..36f5abfc19 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types @@ -21,9 +21,9 @@ class D extends C { this.p = 1; >this.p = 1 : 1 ->this.p : number +>this.p : any >this : typeof D ->p : number +>p : any >1 : 1 s = 1; diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types.diff deleted file mode 100644 index c06890b994..0000000000 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckExtendedClassInsideStaticMethod1.types.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.scopeCheckExtendedClassInsideStaticMethod1.types -+++ new.scopeCheckExtendedClassInsideStaticMethod1.types -@@= skipped -20, +20 lines =@@ - - this.p = 1; - >this.p = 1 : 1 -->this.p : any -+>this.p : number - >this : typeof D -->p : any -+>p : number - >1 : 1 - - s = 1; diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt index 794c40f895..1a8297dc3b 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt @@ -1,7 +1,8 @@ scopeCheckInsideStaticMethod1.ts(6,7): error TS2304: Cannot find name 'v'. +scopeCheckInsideStaticMethod1.ts(8,12): error TS2339: Property 'p' does not exist on type 'typeof C'. -==== scopeCheckInsideStaticMethod1.ts (1 errors) ==== +==== scopeCheckInsideStaticMethod1.ts (2 errors) ==== class C { private v; public p; @@ -12,5 +13,7 @@ scopeCheckInsideStaticMethod1.ts(6,7): error TS2304: Cannot find name 'v'. !!! error TS2304: Cannot find name 'v'. C.s = 1; this.p = 1; // ERR + ~ +!!! error TS2339: Property 'p' does not exist on type 'typeof C'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt.diff deleted file mode 100644 index 93aa9f22d0..0000000000 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.scopeCheckInsideStaticMethod1.errors.txt -+++ new.scopeCheckInsideStaticMethod1.errors.txt -@@= skipped -0, +0 lines =@@ - scopeCheckInsideStaticMethod1.ts(6,7): error TS2304: Cannot find name 'v'. --scopeCheckInsideStaticMethod1.ts(8,12): error TS2339: Property 'p' does not exist on type 'typeof C'. - - --==== scopeCheckInsideStaticMethod1.ts (2 errors) ==== -+==== scopeCheckInsideStaticMethod1.ts (1 errors) ==== - class C { - private v; - public p; -@@= skipped -12, +11 lines =@@ - !!! error TS2304: Cannot find name 'v'. - C.s = 1; - this.p = 1; // ERR -- ~ --!!! error TS2339: Property 'p' does not exist on type 'typeof C'. - } - } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols index 976a6f22be..3ab9c0f4cc 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols @@ -23,8 +23,6 @@ class C { >s : Symbol(s, Decl(scopeCheckInsideStaticMethod1.ts, 2, 12)) this.p = 1; // ERR ->this.p : Symbol(p, Decl(scopeCheckInsideStaticMethod1.ts, 6, 14)) >this : Symbol(C, Decl(scopeCheckInsideStaticMethod1.ts, 0, 0)) ->p : Symbol(p, Decl(scopeCheckInsideStaticMethod1.ts, 6, 14)) } } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols.diff index 522879604c..7dff4e17a6 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.symbols.diff @@ -28,8 +28,4 @@ +>s : Symbol(s, Decl(scopeCheckInsideStaticMethod1.ts, 2, 12)) this.p = 1; // ERR -+>this.p : Symbol(p, Decl(scopeCheckInsideStaticMethod1.ts, 6, 14)) >this : Symbol(C, Decl(scopeCheckInsideStaticMethod1.ts, 0, 0)) -+>p : Symbol(p, Decl(scopeCheckInsideStaticMethod1.ts, 6, 14)) - } - } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types index 9d26bfbfb8..90e3674361 100644 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types +++ b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types @@ -30,9 +30,9 @@ class C { this.p = 1; // ERR >this.p = 1 : 1 ->this.p : number +>this.p : any >this : typeof C ->p : number +>p : any >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types.diff b/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types.diff deleted file mode 100644 index 4e6e7ead92..0000000000 --- a/testdata/baselines/reference/submodule/compiler/scopeCheckInsideStaticMethod1.types.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.scopeCheckInsideStaticMethod1.types -+++ new.scopeCheckInsideStaticMethod1.types -@@= skipped -29, +29 lines =@@ - - this.p = 1; // ERR - >this.p = 1 : 1 -->this.p : any -+>this.p : number - >this : typeof C -->p : any -+>p : number - >1 : 1 - } - } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt b/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt index 423f23bbc9..df048098a2 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt @@ -1,10 +1,11 @@ staticVisibility.ts(9,9): error TS2662: Cannot find name 's'. Did you mean the static member 'C1.s'? staticVisibility.ts(12,9): error TS2662: Cannot find name 'b'. Did you mean the static member 'C1.b'? staticVisibility.ts(17,9): error TS2304: Cannot find name 'v'. +staticVisibility.ts(18,14): error TS2339: Property 'p' does not exist on type 'typeof C1'. staticVisibility.ts(32,29): error TS2304: Cannot find name 'barback'. -==== staticVisibility.ts (4 errors) ==== +==== staticVisibility.ts (5 errors) ==== class C1 { p: any; @@ -29,6 +30,8 @@ staticVisibility.ts(32,29): error TS2304: Cannot find name 'barback'. ~ !!! error TS2304: Cannot find name 'v'. this.p = 0; // should be error + ~ +!!! error TS2339: Property 'p' does not exist on type 'typeof C1'. C1.s = 1; // should be ok } } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt.diff deleted file mode 100644 index 55120768bc..0000000000 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility.errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.staticVisibility.errors.txt -+++ new.staticVisibility.errors.txt -@@= skipped -0, +0 lines =@@ - staticVisibility.ts(9,9): error TS2662: Cannot find name 's'. Did you mean the static member 'C1.s'? - staticVisibility.ts(12,9): error TS2662: Cannot find name 'b'. Did you mean the static member 'C1.b'? - staticVisibility.ts(17,9): error TS2304: Cannot find name 'v'. --staticVisibility.ts(18,14): error TS2339: Property 'p' does not exist on type 'typeof C1'. - staticVisibility.ts(32,29): error TS2304: Cannot find name 'barback'. - - --==== staticVisibility.ts (5 errors) ==== -+==== staticVisibility.ts (4 errors) ==== - class C1 { - - p: any; -@@= skipped -29, +28 lines =@@ - ~ - !!! error TS2304: Cannot find name 'v'. - this.p = 0; // should be error -- ~ --!!! error TS2339: Property 'p' does not exist on type 'typeof C1'. - C1.s = 1; // should be ok - } - } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols b/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols index 59e2964be7..25292d35f4 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols @@ -32,9 +32,7 @@ class C1 { v = 1; // should be error this.p = 0; // should be error ->this.p : Symbol(p, Decl(staticVisibility.ts, 16, 14)) >this : Symbol(C1, Decl(staticVisibility.ts, 0, 0)) ->p : Symbol(p, Decl(staticVisibility.ts, 16, 14)) C1.s = 1; // should be ok >C1.s : Symbol(s, Decl(staticVisibility.ts, 2, 11)) diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols.diff index 3c540baff1..c1ec242d18 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility.symbols.diff @@ -38,9 +38,7 @@ v = 1; // should be error this.p = 0; // should be error -+>this.p : Symbol(p, Decl(staticVisibility.ts, 16, 14)) >this : Symbol(C1, Decl(staticVisibility.ts, 0, 0)) -+>p : Symbol(p, Decl(staticVisibility.ts, 16, 14)) C1.s = 1; // should be ok ->C1.s : Symbol(C1.s, Decl(staticVisibility.ts, 2, 11)) @@ -51,7 +49,7 @@ } } -@@= skipped -29, +31 lines =@@ +@@= skipped -29, +29 lines =@@ >C2 : Symbol(C2, Decl(staticVisibility.ts, 20, 1)) barback:string = ""; diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.types b/testdata/baselines/reference/submodule/compiler/staticVisibility.types index 00897f3b48..7d82e93bc7 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility.types +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility.types @@ -48,9 +48,9 @@ class C1 { this.p = 0; // should be error >this.p = 0 : 0 ->this.p : number +>this.p : any >this : typeof C1 ->p : number +>p : any >0 : 0 C1.s = 1; // should be ok diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility.types.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility.types.diff deleted file mode 100644 index e8bd5325db..0000000000 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility.types.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.staticVisibility.types -+++ new.staticVisibility.types -@@= skipped -47, +47 lines =@@ - - this.p = 0; // should be error - >this.p = 0 : 0 -->this.p : any -+>this.p : number - >this : typeof C1 -->p : any -+>p : number - >0 : 0 - - C1.s = 1; // should be ok diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt b/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt index bd2cf43d98..76c3866179 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt @@ -1,12 +1,15 @@ staticVisibility2.ts(2,12): error TS7008: Member 'sideLength' implicitly has an 'any' type. +staticVisibility2.ts(4,14): error TS2576: Property 'sideLength' does not exist on type 'Square'. Did you mean to access the static member 'Square.sideLength' instead? -==== staticVisibility2.ts (1 errors) ==== +==== staticVisibility2.ts (2 errors) ==== class Square { static sideLength; ~~~~~~~~~~ !!! error TS7008: Member 'sideLength' implicitly has an 'any' type. constructor(sideLength: number) { this.sideLength = sideLength; + ~~~~~~~~~~ +!!! error TS2576: Property 'sideLength' does not exist on type 'Square'. Did you mean to access the static member 'Square.sideLength' instead? } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt.diff deleted file mode 100644 index 725fd3363d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility2.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.staticVisibility2.errors.txt -+++ new.staticVisibility2.errors.txt -@@= skipped -0, +0 lines =@@ - staticVisibility2.ts(2,12): error TS7008: Member 'sideLength' implicitly has an 'any' type. --staticVisibility2.ts(4,14): error TS2576: Property 'sideLength' does not exist on type 'Square'. Did you mean to access the static member 'Square.sideLength' instead? - - --==== staticVisibility2.ts (2 errors) ==== -+==== staticVisibility2.ts (1 errors) ==== - class Square { - static sideLength; - ~~~~~~~~~~ - !!! error TS7008: Member 'sideLength' implicitly has an 'any' type. - constructor(sideLength: number) { - this.sideLength = sideLength; -- ~~~~~~~~~~ --!!! error TS2576: Property 'sideLength' does not exist on type 'Square'. Did you mean to access the static member 'Square.sideLength' instead? - } - } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols b/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols index 7273b9df56..ed9aebe5ee 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols @@ -11,9 +11,7 @@ class Square { >sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 16)) this.sideLength = sideLength; ->this.sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 37)) >this : Symbol(Square, Decl(staticVisibility2.ts, 0, 0)) ->sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 37)) >sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 16)) } } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols.diff index 540967ccfd..22415975fb 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility2.symbols.diff @@ -9,11 +9,3 @@ constructor(sideLength: number) { >sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 16)) - - this.sideLength = sideLength; -+>this.sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 37)) - >this : Symbol(Square, Decl(staticVisibility2.ts, 0, 0)) -+>sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 37)) - >sideLength : Symbol(sideLength, Decl(staticVisibility2.ts, 2, 16)) - } - } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.types b/testdata/baselines/reference/submodule/compiler/staticVisibility2.types index 57030dc87b..b26a196254 100644 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility2.types +++ b/testdata/baselines/reference/submodule/compiler/staticVisibility2.types @@ -12,9 +12,9 @@ class Square { this.sideLength = sideLength; >this.sideLength = sideLength : number ->this.sideLength : number +>this.sideLength : any >this : this ->sideLength : number +>sideLength : any >sideLength : number } } diff --git a/testdata/baselines/reference/submodule/compiler/staticVisibility2.types.diff b/testdata/baselines/reference/submodule/compiler/staticVisibility2.types.diff deleted file mode 100644 index 1d4ca5a4fb..0000000000 --- a/testdata/baselines/reference/submodule/compiler/staticVisibility2.types.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.staticVisibility2.types -+++ new.staticVisibility2.types -@@= skipped -11, +11 lines =@@ - - this.sideLength = sideLength; - >this.sideLength = sideLength : number -->this.sideLength : any -+>this.sideLength : number - >this : this -->sideLength : any - >sideLength : number -+>sideLength : number - } - } diff --git a/testdata/baselines/reference/submodule/compiler/statics.errors.txt b/testdata/baselines/reference/submodule/compiler/statics.errors.txt new file mode 100644 index 0000000000..e4b8e90349 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/statics.errors.txt @@ -0,0 +1,40 @@ +statics.ts(6,18): error TS2339: Property 'g' does not exist on type 'C'. +statics.ts(23,33): error TS2339: Property 'g' does not exist on type 'C'. + + +==== statics.ts (2 errors) ==== + module M { + export class C { + x: number; + constructor(public c1: number, public c2: number, c3: number) { + this.x = C.y+this.c1+this.c2+c3; + this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub); + ~ +!!! error TS2339: Property 'g' does not exist on type 'C'. + } + + static priv=2; + static pub=3; + static y=C.priv; + static f(n:number) { + return "wow: "+(n+C.y+C.pub+C.priv); + + } + } + var c=C.y; + export function f() { + var result=""; + result+=(c); + result+=(new C(0,1,2).x); + result+=(C.f(10)); + result+=(new C(5,10,20).g(C.y)); + ~ +!!! error TS2339: Property 'g' does not exist on type 'C'. + return result; + } + } + + M.f(); + + + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/statics.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/statics.errors.txt.diff deleted file mode 100644 index 7be67a6480..0000000000 --- a/testdata/baselines/reference/submodule/compiler/statics.errors.txt.diff +++ /dev/null @@ -1,45 +0,0 @@ ---- old.statics.errors.txt -+++ new.statics.errors.txt -@@= skipped -0, +-1 lines =@@ --statics.ts(6,18): error TS2339: Property 'g' does not exist on type 'C'. --statics.ts(23,33): error TS2339: Property 'g' does not exist on type 'C'. -- -- --==== statics.ts (2 errors) ==== -- module M { -- export class C { -- x: number; -- constructor(public c1: number, public c2: number, c3: number) { -- this.x = C.y+this.c1+this.c2+c3; -- this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub); -- ~ --!!! error TS2339: Property 'g' does not exist on type 'C'. -- } -- -- static priv=2; -- static pub=3; -- static y=C.priv; -- static f(n:number) { -- return "wow: "+(n+C.y+C.pub+C.priv); -- -- } -- } -- var c=C.y; -- export function f() { -- var result=""; -- result+=(c); -- result+=(new C(0,1,2).x); -- result+=(C.f(10)); -- result+=(new C(5,10,20).g(C.y)); -- ~ --!!! error TS2339: Property 'g' does not exist on type 'C'. -- return result; -- } -- } -- -- M.f(); -- -- -- -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/compiler/statics.symbols b/testdata/baselines/reference/submodule/compiler/statics.symbols index cd68335214..79b105b579 100644 --- a/testdata/baselines/reference/submodule/compiler/statics.symbols +++ b/testdata/baselines/reference/submodule/compiler/statics.symbols @@ -31,9 +31,7 @@ module M { >c3 : Symbol(c3, Decl(statics.ts, 3, 57)) this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub); ->this.g : Symbol(g, Decl(statics.ts, 4, 44)) >this : Symbol(C, Decl(statics.ts, 0, 10)) ->g : Symbol(g, Decl(statics.ts, 4, 44)) >v : Symbol(v, Decl(statics.ts, 5, 22)) >C.f : Symbol(f, Decl(statics.ts, 10, 24)) >C : Symbol(C, Decl(statics.ts, 0, 10)) @@ -116,9 +114,7 @@ module M { result+=(new C(5,10,20).g(C.y)); >result : Symbol(result, Decl(statics.ts, 18, 11)) ->new C(5,10,20).g : Symbol(g, Decl(statics.ts, 4, 44)) >C : Symbol(C, Decl(statics.ts, 0, 10)) ->g : Symbol(g, Decl(statics.ts, 4, 44)) >C.y : Symbol(y, Decl(statics.ts, 9, 21)) >C : Symbol(C, Decl(statics.ts, 0, 10)) >y : Symbol(y, Decl(statics.ts, 9, 21)) diff --git a/testdata/baselines/reference/submodule/compiler/statics.symbols.diff b/testdata/baselines/reference/submodule/compiler/statics.symbols.diff index e37e223cb3..9a92bbc1e6 100644 --- a/testdata/baselines/reference/submodule/compiler/statics.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/statics.symbols.diff @@ -38,9 +38,7 @@ >c3 : Symbol(c3, Decl(statics.ts, 3, 57)) this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub); -+>this.g : Symbol(g, Decl(statics.ts, 4, 44)) >this : Symbol(C, Decl(statics.ts, 0, 10)) -+>g : Symbol(g, Decl(statics.ts, 4, 44)) >v : Symbol(v, Decl(statics.ts, 5, 22)) ->C.f : Symbol(C.f, Decl(statics.ts, 10, 24)) +>C.f : Symbol(f, Decl(statics.ts, 10, 24)) @@ -127,7 +125,7 @@ export function f() { >f : Symbol(f, Decl(statics.ts, 16, 14)) -@@= skipped -94, +96 lines =@@ +@@= skipped -94, +94 lines =@@ result+=(new C(0,1,2).x); >result : Symbol(result, Decl(statics.ts, 18, 11)) @@ -147,10 +145,8 @@ result+=(new C(5,10,20).g(C.y)); >result : Symbol(result, Decl(statics.ts, 18, 11)) -+>new C(5,10,20).g : Symbol(g, Decl(statics.ts, 4, 44)) >C : Symbol(C, Decl(statics.ts, 0, 10)) ->C.y : Symbol(C.y, Decl(statics.ts, 9, 21)) -+>g : Symbol(g, Decl(statics.ts, 4, 44)) +>C.y : Symbol(y, Decl(statics.ts, 9, 21)) >C : Symbol(C, Decl(statics.ts, 0, 10)) ->y : Symbol(C.y, Decl(statics.ts, 9, 21)) @@ -158,7 +154,7 @@ return result; >result : Symbol(result, Decl(statics.ts, 18, 11)) -@@= skipped -23, +25 lines =@@ +@@= skipped -23, +23 lines =@@ } M.f(); diff --git a/testdata/baselines/reference/submodule/compiler/statics.types b/testdata/baselines/reference/submodule/compiler/statics.types index a00cbfd88f..1889beba65 100644 --- a/testdata/baselines/reference/submodule/compiler/statics.types +++ b/testdata/baselines/reference/submodule/compiler/statics.types @@ -36,9 +36,9 @@ module M { 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 : (v: number) => string +>this.g : any >this : this ->g : (v: number) => string +>g : any >(v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub) : (v: number) => string >v : number >C.f(this.x+C.y+v+this.c1+this.c2+C.pub) : string @@ -150,15 +150,15 @@ module M { result+=(new C(5,10,20).g(C.y)); >result+=(new C(5,10,20).g(C.y)) : string >result : string ->(new C(5,10,20).g(C.y)) : string ->new C(5,10,20).g(C.y) : string ->new C(5,10,20).g : (v: number) => string +>(new C(5,10,20).g(C.y)) : any +>new C(5,10,20).g(C.y) : any +>new C(5,10,20).g : any >new C(5,10,20) : C >C : typeof C >5 : 5 >10 : 10 >20 : 20 ->g : (v: number) => string +>g : any >C.y : number >C : typeof C >y : number diff --git a/testdata/baselines/reference/submodule/compiler/statics.types.diff b/testdata/baselines/reference/submodule/compiler/statics.types.diff deleted file mode 100644 index 689692b608..0000000000 --- a/testdata/baselines/reference/submodule/compiler/statics.types.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- old.statics.types -+++ new.statics.types -@@= skipped -35, +35 lines =@@ - - 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.g : (v: number) => string - >this : this -->g : any -+>g : (v: number) => string - >(v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub) : (v: number) => string - >v : number - >C.f(this.x+C.y+v+this.c1+this.c2+C.pub) : string -@@= skipped -114, +114 lines =@@ - result+=(new C(5,10,20).g(C.y)); - >result+=(new C(5,10,20).g(C.y)) : string - >result : string -->(new C(5,10,20).g(C.y)) : any -->new C(5,10,20).g(C.y) : any -->new C(5,10,20).g : any -+>(new C(5,10,20).g(C.y)) : string -+>new C(5,10,20).g(C.y) : string -+>new C(5,10,20).g : (v: number) => string - >new C(5,10,20) : C - >C : typeof C - >5 : 5 - >10 : 10 - >20 : 20 -->g : any -+>g : (v: number) => string - >C.y : number - >C : typeof C - >y : number diff --git a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt index 1ed7aa1da8..595511a63e 100644 --- a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt @@ -9,10 +9,11 @@ unknownSymbols1.ts(13,12): error TS2304: Cannot find name 'asdf'. unknownSymbols1.ts(16,21): error TS2304: Cannot find name 'asdf'. unknownSymbols1.ts(17,21): error TS2304: Cannot find name 'adsf'. unknownSymbols1.ts(22,15): error TS2304: Cannot find name 'asdf'. -unknownSymbols1.ts(30,21): error TS2663: Cannot find name 'asdf'. Did you mean the instance member 'this.asdf'? +unknownSymbols1.ts(30,14): error TS2339: Property 'asdf' does not exist on type 'C5'. +unknownSymbols1.ts(30,21): error TS2304: Cannot find name 'asdf'. -==== unknownSymbols1.ts (12 errors) ==== +==== unknownSymbols1.ts (13 errors) ==== var x = asdf; ~~~~ !!! error TS2304: Cannot find name 'asdf'. @@ -65,7 +66,9 @@ unknownSymbols1.ts(30,21): error TS2663: Cannot find name 'asdf'. Did you mean t class C5 { constructor() { this.asdf = asdf; + ~~~~ +!!! error TS2339: Property 'asdf' does not exist on type 'C5'. ~~~~ -!!! error TS2663: Cannot find name 'asdf'. Did you mean the instance member 'this.asdf'? +!!! error TS2304: Cannot find name 'asdf'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt.diff deleted file mode 100644 index 4eaa53e871..0000000000 --- a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.errors.txt.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.unknownSymbols1.errors.txt -+++ new.unknownSymbols1.errors.txt -@@= skipped -8, +8 lines =@@ - unknownSymbols1.ts(16,21): error TS2304: Cannot find name 'asdf'. - unknownSymbols1.ts(17,21): error TS2304: Cannot find name 'adsf'. - unknownSymbols1.ts(22,15): error TS2304: Cannot find name 'asdf'. --unknownSymbols1.ts(30,14): error TS2339: Property 'asdf' does not exist on type 'C5'. --unknownSymbols1.ts(30,21): error TS2304: Cannot find name 'asdf'. -+unknownSymbols1.ts(30,21): error TS2663: Cannot find name 'asdf'. Did you mean the instance member 'this.asdf'? - - --==== unknownSymbols1.ts (13 errors) ==== -+==== unknownSymbols1.ts (12 errors) ==== - var x = asdf; - ~~~~ - !!! error TS2304: Cannot find name 'asdf'. -@@= skipped -57, +56 lines =@@ - class C5 { - constructor() { - this.asdf = asdf; -- ~~~~ --!!! error TS2339: Property 'asdf' does not exist on type 'C5'. - ~~~~ --!!! error TS2304: Cannot find name 'asdf'. -+!!! error TS2663: Cannot find name 'asdf'. Did you mean the instance member 'this.asdf'? - } - } diff --git a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols index e7612d6452..d9a9a8ac87 100644 --- a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols +++ b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols @@ -69,8 +69,6 @@ class C5 { constructor() { this.asdf = asdf; ->this.asdf : Symbol(asdf, Decl(unknownSymbols1.ts, 28, 19)) >this : Symbol(C5, Decl(unknownSymbols1.ts, 25, 19)) ->asdf : Symbol(asdf, Decl(unknownSymbols1.ts, 28, 19)) } } diff --git a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols.diff b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols.diff index 84d5c1c44f..96e0ebda6b 100644 --- a/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/unknownSymbols1.symbols.diff @@ -14,12 +14,3 @@ >C : Symbol(C, Decl(unknownSymbols1.ts, 8, 16)) >asdf : Symbol(asdf) } -@@= skipped -38, +38 lines =@@ - - constructor() { - this.asdf = asdf; -+>this.asdf : Symbol(asdf, Decl(unknownSymbols1.ts, 28, 19)) - >this : Symbol(C5, Decl(unknownSymbols1.ts, 25, 19)) -+>asdf : Symbol(asdf, Decl(unknownSymbols1.ts, 28, 19)) - } - } diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols index 428ff1d685..2538a42a89 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols @@ -13,22 +13,22 @@ module X.Y { >y : Symbol(y, Decl(class.ts, 2, 30)) this.x = x; ->this.x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) +>this.x : Symbol(x, Decl(class.ts, 5, 9)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) +>x : Symbol(x, Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; ->this.y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) +>this.y : Symbol(y, Decl(class.ts, 6, 18)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) +>y : Symbol(y, Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } x: number; ->x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) +>x : Symbol(x, Decl(class.ts, 5, 9)) y: number; ->y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) +>y : Symbol(y, Decl(class.ts, 6, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff index e786bf7b3e..ba12629ccb 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff @@ -5,27 +5,27 @@ this.x = x; ->this.x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>this.x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) ++>this.x : Symbol(x, Decl(class.ts, 5, 9)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) ++>x : Symbol(x, Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; ->this.y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>this.y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) ++>this.y : Symbol(y, Decl(class.ts, 6, 18)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) ++>y : Symbol(y, Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } x: number; ->x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) ++>x : Symbol(x, Decl(class.ts, 5, 9)) y: number; ->y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) ++>y : Symbol(y, Decl(class.ts, 6, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols index fdf7a9b579..8420b0dbba 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols @@ -13,22 +13,22 @@ module X.Y { >y : Symbol(y, Decl(class.ts, 2, 30)) this.x = x; ->this.x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) +>this.x : Symbol(x, Decl(class.ts, 5, 9)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) +>x : Symbol(x, Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; ->this.y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) +>this.y : Symbol(y, Decl(class.ts, 6, 18)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) +>y : Symbol(y, Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } x: number; ->x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) +>x : Symbol(x, Decl(class.ts, 5, 9)) y: number; ->y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) +>y : Symbol(y, Decl(class.ts, 6, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff index 90fbb41f37..6bee47df4c 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff @@ -5,27 +5,27 @@ this.x = x; ->this.x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>this.x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) ++>this.x : Symbol(x, Decl(class.ts, 5, 9)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) ++>x : Symbol(x, Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; ->this.y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>this.y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) ++>this.y : Symbol(y, Decl(class.ts, 6, 18)) >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) ++>y : Symbol(y, Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } x: number; ->x : Symbol(Point.x, Decl(class.ts, 5, 9)) -+>x : Symbol(x, Decl(class.ts, 2, 43), Decl(class.ts, 5, 9)) ++>x : Symbol(x, Decl(class.ts, 5, 9)) y: number; ->y : Symbol(Point.y, Decl(class.ts, 6, 18)) -+>y : Symbol(y, Decl(class.ts, 3, 23), Decl(class.ts, 6, 18)) ++>y : Symbol(y, Decl(class.ts, 6, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols index 7f7a94816f..9f4a5683b0 100644 --- a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols +++ b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols @@ -28,22 +28,22 @@ module X.Y { >y : Symbol(y, Decl(classPoint.ts, 3, 30)) this.x = x; ->this.x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) +>this.x : Symbol(x, Decl(classPoint.ts, 6, 9)) >this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) ->x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) +>x : Symbol(x, Decl(classPoint.ts, 6, 9)) >x : Symbol(x, Decl(classPoint.ts, 3, 20)) this.y = y; ->this.y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) +>this.y : Symbol(y, Decl(classPoint.ts, 7, 18)) >this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) ->y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) +>y : Symbol(y, Decl(classPoint.ts, 7, 18)) >y : Symbol(y, Decl(classPoint.ts, 3, 30)) } x: number; ->x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) +>x : Symbol(x, Decl(classPoint.ts, 6, 9)) y: number; ->y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) +>y : Symbol(y, Decl(classPoint.ts, 7, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff index 19a2cfdfc2..21b8b5a549 100644 --- a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff @@ -5,27 +5,27 @@ this.x = x; ->this.x : Symbol(Point.x, Decl(classPoint.ts, 6, 9)) -+>this.x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) ++>this.x : Symbol(x, Decl(classPoint.ts, 6, 9)) >this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) ->x : Symbol(Point.x, Decl(classPoint.ts, 6, 9)) -+>x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) ++>x : Symbol(x, Decl(classPoint.ts, 6, 9)) >x : Symbol(x, Decl(classPoint.ts, 3, 20)) this.y = y; ->this.y : Symbol(Point.y, Decl(classPoint.ts, 7, 18)) -+>this.y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) ++>this.y : Symbol(y, Decl(classPoint.ts, 7, 18)) >this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) ->y : Symbol(Point.y, Decl(classPoint.ts, 7, 18)) -+>y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) ++>y : Symbol(y, Decl(classPoint.ts, 7, 18)) >y : Symbol(y, Decl(classPoint.ts, 3, 30)) } x: number; ->x : Symbol(Point.x, Decl(classPoint.ts, 6, 9)) -+>x : Symbol(x, Decl(classPoint.ts, 3, 43), Decl(classPoint.ts, 6, 9)) ++>x : Symbol(x, Decl(classPoint.ts, 6, 9)) y: number; ->y : Symbol(Point.y, Decl(classPoint.ts, 7, 18)) -+>y : Symbol(y, Decl(classPoint.ts, 4, 23), Decl(classPoint.ts, 7, 18)) ++>y : Symbol(y, Decl(classPoint.ts, 7, 18)) } } diff --git a/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols b/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols index 8a632ee8ab..b4a2e53998 100644 --- a/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols +++ b/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols @@ -71,14 +71,14 @@ class D1 extends getBase() { >super : Symbol(BaseConstructor, Decl(classExtendingClassLikeType.ts, 7, 1)) this.x = "x"; ->this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 20, 28)) +>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) >this : Symbol(D1, Decl(classExtendingClassLikeType.ts, 16, 44)) ->x : Symbol(x, Decl(classExtendingClassLikeType.ts, 20, 28)) +>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) this.y = "y"; ->this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 21, 21)) +>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) >this : Symbol(D1, Decl(classExtendingClassLikeType.ts, 16, 44)) ->y : Symbol(y, Decl(classExtendingClassLikeType.ts, 21, 21)) +>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) } } @@ -94,14 +94,14 @@ class D2 extends getBase() { >super : Symbol(BaseConstructor, Decl(classExtendingClassLikeType.ts, 7, 1)) this.x = 1; ->this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 29, 22)) +>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) >this : Symbol(D2, Decl(classExtendingClassLikeType.ts, 24, 1)) ->x : Symbol(x, Decl(classExtendingClassLikeType.ts, 29, 22)) +>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) this.y = 2; ->this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 30, 19)) +>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) >this : Symbol(D2, Decl(classExtendingClassLikeType.ts, 24, 1)) ->y : Symbol(y, Decl(classExtendingClassLikeType.ts, 30, 19)) +>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) } } @@ -114,14 +114,14 @@ class D3 extends getBase() { >super : Symbol(BaseConstructor, Decl(classExtendingClassLikeType.ts, 7, 1)) this.x = "x"; ->this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 37, 25)) +>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) >this : Symbol(D3, Decl(classExtendingClassLikeType.ts, 33, 1)) ->x : Symbol(x, Decl(classExtendingClassLikeType.ts, 37, 25)) +>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) this.y = 2; ->this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 38, 21)) +>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) >this : Symbol(D3, Decl(classExtendingClassLikeType.ts, 33, 1)) ->y : Symbol(y, Decl(classExtendingClassLikeType.ts, 38, 21)) +>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) } } diff --git a/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols.diff b/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols.diff index 7e00b15230..62ac7e69d9 100644 --- a/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.symbols.diff @@ -19,17 +19,17 @@ this.x = "x"; ->this.x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 20, 28)) ++>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) >this : Symbol(D1, Decl(classExtendingClassLikeType.ts, 16, 44)) ->x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 20, 28)) ++>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) this.y = "y"; ->this.y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 21, 21)) ++>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) >this : Symbol(D1, Decl(classExtendingClassLikeType.ts, 16, 44)) ->y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 21, 21)) ++>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) } } @@ -38,17 +38,17 @@ this.x = 1; ->this.x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 29, 22)) ++>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) >this : Symbol(D2, Decl(classExtendingClassLikeType.ts, 24, 1)) ->x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 29, 22)) ++>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) this.y = 2; ->this.y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 30, 19)) ++>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) >this : Symbol(D2, Decl(classExtendingClassLikeType.ts, 24, 1)) ->y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 30, 19)) ++>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) } } @@ -57,17 +57,17 @@ this.x = "x"; ->this.x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 37, 25)) ++>this.x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) >this : Symbol(D3, Decl(classExtendingClassLikeType.ts, 33, 1)) ->x : Symbol(Base.x, Decl(classExtendingClassLikeType.ts, 0, 22)) -+>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 37, 25)) ++>x : Symbol(x, Decl(classExtendingClassLikeType.ts, 0, 22)) this.y = 2; ->this.y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 38, 21)) ++>this.y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) >this : Symbol(D3, Decl(classExtendingClassLikeType.ts, 33, 1)) ->y : Symbol(Base.y, Decl(classExtendingClassLikeType.ts, 1, 9)) -+>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 38, 21)) ++>y : Symbol(y, Decl(classExtendingClassLikeType.ts, 1, 9)) } } diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols index e45d8c9ddd..90160b2ae6 100644 --- a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols +++ b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols @@ -6,11 +6,11 @@ class C { static { this.x = 1; ->this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) >this : Symbol(C, Decl(classStaticBlockUseBeforeDef2.ts, 0, 0)) ->x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } static x; ->x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols.diff b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols.diff index 49968a9bb7..51d36adc6c 100644 --- a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=es2022).symbols.diff @@ -5,13 +5,13 @@ static { this.x = 1; ->this.x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) >this : Symbol(C, Decl(classStaticBlockUseBeforeDef2.ts, 0, 0)) ->x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } static x; ->x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols index e45d8c9ddd..90160b2ae6 100644 --- a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols +++ b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols @@ -6,11 +6,11 @@ class C { static { this.x = 1; ->this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) >this : Symbol(C, Decl(classStaticBlockUseBeforeDef2.ts, 0, 0)) ->x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } static x; ->x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) +>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols.diff b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols.diff index de3c6ded6a..e93495a077 100644 --- a/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef2(target=esnext).symbols.diff @@ -5,13 +5,13 @@ static { this.x = 1; ->this.x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>this.x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) >this : Symbol(C, Decl(classStaticBlockUseBeforeDef2.ts, 0, 0)) ->x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } static x; ->x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) -+>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 1, 12), Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) ++>x : Symbol(x, Decl(classStaticBlockUseBeforeDef2.ts, 3, 5)) } diff --git a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types index 25ed142005..74176773b4 100644 --- a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types +++ b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types @@ -58,9 +58,9 @@ class Thing { /** @type {DoneStatus} */ this.s = { >this.s = { status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } ->this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } +>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined >this : this ->s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } +>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined >{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } >{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } @@ -79,9 +79,9 @@ class Thing { this.s = { >this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } ->this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } +>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined >this : this ->s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } +>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined >{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } status: 'done', diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt index 5ff64493d8..340676d800 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt @@ -1,12 +1,14 @@ destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. destructuringParameterProperties2.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties2.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties2.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties2.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. destructuringParameterProperties2.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties2.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. destructuringParameterProperties2.ts(21,42): error TS2322: Type 'string' is not assignable to type 'boolean'. -==== destructuringParameterProperties2.ts (6 errors) ==== +==== destructuringParameterProperties2.ts (8 errors) ==== class C1 { constructor(private k: number, private [a, b, c]: [number, string, boolean]) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -17,11 +19,15 @@ destructuringParameterProperties2.ts(21,42): error TS2322: Type 'string' is not ~ !!! error TS2339: Property 'c' does not exist on type 'C1'. this.a = a || k; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. } } public getA() { return this.a + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. } public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt.diff deleted file mode 100644 index 752d407e74..0000000000 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.errors.txt.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- old.destructuringParameterProperties2.errors.txt -+++ new.destructuringParameterProperties2.errors.txt -@@= skipped -0, +0 lines =@@ - destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. - destructuringParameterProperties2.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. - destructuringParameterProperties2.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. --destructuringParameterProperties2.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. --destructuringParameterProperties2.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. - destructuringParameterProperties2.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. - destructuringParameterProperties2.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. - destructuringParameterProperties2.ts(21,42): error TS2322: Type 'string' is not assignable to type 'boolean'. - - --==== destructuringParameterProperties2.ts (8 errors) ==== -+==== destructuringParameterProperties2.ts (6 errors) ==== - class C1 { - constructor(private k: number, private [a, b, c]: [number, string, boolean]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -@@= skipped -18, +16 lines =@@ - ~ - !!! error TS2339: Property 'c' does not exist on type 'C1'. - this.a = a || k; -- ~ --!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - } - - public getA() { - return this.a -- ~ --!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - - public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols index 5073978290..215a3c57f4 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols @@ -21,9 +21,7 @@ class C1 { >undefined : Symbol(undefined) this.a = a || k; ->this.a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties2.ts, 0, 0)) ->a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) >a : Symbol(a, Decl(destructuringParameterProperties2.ts, 1, 44)) >k : Symbol(k, Decl(destructuringParameterProperties2.ts, 1, 16)) } @@ -33,9 +31,7 @@ class C1 { >getA : Symbol(getA, Decl(destructuringParameterProperties2.ts, 5, 5)) return this.a ->this.a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties2.ts, 0, 0)) ->a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) } public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols.diff index 0d8cd54903..4e392caf28 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties2.symbols.diff @@ -9,16 +9,7 @@ >a : Symbol(a, Decl(destructuringParameterProperties2.ts, 1, 44)) >b : Symbol(b, Decl(destructuringParameterProperties2.ts, 1, 46)) >c : Symbol(c, Decl(destructuringParameterProperties2.ts, 1, 49)) -@@= skipped -16, +16 lines =@@ - >undefined : Symbol(undefined) - - this.a = a || k; -+>this.a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) - >this : Symbol(C1, Decl(destructuringParameterProperties2.ts, 0, 0)) -+>a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) - >a : Symbol(a, Decl(destructuringParameterProperties2.ts, 1, 44)) - >k : Symbol(k, Decl(destructuringParameterProperties2.ts, 1, 16)) - } +@@= skipped -23, +23 lines =@@ } public getA() { @@ -26,9 +17,7 @@ +>getA : Symbol(getA, Decl(destructuringParameterProperties2.ts, 5, 5)) return this.a -+>this.a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties2.ts, 0, 0)) -+>a : Symbol(a, Decl(destructuringParameterProperties2.ts, 2, 101)) } public getB() { @@ -45,7 +34,7 @@ return this.c; >this : Symbol(C1, Decl(destructuringParameterProperties2.ts, 0, 0)) -@@= skipped -38, +42 lines =@@ +@@= skipped -31, +31 lines =@@ >x_a : Symbol(x_a, Decl(destructuringParameterProperties2.ts, 21, 5)) >x_b : Symbol(x_b, Decl(destructuringParameterProperties2.ts, 21, 9)) >x_c : Symbol(x_c, Decl(destructuringParameterProperties2.ts, 21, 14)) diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt index b0507f5b00..e46e1e715b 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt @@ -1,11 +1,13 @@ destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. destructuringParameterProperties3.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties3.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties3.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties3.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. destructuringParameterProperties3.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties3.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. -==== destructuringParameterProperties3.ts (5 errors) ==== +==== destructuringParameterProperties3.ts (7 errors) ==== class C1 { constructor(private k: T, private [a, b, c]: [T,U,V]) { ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -16,11 +18,15 @@ destructuringParameterProperties3.ts(17,21): error TS2339: Property 'c' does not ~ !!! error TS2339: Property 'c' does not exist on type 'C1'. this.a = a || k; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. } } public getA() { return this.a + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. } public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt.diff deleted file mode 100644 index 2e165ee6df..0000000000 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.errors.txt.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- old.destructuringParameterProperties3.errors.txt -+++ new.destructuringParameterProperties3.errors.txt -@@= skipped -0, +0 lines =@@ - destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. - destructuringParameterProperties3.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. - destructuringParameterProperties3.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. --destructuringParameterProperties3.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. --destructuringParameterProperties3.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. - destructuringParameterProperties3.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. - destructuringParameterProperties3.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. - - --==== destructuringParameterProperties3.ts (7 errors) ==== -+==== destructuringParameterProperties3.ts (5 errors) ==== - class C1 { - constructor(private k: T, private [a, b, c]: [T,U,V]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -@@= skipped -17, +15 lines =@@ - ~ - !!! error TS2339: Property 'c' does not exist on type 'C1'. - this.a = a || k; -- ~ --!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - } - - public getA() { - return this.a -- ~ --!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - - public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols index dc5e168e6c..c72fd89927 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols @@ -28,9 +28,7 @@ class C1 { >undefined : Symbol(undefined) this.a = a || k; ->this.a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties3.ts, 0, 0)) ->a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) >a : Symbol(a, Decl(destructuringParameterProperties3.ts, 1, 39)) >k : Symbol(k, Decl(destructuringParameterProperties3.ts, 1, 16)) } @@ -40,9 +38,7 @@ class C1 { >getA : Symbol(getA, Decl(destructuringParameterProperties3.ts, 5, 5)) return this.a ->this.a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties3.ts, 0, 0)) ->a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) } public getB() { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols.diff index 63ee2c246f..11e2af1128 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties3.symbols.diff @@ -9,16 +9,7 @@ >T : Symbol(T, Decl(destructuringParameterProperties3.ts, 0, 9)) >a : Symbol(a, Decl(destructuringParameterProperties3.ts, 1, 39)) >b : Symbol(b, Decl(destructuringParameterProperties3.ts, 1, 41)) -@@= skipped -20, +20 lines =@@ - >undefined : Symbol(undefined) - - this.a = a || k; -+>this.a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) - >this : Symbol(C1, Decl(destructuringParameterProperties3.ts, 0, 0)) -+>a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) - >a : Symbol(a, Decl(destructuringParameterProperties3.ts, 1, 39)) - >k : Symbol(k, Decl(destructuringParameterProperties3.ts, 1, 16)) - } +@@= skipped -27, +27 lines =@@ } public getA() { @@ -26,9 +17,7 @@ +>getA : Symbol(getA, Decl(destructuringParameterProperties3.ts, 5, 5)) return this.a -+>this.a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties3.ts, 0, 0)) -+>a : Symbol(a, Decl(destructuringParameterProperties3.ts, 2, 101)) } public getB() { @@ -45,7 +34,7 @@ return this.c; >this : Symbol(C1, Decl(destructuringParameterProperties3.ts, 0, 0)) -@@= skipped -37, +41 lines =@@ +@@= skipped -30, +30 lines =@@ >x_a : Symbol(x_a, Decl(destructuringParameterProperties3.ts, 21, 5)) >x_b : Symbol(x_b, Decl(destructuringParameterProperties3.ts, 21, 9)) >x_c : Symbol(x_c, Decl(destructuringParameterProperties3.ts, 21, 14)) diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt index 205632beb5..43d58026dc 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt @@ -1,13 +1,16 @@ destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. destructuringParameterProperties4.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties4.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties4.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties4.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. destructuringParameterProperties4.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. destructuringParameterProperties4.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties4.ts(23,24): error TS2339: Property 'a' does not exist on type 'C2'. destructuringParameterProperties4.ts(23,34): error TS2339: Property 'b' does not exist on type 'C2'. destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not exist on type 'C2'. -==== destructuringParameterProperties4.ts (7 errors) ==== +==== destructuringParameterProperties4.ts (10 errors) ==== class C1 { constructor(private k: T, protected [a, b, c]: [T,U,V]) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -18,11 +21,15 @@ destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not ~ !!! error TS2339: Property 'c' does not exist on type 'C1'. this.a = a || k; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. } } public getA() { return this.a + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. } public getB() { @@ -41,6 +48,8 @@ destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not class C2 extends C1 { public doSomethingWithSuperProperties() { return `${this.a} ${this.b} ${this.c}`; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C2'. ~ !!! error TS2339: Property 'b' does not exist on type 'C2'. ~ diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt.diff deleted file mode 100644 index edd878f744..0000000000 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.errors.txt.diff +++ /dev/null @@ -1,45 +0,0 @@ ---- old.destructuringParameterProperties4.errors.txt -+++ new.destructuringParameterProperties4.errors.txt -@@= skipped -0, +0 lines =@@ - destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. - destructuringParameterProperties4.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. - destructuringParameterProperties4.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. --destructuringParameterProperties4.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. --destructuringParameterProperties4.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. - destructuringParameterProperties4.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. - destructuringParameterProperties4.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. --destructuringParameterProperties4.ts(23,24): error TS2339: Property 'a' does not exist on type 'C2'. - destructuringParameterProperties4.ts(23,34): error TS2339: Property 'b' does not exist on type 'C2'. - destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not exist on type 'C2'. - - --==== destructuringParameterProperties4.ts (10 errors) ==== -+==== destructuringParameterProperties4.ts (7 errors) ==== - class C1 { - constructor(private k: T, protected [a, b, c]: [T,U,V]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -@@= skipped -20, +17 lines =@@ - ~ - !!! error TS2339: Property 'c' does not exist on type 'C1'. - this.a = a || k; -- ~ --!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - } - - public getA() { - return this.a -- ~ --!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - - public getB() { -@@= skipped -27, +23 lines =@@ - class C2 extends C1 { - public doSomethingWithSuperProperties() { - return `${this.a} ${this.b} ${this.c}`; -- ~ --!!! error TS2339: Property 'a' does not exist on type 'C2'. - ~ - !!! error TS2339: Property 'b' does not exist on type 'C2'. - ~ diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols index aacf2c78fe..b9dc13b453 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols @@ -28,9 +28,7 @@ class C1 { >undefined : Symbol(undefined) this.a = a || k; ->this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) ->a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >a : Symbol(a, Decl(destructuringParameterProperties4.ts, 1, 41)) >k : Symbol(k, Decl(destructuringParameterProperties4.ts, 1, 16)) } @@ -40,9 +38,7 @@ class C1 { >getA : Symbol(getA, Decl(destructuringParameterProperties4.ts, 5, 5)) return this.a ->this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) ->a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) } public getB() { @@ -68,9 +64,7 @@ class C2 extends C1 { >doSomethingWithSuperProperties : Symbol(doSomethingWithSuperProperties, Decl(destructuringParameterProperties4.ts, 20, 46)) return `${this.a} ${this.b} ${this.c}`; ->this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) ->a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) } diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols.diff index af3740b008..d70509fefa 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterProperties4.symbols.diff @@ -9,16 +9,7 @@ >T : Symbol(T, Decl(destructuringParameterProperties4.ts, 0, 9)) >a : Symbol(a, Decl(destructuringParameterProperties4.ts, 1, 41)) >b : Symbol(b, Decl(destructuringParameterProperties4.ts, 1, 43)) -@@= skipped -20, +20 lines =@@ - >undefined : Symbol(undefined) - - this.a = a || k; -+>this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) - >this : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) -+>a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) - >a : Symbol(a, Decl(destructuringParameterProperties4.ts, 1, 41)) - >k : Symbol(k, Decl(destructuringParameterProperties4.ts, 1, 16)) - } +@@= skipped -27, +27 lines =@@ } public getA() { @@ -26,9 +17,7 @@ +>getA : Symbol(getA, Decl(destructuringParameterProperties4.ts, 5, 5)) return this.a -+>this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) -+>a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) } public getB() { @@ -45,7 +34,7 @@ return this.c; >this : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) -@@= skipped -33, +37 lines =@@ +@@= skipped -26, +26 lines =@@ >C1 : Symbol(C1, Decl(destructuringParameterProperties4.ts, 0, 0)) public doSomethingWithSuperProperties() { @@ -53,9 +42,4 @@ +>doSomethingWithSuperProperties : Symbol(doSomethingWithSuperProperties, Decl(destructuringParameterProperties4.ts, 20, 46)) return `${this.a} ${this.b} ${this.c}`; -+>this.a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) -+>a : Symbol(a, Decl(destructuringParameterProperties4.ts, 2, 101)) - >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) - >this : Symbol(C2, Decl(destructuringParameterProperties4.ts, 18, 1)) - } diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt index 264985bda1..d0ec3d2795 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt @@ -1,20 +1,9 @@ +a.js(14,13): error TS7008: Member 'inMethodNullable' implicitly has an 'any' type. a.js(20,9): error TS2322: Type 'string' is not assignable to type 'number'. a.js(39,9): error TS2322: Type 'boolean' is not assignable to type 'number'. -b.ts(8,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -b.ts(9,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -b.ts(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -b.ts(11,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -b.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -b.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrBooleanOrUndefined' must be of type 'string | boolean | undefined', but here has type 'string | boolean'. -b.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'any' must be of type 'any', but here has type 'null | undefined'. -b.ts(24,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -b.ts(25,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -b.ts(26,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -b.ts(27,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -b.ts(28,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -==== a.js (2 errors) ==== +==== a.js (3 errors) ==== class C { constructor() { if (Math.random()) { @@ -29,6 +18,8 @@ b.ts(28,5): error TS2403: Subsequent variable declarations must have the same ty if (Math.random()) { this.inMethod = 0; this.inMethodNullable = null; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7008: Member 'inMethodNullable' implicitly has an 'any' type. } else { this.inMethod = "string" @@ -119,7 +110,7 @@ b.ts(28,5): error TS2403: Subsequent variable declarations must have the same ty } } -==== b.ts (12 errors) ==== +==== b.ts (0 errors) ==== var c = new C(); var stringOrNumber: string | number; @@ -128,25 +119,10 @@ b.ts(28,5): error TS2403: Subsequent variable declarations must have the same ty var stringOrNumberOrUndefined: string | number | undefined; var stringOrNumberOrUndefined = c.inMethod; - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inGetter; - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inSetter; - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inPropertyDeclaration; - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = c.inNestedArrowFunction - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrBoolean: string | number | boolean; @@ -154,34 +130,13 @@ b.ts(28,5): error TS2403: Subsequent variable declarations must have the same ty var number = c.inMultiple; var stringOrBooleanOrUndefined : string | boolean | undefined; var stringOrBooleanOrUndefined = c.inMultipleMethods; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrBooleanOrUndefined' must be of type 'string | boolean | undefined', but here has type 'string | boolean'. -!!! related TS6203 b.ts:18:5: 'stringOrBooleanOrUndefined' was also declared here. var any: any; var any = c.inMethodNullable; - ~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'any' must be of type 'any', but here has type 'null | undefined'. -!!! related TS6203 b.ts:20:5: 'any' was also declared here. var stringOrNumberOrUndefined = C.inStaticMethod; - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticGetter; - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticSetter; - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types index a23aaa2c3e..9d89f3d3fb 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.types @@ -44,30 +44,30 @@ class C { this.inMethod = 0; >this.inMethod = 0 : 0 ->this.inMethod : string | number +>this.inMethod : string | number | undefined >this : this ->inMethod : string | number +>inMethod : string | number | undefined >0 : 0 this.inMethodNullable = null; >this.inMethodNullable = null : null ->this.inMethodNullable : null | undefined +>this.inMethodNullable : any >this : this ->inMethodNullable : null | undefined +>inMethodNullable : any } else { this.inMethod = "string" >this.inMethod = "string" : "string" ->this.inMethod : string | number +>this.inMethod : string | number | undefined >this : this ->inMethod : string | number +>inMethod : string | number | undefined >"string" : "string" this.inMethodNullable = undefined; >this.inMethodNullable = undefined : undefined ->this.inMethodNullable : null | undefined +>this.inMethodNullable : any >this : this ->inMethodNullable : null | undefined +>inMethodNullable : any >undefined : undefined } this.inMultiple = "string"; @@ -79,9 +79,9 @@ class C { this.inMultipleMethods = "string"; >this.inMultipleMethods = "string" : "string" ->this.inMultipleMethods : string | boolean +>this.inMultipleMethods : string | boolean | undefined >this : this ->inMultipleMethods : string | boolean +>inMultipleMethods : string | boolean | undefined >"string" : "string" var action = () => { @@ -96,17 +96,17 @@ class C { this.inNestedArrowFunction = 0; >this.inNestedArrowFunction = 0 : 0 ->this.inNestedArrowFunction : string | number +>this.inNestedArrowFunction : string | number | undefined >this : this ->inNestedArrowFunction : string | number +>inNestedArrowFunction : string | number | undefined >0 : 0 } else { this.inNestedArrowFunction = "string" >this.inNestedArrowFunction = "string" : "string" ->this.inNestedArrowFunction : string | number +>this.inNestedArrowFunction : string | number | undefined >this : this ->inNestedArrowFunction : string | number +>inNestedArrowFunction : string | number | undefined >"string" : "string" } }; @@ -122,17 +122,17 @@ class C { this.inGetter = 0; >this.inGetter = 0 : 0 ->this.inGetter : string | number +>this.inGetter : string | number | undefined >this : this ->inGetter : string | number +>inGetter : string | number | undefined >0 : 0 } else { this.inGetter = "string" >this.inGetter = "string" : "string" ->this.inGetter : string | number +>this.inGetter : string | number | undefined >this : this ->inGetter : string | number +>inGetter : string | number | undefined >"string" : "string" } this.inMultiple = false; @@ -144,9 +144,9 @@ class C { this.inMultipleMethods = false; >this.inMultipleMethods = false : false ->this.inMultipleMethods : string | boolean +>this.inMultipleMethods : string | boolean | undefined >this : this ->inMultipleMethods : string | boolean +>inMultipleMethods : string | boolean | undefined >false : false } set() { @@ -160,17 +160,17 @@ class C { this.inSetter = 0; >this.inSetter = 0 : 0 ->this.inSetter : string | number +>this.inSetter : string | number | undefined >this : this ->inSetter : string | number +>inSetter : string | number | undefined >0 : 0 } else { this.inSetter = "string" >this.inSetter = "string" : "string" ->this.inSetter : string | number +>this.inSetter : string | number | undefined >this : this ->inSetter : string | number +>inSetter : string | number | undefined >"string" : "string" } } @@ -186,17 +186,17 @@ class C { this.inPropertyDeclaration = 0; >this.inPropertyDeclaration = 0 : 0 ->this.inPropertyDeclaration : string | number +>this.inPropertyDeclaration : string | number | undefined >this : this ->inPropertyDeclaration : string | number +>inPropertyDeclaration : string | number | undefined >0 : 0 } else { this.inPropertyDeclaration = "string" >this.inPropertyDeclaration = "string" : "string" ->this.inPropertyDeclaration : string | number +>this.inPropertyDeclaration : string | number | undefined >this : this ->inPropertyDeclaration : string | number +>inPropertyDeclaration : string | number | undefined >"string" : "string" } } @@ -211,17 +211,17 @@ class C { this.inStaticMethod = 0; >this.inStaticMethod = 0 : 0 ->this.inStaticMethod : string | number +>this.inStaticMethod : string | number | undefined >this : typeof C ->inStaticMethod : string | number +>inStaticMethod : string | number | undefined >0 : 0 } else { this.inStaticMethod = "string" >this.inStaticMethod = "string" : "string" ->this.inStaticMethod : string | number +>this.inStaticMethod : string | number | undefined >this : typeof C ->inStaticMethod : string | number +>inStaticMethod : string | number | undefined >"string" : "string" } @@ -237,17 +237,17 @@ class C { this.inStaticNestedArrowFunction = 0; >this.inStaticNestedArrowFunction = 0 : 0 ->this.inStaticNestedArrowFunction : string | number +>this.inStaticNestedArrowFunction : string | number | undefined >this : typeof C ->inStaticNestedArrowFunction : string | number +>inStaticNestedArrowFunction : string | number | undefined >0 : 0 } else { this.inStaticNestedArrowFunction = "string" >this.inStaticNestedArrowFunction = "string" : "string" ->this.inStaticNestedArrowFunction : string | number +>this.inStaticNestedArrowFunction : string | number | undefined >this : typeof C ->inStaticNestedArrowFunction : string | number +>inStaticNestedArrowFunction : string | number | undefined >"string" : "string" } }; @@ -263,17 +263,17 @@ class C { this.inStaticGetter = 0; >this.inStaticGetter = 0 : 0 ->this.inStaticGetter : string | number +>this.inStaticGetter : string | number | undefined >this : typeof C ->inStaticGetter : string | number +>inStaticGetter : string | number | undefined >0 : 0 } else { this.inStaticGetter = "string" >this.inStaticGetter = "string" : "string" ->this.inStaticGetter : string | number +>this.inStaticGetter : string | number | undefined >this : typeof C ->inStaticGetter : string | number +>inStaticGetter : string | number | undefined >"string" : "string" } } @@ -288,17 +288,17 @@ class C { this.inStaticSetter = 0; >this.inStaticSetter = 0 : 0 ->this.inStaticSetter : string | number +>this.inStaticSetter : string | number | undefined >this : typeof C ->inStaticSetter : string | number +>inStaticSetter : string | number | undefined >0 : 0 } else { this.inStaticSetter = "string" >this.inStaticSetter = "string" : "string" ->this.inStaticSetter : string | number +>this.inStaticSetter : string | number | undefined >this : typeof C ->inStaticSetter : string | number +>inStaticSetter : string | number | undefined >"string" : "string" } } @@ -314,17 +314,17 @@ class C { this.inStaticPropertyDeclaration = 0; >this.inStaticPropertyDeclaration = 0 : 0 ->this.inStaticPropertyDeclaration : string | number +>this.inStaticPropertyDeclaration : string | number | undefined >this : typeof C ->inStaticPropertyDeclaration : string | number +>inStaticPropertyDeclaration : string | number | undefined >0 : 0 } else { this.inStaticPropertyDeclaration = "string" >this.inStaticPropertyDeclaration = "string" : "string" ->this.inStaticPropertyDeclaration : string | number +>this.inStaticPropertyDeclaration : string | number | undefined >this : typeof C ->inStaticPropertyDeclaration : string | number +>inStaticPropertyDeclaration : string | number | undefined >"string" : "string" } } @@ -350,33 +350,33 @@ var stringOrNumberOrUndefined: string | number | undefined; var stringOrNumberOrUndefined = c.inMethod; >stringOrNumberOrUndefined : string | number | undefined ->c.inMethod : string | number +>c.inMethod : string | number | undefined >c : C ->inMethod : string | number +>inMethod : string | number | undefined var stringOrNumberOrUndefined = c.inGetter; >stringOrNumberOrUndefined : string | number | undefined ->c.inGetter : string | number +>c.inGetter : string | number | undefined >c : C ->inGetter : string | number +>inGetter : string | number | undefined var stringOrNumberOrUndefined = c.inSetter; >stringOrNumberOrUndefined : string | number | undefined ->c.inSetter : string | number +>c.inSetter : string | number | undefined >c : C ->inSetter : string | number +>inSetter : string | number | undefined var stringOrNumberOrUndefined = c.inPropertyDeclaration; >stringOrNumberOrUndefined : string | number | undefined ->c.inPropertyDeclaration : string | number +>c.inPropertyDeclaration : string | number | undefined >c : C ->inPropertyDeclaration : string | number +>inPropertyDeclaration : string | number | undefined var stringOrNumberOrUndefined = c.inNestedArrowFunction >stringOrNumberOrUndefined : string | number | undefined ->c.inNestedArrowFunction : string | number +>c.inNestedArrowFunction : string | number | undefined >c : C ->inNestedArrowFunction : string | number +>inNestedArrowFunction : string | number | undefined var stringOrNumberOrBoolean: string | number | boolean; >stringOrNumberOrBoolean : string | number | boolean @@ -395,47 +395,47 @@ var stringOrBooleanOrUndefined : string | boolean | undefined; var stringOrBooleanOrUndefined = c.inMultipleMethods; >stringOrBooleanOrUndefined : string | boolean | undefined ->c.inMultipleMethods : string | boolean +>c.inMultipleMethods : string | boolean | undefined >c : C ->inMultipleMethods : string | boolean +>inMultipleMethods : string | boolean | undefined var any: any; >any : any var any = c.inMethodNullable; >any : any ->c.inMethodNullable : null | undefined +>c.inMethodNullable : any >c : C ->inMethodNullable : null | undefined +>inMethodNullable : any var stringOrNumberOrUndefined = C.inStaticMethod; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticMethod : string | number +>C.inStaticMethod : string | number | undefined >C : typeof C ->inStaticMethod : string | number +>inStaticMethod : string | number | undefined var stringOrNumberOrUndefined = C.inStaticGetter; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticGetter : string | number +>C.inStaticGetter : string | number | undefined >C : typeof C ->inStaticGetter : string | number +>inStaticGetter : string | number | undefined var stringOrNumberOrUndefined = C.inStaticSetter; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticSetter : string | number +>C.inStaticSetter : string | number | undefined >C : typeof C ->inStaticSetter : string | number +>inStaticSetter : string | number | undefined var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticPropertyDeclaration : string | number +>C.inStaticPropertyDeclaration : string | number | undefined >C : typeof C ->inStaticPropertyDeclaration : string | number +>inStaticPropertyDeclaration : string | number | undefined var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; >stringOrNumberOrUndefined : string | number | undefined ->C.inStaticNestedArrowFunction : string | number +>C.inStaticNestedArrowFunction : string | number | undefined >C : typeof C ->inStaticNestedArrowFunction : string | number +>inStaticNestedArrowFunction : string | number | undefined diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.types b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.types index b2f4b88fff..6c5fa20112 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.types +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments4.types @@ -9,9 +9,9 @@ class Base { this.p = 1 >this.p = 1 : 1 ->this.p : number +>this.p : number | undefined >this : this ->p : number +>p : number | undefined >1 : 1 } } @@ -25,9 +25,9 @@ class Derived extends Base { // should be OK, and p should have type number | undefined from its base this.p = 1 >this.p = 1 : 1 ->this.p : number +>this.p : number | undefined >this : this ->p : number +>p : number | undefined >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.types b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.types index 990a50d8df..6604200a4b 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.types +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments5.types @@ -9,9 +9,9 @@ class Base { this.p = 1 >this.p = 1 : 1 ->this.p : number +>this.p : number | undefined >this : this ->p : number +>p : number | undefined >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.types index 6936cd5b08..981b176d05 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionJSDoc.types @@ -31,9 +31,9 @@ export class Aleph { */ this.field = b; >this.field = b : null ->this.field : null +>this.field : any >this : this ->field : null +>field : any >b : null } diff --git a/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols b/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols index be9ade1544..f4866237ef 100644 --- a/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols +++ b/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols @@ -519,13 +519,10 @@ export class c { constructor() { this.a = "b"; ->this.a : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) >this : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1)) ->a : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) this["a"] = "b"; >this : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1)) ->"a" : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) } } diff --git a/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols.diff b/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols.diff index ddb15be14d..53f1b71f89 100644 --- a/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess2.symbols.diff @@ -85,17 +85,3 @@ } function get123(): Type[K] { -@@= skipped -141, +141 lines =@@ - - constructor() { - this.a = "b"; -+>this.a : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) - >this : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1)) -+>a : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) - - this["a"] = "b"; - >this : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1)) -+>"a" : Symbol(a, Decl(keyofAndIndexedAccess2.ts, 142, 17), Decl(keyofAndIndexedAccess2.ts, 143, 17)) - } - } - diff --git a/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols b/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols index 68919134f1..5a27087f04 100644 --- a/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols +++ b/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols @@ -177,9 +177,9 @@ class Thing3 extends Thing2 { super(10, 20, 30); this._tag = tag; ->this._tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 58, 26)) +>this._tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 24, 18)) >this : Symbol(Thing3, Decl(mixinClassesAnnotated.ts, 54, 1)) ->_tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 58, 26)) +>_tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 24, 18)) >tag : Symbol(tag, Decl(mixinClassesAnnotated.ts, 57, 16)) } test() { diff --git a/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols.diff b/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols.diff index 872519255d..62511dee7e 100644 --- a/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/mixinClassesAnnotated.symbols.diff @@ -135,10 +135,10 @@ super(10, 20, 30); this._tag = tag; ->this._tag : Symbol(Tagged._tag, Decl(mixinClassesAnnotated.ts, 24, 18)) -+>this._tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 58, 26)) ++>this._tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 24, 18)) >this : Symbol(Thing3, Decl(mixinClassesAnnotated.ts, 54, 1)) ->_tag : Symbol(Tagged._tag, Decl(mixinClassesAnnotated.ts, 24, 18)) -+>_tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 58, 26)) ++>_tag : Symbol(_tag, Decl(mixinClassesAnnotated.ts, 24, 18)) >tag : Symbol(tag, Decl(mixinClassesAnnotated.ts, 57, 16)) } test() { diff --git a/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols b/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols index f64e6a23f9..5bab33f575 100644 --- a/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols +++ b/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols @@ -154,9 +154,9 @@ class Thing3 extends Thing2 { super(10, 20, 30); this._tag = tag; ->this._tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 49, 26)) +>this._tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 20, 32)) >this : Symbol(Thing3, Decl(mixinClassesAnonymous.ts, 45, 1)) ->_tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 49, 26)) +>_tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 20, 32)) >tag : Symbol(tag, Decl(mixinClassesAnonymous.ts, 48, 16)) } test() { diff --git a/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols.diff b/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols.diff index 4d547a8db9..7443722962 100644 --- a/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols.diff @@ -129,10 +129,10 @@ super(10, 20, 30); this._tag = tag; ->this._tag : Symbol(C._tag, Decl(mixinClassesAnonymous.ts, 20, 32)) -+>this._tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 49, 26)) ++>this._tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 20, 32)) >this : Symbol(Thing3, Decl(mixinClassesAnonymous.ts, 45, 1)) ->_tag : Symbol(C._tag, Decl(mixinClassesAnonymous.ts, 20, 32)) -+>_tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 49, 26)) ++>_tag : Symbol(_tag, Decl(mixinClassesAnonymous.ts, 20, 32)) >tag : Symbol(tag, Decl(mixinClassesAnonymous.ts, 48, 16)) } test() { diff --git a/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols b/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols index 7945340511..fe35cd8d19 100644 --- a/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols +++ b/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols @@ -296,16 +296,16 @@ class c3 extends c2 { >super : Symbol(c2, Decl(parserAstSpans1.ts, 69, 13)) this.p1 = super.c2_p1; ->this.p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) +>this.p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) >this : Symbol(c3, Decl(parserAstSpans1.ts, 106, 1)) ->p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) +>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) >super.c2_p1 : Symbol(c2_p1, Decl(parserAstSpans1.ts, 71, 10)) >super : Symbol(c2, Decl(parserAstSpans1.ts, 69, 13)) >c2_p1 : Symbol(c2_p1, Decl(parserAstSpans1.ts, 71, 10)) } /** c3 p1*/ public p1: number; ->p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) +>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) /** c3 f1*/ public f1() { diff --git a/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols.diff b/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols.diff index dbfb1dc10f..0c9a8f01c3 100644 --- a/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/parserAstSpans1.symbols.diff @@ -374,11 +374,11 @@ this.p1 = super.c2_p1; ->this.p1 : Symbol(c3.p1, Decl(parserAstSpans1.ts, 111, 5)) -+>this.p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) ++>this.p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) >this : Symbol(c3, Decl(parserAstSpans1.ts, 106, 1)) ->p1 : Symbol(c3.p1, Decl(parserAstSpans1.ts, 111, 5)) ->super.c2_p1 : Symbol(c2.c2_p1, Decl(parserAstSpans1.ts, 71, 10)) -+>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) ++>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) +>super.c2_p1 : Symbol(c2_p1, Decl(parserAstSpans1.ts, 71, 10)) >super : Symbol(c2, Decl(parserAstSpans1.ts, 69, 13)) ->c2_p1 : Symbol(c2.c2_p1, Decl(parserAstSpans1.ts, 71, 10)) @@ -387,7 +387,7 @@ /** c3 p1*/ public p1: number; ->p1 : Symbol(c3.p1, Decl(parserAstSpans1.ts, 111, 5)) -+>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 109, 18), Decl(parserAstSpans1.ts, 111, 5)) ++>p1 : Symbol(p1, Decl(parserAstSpans1.ts, 111, 5)) /** c3 f1*/ public f1() { diff --git a/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt b/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt index 32c5c27953..6b44ee27d8 100644 --- a/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt @@ -1,8 +1,9 @@ parserClass2.ts(1,43): error TS2304: Cannot find name 'ILogger'. parserClass2.ts(2,37): error TS2304: Cannot find name 'ILogger'. +parserClass2.ts(3,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. -==== parserClass2.ts (2 errors) ==== +==== parserClass2.ts (3 errors) ==== export class LoggerAdapter implements ILogger { ~~~~~~~ !!! error TS2304: Cannot find name 'ILogger'. @@ -10,5 +11,7 @@ parserClass2.ts(2,37): error TS2304: Cannot find name 'ILogger'. ~~~~~~~ !!! error TS2304: Cannot find name 'ILogger'. this._information = this.logger.information(); + ~~~~~~~~~~~~ +!!! error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt.diff deleted file mode 100644 index 72bdbfa9d5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserClass2.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.parserClass2.errors.txt -+++ new.parserClass2.errors.txt -@@= skipped -0, +0 lines =@@ - parserClass2.ts(1,43): error TS2304: Cannot find name 'ILogger'. - parserClass2.ts(2,37): error TS2304: Cannot find name 'ILogger'. --parserClass2.ts(3,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. - - --==== parserClass2.ts (3 errors) ==== -+==== parserClass2.ts (2 errors) ==== - export class LoggerAdapter implements ILogger { - ~~~~~~~ - !!! error TS2304: Cannot find name 'ILogger'. -@@= skipped -10, +9 lines =@@ - ~~~~~~~ - !!! error TS2304: Cannot find name 'ILogger'. - this._information = this.logger.information(); -- ~~~~~~~~~~~~ --!!! error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. - } - } diff --git a/testdata/baselines/reference/submodule/conformance/parserClass2.symbols b/testdata/baselines/reference/submodule/conformance/parserClass2.symbols index f822ebab1b..28f9588d7c 100644 --- a/testdata/baselines/reference/submodule/conformance/parserClass2.symbols +++ b/testdata/baselines/reference/submodule/conformance/parserClass2.symbols @@ -9,9 +9,7 @@ >ILogger : Symbol(ILogger) this._information = this.logger.information(); ->this._information : Symbol(_information, Decl(parserClass2.ts, 1, 46)) >this : Symbol(LoggerAdapter, Decl(parserClass2.ts, 0, 0)) ->_information : Symbol(_information, Decl(parserClass2.ts, 1, 46)) >this.logger : Symbol(logger, Decl(parserClass2.ts, 1, 21)) >this : Symbol(LoggerAdapter, Decl(parserClass2.ts, 0, 0)) >logger : Symbol(logger, Decl(parserClass2.ts, 1, 21)) diff --git a/testdata/baselines/reference/submodule/conformance/parserClass2.symbols.diff b/testdata/baselines/reference/submodule/conformance/parserClass2.symbols.diff index dd67938883..de2de22ace 100644 --- a/testdata/baselines/reference/submodule/conformance/parserClass2.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/parserClass2.symbols.diff @@ -9,10 +9,8 @@ >ILogger : Symbol(ILogger) this._information = this.logger.information(); -+>this._information : Symbol(_information, Decl(parserClass2.ts, 1, 46)) >this : Symbol(LoggerAdapter, Decl(parserClass2.ts, 0, 0)) ->this.logger : Symbol(LoggerAdapter.logger, Decl(parserClass2.ts, 1, 21)) -+>_information : Symbol(_information, Decl(parserClass2.ts, 1, 46)) +>this.logger : Symbol(logger, Decl(parserClass2.ts, 1, 21)) >this : Symbol(LoggerAdapter, Decl(parserClass2.ts, 0, 0)) ->logger : Symbol(LoggerAdapter.logger, Decl(parserClass2.ts, 1, 21)) diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols b/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols index 3a1938be45..7870b392f1 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols @@ -484,15 +484,15 @@ module TypeScript { >super : Symbol(AST, Decl(parserRealSource11.ts, 9, 5)) this.minChar = min; ->this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 183, 34)) +>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) >this : Symbol(IncompleteAST, Decl(parserRealSource11.ts, 179, 5)) ->minChar : Symbol(minChar, Decl(parserRealSource11.ts, 183, 34)) +>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) >min : Symbol(min, Decl(parserRealSource11.ts, 182, 21)) this.limChar = lim; ->this.limChar : Symbol(limChar, Decl(parserRealSource11.ts, 185, 31)) +>this.limChar : Symbol(limChar, Decl(parserRealSource11.ts, 7, 36)) >this : Symbol(IncompleteAST, Decl(parserRealSource11.ts, 179, 5)) ->limChar : Symbol(limChar, Decl(parserRealSource11.ts, 185, 31)) +>limChar : Symbol(limChar, Decl(parserRealSource11.ts, 7, 36)) >lim : Symbol(lim, Decl(parserRealSource11.ts, 182, 33)) } } @@ -900,9 +900,9 @@ module TypeScript { >TypeFlow : Symbol(TypeFlow) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 331, 46)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(Label, Decl(parserRealSource11.ts, 322, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 331, 46)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 331, 25)) return this; @@ -1084,9 +1084,9 @@ module TypeScript { >operand : Symbol(operand, Decl(parserRealSource11.ts, 362, 40)) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) return this; @@ -1103,9 +1103,9 @@ module TypeScript { >operand : Symbol(operand, Decl(parserRealSource11.ts, 362, 40)) this.type = typeFlow.stringType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) return this; @@ -1122,9 +1122,9 @@ module TypeScript { >operand : Symbol(operand, Decl(parserRealSource11.ts, 362, 40)) this.type = typeFlow.booleanType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) break; @@ -1176,9 +1176,9 @@ module TypeScript { >type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) this.type = this.castTerm.type; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this.castTerm.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this.castTerm : Symbol(castTerm, Decl(parserRealSource11.ts, 359, 39)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) @@ -1202,9 +1202,9 @@ module TypeScript { >operand : Symbol(operand, Decl(parserRealSource11.ts, 362, 40)) this.type = typeFlow.checker.undefinedType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) break; @@ -1462,9 +1462,9 @@ module TypeScript { >nodeType : Symbol(nodeType, Decl(parserRealSource11.ts, 517, 21)) this.minChar = this.target.minChar; ->this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 520, 28)) +>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) >this : Symbol(CallExpression, Decl(parserRealSource11.ts, 514, 5)) ->minChar : Symbol(minChar, Decl(parserRealSource11.ts, 520, 28)) +>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) >this.target.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) >this.target : Symbol(target, Decl(parserRealSource11.ts, 517, 40)) >this : Symbol(CallExpression, Decl(parserRealSource11.ts, 514, 5)) @@ -1663,9 +1663,9 @@ module TypeScript { case NodeType.Member: this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 594, 37)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(BinaryExpression, Decl(parserRealSource11.ts, 549, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 594, 37)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 556, 25)) return this; @@ -2038,9 +2038,9 @@ module TypeScript { >TypeFlow : Symbol(TypeFlow) this.type = typeFlow.doubleType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 737, 46)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(NumberLiteral, Decl(parserRealSource11.ts, 728, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 737, 46)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 737, 25)) return this; @@ -2169,9 +2169,9 @@ module TypeScript { >TypeFlow : Symbol(TypeFlow) this.type = typeFlow.regexType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 780, 46)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(RegexLiteral, Decl(parserRealSource11.ts, 773, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 780, 46)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 780, 25)) return this; @@ -2258,9 +2258,9 @@ module TypeScript { >TypeFlow : Symbol(TypeFlow) this.type = typeFlow.stringType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 807, 46)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(StringLiteral, Decl(parserRealSource11.ts, 792, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 807, 46)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 807, 25)) return this; @@ -3891,9 +3891,9 @@ module TypeScript { >TypeFlow : Symbol(TypeFlow) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 1305, 46)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(Statement, Decl(parserRealSource11.ts, 1291, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 1305, 46)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 1305, 25)) return this; @@ -6108,9 +6108,9 @@ module TypeScript { >defaultCase : Symbol(defaultCase, Decl(parserRealSource11.ts, 1933, 33)) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 1974, 83)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(SwitchStatement, Decl(parserRealSource11.ts, 1930, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 1974, 83)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 1968, 25)) return this; @@ -6295,9 +6295,9 @@ module TypeScript { >body : Symbol(body, Decl(parserRealSource11.ts, 2009, 32)) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 2034, 42)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(CaseStatement, Decl(parserRealSource11.ts, 2006, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 2034, 42)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2032, 25)) return this; @@ -6440,9 +6440,9 @@ module TypeScript { >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) this.type = typeLink.type; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeLink : Symbol(typeLink, Decl(parserRealSource11.ts, 2076, 15)) // in error recovery cases, there may not be a term @@ -6457,9 +6457,9 @@ module TypeScript { >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) >term : Symbol(term, Decl(parserRealSource11.ts, 2065, 21)) >type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) ->this.type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) } typeFlow.inTypeRefTypeCheck = prevInTCTR; @@ -6542,9 +6542,9 @@ module TypeScript { >finallyNode : Symbol(finallyNode, Decl(parserRealSource11.ts, 2098, 41)) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 2113, 77)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(TryFinally, Decl(parserRealSource11.ts, 2095, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 2113, 77)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2111, 25)) return this; @@ -6781,9 +6781,9 @@ module TypeScript { >catchNode : Symbol(catchNode, Decl(parserRealSource11.ts, 2143, 41)) this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 2186, 71)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(TryCatch, Decl(parserRealSource11.ts, 2140, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 2186, 71)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2184, 25)) return this; @@ -7144,9 +7144,9 @@ module TypeScript { >undefined : Symbol(undefined) } this.type = typeFlow.voidType; ->this.type : Symbol(type, Decl(parserRealSource11.ts, 2290, 13)) +>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(Catch, Decl(parserRealSource11.ts, 2218, 5)) ->type : Symbol(type, Decl(parserRealSource11.ts, 2290, 13)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2258, 25)) typeFlow.scope = prevScope; diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols.diff index 76a7744ceb..f1320a0ff9 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols.diff @@ -349,18 +349,18 @@ this.minChar = min; ->this.minChar : Symbol(ASTSpan.minChar, Decl(parserRealSource11.ts, 6, 26)) -+>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 183, 34)) ++>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) >this : Symbol(IncompleteAST, Decl(parserRealSource11.ts, 179, 5)) ->minChar : Symbol(ASTSpan.minChar, Decl(parserRealSource11.ts, 6, 26)) -+>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 183, 34)) ++>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) >min : Symbol(min, Decl(parserRealSource11.ts, 182, 21)) this.limChar = lim; ->this.limChar : Symbol(ASTSpan.limChar, Decl(parserRealSource11.ts, 7, 36)) -+>this.limChar : Symbol(limChar, Decl(parserRealSource11.ts, 185, 31)) ++>this.limChar : Symbol(limChar, Decl(parserRealSource11.ts, 7, 36)) >this : Symbol(IncompleteAST, Decl(parserRealSource11.ts, 179, 5)) ->limChar : Symbol(ASTSpan.limChar, Decl(parserRealSource11.ts, 7, 36)) -+>limChar : Symbol(limChar, Decl(parserRealSource11.ts, 185, 31)) ++>limChar : Symbol(limChar, Decl(parserRealSource11.ts, 7, 36)) >lim : Symbol(lim, Decl(parserRealSource11.ts, 182, 33)) } } @@ -777,10 +777,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 331, 46)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(Label, Decl(parserRealSource11.ts, 322, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 331, 46)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 331, 25)) return this; @@ -922,10 +922,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) return this; @@ -947,10 +947,10 @@ this.type = typeFlow.stringType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) return this; @@ -972,10 +972,10 @@ this.type = typeFlow.booleanType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) break; @@ -1048,12 +1048,12 @@ this.type = this.castTerm.type; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) ->this.castTerm.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) ->this.castTerm : Symbol(UnaryExpression.castTerm, Decl(parserRealSource11.ts, 359, 39)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.castTerm.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) +>this.castTerm : Symbol(castTerm, Decl(parserRealSource11.ts, 359, 39)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) @@ -1082,10 +1082,10 @@ this.type = typeFlow.checker.undefinedType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(UnaryExpression, Decl(parserRealSource11.ts, 356, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 401, 68), Decl(parserRealSource11.ts, 406, 68), Decl(parserRealSource11.ts, 411, 68), Decl(parserRealSource11.ts, 422, 93), Decl(parserRealSource11.ts, 430, 68)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 374, 25)) break; @@ -1347,12 +1347,12 @@ this.minChar = this.target.minChar; ->this.minChar : Symbol(ASTSpan.minChar, Decl(parserRealSource11.ts, 6, 26)) -+>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 520, 28)) ++>this.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) >this : Symbol(CallExpression, Decl(parserRealSource11.ts, 514, 5)) ->minChar : Symbol(ASTSpan.minChar, Decl(parserRealSource11.ts, 6, 26)) ->this.target.minChar : Symbol(ASTSpan.minChar, Decl(parserRealSource11.ts, 6, 26)) ->this.target : Symbol(CallExpression.target, Decl(parserRealSource11.ts, 517, 40)) -+>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 520, 28)) ++>minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) +>this.target.minChar : Symbol(minChar, Decl(parserRealSource11.ts, 6, 26)) +>this.target : Symbol(target, Decl(parserRealSource11.ts, 517, 40)) >this : Symbol(CallExpression, Decl(parserRealSource11.ts, 514, 5)) @@ -1506,10 +1506,10 @@ case NodeType.Member: this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 594, 37)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(BinaryExpression, Decl(parserRealSource11.ts, 549, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 594, 37)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 556, 25)) return this; @@ -1796,10 +1796,10 @@ this.type = typeFlow.doubleType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 737, 46)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(NumberLiteral, Decl(parserRealSource11.ts, 728, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 737, 46)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 737, 25)) return this; @@ -1949,10 +1949,10 @@ this.type = typeFlow.regexType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 780, 46)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(RegexLiteral, Decl(parserRealSource11.ts, 773, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 780, 46)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 780, 25)) return this; @@ -2017,10 +2017,10 @@ this.type = typeFlow.stringType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 807, 46)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(StringLiteral, Decl(parserRealSource11.ts, 792, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 807, 46)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 807, 25)) return this; @@ -3800,10 +3800,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 1305, 46)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(Statement, Decl(parserRealSource11.ts, 1291, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 1305, 46)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 1305, 25)) return this; @@ -5733,10 +5733,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 1974, 83)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(SwitchStatement, Decl(parserRealSource11.ts, 1930, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 1974, 83)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 1968, 25)) return this; @@ -5882,10 +5882,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 2034, 42)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(CaseStatement, Decl(parserRealSource11.ts, 2006, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 2034, 42)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2032, 25)) return this; @@ -5996,10 +5996,10 @@ this.type = typeLink.type; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeLink : Symbol(typeLink, Decl(parserRealSource11.ts, 2076, 15)) // in error recovery cases, there may not be a term @@ -6021,10 +6021,10 @@ ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) +>term : Symbol(term, Decl(parserRealSource11.ts, 2065, 21)) +>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(TypeReference, Decl(parserRealSource11.ts, 2062, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 2083, 66)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) } typeFlow.inTypeRefTypeCheck = prevInTCTR; @@ -6111,10 +6111,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 2113, 77)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(TryFinally, Decl(parserRealSource11.ts, 2095, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 2113, 77)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2111, 25)) return this; @@ -6268,10 +6268,10 @@ this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 2186, 71)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(TryCatch, Decl(parserRealSource11.ts, 2140, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 2186, 71)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2184, 25)) return this; @@ -6606,10 +6606,10 @@ } this.type = typeFlow.voidType; ->this.type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>this.type : Symbol(type, Decl(parserRealSource11.ts, 2290, 13)) ++>this.type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >this : Symbol(Catch, Decl(parserRealSource11.ts, 2218, 5)) ->type : Symbol(AST.type, Decl(parserRealSource11.ts, 11, 38)) -+>type : Symbol(type, Decl(parserRealSource11.ts, 2290, 13)) ++>type : Symbol(type, Decl(parserRealSource11.ts, 11, 38)) >typeFlow : Symbol(typeFlow, Decl(parserRealSource11.ts, 2258, 25)) typeFlow.scope = prevScope; diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource11.types b/testdata/baselines/reference/submodule/conformance/parserRealSource11.types index efef683941..0fa88d6265 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource11.types +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource11.types @@ -1322,9 +1322,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -1605,9 +1605,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -1635,9 +1635,9 @@ module TypeScript { this.type = typeFlow.stringType; >this.type = typeFlow.stringType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.stringType : any >typeFlow : TypeFlow >stringType : any @@ -1665,9 +1665,9 @@ module TypeScript { this.type = typeFlow.booleanType; >this.type = typeFlow.booleanType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.booleanType : any >typeFlow : TypeFlow >booleanType : any @@ -1748,9 +1748,9 @@ module TypeScript { this.type = this.castTerm.type; >this.type = this.castTerm.type : Type ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >this.castTerm.type : Type >this.castTerm : AST >this : this @@ -1783,9 +1783,9 @@ module TypeScript { this.type = typeFlow.checker.undefinedType; >this.type = typeFlow.checker.undefinedType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.checker.undefinedType : any >typeFlow.checker : any >typeFlow : TypeFlow @@ -2658,9 +2658,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -3376,9 +3376,9 @@ module TypeScript { this.type = typeFlow.doubleType; >this.type = typeFlow.doubleType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.doubleType : any >typeFlow : TypeFlow >doubleType : any @@ -3549,9 +3549,9 @@ module TypeScript { this.type = typeFlow.regexType; >this.type = typeFlow.regexType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.regexType : any >typeFlow : TypeFlow >regexType : any @@ -3677,9 +3677,9 @@ module TypeScript { this.type = typeFlow.stringType; >this.type = typeFlow.stringType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.stringType : any >typeFlow : TypeFlow >stringType : any @@ -5795,9 +5795,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -9172,9 +9172,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -9466,9 +9466,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -9688,9 +9688,9 @@ module TypeScript { this.type = typeLink.type; >this.type = typeLink.type : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeLink.type : any >typeLink : any >type : any @@ -9702,15 +9702,15 @@ module TypeScript { >term : AST this.term.type = this.type; ->this.term.type = this.type : any +>this.term.type = this.type : Type >this.term.type : Type >this.term : AST >this : this >term : AST >type : Type ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type } typeFlow.inTypeRefTypeCheck = prevInTCTR; @@ -9825,9 +9825,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -10224,9 +10224,9 @@ module TypeScript { this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any @@ -10809,9 +10809,9 @@ module TypeScript { } this.type = typeFlow.voidType; >this.type = typeFlow.voidType : any ->this.type : any +>this.type : Type >this : this ->type : any +>type : Type >typeFlow.voidType : any >typeFlow : TypeFlow >voidType : any diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource11.types.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource11.types.diff deleted file mode 100644 index b9b88c72a1..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource11.types.diff +++ /dev/null @@ -1,225 +0,0 @@ ---- old.parserRealSource11.types -+++ new.parserRealSource11.types -@@= skipped -1321, +1321 lines =@@ - - this.type = typeFlow.voidType; - >this.type = typeFlow.voidType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.voidType : any - >typeFlow : TypeFlow - >voidType : any -@@= skipped -283, +283 lines =@@ - - this.type = typeFlow.voidType; - >this.type = typeFlow.voidType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.voidType : any - >typeFlow : TypeFlow - >voidType : any -@@= skipped -30, +30 lines =@@ - - this.type = typeFlow.stringType; - >this.type = typeFlow.stringType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.stringType : any - >typeFlow : TypeFlow - >stringType : any -@@= skipped -30, +30 lines =@@ - - this.type = typeFlow.booleanType; - >this.type = typeFlow.booleanType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.booleanType : any - >typeFlow : TypeFlow - >booleanType : any -@@= skipped -83, +83 lines =@@ - - this.type = this.castTerm.type; - >this.type = this.castTerm.type : Type -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >this.castTerm.type : Type - >this.castTerm : AST - >this : this -@@= skipped -35, +35 lines =@@ - - this.type = typeFlow.checker.undefinedType; - >this.type = typeFlow.checker.undefinedType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.checker.undefinedType : any - >typeFlow.checker : any - >typeFlow : TypeFlow -@@= skipped -875, +875 lines =@@ - - this.type = typeFlow.voidType; - >this.type = typeFlow.voidType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.voidType : any - >typeFlow : TypeFlow - >voidType : any -@@= skipped -718, +718 lines =@@ - - this.type = typeFlow.doubleType; - >this.type = typeFlow.doubleType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.doubleType : any - >typeFlow : TypeFlow - >doubleType : any -@@= skipped -173, +173 lines =@@ - - this.type = typeFlow.regexType; - >this.type = typeFlow.regexType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.regexType : any - >typeFlow : TypeFlow - >regexType : any -@@= skipped -128, +128 lines =@@ - - this.type = typeFlow.stringType; - >this.type = typeFlow.stringType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.stringType : any - >typeFlow : TypeFlow - >stringType : any -@@= skipped -2118, +2118 lines =@@ - - this.type = typeFlow.voidType; - >this.type = typeFlow.voidType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.voidType : any - >typeFlow : TypeFlow - >voidType : any -@@= skipped -3377, +3377 lines =@@ - - this.type = typeFlow.voidType; - >this.type = typeFlow.voidType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.voidType : any - >typeFlow : TypeFlow - >voidType : any -@@= skipped -294, +294 lines =@@ - - this.type = typeFlow.voidType; - >this.type = typeFlow.voidType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.voidType : any - >typeFlow : TypeFlow - >voidType : any -@@= skipped -222, +222 lines =@@ - - this.type = typeLink.type; - >this.type = typeLink.type : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeLink.type : any - >typeLink : any - >type : any -@@= skipped -14, +14 lines =@@ - >term : AST - - this.term.type = this.type; -->this.term.type = this.type : Type -+>this.term.type = this.type : any - >this.term.type : Type - >this.term : AST - >this : this - >term : AST - >type : Type -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - } - - typeFlow.inTypeRefTypeCheck = prevInTCTR; -@@= skipped -123, +123 lines =@@ - - this.type = typeFlow.voidType; - >this.type = typeFlow.voidType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.voidType : any - >typeFlow : TypeFlow - >voidType : any -@@= skipped -399, +399 lines =@@ - - this.type = typeFlow.voidType; - >this.type = typeFlow.voidType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.voidType : any - >typeFlow : TypeFlow - >voidType : any -@@= skipped -585, +585 lines =@@ - } - this.type = typeFlow.voidType; - >this.type = typeFlow.voidType : any -->this.type : Type -+>this.type : any - >this : this -->type : Type -+>type : any - >typeFlow.voidType : any - >typeFlow : TypeFlow - >voidType : any diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols b/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols index 8c54742a34..d532209470 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols @@ -44,7 +44,7 @@ module TypeScript { // initialize the 'constructor' field this["constructor"] = undefined; >this : Symbol(BlockIntrinsics, Decl(parserRealSource4.ts, 5, 19)) ->"constructor" : Symbol(constructor, Decl(parserRealSource4.ts, 16, 24)) +>"constructor" : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) } } diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols.diff index f7ee666626..aba382fd97 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource4.symbols.diff @@ -43,7 +43,7 @@ this["constructor"] = undefined; >this : Symbol(BlockIntrinsics, Decl(parserRealSource4.ts, 5, 19)) ->"constructor" : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) -+>"constructor" : Symbol(constructor, Decl(parserRealSource4.ts, 16, 24)) ++>"constructor" : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) } } diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource4.types b/testdata/baselines/reference/submodule/conformance/parserRealSource4.types index 0cb9f6b068..7bc56dad4d 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource4.types +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource4.types @@ -44,7 +44,7 @@ module TypeScript { // initialize the 'constructor' field this["constructor"] = undefined; >this["constructor"] = undefined : undefined ->this["constructor"] : any +>this["constructor"] : Function >this : this >"constructor" : "constructor" >undefined : undefined diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource4.types.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource4.types.diff deleted file mode 100644 index d549407643..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource4.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.parserRealSource4.types -+++ new.parserRealSource4.types -@@= skipped -43, +43 lines =@@ - // initialize the 'constructor' field - this["constructor"] = undefined; - >this["constructor"] = undefined : undefined -->this["constructor"] : Function -+>this["constructor"] : any - >this : this - >"constructor" : "constructor" - >undefined : undefined diff --git a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols index 51c933123f..3c241379aa 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols +++ b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols @@ -24,7 +24,6 @@ class A { this["#foo"] = 3; // Okay (type has index signature and "#foo" does not collide with private identifier #foo) >this : Symbol(A, Decl(privateNameAndIndexSignature.ts, 0, 0)) ->"#foo" : Symbol("#foo", Decl(privateNameAndIndexSignature.ts, 5, 19)) } } diff --git a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols.diff b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols.diff index 3bb9f0e2e4..e01d35354e 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.symbols.diff @@ -18,11 +18,3 @@ constructor(message: string) { >message : Symbol(message, Decl(privateNameAndIndexSignature.ts, 4, 16)) -@@= skipped -16, +16 lines =@@ - - this["#foo"] = 3; // Okay (type has index signature and "#foo" does not collide with private identifier #foo) - >this : Symbol(A, Decl(privateNameAndIndexSignature.ts, 0, 0)) -+>"#foo" : Symbol("#foo", Decl(privateNameAndIndexSignature.ts, 5, 19)) - - } - } diff --git a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types index 4ae69d6cf4..e0d1a3b416 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types +++ b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types @@ -29,7 +29,7 @@ class A { this["#foo"] = 3; // Okay (type has index signature and "#foo" does not collide with private identifier #foo) >this["#foo"] = 3 : 3 ->this["#foo"] : number +>this["#foo"] : any >this : this >"#foo" : "#foo" >3 : 3 diff --git a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types.diff b/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types.diff deleted file mode 100644 index 69b43dc089..0000000000 --- a/testdata/baselines/reference/submodule/conformance/privateNameAndIndexSignature.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.privateNameAndIndexSignature.types -+++ new.privateNameAndIndexSignature.types -@@= skipped -28, +28 lines =@@ - - 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["#foo"] : number - >this : this - >"#foo" : "#foo" - >3 : 3 diff --git a/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols b/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols index ad66ed300a..554526879f 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols +++ b/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols @@ -6,9 +6,9 @@ class AA { #method() { this.x = 10; }; >#method : Symbol(#method, Decl(privateNameMethodCallExpression.ts, 0, 10)) ->this.x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) +>this.x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) >this : Symbol(AA, Decl(privateNameMethodCallExpression.ts, 0, 0)) ->x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) +>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) #method2(a, ...b) {}; >#method2 : Symbol(#method2, Decl(privateNameMethodCallExpression.ts, 1, 31)) @@ -16,7 +16,7 @@ class AA { >b : Symbol(b, Decl(privateNameMethodCallExpression.ts, 2, 15)) x = 1; ->x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) +>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) test() { >test : Symbol(test, Decl(privateNameMethodCallExpression.ts, 3, 10)) diff --git a/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols.diff b/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols.diff index 24ff8d8f84..302a50c03d 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/privateNameMethodCallExpression.symbols.diff @@ -7,10 +7,10 @@ ->#method : Symbol(AA.#method, Decl(privateNameMethodCallExpression.ts, 0, 10)) ->this.x : Symbol(AA.x, Decl(privateNameMethodCallExpression.ts, 2, 25)) +>#method : Symbol(#method, Decl(privateNameMethodCallExpression.ts, 0, 10)) -+>this.x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) ++>this.x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) >this : Symbol(AA, Decl(privateNameMethodCallExpression.ts, 0, 0)) ->x : Symbol(AA.x, Decl(privateNameMethodCallExpression.ts, 2, 25)) -+>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) ++>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) #method2(a, ...b) {}; ->#method2 : Symbol(AA.#method2, Decl(privateNameMethodCallExpression.ts, 1, 31)) @@ -20,7 +20,7 @@ x = 1; ->x : Symbol(AA.x, Decl(privateNameMethodCallExpression.ts, 2, 25)) -+>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 1, 15), Decl(privateNameMethodCallExpression.ts, 2, 25)) ++>x : Symbol(x, Decl(privateNameMethodCallExpression.ts, 2, 25)) test() { ->test : Symbol(AA.test, Decl(privateNameMethodCallExpression.ts, 3, 10)) diff --git a/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols b/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols index 269f1e1311..d810fd9f56 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols +++ b/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols @@ -6,9 +6,9 @@ class AA { static #method() { this.x = 10; }; >#method : Symbol(#method, Decl(privateNameStaticMethodCallExpression.ts, 0, 10)) ->this.x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) +>this.x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) >this : Symbol(AA, Decl(privateNameStaticMethodCallExpression.ts, 0, 0)) ->x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) +>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) static #method2(a, ...b) {}; >#method2 : Symbol(#method2, Decl(privateNameStaticMethodCallExpression.ts, 1, 38)) @@ -16,7 +16,7 @@ class AA { >b : Symbol(b, Decl(privateNameStaticMethodCallExpression.ts, 2, 22)) static x = 1; ->x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) +>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) test() { >test : Symbol(test, Decl(privateNameStaticMethodCallExpression.ts, 3, 17)) diff --git a/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols.diff b/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols.diff index 7da5ca836d..5c372137f2 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/privateNameStaticMethodCallExpression.symbols.diff @@ -7,10 +7,10 @@ ->#method : Symbol(AA.#method, Decl(privateNameStaticMethodCallExpression.ts, 0, 10)) ->this.x : Symbol(AA.x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) +>#method : Symbol(#method, Decl(privateNameStaticMethodCallExpression.ts, 0, 10)) -+>this.x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) ++>this.x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) >this : Symbol(AA, Decl(privateNameStaticMethodCallExpression.ts, 0, 0)) ->x : Symbol(AA.x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) -+>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) ++>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) static #method2(a, ...b) {}; ->#method2 : Symbol(AA.#method2, Decl(privateNameStaticMethodCallExpression.ts, 1, 38)) @@ -20,7 +20,7 @@ static x = 1; ->x : Symbol(AA.x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) -+>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 1, 22), Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) ++>x : Symbol(x, Decl(privateNameStaticMethodCallExpression.ts, 2, 32)) test() { ->test : Symbol(AA.test, Decl(privateNameStaticMethodCallExpression.ts, 3, 17)) diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt index a6b6c3d618..324b43eef1 100644 --- a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt @@ -1,8 +1,9 @@ +readonlyConstructorAssignment.ts(13,14): error TS2540: Cannot assign to 'x' because it is a read-only property. 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'. -==== readonlyConstructorAssignment.ts (1 errors) ==== +==== readonlyConstructorAssignment.ts (2 errors) ==== // Tests that readonly parameter properties behave like regular readonly properties class A { @@ -16,6 +17,8 @@ readonlyConstructorAssignment.ts(33,7): error TS2415: Class 'E' incorrectly exte super(x); // Fails, x is readonly this.x = 1; + ~ +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. } } diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt.diff deleted file mode 100644 index 33d2b08402..0000000000 --- a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.readonlyConstructorAssignment.errors.txt -+++ new.readonlyConstructorAssignment.errors.txt -@@= skipped -0, +0 lines =@@ --readonlyConstructorAssignment.ts(13,14): error TS2540: Cannot assign to 'x' because it is a read-only property. - 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'. - - --==== readonlyConstructorAssignment.ts (2 errors) ==== -+==== readonlyConstructorAssignment.ts (1 errors) ==== - // Tests that readonly parameter properties behave like regular readonly properties - - class A { -@@= skipped -16, +15 lines =@@ - super(x); - // Fails, x is readonly - this.x = 1; -- ~ --!!! error TS2540: Cannot assign to 'x' because it is a read-only property. - } - } - diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols index 42d1feff7c..4a793fbca5 100644 --- a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols +++ b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols @@ -29,9 +29,9 @@ class B extends A { // Fails, x is readonly this.x = 1; ->this.x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 10, 17)) +>this.x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 3, 16)) >this : Symbol(B, Decl(readonlyConstructorAssignment.ts, 6, 1)) ->x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 10, 17)) +>x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 3, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols.diff b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols.diff index af1ffa61b3..459527c70e 100644 --- a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.symbols.diff @@ -21,10 +21,10 @@ // Fails, x is readonly this.x = 1; ->this.x : Symbol(A.x, Decl(readonlyConstructorAssignment.ts, 3, 16)) -+>this.x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 10, 17)) ++>this.x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 3, 16)) >this : Symbol(B, Decl(readonlyConstructorAssignment.ts, 6, 1)) ->x : Symbol(A.x, Decl(readonlyConstructorAssignment.ts, 3, 16)) -+>x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 10, 17)) ++>x : Symbol(x, Decl(readonlyConstructorAssignment.ts, 3, 16)) } } diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types index 0fafbef3a1..9820fd91f0 100644 --- a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types +++ b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types @@ -33,9 +33,9 @@ class B extends A { // Fails, x is readonly this.x = 1; >this.x = 1 : 1 ->this.x : number +>this.x : any >this : this ->x : number +>x : any >1 : 1 } } diff --git a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types.diff b/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types.diff deleted file mode 100644 index 1fe7c9ec3a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/readonlyConstructorAssignment.types.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.readonlyConstructorAssignment.types -+++ new.readonlyConstructorAssignment.types -@@= skipped -32, +32 lines =@@ - // Fails, x is readonly - this.x = 1; - >this.x = 1 : 1 -->this.x : any -+>this.x : number - >this : this -->x : any -+>x : number - >1 : 1 - } - } diff --git a/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt b/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt index 92cf666363..8de9048f48 100644 --- a/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt @@ -1,8 +1,9 @@ scannerClass2.ts(1,43): error TS2304: Cannot find name 'ILogger'. scannerClass2.ts(2,37): error TS2304: Cannot find name 'ILogger'. +scannerClass2.ts(3,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. -==== scannerClass2.ts (2 errors) ==== +==== scannerClass2.ts (3 errors) ==== export class LoggerAdapter implements ILogger { ~~~~~~~ !!! error TS2304: Cannot find name 'ILogger'. @@ -10,5 +11,7 @@ scannerClass2.ts(2,37): error TS2304: Cannot find name 'ILogger'. ~~~~~~~ !!! error TS2304: Cannot find name 'ILogger'. this._information = this.logger.information(); + ~~~~~~~~~~~~ +!!! error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt.diff deleted file mode 100644 index cd5cb048ff..0000000000 --- a/testdata/baselines/reference/submodule/conformance/scannerClass2.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.scannerClass2.errors.txt -+++ new.scannerClass2.errors.txt -@@= skipped -0, +0 lines =@@ - scannerClass2.ts(1,43): error TS2304: Cannot find name 'ILogger'. - scannerClass2.ts(2,37): error TS2304: Cannot find name 'ILogger'. --scannerClass2.ts(3,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. - - --==== scannerClass2.ts (3 errors) ==== -+==== scannerClass2.ts (2 errors) ==== - export class LoggerAdapter implements ILogger { - ~~~~~~~ - !!! error TS2304: Cannot find name 'ILogger'. -@@= skipped -10, +9 lines =@@ - ~~~~~~~ - !!! error TS2304: Cannot find name 'ILogger'. - this._information = this.logger.information(); -- ~~~~~~~~~~~~ --!!! error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. - } - } diff --git a/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols b/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols index 039c2ffc14..2cc283d643 100644 --- a/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols +++ b/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols @@ -9,9 +9,7 @@ >ILogger : Symbol(ILogger) this._information = this.logger.information(); ->this._information : Symbol(_information, Decl(scannerClass2.ts, 1, 46)) >this : Symbol(LoggerAdapter, Decl(scannerClass2.ts, 0, 0)) ->_information : Symbol(_information, Decl(scannerClass2.ts, 1, 46)) >this.logger : Symbol(logger, Decl(scannerClass2.ts, 1, 21)) >this : Symbol(LoggerAdapter, Decl(scannerClass2.ts, 0, 0)) >logger : Symbol(logger, Decl(scannerClass2.ts, 1, 21)) diff --git a/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols.diff b/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols.diff index 67848d8e3b..2145b3ee77 100644 --- a/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/scannerClass2.symbols.diff @@ -9,10 +9,8 @@ >ILogger : Symbol(ILogger) this._information = this.logger.information(); -+>this._information : Symbol(_information, Decl(scannerClass2.ts, 1, 46)) >this : Symbol(LoggerAdapter, Decl(scannerClass2.ts, 0, 0)) ->this.logger : Symbol(LoggerAdapter.logger, Decl(scannerClass2.ts, 1, 21)) -+>_information : Symbol(_information, Decl(scannerClass2.ts, 1, 46)) +>this.logger : Symbol(logger, Decl(scannerClass2.ts, 1, 21)) >this : Symbol(LoggerAdapter, Decl(scannerClass2.ts, 0, 0)) ->logger : Symbol(LoggerAdapter.logger, Decl(scannerClass2.ts, 1, 21)) diff --git a/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt b/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt index 392b07ceef..f2f7d82423 100644 --- a/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt @@ -1,8 +1,11 @@ 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'. +typeRelationships.ts(35,9): error TS2739: Type 'C' is missing the following properties from type 'D': self1, self2, self3, d, bar +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'. -==== typeRelationships.ts (1 errors) ==== +==== typeRelationships.ts (3 errors) ==== class C { self = this; c = new C(); @@ -41,7 +44,12 @@ typeRelationships.ts(9,9): error TS2322: Type 'C' is not assignable to type 'thi 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 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/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt.diff deleted file mode 100644 index b18942bf28..0000000000 --- a/testdata/baselines/reference/submodule/conformance/typeRelationships.errors.txt.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- old.typeRelationships.errors.txt -+++ new.typeRelationships.errors.txt -@@= skipped -0, +0 lines =@@ - 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'. --typeRelationships.ts(35,9): error TS2739: Type 'C' is missing the following properties from type 'D': self1, self2, self3, d, bar --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'. - - --==== typeRelationships.ts (3 errors) ==== -+==== typeRelationships.ts (1 errors) ==== - class C { - self = this; - c = new C(); -@@= skipped -43, +40 lines =@@ - 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 - 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/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols b/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols index ffb87d9a37..f556aa23b3 100644 --- a/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols +++ b/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols @@ -87,9 +87,9 @@ class D extends C { self2 = this.self; >self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) ->this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) self3 = this.foo(); >self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) @@ -105,25 +105,25 @@ class D extends C { >bar : Symbol(bar, Decl(typeRelationships.ts, 25, 16)) this.self = this.self1; ->this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this.self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) this.self = this.self2; ->this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this.self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) this.self = this.self3; ->this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this.self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) @@ -132,54 +132,54 @@ class D extends C { >this.self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) ->this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) this.self2 = this.self; >this.self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) ->this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) this.self3 = this.self; >this.self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) ->this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) this.d = this.self; >this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) ->this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) this.d = this.c; // Error >this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) ->this.c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) +>this.c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) +>c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) this.self = this.d; // Error ->this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) +>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) this.c = this.d; ->this.c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) +>this.c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) +>c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) >this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) >d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) diff --git a/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols.diff b/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols.diff index ae84f28578..82f312e4ba 100644 --- a/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/typeRelationships.symbols.diff @@ -109,10 +109,10 @@ ->self2 : Symbol(D.self2, Decl(typeRelationships.ts, 22, 17)) ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) +>self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) self3 = this.foo(); ->self3 : Symbol(D.self3, Decl(typeRelationships.ts, 23, 22)) @@ -134,11 +134,11 @@ this.self = this.self1; ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) ->this.self1 : Symbol(D.self1, Decl(typeRelationships.ts, 21, 19)) -+>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self1 : Symbol(D.self1, Decl(typeRelationships.ts, 21, 19)) @@ -146,11 +146,11 @@ this.self = this.self2; ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) ->this.self2 : Symbol(D.self2, Decl(typeRelationships.ts, 22, 17)) -+>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self2 : Symbol(D.self2, Decl(typeRelationships.ts, 22, 17)) @@ -158,11 +158,11 @@ this.self = this.self3; ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) ->this.self3 : Symbol(D.self3, Decl(typeRelationships.ts, 23, 22)) -+>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self3 : Symbol(D.self3, Decl(typeRelationships.ts, 23, 22)) @@ -175,10 +175,10 @@ ->self1 : Symbol(D.self1, Decl(typeRelationships.ts, 21, 19)) ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) +>self1 : Symbol(self1, Decl(typeRelationships.ts, 21, 19)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) this.self2 = this.self; ->this.self2 : Symbol(D.self2, Decl(typeRelationships.ts, 22, 17)) @@ -187,10 +187,10 @@ ->self2 : Symbol(D.self2, Decl(typeRelationships.ts, 22, 17)) ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) +>self2 : Symbol(self2, Decl(typeRelationships.ts, 22, 17)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) this.self3 = this.self; ->this.self3 : Symbol(D.self3, Decl(typeRelationships.ts, 23, 22)) @@ -199,10 +199,10 @@ ->self3 : Symbol(D.self3, Decl(typeRelationships.ts, 23, 22)) ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) +>self3 : Symbol(self3, Decl(typeRelationships.ts, 23, 22)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) this.d = this.self; ->this.d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) @@ -211,10 +211,10 @@ ->d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) +>d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) this.d = this.c; // Error ->this.d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) @@ -223,18 +223,18 @@ ->d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) ->this.c : Symbol(C.c, Decl(typeRelationships.ts, 1, 16)) +>d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) -+>this.c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) ++>this.c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->c : Symbol(C.c, Decl(typeRelationships.ts, 1, 16)) -+>c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) ++>c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) this.self = this.d; // Error ->this.self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) -+>this.self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>this.self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->self : Symbol(C.self, Decl(typeRelationships.ts, 0, 9)) ->this.d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) -+>self : Symbol(self, Decl(typeRelationships.ts, 26, 11), Decl(typeRelationships.ts, 27, 31), Decl(typeRelationships.ts, 28, 31), Decl(typeRelationships.ts, 34, 24)) ++>self : Symbol(self, Decl(typeRelationships.ts, 0, 9)) +>this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) @@ -242,11 +242,11 @@ this.c = this.d; ->this.c : Symbol(C.c, Decl(typeRelationships.ts, 1, 16)) -+>this.c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) ++>this.c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->c : Symbol(C.c, Decl(typeRelationships.ts, 1, 16)) ->this.d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) -+>c : Symbol(c, Decl(typeRelationships.ts, 35, 27)) ++>c : Symbol(c, Decl(typeRelationships.ts, 1, 16)) +>this.d : Symbol(d, Decl(typeRelationships.ts, 24, 23)) >this : Symbol(D, Decl(typeRelationships.ts, 19, 1)) ->d : Symbol(D.d, Decl(typeRelationships.ts, 24, 23)) diff --git a/testdata/baselines/reference/submodule/conformance/typeRelationships.types b/testdata/baselines/reference/submodule/conformance/typeRelationships.types index 034651cbb3..7f9d5d240c 100644 --- a/testdata/baselines/reference/submodule/conformance/typeRelationships.types +++ b/testdata/baselines/reference/submodule/conformance/typeRelationships.types @@ -91,10 +91,10 @@ class D extends C { >this : this self2 = this.self; ->self2 : any ->this.self : any +>self2 : this +>this.self : this >this : this ->self : any +>self : this self3 = this.foo(); >self3 : this @@ -113,90 +113,90 @@ class D extends C { this.self = this.self1; >this.self = this.self1 : this ->this.self : any +>this.self : this >this : this ->self : any +>self : this >this.self1 : this >this : this >self1 : this this.self = this.self2; ->this.self = this.self2 : any ->this.self : any +>this.self = this.self2 : this +>this.self : this >this : this ->self : any ->this.self2 : any +>self : this +>this.self2 : this >this : this ->self2 : any +>self2 : this this.self = this.self3; >this.self = this.self3 : this ->this.self : any +>this.self : this >this : this ->self : any +>self : this >this.self3 : this >this : this >self3 : this this.self1 = this.self; ->this.self1 = this.self : any +>this.self1 = this.self : this >this.self1 : this >this : this >self1 : this ->this.self : any +>this.self : this >this : this ->self : any +>self : this this.self2 = this.self; ->this.self2 = this.self : any ->this.self2 : any +>this.self2 = this.self : this +>this.self2 : this >this : this ->self2 : any ->this.self : any +>self2 : this +>this.self : this >this : this ->self : any +>self : this this.self3 = this.self; ->this.self3 = this.self : any +>this.self3 = this.self : this >this.self3 : this >this : this >self3 : this ->this.self : any +>this.self : this >this : this ->self : any +>self : this this.d = this.self; ->this.d = this.self : any +>this.d = this.self : this >this.d : D >this : this >d : D ->this.self : any +>this.self : this >this : this ->self : any +>self : this this.d = this.c; // Error ->this.d = this.c : D +>this.d = this.c : C >this.d : D >this : this >d : D ->this.c : D +>this.c : C >this : this ->c : D +>c : C this.self = this.d; // Error >this.self = this.d : D ->this.self : any +>this.self : this >this : this ->self : any +>self : this >this.d : D >this : this >d : D this.c = this.d; >this.c = this.d : D ->this.c : D +>this.c : C >this : this ->c : D +>c : C >this.d : D >this : this >d : D diff --git a/testdata/baselines/reference/submodule/conformance/typeRelationships.types.diff b/testdata/baselines/reference/submodule/conformance/typeRelationships.types.diff deleted file mode 100644 index 67b9381e12..0000000000 --- a/testdata/baselines/reference/submodule/conformance/typeRelationships.types.diff +++ /dev/null @@ -1,137 +0,0 @@ ---- old.typeRelationships.types -+++ new.typeRelationships.types -@@= skipped -90, +90 lines =@@ - >this : this - - self2 = this.self; -->self2 : this -->this.self : this -+>self2 : any -+>this.self : any - >this : this -->self : this -+>self : any - - self3 = this.foo(); - >self3 : this -@@= skipped -22, +22 lines =@@ - - this.self = this.self1; - >this.self = this.self1 : this -->this.self : this -+>this.self : any - >this : this -->self : this -+>self : any - >this.self1 : this - >this : this - >self1 : this - - this.self = this.self2; -->this.self = this.self2 : this -->this.self : this -+>this.self = this.self2 : any -+>this.self : any - >this : this -->self : this -->this.self2 : this -+>self : any -+>this.self2 : any - >this : this -->self2 : this -+>self2 : any - - this.self = this.self3; - >this.self = this.self3 : this -->this.self : this -+>this.self : any - >this : this -->self : this -+>self : any - >this.self3 : this - >this : this - >self3 : this - - this.self1 = this.self; -->this.self1 = this.self : this -+>this.self1 = this.self : any - >this.self1 : this - >this : this - >self1 : this -->this.self : this -+>this.self : any - >this : this -->self : this -+>self : any - - this.self2 = this.self; -->this.self2 = this.self : this -->this.self2 : this -+>this.self2 = this.self : any -+>this.self2 : any - >this : this -->self2 : this -->this.self : this -+>self2 : any -+>this.self : any - >this : this -->self : this -+>self : any - - this.self3 = this.self; -->this.self3 = this.self : this -+>this.self3 = this.self : any - >this.self3 : this - >this : this - >self3 : this -->this.self : this -+>this.self : any - >this : this -->self : this -+>self : any - - this.d = this.self; -->this.d = this.self : this -+>this.d = this.self : any - >this.d : D - >this : this - >d : D -->this.self : this -+>this.self : any - >this : this -->self : this -+>self : any - - this.d = this.c; // Error -->this.d = this.c : C -+>this.d = this.c : D - >this.d : D - >this : this - >d : D -->this.c : C -+>this.c : D - >this : this -->c : C -+>c : D - - this.self = this.d; // Error - >this.self = this.d : D -->this.self : this -+>this.self : any - >this : this -->self : this -+>self : any - >this.d : D - >this : this - >d : D - - this.c = this.d; - >this.c = this.d : D -->this.c : C -+>this.c : D - >this : this -->c : C -+>c : D - >this.d : D - >this : this - >d : D diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.types.diff index c935348128..9ad6ea8b38 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/classFieldSuperNotAccessibleJs.types.diff @@ -21,31 +21,8 @@ /** @type string */ this['literalElementAccess']; -@@= skipped -29, +29 lines =@@ - - this.foo = 10 - >this.foo = 10 : 10 -->this.foo : number | undefined -+>this.foo : number - >this : this -->foo : number | undefined -+>foo : number - >10 : 10 - } - } -@@= skipped -20, +20 lines =@@ - >roots : string - } - get fooTests() { -->fooTests : number | undefined -+>fooTests : number - - return super.foo; -->super.foo : number | undefined -+>super.foo : number - >super : YaddaBase -->foo : number | undefined -+>foo : number +@@= skipped -57, +57 lines =@@ + >foo : number | undefined } get justPropTests() { ->justPropTests : number diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff index 1beca852a9..ee3c04e6e9 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff @@ -67,11 +67,11 @@ ->this.s = { status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } ->this.s : DoneStatus +>this.s = { status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } -+>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } ++>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined >this : this ->s : DoneStatus ->{ status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } -+>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } ++>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined +>{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } +>{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } @@ -84,11 +84,11 @@ ->this.s = { status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } ->this.s : DoneStatus +>this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } -+>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } ++>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined >this : this ->s : DoneStatus ->{ status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } -+>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } ++>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined +>{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } status: 'done', diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff deleted file mode 100644 index ba45aca11f..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff +++ /dev/null @@ -1,104 +0,0 @@ ---- old.inferringClassMembersFromAssignments.errors.txt -+++ new.inferringClassMembersFromAssignments.errors.txt -@@= skipped -0, +0 lines =@@ --a.js(14,13): error TS7008: Member 'inMethodNullable' implicitly has an 'any' type. - a.js(20,9): error TS2322: Type 'string' is not assignable to type 'number'. - a.js(39,9): error TS2322: Type 'boolean' is not assignable to type 'number'. -+b.ts(8,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+b.ts(9,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+b.ts(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+b.ts(11,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+b.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+b.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrBooleanOrUndefined' must be of type 'string | boolean | undefined', but here has type 'string | boolean'. -+b.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'any' must be of type 'any', but here has type 'null | undefined'. -+b.ts(24,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+b.ts(25,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+b.ts(26,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+b.ts(27,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+b.ts(28,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. - - --==== a.js (3 errors) ==== -+==== a.js (2 errors) ==== - class C { - constructor() { - if (Math.random()) { -@@= skipped -17, +28 lines =@@ - if (Math.random()) { - this.inMethod = 0; - this.inMethodNullable = null; -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS7008: Member 'inMethodNullable' implicitly has an 'any' type. - } - else { - this.inMethod = "string" -@@= skipped -92, +90 lines =@@ - } - } - --==== b.ts (0 errors) ==== -+==== b.ts (12 errors) ==== - var c = new C(); - - var stringOrNumber: string | number; -@@= skipped -9, +9 lines =@@ - var stringOrNumberOrUndefined: string | number | undefined; - - var stringOrNumberOrUndefined = c.inMethod; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. - var stringOrNumberOrUndefined = c.inGetter; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. - var stringOrNumberOrUndefined = c.inSetter; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. - var stringOrNumberOrUndefined = c.inPropertyDeclaration; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. - var stringOrNumberOrUndefined = c.inNestedArrowFunction -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. - - var stringOrNumberOrBoolean: string | number | boolean; - -@@= skipped -11, +26 lines =@@ - var number = c.inMultiple; - var stringOrBooleanOrUndefined : string | boolean | undefined; - var stringOrBooleanOrUndefined = c.inMultipleMethods; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrBooleanOrUndefined' must be of type 'string | boolean | undefined', but here has type 'string | boolean'. -+!!! related TS6203 b.ts:18:5: 'stringOrBooleanOrUndefined' was also declared here. - var any: any; - var any = c.inMethodNullable; -+ ~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'any' must be of type 'any', but here has type 'null | undefined'. -+!!! related TS6203 b.ts:20:5: 'any' was also declared here. - - - var stringOrNumberOrUndefined = C.inStaticMethod; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. - var stringOrNumberOrUndefined = C.inStaticGetter; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. - var stringOrNumberOrUndefined = C.inStaticSetter; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. - var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. - var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'stringOrNumberOrUndefined' must be of type 'string | number | undefined', but here has type 'string | number'. -+!!! related TS6203 b.ts:6:5: 'stringOrNumberOrUndefined' was also declared here. - diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff index 01d44fd593..903298ba8c 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.types.diff @@ -31,370 +31,3 @@ >0 : 0 } method() { -@@= skipped -31, +31 lines =@@ - - this.inMethod = 0; - >this.inMethod = 0 : 0 -->this.inMethod : string | number | undefined -+>this.inMethod : string | number - >this : this -->inMethod : string | number | undefined -+>inMethod : string | number - >0 : 0 - - this.inMethodNullable = null; - >this.inMethodNullable = null : null -->this.inMethodNullable : any -+>this.inMethodNullable : null | undefined - >this : this -->inMethodNullable : any -+>inMethodNullable : null | undefined - } - else { - this.inMethod = "string" - >this.inMethod = "string" : "string" -->this.inMethod : string | number | undefined -+>this.inMethod : string | number - >this : this -->inMethod : string | number | undefined -+>inMethod : string | number - >"string" : "string" - - this.inMethodNullable = undefined; - >this.inMethodNullable = undefined : undefined -->this.inMethodNullable : any -+>this.inMethodNullable : null | undefined - >this : this -->inMethodNullable : any -+>inMethodNullable : null | undefined - >undefined : undefined - } - this.inMultiple = "string"; -@@= skipped -35, +35 lines =@@ - - this.inMultipleMethods = "string"; - >this.inMultipleMethods = "string" : "string" -->this.inMultipleMethods : string | boolean | undefined -+>this.inMultipleMethods : string | boolean - >this : this -->inMultipleMethods : string | boolean | undefined -+>inMultipleMethods : string | boolean - >"string" : "string" - - var action = () => { -@@= skipped -17, +17 lines =@@ - - this.inNestedArrowFunction = 0; - >this.inNestedArrowFunction = 0 : 0 -->this.inNestedArrowFunction : string | number | undefined -+>this.inNestedArrowFunction : string | number - >this : this -->inNestedArrowFunction : string | number | undefined -+>inNestedArrowFunction : string | number - >0 : 0 - } - else { - this.inNestedArrowFunction = "string" - >this.inNestedArrowFunction = "string" : "string" -->this.inNestedArrowFunction : string | number | undefined -+>this.inNestedArrowFunction : string | number - >this : this -->inNestedArrowFunction : string | number | undefined -+>inNestedArrowFunction : string | number - >"string" : "string" - } - }; -@@= skipped -26, +26 lines =@@ - - this.inGetter = 0; - >this.inGetter = 0 : 0 -->this.inGetter : string | number | undefined -+>this.inGetter : string | number - >this : this -->inGetter : string | number | undefined -+>inGetter : string | number - >0 : 0 - } - else { - this.inGetter = "string" - >this.inGetter = "string" : "string" -->this.inGetter : string | number | undefined -+>this.inGetter : string | number - >this : this -->inGetter : string | number | undefined -+>inGetter : string | number - >"string" : "string" - } - this.inMultiple = false; -@@= skipped -22, +22 lines =@@ - - this.inMultipleMethods = false; - >this.inMultipleMethods = false : false -->this.inMultipleMethods : string | boolean | undefined -+>this.inMultipleMethods : string | boolean - >this : this -->inMultipleMethods : string | boolean | undefined -+>inMultipleMethods : string | boolean - >false : false - } - set() { -@@= skipped -16, +16 lines =@@ - - this.inSetter = 0; - >this.inSetter = 0 : 0 -->this.inSetter : string | number | undefined -+>this.inSetter : string | number - >this : this -->inSetter : string | number | undefined -+>inSetter : string | number - >0 : 0 - } - else { - this.inSetter = "string" - >this.inSetter = "string" : "string" -->this.inSetter : string | number | undefined -+>this.inSetter : string | number - >this : this -->inSetter : string | number | undefined -+>inSetter : string | number - >"string" : "string" - } - } -@@= skipped -26, +26 lines =@@ - - this.inPropertyDeclaration = 0; - >this.inPropertyDeclaration = 0 : 0 -->this.inPropertyDeclaration : string | number | undefined -+>this.inPropertyDeclaration : string | number - >this : this -->inPropertyDeclaration : string | number | undefined -+>inPropertyDeclaration : string | number - >0 : 0 - } - else { - this.inPropertyDeclaration = "string" - >this.inPropertyDeclaration = "string" : "string" -->this.inPropertyDeclaration : string | number | undefined -+>this.inPropertyDeclaration : string | number - >this : this -->inPropertyDeclaration : string | number | undefined -+>inPropertyDeclaration : string | number - >"string" : "string" - } - } -@@= skipped -25, +25 lines =@@ - - this.inStaticMethod = 0; - >this.inStaticMethod = 0 : 0 -->this.inStaticMethod : string | number | undefined -+>this.inStaticMethod : string | number - >this : typeof C -->inStaticMethod : string | number | undefined -+>inStaticMethod : string | number - >0 : 0 - } - else { - this.inStaticMethod = "string" - >this.inStaticMethod = "string" : "string" -->this.inStaticMethod : string | number | undefined -+>this.inStaticMethod : string | number - >this : typeof C -->inStaticMethod : string | number | undefined -+>inStaticMethod : string | number - >"string" : "string" - } - -@@= skipped -26, +26 lines =@@ - - this.inStaticNestedArrowFunction = 0; - >this.inStaticNestedArrowFunction = 0 : 0 -->this.inStaticNestedArrowFunction : string | number | undefined -+>this.inStaticNestedArrowFunction : string | number - >this : typeof C -->inStaticNestedArrowFunction : string | number | undefined -+>inStaticNestedArrowFunction : string | number - >0 : 0 - } - else { - this.inStaticNestedArrowFunction = "string" - >this.inStaticNestedArrowFunction = "string" : "string" -->this.inStaticNestedArrowFunction : string | number | undefined -+>this.inStaticNestedArrowFunction : string | number - >this : typeof C -->inStaticNestedArrowFunction : string | number | undefined -+>inStaticNestedArrowFunction : string | number - >"string" : "string" - } - }; -@@= skipped -26, +26 lines =@@ - - this.inStaticGetter = 0; - >this.inStaticGetter = 0 : 0 -->this.inStaticGetter : string | number | undefined -+>this.inStaticGetter : string | number - >this : typeof C -->inStaticGetter : string | number | undefined -+>inStaticGetter : string | number - >0 : 0 - } - else { - this.inStaticGetter = "string" - >this.inStaticGetter = "string" : "string" -->this.inStaticGetter : string | number | undefined -+>this.inStaticGetter : string | number - >this : typeof C -->inStaticGetter : string | number | undefined -+>inStaticGetter : string | number - >"string" : "string" - } - } -@@= skipped -25, +25 lines =@@ - - this.inStaticSetter = 0; - >this.inStaticSetter = 0 : 0 -->this.inStaticSetter : string | number | undefined -+>this.inStaticSetter : string | number - >this : typeof C -->inStaticSetter : string | number | undefined -+>inStaticSetter : string | number - >0 : 0 - } - else { - this.inStaticSetter = "string" - >this.inStaticSetter = "string" : "string" -->this.inStaticSetter : string | number | undefined -+>this.inStaticSetter : string | number - >this : typeof C -->inStaticSetter : string | number | undefined -+>inStaticSetter : string | number - >"string" : "string" - } - } -@@= skipped -26, +26 lines =@@ - - this.inStaticPropertyDeclaration = 0; - >this.inStaticPropertyDeclaration = 0 : 0 -->this.inStaticPropertyDeclaration : string | number | undefined -+>this.inStaticPropertyDeclaration : string | number - >this : typeof C -->inStaticPropertyDeclaration : string | number | undefined -+>inStaticPropertyDeclaration : string | number - >0 : 0 - } - else { - this.inStaticPropertyDeclaration = "string" - >this.inStaticPropertyDeclaration = "string" : "string" -->this.inStaticPropertyDeclaration : string | number | undefined -+>this.inStaticPropertyDeclaration : string | number - >this : typeof C -->inStaticPropertyDeclaration : string | number | undefined -+>inStaticPropertyDeclaration : string | number - >"string" : "string" - } - } -@@= skipped -36, +36 lines =@@ - - var stringOrNumberOrUndefined = c.inMethod; - >stringOrNumberOrUndefined : string | number | undefined -->c.inMethod : string | number | undefined -+>c.inMethod : string | number - >c : C -->inMethod : string | number | undefined -+>inMethod : string | number - - var stringOrNumberOrUndefined = c.inGetter; - >stringOrNumberOrUndefined : string | number | undefined -->c.inGetter : string | number | undefined -+>c.inGetter : string | number - >c : C -->inGetter : string | number | undefined -+>inGetter : string | number - - var stringOrNumberOrUndefined = c.inSetter; - >stringOrNumberOrUndefined : string | number | undefined -->c.inSetter : string | number | undefined -+>c.inSetter : string | number - >c : C -->inSetter : string | number | undefined -+>inSetter : string | number - - var stringOrNumberOrUndefined = c.inPropertyDeclaration; - >stringOrNumberOrUndefined : string | number | undefined -->c.inPropertyDeclaration : string | number | undefined -+>c.inPropertyDeclaration : string | number - >c : C -->inPropertyDeclaration : string | number | undefined -+>inPropertyDeclaration : string | number - - var stringOrNumberOrUndefined = c.inNestedArrowFunction - >stringOrNumberOrUndefined : string | number | undefined -->c.inNestedArrowFunction : string | number | undefined -+>c.inNestedArrowFunction : string | number - >c : C -->inNestedArrowFunction : string | number | undefined -+>inNestedArrowFunction : string | number - - var stringOrNumberOrBoolean: string | number | boolean; - >stringOrNumberOrBoolean : string | number | boolean -@@= skipped -45, +45 lines =@@ - - var stringOrBooleanOrUndefined = c.inMultipleMethods; - >stringOrBooleanOrUndefined : string | boolean | undefined -->c.inMultipleMethods : string | boolean | undefined -+>c.inMultipleMethods : string | boolean - >c : C -->inMultipleMethods : string | boolean | undefined -+>inMultipleMethods : string | boolean - - var any: any; - >any : any - - var any = c.inMethodNullable; - >any : any -->c.inMethodNullable : any -+>c.inMethodNullable : null | undefined - >c : C -->inMethodNullable : any -+>inMethodNullable : null | undefined - - - var stringOrNumberOrUndefined = C.inStaticMethod; - >stringOrNumberOrUndefined : string | number | undefined -->C.inStaticMethod : string | number | undefined -+>C.inStaticMethod : string | number - >C : typeof C -->inStaticMethod : string | number | undefined -+>inStaticMethod : string | number - - var stringOrNumberOrUndefined = C.inStaticGetter; - >stringOrNumberOrUndefined : string | number | undefined -->C.inStaticGetter : string | number | undefined -+>C.inStaticGetter : string | number - >C : typeof C -->inStaticGetter : string | number | undefined -+>inStaticGetter : string | number - - var stringOrNumberOrUndefined = C.inStaticSetter; - >stringOrNumberOrUndefined : string | number | undefined -->C.inStaticSetter : string | number | undefined -+>C.inStaticSetter : string | number - >C : typeof C -->inStaticSetter : string | number | undefined -+>inStaticSetter : string | number - - var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; - >stringOrNumberOrUndefined : string | number | undefined -->C.inStaticPropertyDeclaration : string | number | undefined -+>C.inStaticPropertyDeclaration : string | number - >C : typeof C -->inStaticPropertyDeclaration : string | number | undefined -+>inStaticPropertyDeclaration : string | number - - var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; - >stringOrNumberOrUndefined : string | number | undefined -->C.inStaticNestedArrowFunction : string | number | undefined -+>C.inStaticNestedArrowFunction : string | number - >C : typeof C -->inStaticNestedArrowFunction : string | number | undefined -+>inStaticNestedArrowFunction : string | number - diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.types.diff deleted file mode 100644 index db04574201..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments4.types.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- old.inferringClassMembersFromAssignments4.types -+++ new.inferringClassMembersFromAssignments4.types -@@= skipped -8, +8 lines =@@ - - this.p = 1 - >this.p = 1 : 1 -->this.p : number | undefined -+>this.p : number - >this : this -->p : number | undefined -+>p : number - >1 : 1 - } - } -@@= skipped -16, +16 lines =@@ - // should be OK, and p should have type number | undefined from its base - this.p = 1 - >this.p = 1 : 1 -->this.p : number | undefined -+>this.p : number - >this : this -->p : number | undefined -+>p : number - >1 : 1 - } - } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.types.diff index 819c368e37..b770166727 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments5.types.diff @@ -1,18 +1,6 @@ --- old.inferringClassMembersFromAssignments5.types +++ new.inferringClassMembersFromAssignments5.types -@@= skipped -8, +8 lines =@@ - - this.p = 1 - >this.p = 1 : 1 -->this.p : number | undefined -+>this.p : number - >this : this -->p : number | undefined -+>p : number - >1 : 1 - } - } -@@= skipped -18, +18 lines =@@ +@@= skipped -26, +26 lines =@@ // should be OK, and p should have type number from this assignment this.p = 1 >this.p = 1 : 1 diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.types.diff deleted file mode 100644 index a4402124a3..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsFunctionJSDoc.types.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.jsDeclarationsFunctionJSDoc.types -+++ new.jsDeclarationsFunctionJSDoc.types -@@= skipped -30, +30 lines =@@ - */ - this.field = b; - >this.field = b : null -->this.field : any -+>this.field : null - >this : this -->field : any -+>field : null - >b : null - } - From b5276c99eeac5f077696a9425b696d17042e4847 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Mon, 12 May 2025 13:13:44 -0700 Subject: [PATCH 5/8] Even better getWidenedTypeForAssignmentDeclaration --- internal/checker/checker.go | 96 +++++++++++++------ .../compiler/checkJsFiles7.errors.txt | 13 --- .../submodule/compiler/checkJsFiles7.types | 12 +-- ...ontextualTypedSpecialAssignment.errors.txt | 6 +- .../contextualTypedSpecialAssignment.types | 8 +- ...thisPropertyAssignmentInherited.errors.txt | 28 ------ .../thisPropertyAssignmentInherited.types | 18 ++-- .../compiler/checkJsFiles7.errors.txt.diff | 18 ---- .../compiler/checkJsFiles7.types.diff | 18 ++-- ...tualTypedSpecialAssignment.errors.txt.diff | 6 +- ...ontextualTypedSpecialAssignment.types.diff | 8 +- ...ropertyAssignmentInherited.errors.txt.diff | 33 ------- ...thisPropertyAssignmentInherited.types.diff | 18 ++-- 13 files changed, 114 insertions(+), 168 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/checkJsFiles7.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.errors.txt delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.errors.txt.diff diff --git a/internal/checker/checker.go b/internal/checker/checker.go index f9aa5bd03b..5bcd14f880 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -579,7 +579,8 @@ type Checker struct { templateLiteralTypes map[string]*Type stringMappingTypes map[StringMappingKey]*Type uniqueESSymbolTypes map[*ast.Symbol]*Type - constructorOfThisExpandos map[*ast.Symbol]*ast.Node + thisExpandoKinds map[*ast.Symbol]thisAssignmentDeclarationKind + thisExpandoLocations map[*ast.Symbol]*ast.Node subtypeReductionCache map[string][]*Type cachedTypes map[CachedTypeKey]*Type cachedSignatures map[CachedSignatureKey]*Signature @@ -864,7 +865,8 @@ func NewChecker(program Program) *Checker { c.templateLiteralTypes = make(map[string]*Type) c.stringMappingTypes = make(map[StringMappingKey]*Type) c.uniqueESSymbolTypes = make(map[*ast.Symbol]*Type) - c.constructorOfThisExpandos = make(map[*ast.Symbol]*ast.Node) + c.thisExpandoKinds = make(map[*ast.Symbol]thisAssignmentDeclarationKind) + c.thisExpandoLocations = make(map[*ast.Symbol]*ast.Node) c.subtypeReductionCache = make(map[string][]*Type) c.cachedTypes = make(map[CachedTypeKey]*Type) c.cachedSignatures = make(map[CachedSignatureKey]*Signature) @@ -16689,30 +16691,43 @@ func (c *Checker) getTypeOfPrototypeProperty(prototype *ast.Symbol) *Type { return classType } +type thisAssignmentDeclarationKind int32 + +const ( + thisAssignmentDeclarationNone thisAssignmentDeclarationKind = iota // not (all) this.property assignments + thisAssignmentDeclarationTyped // typed; use the type annotation + thisAssignmentDeclarationConstructor // at least one in the constructor; use control flow + thisAssignmentDeclarationMethod // methods only; look in base first, and if not found, union all declaration types plus undefined +) + func (c *Checker) getWidenedTypeForAssignmentDeclaration(symbol *ast.Symbol) *Type { - var types []*Type var t *Type - if ctor := c.isConstructorDeclaredThisProperty(symbol); ctor != nil { - t = c.getFlowTypeInConstructor(symbol, ctor) + kind, location := c.isConstructorDeclaredThisProperty(symbol) + if kind == thisAssignmentDeclarationTyped { + if location == nil { + panic("constructor should not be nil when this assignment is in a constructor.") + } + t = c.getTypeFromTypeNode(location) + } else if kind == thisAssignmentDeclarationConstructor { + if location == nil { + panic("constructor should not be nil when this assignment is in a constructor.") + } + t = c.getFlowTypeInConstructor(symbol, location) + } else if kind == thisAssignmentDeclarationMethod { + t = c.getTypeOfPropertyInBaseClass(symbol) } if t == nil { - nonConstructorDeclaredThis := true + var types []*Type for _, declaration := range symbol.Declarations { if ast.IsBinaryExpression(declaration) { - nonConstructorDeclaredThis = nonConstructorDeclaredThis && ast.GetAssignmentDeclarationKind(declaration.AsBinaryExpression()) == ast.JSDeclarationKindThisProperty - // TODO: if declaration.Type() != nil { nonConstructorDeclaredThis = false; t = c.getTypeOfTypeNode(declaration.Type()); break } types = core.AppendIfUnique(types, c.checkExpressionForMutableLocation(declaration.AsBinaryExpression().Right, CheckModeNormal)) } } - if nonConstructorDeclaredThis && len(types) > 0 { - if base := c.getTypeOfPropertyInBaseClass(symbol); base != nil { - t = base - } else if c.strictNullChecks { + if kind == thisAssignmentDeclarationMethod && len(types) > 0 { + if c.strictNullChecks { types = core.AppendIfUnique(types, c.undefinedOrMissingType) } } - } - if t == nil { t = c.getWidenedType(c.getUnionType(types)) } // report an all-nullable or empty union as an implicit any in JS files @@ -16727,29 +16742,50 @@ func (c *Checker) getWidenedTypeForAssignmentDeclaration(symbol *ast.Symbol) *Ty // A property is considered a constructor declared property when all declaration sites are this.xxx assignments, // when no declaration sites have JSDoc type annotations, and when at least one declaration site is in the body of // a class constructor. -func (c *Checker) isConstructorDeclaredThisProperty(symbol *ast.Symbol) *ast.Node { +func (c *Checker) isConstructorDeclaredThisProperty(symbol *ast.Symbol) (thisAssignmentDeclarationKind, *ast.Node) { if symbol.ValueDeclaration == nil || !ast.IsBinaryExpression(symbol.ValueDeclaration) { - return nil + return thisAssignmentDeclarationNone, nil } - if ctor, ok := c.constructorOfThisExpandos[symbol]; ok { - return ctor + if kind, ok := c.thisExpandoKinds[symbol]; ok { + location, ok2 := c.thisExpandoLocations[symbol] + if !ok2 { + panic("ctor should be cached whenever this expando location is cached") + } + return kind, location } - untypedConstructorDeclaredThis := core.Every(symbol.Declarations, func(declaration *ast.Declaration) bool { + allThis := true + var typeAnnotation *ast.Node + for _, declaration := range symbol.Declarations { if !ast.IsBinaryExpression(declaration) { - return false + allThis = false + break } bin := declaration.AsBinaryExpression() - return ast.GetAssignmentDeclarationKind(bin) == ast.JSDeclarationKindThisProperty && - (bin.Left.Kind != ast.KindElementAccessExpression || ast.IsStringOrNumericLiteralLike(bin.Left.AsElementAccessExpression().ArgumentExpression)) && - // TODO: bin.Type() == nil - bin.Right.Kind != ast.KindTypeAssertionExpression - }) - if untypedConstructorDeclaredThis { - c.constructorOfThisExpandos[symbol] = c.getDeclaringConstructor(symbol) - } else { - c.constructorOfThisExpandos[symbol] = nil + if ast.GetAssignmentDeclarationKind(bin) == ast.JSDeclarationKindThisProperty && + (bin.Left.Kind != ast.KindElementAccessExpression || ast.IsStringOrNumericLiteralLike(bin.Left.AsElementAccessExpression().ArgumentExpression)) { + // TODO: if bin.Type() != nil, use bin.Type() + if bin.Right.Kind == ast.KindTypeAssertionExpression { + typeAnnotation = bin.Right.AsTypeAssertion().Type + } + } else { + allThis = false + break + } + } + var location *ast.Node + kind := thisAssignmentDeclarationNone + if allThis { + if typeAnnotation != nil { + location = typeAnnotation + kind = thisAssignmentDeclarationTyped + } else { + location = c.getDeclaringConstructor(symbol) + kind = core.IfElse(location == nil, thisAssignmentDeclarationMethod, thisAssignmentDeclarationConstructor) + } } - return c.constructorOfThisExpandos[symbol] + c.thisExpandoKinds[symbol] = kind + c.thisExpandoLocations[symbol] = location + return kind, location } func (c *Checker) widenTypeForVariableLikeDeclaration(t *Type, declaration *ast.Node, reportErrors bool) *Type { diff --git a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.errors.txt b/testdata/baselines/reference/submodule/compiler/checkJsFiles7.errors.txt deleted file mode 100644 index a616ed7e39..0000000000 --- a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -a.js(4,3): error TS7022: 'a' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - -==== a.js (1 errors) ==== - class C { - constructor() { - /** @type {boolean} */ - this.a = true; - ~~~~~~~~~~~~~ -!!! error TS7022: 'a' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - this.a = !!this.a; - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.types b/testdata/baselines/reference/submodule/compiler/checkJsFiles7.types index 396e85db31..7d08242804 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsFiles7.types +++ b/testdata/baselines/reference/submodule/compiler/checkJsFiles7.types @@ -8,21 +8,21 @@ class C { /** @type {boolean} */ this.a = true; >this.a = true : boolean ->this.a : any +>this.a : boolean >this : this ->a : any +>a : boolean >true : boolean >true : true this.a = !!this.a; >this.a = !!this.a : boolean ->this.a : any +>this.a : boolean >this : this ->a : any +>a : boolean >!!this.a : boolean >!this.a : boolean ->this.a : any +>this.a : boolean >this : this ->a : any +>a : boolean } } diff --git a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt index cc03230883..0eac008b4f 100644 --- a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.errors.txt @@ -2,13 +2,14 @@ test.js(9,4): error TS2339: Property 'x' does not exist on type '{}'. test.js(14,4): error TS2339: Property 'x' does not exist on type '{}'. test.js(16,7): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(18,4): error TS2339: Property 'x' does not exist on type '{}'. +test.js(33,13): error TS2322: Type 'string' is not assignable to type '"done"'. test.js(34,15): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(57,17): error TS2339: Property 'x' does not exist on type 'Thing'. test.js(59,7): error TS7006: Parameter 'n' implicitly has an 'any' type. test.js(61,17): error TS2339: Property 'x' does not exist on type 'Thing'. -==== test.js (8 errors) ==== +==== test.js (9 errors) ==== /** @typedef {{ status: 'done' m(n: number): void @@ -50,6 +51,9 @@ test.js(61,17): error TS2339: Property 'x' does not exist on type 'Thing'. fail() { this.s = { status: 'done', + ~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type '"done"'. +!!! related TS6500 test.js:2:5: The expected type comes from property 'status' which is declared here on type '{ status: "done"; m: (n: number) => void; }' m(n) { } ~ !!! error TS7006: Parameter 'n' implicitly has an 'any' type. diff --git a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types index 74176773b4..2d97e75add 100644 --- a/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types +++ b/testdata/baselines/reference/submodule/conformance/contextualTypedSpecialAssignment.types @@ -58,9 +58,9 @@ class Thing { /** @type {DoneStatus} */ this.s = { >this.s = { status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } ->this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined +>this.s : { status: "done"; m: (n: number) => void; } >this : this ->s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined +>s : { status: "done"; m: (n: number) => void; } >{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } >{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } @@ -79,9 +79,9 @@ class Thing { this.s = { >this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } ->this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined +>this.s : { status: "done"; m: (n: number) => void; } >this : this ->s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined +>s : { status: "done"; m: (n: number) => void; } >{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } status: 'done', diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.errors.txt b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.errors.txt deleted file mode 100644 index f482f36b24..0000000000 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.errors.txt +++ /dev/null @@ -1,28 +0,0 @@ -thisPropertyAssignmentInherited.js(13,7): error TS7023: 'innerHTML' 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. -thisPropertyAssignmentInherited.js(14,25): error TS7022: 'textContent' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - -==== thisPropertyAssignmentInherited.js (2 errors) ==== - export class Element { - /** - * @returns {String} - */ - get textContent() { - return '' - } - set textContent(x) {} - cloneNode() { return this} - } - export class HTMLElement extends Element {} - export class TextElement extends HTMLElement { - get innerHTML() { return this.textContent; } - ~~~~~~~~~ -!!! error TS7023: 'innerHTML' 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. - set innerHTML(html) { this.textContent = html; } - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'textContent' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - toString() { - } - } - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.types b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.types index 1ed258c2af..c2d9c2495b 100644 --- a/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.types +++ b/testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.types @@ -30,19 +30,19 @@ export class TextElement extends HTMLElement { >HTMLElement : HTMLElement get innerHTML() { return this.textContent; } ->innerHTML : any ->this.textContent : any +>innerHTML : String +>this.textContent : String >this : this ->textContent : any +>textContent : String set innerHTML(html) { this.textContent = html; } ->innerHTML : any ->html : any ->this.textContent = html : any ->this.textContent : any +>innerHTML : String +>html : String +>this.textContent = html : String +>this.textContent : String >this : this ->textContent : any ->html : any +>textContent : String +>html : String toString() { >toString : () => void diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.errors.txt.diff deleted file mode 100644 index f4826197ae..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.checkJsFiles7.errors.txt -+++ new.checkJsFiles7.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+a.js(4,3): error TS7022: 'a' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -+ -+ -+==== a.js (1 errors) ==== -+ class C { -+ constructor() { -+ /** @type {boolean} */ -+ this.a = true; -+ ~~~~~~~~~~~~~ -+!!! error TS7022: 'a' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -+ this.a = !!this.a; -+ } -+ } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.types.diff index 0250dcc65b..90cf13e40c 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/checkJsFiles7.types.diff @@ -5,28 +5,22 @@ /** @type {boolean} */ this.a = true; ->this.a = true : true -->this.a : boolean +>this.a = true : boolean -+>this.a : any + >this.a : boolean >this : this -->a : boolean -+>a : any + >a : boolean +>true : boolean >true : true this.a = !!this.a; - >this.a = !!this.a : boolean -->this.a : boolean -+>this.a : any - >this : this -->a : boolean -+>a : any +@@= skipped -13, +14 lines =@@ + >a : boolean >!!this.a : boolean >!this.a : boolean ->this.a : true -+>this.a : any ++>this.a : boolean >this : this ->a : true -+>a : any ++>a : boolean } } diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff index 64cfd6f246..a7aa8f190e 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.errors.txt.diff @@ -7,13 +7,14 @@ +test.js(14,4): error TS2339: Property 'x' does not exist on type '{}'. +test.js(16,7): error TS7006: Parameter 'n' implicitly has an 'any' type. +test.js(18,4): error TS2339: Property 'x' does not exist on type '{}'. ++test.js(33,13): error TS2322: Type 'string' is not assignable to type '"done"'. +test.js(34,15): error TS7006: Parameter 'n' implicitly has an 'any' type. +test.js(57,17): error TS2339: Property 'x' does not exist on type 'Thing'. +test.js(59,7): error TS7006: Parameter 'n' implicitly has an 'any' type. +test.js(61,17): error TS2339: Property 'x' does not exist on type 'Thing'. + + -+==== test.js (8 errors) ==== ++==== test.js (9 errors) ==== + /** @typedef {{ + status: 'done' + m(n: number): void @@ -55,6 +56,9 @@ + fail() { + this.s = { + status: 'done', ++ ~~~~~~ ++!!! error TS2322: Type 'string' is not assignable to type '"done"'. ++!!! related TS6500 test.js:2:5: The expected type comes from property 'status' which is declared here on type '{ status: "done"; m: (n: number) => void; }' + m(n) { } + ~ +!!! error TS7006: Parameter 'n' implicitly has an 'any' type. diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff index ee3c04e6e9..0eeea1a941 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/contextualTypedSpecialAssignment.types.diff @@ -67,11 +67,11 @@ ->this.s = { status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } ->this.s : DoneStatus +>this.s = { status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } -+>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined ++>this.s : { status: "done"; m: (n: number) => void; } >this : this ->s : DoneStatus ->{ status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } -+>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined ++>s : { status: "done"; m: (n: number) => void; } +>{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } +>{ status: 'done', m(n) { } } : { status: "done"; m: (n: number) => void; } @@ -84,11 +84,11 @@ ->this.s = { status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } ->this.s : DoneStatus +>this.s = { status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } -+>this.s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined ++>this.s : { status: "done"; m: (n: number) => void; } >this : this ->s : DoneStatus ->{ status: 'done', m(n) { } } : { status: "done"; m(n: number): void; } -+>s : { status: "done"; m: (n: number) => void; } | { status: string; m: (n: any) => void; } | undefined ++>s : { status: "done"; m: (n: number) => void; } +>{ status: 'done', m(n) { } } : { status: string; m: (n: any) => void; } status: 'done', diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.errors.txt.diff deleted file mode 100644 index 0612a29992..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.errors.txt.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- old.thisPropertyAssignmentInherited.errors.txt -+++ new.thisPropertyAssignmentInherited.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+thisPropertyAssignmentInherited.js(13,7): error TS7023: 'innerHTML' 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. -+thisPropertyAssignmentInherited.js(14,25): error TS7022: 'textContent' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -+ -+ -+==== thisPropertyAssignmentInherited.js (2 errors) ==== -+ export class Element { -+ /** -+ * @returns {String} -+ */ -+ get textContent() { -+ return '' -+ } -+ set textContent(x) {} -+ cloneNode() { return this} -+ } -+ export class HTMLElement extends Element {} -+ export class TextElement extends HTMLElement { -+ get innerHTML() { return this.textContent; } -+ ~~~~~~~~~ -+!!! error TS7023: 'innerHTML' 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. -+ set innerHTML(html) { this.textContent = html; } -+ ~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS7022: 'textContent' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -+ toString() { -+ } -+ } -+ -+ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.types.diff index df3a68dc6a..8684595695 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/thisPropertyAssignmentInherited.types.diff @@ -24,26 +24,26 @@ get innerHTML() { return this.textContent; } ->innerHTML : string ->this.textContent : string -+>innerHTML : any -+>this.textContent : any ++>innerHTML : String ++>this.textContent : String >this : this ->textContent : string -+>textContent : any ++>textContent : String set innerHTML(html) { this.textContent = html; } ->innerHTML : string ->html : string ->this.textContent = html : string ->this.textContent : string -+>innerHTML : any -+>html : any -+>this.textContent = html : any -+>this.textContent : any ++>innerHTML : String ++>html : String ++>this.textContent = html : String ++>this.textContent : String >this : this ->textContent : string ->html : string -+>textContent : any -+>html : any ++>textContent : String ++>html : String toString() { >toString : () => void From 08f7aa9192eb5cfce08207eff4ecd8c8985ab1fe Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Mon, 12 May 2025 13:14:45 -0700 Subject: [PATCH 6/8] dedupe panic message --- internal/checker/checker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 5bcd14f880..c1af48ffdf 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -16705,7 +16705,7 @@ func (c *Checker) getWidenedTypeForAssignmentDeclaration(symbol *ast.Symbol) *Ty kind, location := c.isConstructorDeclaredThisProperty(symbol) if kind == thisAssignmentDeclarationTyped { if location == nil { - panic("constructor should not be nil when this assignment is in a constructor.") + panic("location should not be nil when this assignment has a type.") } t = c.getTypeFromTypeNode(location) } else if kind == thisAssignmentDeclarationConstructor { From 3b8bf7bac52a0ae6ddbc657afecfae27c9e30d2f Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Mon, 12 May 2025 13:19:10 -0700 Subject: [PATCH 7/8] hereby format --- internal/checker/types.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/checker/types.go b/internal/checker/types.go index bd438bd6a8..61595fa73a 100644 --- a/internal/checker/types.go +++ b/internal/checker/types.go @@ -88,12 +88,12 @@ type SymbolReferenceLinks struct { // Links for value symbols type ValueSymbolLinks struct { - resolvedType *Type // Type of value symbol - writeType *Type - target *ast.Symbol - mapper *TypeMapper - nameType *Type - containingType *Type // Mapped type for mapped type property, containing union or intersection type for synthetic property + resolvedType *Type // Type of value symbol + writeType *Type + target *ast.Symbol + mapper *TypeMapper + nameType *Type + containingType *Type // Mapped type for mapped type property, containing union or intersection type for synthetic property } // Additional links for mapped symbols @@ -152,9 +152,9 @@ type ExportTypeLinks struct { // Links for type aliases type TypeAliasLinks struct { - declaredType *Type - typeParameters []*Type // Type parameters of type alias (undefined if non-generic) - instantiations map[string]*Type // Instantiations of generic type alias (undefined if non-generic) + declaredType *Type + typeParameters []*Type // Type parameters of type alias (undefined if non-generic) + instantiations map[string]*Type // Instantiations of generic type alias (undefined if non-generic) isConstructorDeclaredProperty bool } From 9fb3135e4f2ac038d866acd114c8819e86e84e36 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 15 May 2025 14:32:45 -0700 Subject: [PATCH 8/8] remove unneeded break --- internal/binder/binder.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/binder/binder.go b/internal/binder/binder.go index a29dfeab6f..e767cb20d9 100644 --- a/internal/binder/binder.go +++ b/internal/binder/binder.go @@ -1075,7 +1075,6 @@ func (b *Binder) bindThisPropertyAssignment(node *ast.Node) { } case ast.KindSourceFile, ast.KindModuleDeclaration: // top-level this.property as assignment to globals is no longer supported - break default: panic("Unhandled case in bindThisPropertyAssignment: " + thisContainer.Kind.String()) }