From c26f40268eb0a2bc9065fdcec68c6f63aecb0ed3 Mon Sep 17 00:00:00 2001 From: rbuckton Date: Wed, 4 Jan 2017 20:38:10 -0800 Subject: [PATCH] Merge pull request #13277 from Microsoft/fix13276 --- src/compiler/transformers/es2015.ts | 37 +++++--- ...sClassHeritageListMemberTypeAnnotations.js | 2 +- ...accessibleTypeInTypeParameterConstraint.js | 2 +- .../reference/abstractClassInLocalScope.js | 2 +- .../abstractClassInLocalScopeIsAbstract.js | 2 +- tests/baselines/reference/abstractProperty.js | 2 +- .../reference/abstractPropertyNegative.js | 8 +- .../accessors_spec_section-4.5_inference.js | 2 +- .../reference/aliasUsageInAccessorsOfClass.js | 2 +- .../baselines/reference/aliasUsageInArray.js | 2 +- .../aliasUsageInFunctionExpression.js | 2 +- .../reference/aliasUsageInGenericFunction.js | 2 +- .../reference/aliasUsageInIndexerOfClass.js | 2 +- .../reference/aliasUsageInObjectLiteral.js | 2 +- .../reference/aliasUsageInOrExpression.js | 2 +- ...aliasUsageInTypeArgumentOfExtendsClause.js | 4 +- .../reference/aliasUsageInVarAssignment.js | 2 +- .../reference/ambiguousOverloadResolution.js | 2 +- .../reference/apparentTypeSubtyping.js | 4 +- .../reference/apparentTypeSupertype.js | 2 +- .../reference/arrayAssignmentTest1.js | 2 +- .../reference/arrayAssignmentTest2.js | 2 +- .../reference/arrayBestCommonTypes.js | 4 +- .../reference/arrayLiteralTypeInference.js | 4 +- tests/baselines/reference/arrayLiterals.js | 4 +- .../arrayLiteralsWithRecursiveGenerics.js | 2 +- ...rayOfSubtypeIsAssignableToReadonlyArray.js | 4 +- .../assignmentCompatWithCallSignatures3.js | 6 +- .../assignmentCompatWithCallSignatures4.js | 6 +- .../assignmentCompatWithCallSignatures5.js | 6 +- .../assignmentCompatWithCallSignatures6.js | 6 +- ...ssignmentCompatWithConstructSignatures3.js | 6 +- ...ssignmentCompatWithConstructSignatures4.js | 6 +- ...ssignmentCompatWithConstructSignatures5.js | 6 +- ...ssignmentCompatWithConstructSignatures6.js | 6 +- .../assignmentCompatWithNumericIndexer.js | 2 +- .../assignmentCompatWithNumericIndexer3.js | 2 +- .../assignmentCompatWithObjectMembers4.js | 8 +- ...nmentCompatWithObjectMembersOptionality.js | 4 +- ...mentCompatWithObjectMembersOptionality2.js | 4 +- .../assignmentCompatWithStringIndexer.js | 4 +- .../reference/asyncImportedPromise_es5.js | 2 +- .../reference/asyncMethodWithSuper_es5.js | 2 +- .../reference/asyncQualifiedReturnType_es5.js | 2 +- .../reference/awaitClassExpression_es5.js | 2 +- .../reference/baseIndexSignatureResolution.js | 2 +- .../reference/baseTypeOrderChecking.js | 4 +- .../baseTypeWrappingInstantiationChain.js | 4 +- tests/baselines/reference/bases.js | 2 +- .../bestCommonTypeOfConditionalExpressions.js | 4 +- ...bestCommonTypeOfConditionalExpressions2.js | 4 +- .../reference/bestCommonTypeOfTuple2.js | 4 +- ...allSignatureAssignabilityInInheritance2.js | 6 +- ...allSignatureAssignabilityInInheritance3.js | 6 +- ...allSignatureAssignabilityInInheritance4.js | 6 +- ...allSignatureAssignabilityInInheritance5.js | 6 +- ...allSignatureAssignabilityInInheritance6.js | 6 +- tests/baselines/reference/castingTuple.js | 4 +- .../baselines/reference/chainedAssignment3.js | 2 +- ...arameterConstrainedToOtherTypeParameter.js | 4 +- .../checkSuperCallBeforeThisAccessing2.js | 2 +- .../checkSuperCallBeforeThisAccessing3.js | 2 +- .../checkSuperCallBeforeThisAccessing4.js | 2 +- .../checkSuperCallBeforeThisAccessing6.js | 2 +- .../checkSuperCallBeforeThisAccessing8.js | 2 +- .../reference/circularImportAlias.js | 2 +- .../circularTypeofWithFunctionModule.js | 2 +- .../classAbstractConstructorAssignability.js | 4 +- .../reference/classAbstractCrashedOnce.js | 2 +- .../reference/classAbstractExtends.js | 8 +- .../reference/classAbstractFactoryFunction.js | 2 +- .../reference/classAbstractGeneric.js | 12 +-- .../reference/classAbstractInAModule.js | 2 +- .../reference/classAbstractInheritance.js | 16 ++-- .../reference/classAbstractInstantiations1.js | 4 +- .../reference/classAbstractInstantiations2.js | 8 +- .../classAbstractOverrideWithAbstract.js | 8 +- .../reference/classAbstractSuperCalls.js | 6 +- .../classAbstractUsingAbstractMethod1.js | 4 +- .../classAbstractUsingAbstractMethods2.js | 14 +-- .../classConstructorAccessibility4.js | 4 +- .../classConstructorAccessibility5.js | 2 +- ...clarationMergedInModuleWithContinuation.js | 2 +- .../classDeclaredBeforeClassFactory.js | 2 +- .../classDoesNotDependOnBaseTypes.js | 2 +- tests/baselines/reference/classExpression2.js | 2 +- tests/baselines/reference/classExpression3.js | 4 +- .../classExpressionExtendingAbstractClass.js | 2 +- .../reference/classExtendingBuiltinType.js | 20 ++-- .../reference/classExtendingClass.js | 4 +- .../reference/classExtendingClassLikeType.js | 6 +- .../reference/classExtendingNonConstructor.js | 14 +-- .../baselines/reference/classExtendingNull.js | 2 - .../reference/classExtendingPrimitive.js | 17 ++-- .../reference/classExtendingPrimitive2.js | 1 - .../reference/classExtendingQualifiedName.js | 2 +- .../reference/classExtendingQualifiedName2.js | 2 +- .../reference/classExtendsAcrossFiles.js | 4 +- ...sMergedWithModuleNotReferingConstructor.js | 2 +- ...tendsClauseClassNotReferringConstructor.js | 2 +- .../reference/classExtendsEveryObjectType.js | 12 +-- .../reference/classExtendsEveryObjectType2.js | 4 +- .../reference/classExtendsInterface.js | 4 +- .../classExtendsInterfaceInExpression.js | 2 +- .../classExtendsInterfaceInModule.js | 6 +- .../baselines/reference/classExtendsItself.js | 6 +- .../reference/classExtendsItselfIndirectly.js | 12 +-- .../classExtendsItselfIndirectly2.js | 12 +-- .../classExtendsItselfIndirectly3.js | 12 +-- .../classExtendsMultipleBaseClasses.js | 2 +- tests/baselines/reference/classExtendsNull.js | 3 +- ...classExtendsShadowedConstructorFunction.js | 2 +- .../classExtendsValidConstructorFunction.js | 2 +- .../classHeritageWithTrailingSeparator.js | 2 +- .../reference/classImplementsClass2.js | 2 +- .../reference/classImplementsClass3.js | 2 +- .../reference/classImplementsClass4.js | 2 +- .../reference/classImplementsClass5.js | 2 +- .../reference/classImplementsClass6.js | 2 +- tests/baselines/reference/classIndexer3.js | 2 +- tests/baselines/reference/classInheritence.js | 4 +- .../reference/classIsSubtypeOfBaseType.js | 4 +- tests/baselines/reference/classOrder2.js | 2 +- tests/baselines/reference/classOrderBug.js | 2 +- .../reference/classSideInheritance1.js | 2 +- tests/baselines/reference/classUpdateTests.js | 8 +- .../classWithBaseClassButNoConstructor.js | 8 +- .../reference/classWithConstructors.js | 4 +- .../reference/classWithProtectedProperty.js | 2 +- .../reference/classWithStaticMembers.js | 2 +- tests/baselines/reference/classdecl.js | 6 +- .../reference/clodulesDerivedClasses.js | 2 +- ...llisionSuperAndLocalFunctionInAccessors.js | 4 +- .../collisionSuperAndLocalFunctionInMethod.js | 4 +- ...ollisionSuperAndLocalFunctionInProperty.js | 2 +- .../collisionSuperAndLocalVarInAccessors.js | 4 +- .../collisionSuperAndLocalVarInMethod.js | 4 +- .../collisionSuperAndLocalVarInProperty.js | 2 +- .../collisionSuperAndNameResolution.js | 2 +- .../reference/collisionSuperAndParameter1.js | 2 +- ...xpressionAndLocalVarWithSuperExperssion.js | 4 +- .../reference/commentsInheritance.js | 2 +- .../comparisonOperatorWithIdenticalObjects.js | 4 +- ...ithNoRelationshipObjectsOnCallSignature.js | 2 +- ...lationshipObjectsOnConstructorSignature.js | 2 +- ...thNoRelationshipObjectsOnIndexSignature.js | 2 +- ...nshipObjectsOnInstantiatedCallSignature.js | 2 +- ...jectsOnInstantiatedConstructorSignature.js | 2 +- ...peratorWithSubtypeObjectOnCallSignature.js | 2 +- ...WithSubtypeObjectOnConstructorSignature.js | 2 +- ...eratorWithSubtypeObjectOnIndexSignature.js | 2 +- ...ubtypeObjectOnInstantiatedCallSignature.js | 2 +- ...bjectOnInstantiatedConstructorSignature.js | 2 +- ...isonOperatorWithSubtypeObjectOnProperty.js | 4 +- .../reference/complexClassRelationships.js | 2 +- ...catedGenericRecursiveBaseClassReference.js | 2 +- .../reference/computedPropertyNames24_ES5.js | 2 +- .../reference/computedPropertyNames25_ES5.js | 2 +- .../reference/computedPropertyNames26_ES5.js | 2 +- .../reference/computedPropertyNames27_ES5.js | 2 +- .../reference/computedPropertyNames31_ES5.js | 2 +- .../reference/computedPropertyNames43_ES5.js | 2 +- .../reference/computedPropertyNames44_ES5.js | 2 +- .../reference/computedPropertyNames45_ES5.js | 2 +- .../conditionalOperatorWithIdenticalBCT.js | 4 +- .../conditionalOperatorWithoutIdenticalBCT.js | 4 +- .../reference/constantOverloadFunction.js | 6 +- .../constantOverloadFunctionNoSubtypeError.js | 6 +- ...nstraintCheckInGenericBaseTypeReference.js | 2 +- ...uctSignatureAssignabilityInInheritance2.js | 6 +- ...uctSignatureAssignabilityInInheritance3.js | 6 +- ...uctSignatureAssignabilityInInheritance4.js | 6 +- ...uctSignatureAssignabilityInInheritance5.js | 6 +- ...uctSignatureAssignabilityInInheritance6.js | 6 +- ...uctorFunctionTypeIsAssignableToBaseType.js | 4 +- .../constructorHasPrototypeProperty.js | 4 +- .../reference/constructorOverloads3.js | 2 +- ...constructorWithIncompleteTypeAnnotation.js | 2 +- .../contextualTypingArrayOfLambdas.js | 4 +- ...contextualTypingOfConditionalExpression.js | 4 +- ...ontextualTypingOfConditionalExpression2.js | 4 +- ...urcePropertyIsRelatableToTargetProperty.js | 2 +- .../reference/declFileClassExtendsNull.js | 1 - .../declFileForFunctionTypeAsTypeParameter.js | 2 +- ...ileGenericClassWithGenericExtendedClass.js | 2 +- .../reference/declFileGenericType.js | 2 +- ...lictingWithClassReferredByExtendsClause.js | 4 +- ...dsClauseThatHasItsContainerNameConflict.js | 2 +- .../declarationEmitExpressionInExtends.js | 2 +- .../declarationEmitExpressionInExtends2.js | 2 +- .../declarationEmitExpressionInExtends3.js | 8 +- .../declarationEmitExpressionInExtends4.js | 6 +- .../declarationEmitNameConflicts3.js | 2 +- .../declarationEmitProtectedMembers.js | 4 +- .../declarationEmitThisPredicates01.js | 2 +- ...tionEmitThisPredicatesWithPrivateName01.js | 2 +- .../reference/declareDottedExtend.js | 4 +- .../reference/decoratorOnClassConstructor4.js | 2 +- .../reference/decoratorOnClassMethod12.js | 2 +- ...derivedClassConstructorWithoutSuperCall.js | 8 +- ...ClassFunctionOverridesBaseClassAccessor.js | 2 +- .../derivedClassIncludesInheritedMembers.js | 4 +- ...idesIndexersWithAssignmentCompatibility.js | 4 +- .../derivedClassOverridesPrivates.js | 4 +- .../derivedClassOverridesProtectedMembers2.js | 2 +- .../derivedClassOverridesProtectedMembers4.js | 4 +- .../derivedClassOverridesPublicMembers.js | 2 +- .../derivedClassOverridesWithoutSubtype.js | 4 +- .../derivedClassParameterProperties.js | 12 +-- ...dClassSuperCallsInNonConstructorMembers.js | 2 +- .../reference/derivedClassTransitivity.js | 4 +- .../reference/derivedClassTransitivity2.js | 4 +- .../reference/derivedClassTransitivity3.js | 4 +- .../reference/derivedClassTransitivity4.js | 4 +- .../reference/derivedClassWithAny.js | 4 +- ...ivateInstanceShadowingProtectedInstance.js | 2 +- ...hPrivateInstanceShadowingPublicInstance.js | 2 +- ...thPrivateStaticShadowingProtectedStatic.js | 2 +- ...sWithPrivateStaticShadowingPublicStatic.js | 2 +- .../derivedClassWithoutExplicitConstructor.js | 4 +- ...derivedClassWithoutExplicitConstructor2.js | 4 +- ...derivedClassWithoutExplicitConstructor3.js | 4 +- tests/baselines/reference/derivedClasses.js | 4 +- .../reference/derivedGenericClassWithAny.js | 4 +- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 2 +- .../derivedTypeDoesNotRequireExtendsClause.js | 2 +- .../reference/emitThisInSuperMethodCall.js | 2 +- tests/baselines/reference/emptyModuleName.js | 2 +- ...rorForwardReferenceForwadingConstructor.js | 2 +- tests/baselines/reference/errorSuperCalls.js | 4 +- .../reference/errorSuperPropertyAccess.js | 2 +- .../reference/errorsInGenericTypeReference.js | 2 +- .../reference/es6ClassSuperCodegenBug.js | 2 +- tests/baselines/reference/es6ClassTest2.js | 2 +- tests/baselines/reference/es6ClassTest7.js | 2 +- .../exportAssignmentOfGenericType1.js | 2 +- .../exportDeclarationInInternalModule.js | 2 +- tests/baselines/reference/extBaseClass1.js | 6 +- tests/baselines/reference/extBaseClass2.js | 4 +- .../extendAndImplementTheSameBaseType.js | 2 +- .../extendAndImplementTheSameBaseType2.js | 2 +- .../extendBaseClassBeforeItsDeclared.js | 2 +- .../extendClassExpressionFromModule.js | 2 +- .../extendConstructSignatureInInterface.js | 2 +- .../reference/extendNonClassSymbol1.js | 2 +- .../reference/extendNonClassSymbol2.js | 2 +- .../extendPrivateConstructorClass.js | 2 +- ...xtendingClassFromAliasAndUsageInIndexer.js | 4 +- .../reference/extendsClauseAlreadySeen.js | 2 +- .../reference/extendsClauseAlreadySeen2.js | 2 +- tests/baselines/reference/fluentClasses.js | 4 +- tests/baselines/reference/for-inStatements.js | 2 +- .../reference/for-inStatementsInvalid.js | 2 +- .../forStatementsMultipleInvalidDecl.js | 2 +- .../reference/functionImplementationErrors.js | 4 +- .../reference/functionImplementations.js | 4 +- .../reference/functionSubtypingOfVarArgs.js | 2 +- .../reference/functionSubtypingOfVarArgs2.js | 2 +- .../reference/generatedContextualTyping.js | 4 +- .../genericBaseClassLiteralProperty.js | 2 +- .../genericBaseClassLiteralProperty2.js | 2 +- ...allWithConstraintsTypeArgumentInference.js | 4 +- .../genericCallWithObjectTypeArgs2.js | 4 +- ...icCallWithObjectTypeArgsAndConstraints2.js | 2 +- ...icCallWithObjectTypeArgsAndConstraints3.js | 4 +- .../genericCallbacksAndClassHierarchy.js | 2 +- .../genericClassExpressionInFunction.js | 12 +-- ...sInheritsConstructorFromNonGenericClass.js | 4 +- .../reference/genericClassStaticMethod.js | 2 +- tests/baselines/reference/genericClasses3.js | 2 +- .../genericDerivedTypeWithSpecializedBase.js | 2 +- .../genericDerivedTypeWithSpecializedBase2.js | 2 +- .../genericInheritedDefaultConstructors.js | 2 +- .../reference/genericPrototypeProperty2.js | 4 +- .../reference/genericPrototypeProperty3.js | 4 +- ...ericRecursiveImplicitConstructorErrors2.js | 2 +- ...ericRecursiveImplicitConstructorErrors3.js | 2 +- .../reference/genericTypeAssertions2.js | 2 +- .../reference/genericTypeAssertions4.js | 4 +- .../reference/genericTypeAssertions6.js | 2 +- ...genericTypeReferenceWithoutTypeArgument.js | 4 +- ...enericTypeReferenceWithoutTypeArgument2.js | 4 +- .../genericWithIndexerOfTypeParameterType2.js | 4 +- .../reference/heterogeneousArrayLiterals.js | 4 +- .../reference/ifDoWhileStatements.js | 2 +- .../illegalSuperCallsInConstructor.js | 2 +- .../implementClausePrecedingExtends.js | 2 +- ...gAnInterfaceExtendingClassWithPrivates2.js | 22 ++--- ...AnInterfaceExtendingClassWithProtecteds.js | 8 +- .../baselines/reference/importAsBaseClass.js | 2 +- tests/baselines/reference/importHelpers.js | 4 +- tests/baselines/reference/importHelpersAmd.js | 2 +- .../importHelpersInIsolatedModules.js | 4 +- .../reference/importHelpersNoHelpers.js | 4 +- .../reference/importHelpersNoModule.js | 4 +- .../reference/importHelpersOutFile.js | 4 +- .../reference/importHelpersSystem.js | 2 +- .../reference/importShadowsGlobalName.js | 2 +- .../reference/importUsedInExtendsList1.js | 2 +- .../reference/indexerConstraints2.js | 8 +- .../reference/indirectSelfReference.js | 4 +- .../reference/indirectSelfReferenceGeneric.js | 4 +- .../infinitelyExpandingTypesNonGenericBase.js | 2 +- .../inheritFromGenericTypeParameter.js | 2 +- ...SameNamePrivatePropertiesFromSameOrigin.js | 4 +- tests/baselines/reference/inheritance.js | 8 +- tests/baselines/reference/inheritance1.js | 8 +- ...itanceGrandParentPrivateMemberCollision.js | 4 +- ...tPrivateMemberCollisionWithPublicMember.js | 4 +- ...tPublicMemberCollisionWithPrivateMember.js | 4 +- ...ritanceMemberAccessorOverridingAccessor.js | 2 +- ...heritanceMemberAccessorOverridingMethod.js | 2 +- ...ritanceMemberAccessorOverridingProperty.js | 2 +- ...inheritanceMemberFuncOverridingAccessor.js | 2 +- .../inheritanceMemberFuncOverridingMethod.js | 2 +- ...inheritanceMemberFuncOverridingProperty.js | 2 +- ...ritanceMemberPropertyOverridingAccessor.js | 2 +- ...heritanceMemberPropertyOverridingMethod.js | 2 +- ...ritanceMemberPropertyOverridingProperty.js | 2 +- .../inheritanceOfGenericConstructorMethod1.js | 2 +- .../inheritanceOfGenericConstructorMethod2.js | 4 +- ...ritanceStaticAccessorOverridingAccessor.js | 2 +- ...heritanceStaticAccessorOverridingMethod.js | 2 +- ...ritanceStaticAccessorOverridingProperty.js | 2 +- ...inheritanceStaticFuncOverridingAccessor.js | 2 +- ...eStaticFuncOverridingAccessorOfFuncType.js | 2 +- .../inheritanceStaticFuncOverridingMethod.js | 2 +- ...inheritanceStaticFuncOverridingProperty.js | 2 +- ...eStaticFuncOverridingPropertyOfFuncType.js | 2 +- ...taticFunctionOverridingInstanceProperty.js | 2 +- .../inheritanceStaticMembersCompatible.js | 2 +- .../inheritanceStaticMembersIncompatible.js | 2 +- ...ritanceStaticPropertyOverridingAccessor.js | 2 +- ...heritanceStaticPropertyOverridingMethod.js | 2 +- ...ritanceStaticPropertyOverridingProperty.js | 2 +- .../inheritedConstructorWithRestParams.js | 2 +- .../inheritedConstructorWithRestParams2.js | 4 +- .../inheritedModuleMembersForClodule.js | 4 +- .../reference/instanceOfAssignability.js | 4 +- ...nstancePropertiesInheritedIntoClassType.js | 4 +- .../reference/instanceSubtypeCheck2.js | 2 +- ...nstanceofWithStructurallyIdenticalTypes.js | 4 +- .../instantiatedReturnTypeContravariance.js | 2 +- .../reference/interfaceClassMerging.js | 2 +- .../reference/interfaceClassMerging2.js | 2 +- .../reference/interfaceExtendsClass1.js | 6 +- .../interfaceExtendsClassWithPrivate1.js | 2 +- .../interfaceExtendsClassWithPrivate2.js | 4 +- .../reference/interfaceImplementation8.js | 8 +- .../invalidModuleWithStatementsOfEveryKind.js | 12 +-- .../invalidMultipleVariableDeclarations.js | 2 +- .../reference/invalidReturnStatements.js | 2 +- .../isolatedModulesImportExportElision.js | 2 +- .../baselines/reference/jsxInExtendsClause.js | 4 +- tests/baselines/reference/jsxViaImport.2.js | 2 +- tests/baselines/reference/jsxViaImport.js | 2 +- .../reference/keyofAndIndexedAccess.js | 2 +- tests/baselines/reference/lambdaArgCrash.js | 2 +- tests/baselines/reference/localTypes1.js | 4 +- tests/baselines/reference/m7Bugs.js | 2 +- .../reference/mergedDeclarations5.js | 2 +- .../reference/mergedDeclarations6.js | 2 +- .../mergedInheritedClassInterface.js | 4 +- .../mergedInterfacesWithInheritedPrivates2.js | 4 +- .../mergedInterfacesWithInheritedPrivates3.js | 2 +- tests/baselines/reference/moduleAsBaseType.js | 2 +- .../moduleImportedForTypeArgumentPosition.js | 2 +- .../moduleWithStatementsOfEveryKind.js | 8 +- .../reference/multipleInheritance.js | 12 +-- .../mutuallyRecursiveGenericBaseTypes2.js | 2 +- tests/baselines/reference/noEmitHelpers.js | 2 +- .../noImplicitAnyMissingGetAccessor.js | 2 +- .../noImplicitAnyMissingSetAccessor.js | 2 +- ...enericClassExtendingGenericClassWithAny.js | 2 +- ...cIndexerConstrainsPropertyDeclarations2.js | 2 +- .../reference/numericIndexerConstraint3.js | 2 +- .../reference/numericIndexerConstraint4.js | 2 +- .../reference/numericIndexerTyping2.js | 2 +- ...objectTypeHidingMembersOfExtendedObject.js | 2 +- ...objectTypesIdentityWithNumericIndexers1.js | 4 +- ...objectTypesIdentityWithNumericIndexers2.js | 6 +- ...objectTypesIdentityWithNumericIndexers3.js | 4 +- .../objectTypesIdentityWithPrivates.js | 4 +- .../objectTypesIdentityWithPrivates2.js | 2 +- .../objectTypesIdentityWithPrivates3.js | 4 +- .../objectTypesIdentityWithStringIndexers.js | 4 +- .../objectTypesIdentityWithStringIndexers2.js | 6 +- .../optionalConstructorArgInSuper.js | 2 +- tests/baselines/reference/optionalMethods.js | 2 +- .../reference/optionalParamInOverride.js | 2 +- .../baselines/reference/outModuleConcatAmd.js | 2 +- .../outModuleConcatAmd.sourcemap.txt | 4 +- .../reference/outModuleConcatSystem.js | 2 +- .../outModuleConcatSystem.sourcemap.txt | 4 +- .../reference/outModuleTripleSlashRefs.js | 2 +- .../outModuleTripleSlashRefs.sourcemap.txt | 4 +- tests/baselines/reference/overload1.js | 4 +- .../overloadOnConstConstraintChecks1.js | 6 +- .../overloadOnConstConstraintChecks2.js | 4 +- .../overloadOnConstConstraintChecks3.js | 4 +- .../overloadOnConstConstraintChecks4.js | 6 +- .../overloadOnConstantsInvalidOverload1.js | 6 +- .../baselines/reference/overloadResolution.js | 6 +- .../overloadResolutionClassConstructors.js | 6 +- .../overloadResolutionConstructors.js | 6 +- .../reference/overloadingOnConstants1.js | 6 +- .../reference/overloadingOnConstants2.js | 2 +- .../overridingPrivateStaticMembers.js | 2 +- .../reference/parseErrorInHeritageClause1.js | 2 +- tests/baselines/reference/parser509630.js | 2 +- tests/baselines/reference/parserAstSpans1.js | 2 +- .../reference/parserClassDeclaration1.js | 2 +- .../reference/parserClassDeclaration3.js | 2 +- .../reference/parserClassDeclaration4.js | 2 +- .../reference/parserClassDeclaration5.js | 2 +- .../reference/parserClassDeclaration6.js | 2 +- ...rrorRecovery_ExtendsOrImplementsClause2.js | 2 +- ...rrorRecovery_ExtendsOrImplementsClause4.js | 2 +- ...rrorRecovery_ExtendsOrImplementsClause5.js | 2 +- .../parserGenericsInTypeContexts1.js | 2 +- .../parserGenericsInTypeContexts2.js | 2 +- ...artiallyAnnotatedFunctionInferenceError.js | 2 +- ...tatedFunctionInferenceWithTypeParameter.js | 2 +- tests/baselines/reference/primitiveMembers.js | 2 +- tests/baselines/reference/privacyClass.js | 48 +++++----- .../privacyClassExtendsClauseDeclFile.js | 46 ++++----- tests/baselines/reference/privacyGloClass.js | 20 ++-- .../reference/privateAccessInSubclass1.js | 2 +- .../privateInstanceMemberAccessibility.js | 2 +- ...tedMembersAreNotAccessibleDestructuring.js | 2 +- .../privateStaticMemberAccessibility.js | 2 +- .../privateStaticNotAccessibleInClodule2.js | 2 +- .../amd/testGlo.js | 8 +- .../node/testGlo.js | 8 +- .../reference/project/prologueEmit/amd/out.js | 2 +- .../project/prologueEmit/node/out.js | 2 +- .../amd/m'ain.js | 2 +- .../node/m'ain.js | 2 +- .../reference/propertiesAndIndexers.js | 2 +- tests/baselines/reference/propertyAccess.js | 2 +- ...tyAccessOnTypeParameterWithConstraints2.js | 2 +- ...tyAccessOnTypeParameterWithConstraints3.js | 2 +- ...tyAccessOnTypeParameterWithConstraints5.js | 2 +- ...sPropertyAccessibleWithinNestedSubclass.js | 4 +- ...PropertyAccessibleWithinNestedSubclass1.js | 8 +- ...edClassPropertyAccessibleWithinSubclass.js | 2 +- ...dClassPropertyAccessibleWithinSubclass2.js | 8 +- ...dClassPropertyAccessibleWithinSubclass3.js | 2 +- .../protectedInstanceMemberAccessibility.js | 4 +- tests/baselines/reference/protectedMembers.js | 14 +-- ...icClassPropertyAccessibleWithinSubclass.js | 6 +- ...cClassPropertyAccessibleWithinSubclass2.js | 4 +- ...solution-does-not-affect-class-heritage.js | 2 +- .../reference/recursiveBaseCheck3.js | 4 +- .../reference/recursiveBaseCheck4.js | 2 +- .../reference/recursiveBaseCheck6.js | 2 +- .../recursiveBaseConstructorCreation1.js | 2 +- ...ssInstantiationsWithDefaultConstructors.js | 2 +- .../reference/recursiveClassReferenceTest.js | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 4 +- .../reference/recursiveComplicatedClasses.js | 6 +- ...sivelySpecializedConstructorDeclaration.js | 2 +- .../reference/reexportClassDefinition.js | 2 +- ...lassDeclarationWhenInBaseTypeResolution.js | 94 +++++++++---------- tests/baselines/reference/returnStatements.js | 2 +- ...peCheckExtendedClassInsidePublicMethod2.js | 2 +- ...peCheckExtendedClassInsideStaticMethod1.js | 2 +- .../reference/shadowPrivateMembers.js | 2 +- ...sWithDefaultConstructorAndExtendsClause.js | 2 +- ...hDefaultConstructorAndExtendsClause.js.map | 2 +- ...tConstructorAndExtendsClause.sourcemap.txt | 8 +- .../specializedInheritedConstructors1.js | 2 +- .../specializedOverloadWithRestParameters.js | 2 +- tests/baselines/reference/staticFactory1.js | 2 +- .../baselines/reference/staticInheritance.js | 2 +- .../staticMemberAccessOffDerivedType1.js | 2 +- tests/baselines/reference/staticPropSuper.js | 8 +- .../reference/strictModeInConstructor.js | 4 +- .../reference/strictModeReservedWord.js | 2 +- ...trictModeReservedWordInClassDeclaration.js | 4 +- ...gIndexerConstrainsPropertyDeclarations2.js | 2 +- ...ubSubClassCanAccessProtectedConstructor.js | 4 +- .../reference/subtypesOfTypeParameter.js | 2 +- .../subtypesOfTypeParameterWithConstraints.js | 58 ++++++------ ...subtypesOfTypeParameterWithConstraints4.js | 18 ++-- ...OfTypeParameterWithRecursiveConstraints.js | 36 +++---- .../reference/subtypingTransitivity.js | 4 +- .../reference/subtypingWithCallSignatures2.js | 6 +- .../reference/subtypingWithCallSignatures3.js | 6 +- .../reference/subtypingWithCallSignatures4.js | 6 +- .../subtypingWithConstructSignatures2.js | 6 +- .../subtypingWithConstructSignatures3.js | 6 +- .../subtypingWithConstructSignatures4.js | 6 +- .../subtypingWithConstructSignatures5.js | 6 +- .../subtypingWithConstructSignatures6.js | 6 +- .../reference/subtypingWithNumericIndexer.js | 12 +-- .../reference/subtypingWithNumericIndexer3.js | 14 +-- .../reference/subtypingWithNumericIndexer4.js | 6 +- .../reference/subtypingWithObjectMembers.js | 16 ++-- .../reference/subtypingWithObjectMembers4.js | 8 +- ...subtypingWithObjectMembersAccessibility.js | 8 +- ...ubtypingWithObjectMembersAccessibility2.js | 14 +-- .../reference/subtypingWithStringIndexer.js | 12 +-- .../reference/subtypingWithStringIndexer3.js | 14 +-- .../reference/subtypingWithStringIndexer4.js | 6 +- tests/baselines/reference/super.js | 4 +- tests/baselines/reference/super1.js | 10 +- tests/baselines/reference/super2.js | 8 +- tests/baselines/reference/superAccess.js | 2 +- .../reference/superAccessInFatArrow1.js | 2 +- .../reference/superCallAssignResult.js | 2 +- .../superCallBeforeThisAccessing3.js | 2 +- .../superCallBeforeThisAccessing4.js | 9 +- .../superCallBeforeThisAccessing5.js | 4 +- .../superCallBeforeThisAccessing7.js | 2 +- .../superCallBeforeThisAccessing8.js | 2 +- .../reference/superCallInStaticMethod.js | 2 +- .../superCallInsideClassDeclaration.js | 2 +- .../superCallInsideClassExpression.js | 2 +- .../superCallInsideObjectLiteralExpression.js | 2 +- .../superCallWithMissingBaseClass.js | 2 +- tests/baselines/reference/superCalls.js | 2 +- .../reference/superCallsInConstructor.js | 2 +- .../baselines/reference/superInCatchBlock1.js | 2 +- .../reference/superInConstructorParam1.js | 2 +- .../reference/superInObjectLiterals_ES5.js | 2 +- tests/baselines/reference/superNewCall1.js | 2 +- .../reference/superPropertyAccess.js | 2 +- ...essInComputedPropertiesOfNestedType_ES5.js | 2 +- .../reference/superPropertyAccess_ES5.js | 2 +- ...perPropertyInConstructorBeforeSuperCall.js | 2 +- .../reference/superSymbolIndexedAccess5.js | 2 +- .../reference/superSymbolIndexedAccess6.js | 2 +- .../reference/superWithTypeArgument.js | 2 +- .../reference/superWithTypeArgument2.js | 2 +- .../reference/superWithTypeArgument3.js | 2 +- ...side-object-literal-getters-and-setters.js | 2 +- tests/baselines/reference/switchStatements.js | 2 +- .../reference/systemModuleWithSuperClass.js | 2 +- .../reference/thisInInvalidContexts.js | 2 +- .../thisInInvalidContextsExternalModule.js | 2 +- .../reference/thisTypeInFunctions.js | 6 +- .../reference/thisTypeInFunctionsNegative.js | 4 +- .../tsxCorrectlyParseLessThanComparison1.js | 2 +- .../baselines/reference/tsxDynamicTagName5.js | 2 +- .../baselines/reference/tsxDynamicTagName7.js | 2 +- .../baselines/reference/tsxDynamicTagName8.js | 2 +- .../baselines/reference/tsxDynamicTagName9.js | 2 +- .../reference/tsxExternalModuleEmit1.js | 4 +- .../tsxStatelessFunctionComponents2.js | 2 +- .../reference/tsxUnionTypeComponent1.js | 4 +- tests/baselines/reference/typeAssertions.js | 2 +- .../baselines/reference/typeGuardFunction.js | 2 +- .../reference/typeGuardFunctionErrors.js | 2 +- .../reference/typeGuardFunctionGenerics.js | 2 +- .../reference/typeGuardFunctionOfFormThis.js | 12 +-- .../typeGuardFunctionOfFormThisErrors.js | 4 +- .../reference/typeGuardOfFormInstanceOf.js | 2 +- .../reference/typeGuardOfFormIsType.js | 2 +- .../reference/typeGuardOfFormThisMember.js | 2 +- .../typeGuardOfFormThisMemberErrors.js | 2 +- tests/baselines/reference/typeMatch2.js | 2 +- tests/baselines/reference/typeOfSuperCall.js | 2 +- .../reference/typeParameterAsBaseClass.js | 2 +- .../reference/typeParameterAsBaseType.js | 4 +- .../reference/typeParameterExtendingUnion1.js | 4 +- .../reference/typeParameterExtendingUnion2.js | 4 +- .../baselines/reference/typeRelationships.js | 2 +- .../baselines/reference/typeValueConflict1.js | 2 +- .../baselines/reference/typeValueConflict2.js | 4 +- tests/baselines/reference/typeofClass2.js | 2 +- .../typesWithSpecializedCallSignatures.js | 4 +- ...typesWithSpecializedConstructSignatures.js | 4 +- tests/baselines/reference/undeclaredBase.js | 2 +- .../undefinedIsSubtypeOfEverything.js | 44 ++++----- .../baselines/reference/underscoreMapFirst.js | 2 +- .../underscoreThisInDerivedClass01.js | 2 +- .../underscoreThisInDerivedClass02.js | 2 +- .../reference/unionTypeEquivalence.js | 2 +- .../reference/unionTypeFromArrayLiteral.js | 4 +- .../reference/unionTypesAssignability.js | 4 +- .../reference/unspecializedConstraints.js | 2 +- ...untypedFunctionCallsWithTypeParameters1.js | 2 +- .../reference/unusedClassesinNamespace4.js | 2 +- .../unusedIdentifiersConsolidated1.js | 2 +- 585 files changed, 1227 insertions(+), 1225 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 5dae1da7b74..a4d8df6b8d4 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -882,7 +882,10 @@ namespace ts { } - const superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, hasSynthesizedSuper, statementOffset); + // determine whether the class is known syntactically to be a derived class (e.g. a + // class that extends a value that is not syntactically known to be `null`). + const isDerivedClass = extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== SyntaxKind.NullKeyword; + const superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset); // The last statement expression was replaced. Skip it. if (superCaptureStatus === SuperCaptureResult.ReplaceSuperCapture || superCaptureStatus === SuperCaptureResult.ReplaceWithReturn) { @@ -899,7 +902,7 @@ namespace ts { // Return `_this` unless we're sure enough that it would be pointless to add a return statement. // If there's a constructor that we can tell returns in enough places, then we *do not* want to add a return. - if (extendsClauseElement + if (isDerivedClass && superCaptureStatus !== SuperCaptureResult.ReplaceWithReturn && !(constructor && isSufficientlyCoveredByReturnStatements(constructor.body))) { statements.push( @@ -963,11 +966,11 @@ namespace ts { function declareOrCaptureOrReturnThisForConstructorIfNeeded( statements: Statement[], ctor: ConstructorDeclaration | undefined, - hasExtendsClause: boolean, + isDerivedClass: boolean, hasSynthesizedSuper: boolean, statementOffset: number) { // If this isn't a derived class, just capture 'this' for arrow functions if necessary. - if (!hasExtendsClause) { + if (!isDerivedClass) { if (ctor) { addCaptureThisForNodeIfNeeded(statements, ctor); } @@ -1047,7 +1050,7 @@ namespace ts { } // Perform the capture. - captureThisForNode(statements, ctor, superCallExpression, firstStatement); + captureThisForNode(statements, ctor, superCallExpression || createActualThis(), firstStatement); // If we're actually replacing the original statement, we need to signal this to the caller. if (superCallExpression) { @@ -1057,15 +1060,25 @@ namespace ts { return SuperCaptureResult.NoReplacement; } + function createActualThis() { + return setEmitFlags(createThis(), EmitFlags.NoSubstitution); + } + function createDefaultSuperCallOrThis() { - const actualThis = createThis(); - setEmitFlags(actualThis, EmitFlags.NoSubstitution); - const superCall = createFunctionApply( - createIdentifier("_super"), - actualThis, - createIdentifier("arguments"), + return createLogicalOr( + createLogicalAnd( + createStrictInequality( + createIdentifier("_super"), + createNull() + ), + createFunctionApply( + createIdentifier("_super"), + createActualThis(), + createIdentifier("arguments") + ) + ), + createActualThis() ); - return createLogicalOr(superCall, actualThis); } /** diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index ec0ed5494a4..a42424b36bb 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -38,7 +38,7 @@ var A; var Point3d = (function (_super) { __extends(Point3d, _super); function Point3d() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Point3d; }(Point)); diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index bae9593fb98..12d16837a57 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -41,7 +41,7 @@ var A; var Point3d = (function (_super) { __extends(Point3d, _super); function Point3d() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Point3d; }(Point)); diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index db5144be399..455fd716889 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -22,7 +22,7 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index 1b3e11cfa32..9c7cca30692 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -22,7 +22,7 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index fb7deaa09dd..d4ef48ac84f 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -35,7 +35,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.raw = "edge"; _this.ro = "readonly please"; return _this; diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index bebf9026a0e..c5e12a3cfa0 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -57,7 +57,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.ro = "readonly please"; return _this; } @@ -78,7 +78,7 @@ var WrongTypeProperty = (function () { var WrongTypePropertyImpl = (function (_super) { __extends(WrongTypePropertyImpl, _super); function WrongTypePropertyImpl() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.num = "nope, wrong"; return _this; } @@ -92,7 +92,7 @@ var WrongTypeAccessor = (function () { var WrongTypeAccessorImpl = (function (_super) { __extends(WrongTypeAccessorImpl, _super); function WrongTypeAccessorImpl() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(WrongTypeAccessorImpl.prototype, "num", { get: function () { return "nope, wrong"; }, @@ -104,7 +104,7 @@ var WrongTypeAccessorImpl = (function (_super) { var WrongTypeAccessorImpl2 = (function (_super) { __extends(WrongTypeAccessorImpl2, _super); function WrongTypeAccessorImpl2() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.num = "nope, wrong"; return _this; } diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js index dbaeec1f688..efafc978bee 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -38,7 +38,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index 8b60ed8e76d..1c2bed21529 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -46,7 +46,7 @@ var Backbone = require("./aliasUsage1_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index bf573aa9abb..fb1a37b2e93 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -40,7 +40,7 @@ var Backbone = require("./aliasUsageInArray_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 49bdd493aac..a611efa37bf 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -39,7 +39,7 @@ var Backbone = require("./aliasUsageInFunctionExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index dc3a8a88bab..033d206a4a5 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -43,7 +43,7 @@ var Backbone = require("./aliasUsageInGenericFunction_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index cb7ad3027ca..fe79dcd655f 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -45,7 +45,7 @@ var Backbone = require("./aliasUsageInIndexerOfClass_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 81e3e621e85..236397053a4 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -40,7 +40,7 @@ var Backbone = require("./aliasUsageInObjectLiteral_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 4faa41dd034..452566010e5 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -43,7 +43,7 @@ var Backbone = require("./aliasUsageInOrExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 2cf4aefab6c..2bfc7ce3c3c 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -43,7 +43,7 @@ var Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); @@ -64,7 +64,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.x = moduleA; return _this; } diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 80bb2dca20e..b0b40dca969 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -39,7 +39,7 @@ var Backbone = require("./aliasUsageInVarAssignment_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 01002792921..5cf216dcd38 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -22,7 +22,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index 6ca9d343a72..517e7da75cc 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -38,7 +38,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -51,7 +51,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index c6d3378872e..42043b0bda9 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -28,7 +28,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index a887203cd5e..18a0aeb77da 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -101,7 +101,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C2.prototype.C2M1 = function () { return null; }; return C2; diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index d82dedff29d..4782542f232 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -75,7 +75,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C2.prototype.C2M1 = function () { return null; }; return C2; diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index b7ddaa5d6da..fd0ea619bb0 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -128,7 +128,7 @@ var EmptyTypes; var derived = (function (_super) { __extends(derived, _super); function derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return derived; }(base)); @@ -187,7 +187,7 @@ var NonEmptyTypes; var derived = (function (_super) { __extends(derived, _super); function derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return derived; }(base)); diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index 919d3a5e922..8173747139c 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -65,14 +65,14 @@ var Action = (function () { var ActionA = (function (_super) { __extends(ActionA, _super); function ActionA() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ActionA; }(Action)); var ActionB = (function (_super) { __extends(ActionB, _super); function ActionB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ActionB; }(Action)); diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 530cdedec73..68c886e3c04 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -70,7 +70,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived1; }(Base)); @@ -78,7 +78,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index c0f320ac1e5..947186e4e6f 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -39,7 +39,7 @@ var List = (function () { var DerivedList = (function (_super) { __extends(DerivedList, _super); function DerivedList() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return DerivedList; }(List)); diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index d1d75e8041c..4cd45282674 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -33,14 +33,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(Array)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index c5a1f415437..de4624a8679 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -114,21 +114,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 58faf663ea8..f47d201b67e 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -115,21 +115,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 87506cad08f..90a9ce68428 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -80,21 +80,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index 2c05d5960b2..f970f31cd1f 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -57,21 +57,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index 76ad53e4e05..e788a20089f 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -114,21 +114,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index f516df153c6..bec6f0dd265 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -115,21 +115,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index ef7de7f011b..98ab16721ed 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -80,21 +80,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index 3d58ae707a5..3716cc120eb 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -57,21 +57,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 37160506683..82f71a9a905 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -72,7 +72,7 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index 2e6ecd72741..6b8654f4153 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -59,7 +59,7 @@ b = a; // ok var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A)); diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 2cc2510c8da..3d6ee83e467 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -108,14 +108,14 @@ var OnlyDerived; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); @@ -167,14 +167,14 @@ var WithBase; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 3b12701b3d9..bdef4c0a488 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -103,14 +103,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index f965d18e2ce..496a5b7bdfa 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -105,14 +105,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index 8d081c90794..6c4fe424d1b 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -82,7 +82,7 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -93,7 +93,7 @@ var Generics; var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A)); diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index 641b8e0381f..7aab30f9fa0 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -19,7 +19,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Task = (function (_super) { __extends(Task, _super); function Task() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Task; }(Promise)); diff --git a/tests/baselines/reference/asyncMethodWithSuper_es5.js b/tests/baselines/reference/asyncMethodWithSuper_es5.js index 235f2763f9f..c68b1ed036f 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es5.js +++ b/tests/baselines/reference/asyncMethodWithSuper_es5.js @@ -61,7 +61,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } // async method with only call/get on 'super' does not require a binding B.prototype.simple = function () { diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es5.js b/tests/baselines/reference/asyncQualifiedReturnType_es5.js index dd54f6ee833..3cae9ea6b56 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es5.js +++ b/tests/baselines/reference/asyncQualifiedReturnType_es5.js @@ -13,7 +13,7 @@ var X; var MyPromise = (function (_super) { __extends(MyPromise, _super); function MyPromise() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyPromise; }(Promise)); diff --git a/tests/baselines/reference/awaitClassExpression_es5.js b/tests/baselines/reference/awaitClassExpression_es5.js index b207ba08f8d..9cb8ce22f63 100644 --- a/tests/baselines/reference/awaitClassExpression_es5.js +++ b/tests/baselines/reference/awaitClassExpression_es5.js @@ -17,7 +17,7 @@ function func() { _a = function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }; diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index 7e922cf83b2..0f28011b2b2 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -38,7 +38,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index ec96b80a999..623f07930f1 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -51,7 +51,7 @@ var Class1 = (function () { var Class2 = (function (_super) { __extends(Class2, _super); function Class2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Class2; }(Class1)); @@ -63,7 +63,7 @@ var Class3 = (function () { var Class4 = (function (_super) { __extends(Class4, _super); function Class4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Class4; }(Class3)); diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index 5f8dcbd0e10..6b017d1d60a 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -41,7 +41,7 @@ var CBaseBase = (function () { var CBase = (function (_super) { __extends(CBase, _super); function CBase() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return CBase; }(CBaseBase)); @@ -59,7 +59,7 @@ var Wrapper = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.works = function () { new CBaseBase(this); diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index 6b73eb9556b..b803423fd6f 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -36,7 +36,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this; + var _this = this; _this.x; any; return _this; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index 6d0f19dd37d..ee40ccaf724 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -44,14 +44,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 2e2d0bcb1e2..ce14274b531 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -40,14 +40,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 928909f4c38..38c2b498929 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -46,7 +46,7 @@ var E = (function () { var F = (function (_super) { __extends(F, _super); function F() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return F; }(C)); @@ -59,7 +59,7 @@ var C1 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.i = "bar"; return _this; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 0ae7648c7f9..733c9b744fd 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -84,21 +84,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index 7a7791280ad..c07edf25e4e 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -131,21 +131,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index 19d66ce8d46..2e0833a2b30 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -64,21 +64,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index 1c53de5d26e..d7f79d37681 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -64,21 +64,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index c42e36389ca..de5251be911 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -67,21 +67,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index f0178dcbbf0..1dcc8a7b264 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -59,7 +59,7 @@ var D = (function () { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E; }(A)); @@ -67,7 +67,7 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return F; }(A)); diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index 3857867043c..0fc896ab83f 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -36,7 +36,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index 26d341e1f6a..8d8d4e1e787 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -42,14 +42,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index 95b34f27b68..a74c0015f89 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -24,7 +24,7 @@ var Based = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; + var _this = this; _this.x = 100; _this = _super.call(this) || this; _this.x = 10; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 0e882f71fdb..ebb0a6d7685 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -29,7 +29,7 @@ var Based = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; + var _this = this; var innver = (function () { function innver() { this.y = true; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 00f2ed22fbf..19a701d4e0e 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -33,7 +33,7 @@ var Based = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; + var _this = this; (function () { _this; // No error }); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 782e3236271..9468d817e23 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -28,7 +28,7 @@ var Base = (function () { var Super = (function (_super) { __extends(Super, _super); function Super() { - var _this; + var _this = this; (function () { return _this; }); // No Error _this = _super.call(this) || this; return _this; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index 5dd3708a3bb..3c61f03eb46 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -28,7 +28,7 @@ var Base = (function () { var Super = (function (_super) { __extends(Super, _super); function Super() { - var _this; + var _this = this; var that = _this; _this = _super.call(this) || this; return _this; diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 6fe5e604e57..42efa92f5ba 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -32,7 +32,7 @@ var B; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(B.a.C)); diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js index 1c38b9625e3..89c81d0df2a 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -31,7 +31,7 @@ function maker(value) { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar; }(Foo)); diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index 35d9e75884f..a0ea721c1a8 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -28,14 +28,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index fe23e60c94f..4ce3ec9a3a8 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -24,7 +24,7 @@ var foo = (function () { var bar = (function (_super) { __extends(bar, _super); function bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } bar.prototype.test = function () { this. diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index e899cb82d6d..4d2e5d2492d 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -31,28 +31,28 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B)); var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(B)); var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } E.prototype.bar = function () { }; return E; diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js index 50e232a9fca..a7046ff159c 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -31,7 +31,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index 96df8f5f19e..0bb24e8c92c 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -39,28 +39,28 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); // error -- inherits abstract methods var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(A)); // error -- inherits abstract methods var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } E.prototype.foo = function () { return this.t; }; return E; @@ -68,7 +68,7 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } F.prototype.bar = function (t) { }; return F; @@ -76,7 +76,7 @@ var F = (function (_super) { var G = (function (_super) { __extends(G, _super); function G() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } G.prototype.foo = function () { return this.t; }; G.prototype.bar = function (t) { }; diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js index c6a9e206bcc..4081f23561c 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -24,7 +24,7 @@ var M; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index 297a80dd99c..8fe03d503b0 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -35,14 +35,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); @@ -54,42 +54,42 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return BB; }(AA)); var CC = (function (_super) { __extends(CC, _super); function CC() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return CC; }(AA)); var DD = (function (_super) { __extends(DD, _super); function DD() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return DD; }(BB)); var EE = (function (_super) { __extends(EE, _super); function EE() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return EE; }(BB)); var FF = (function (_super) { __extends(FF, _super); function FF() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return FF; }(CC)); var GG = (function (_super) { __extends(GG, _super); function GG() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return GG; }(CC)); diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index 5abbb9c1baa..32e8f3e217f 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -41,14 +41,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index dea4c744ae0..666a3bc2db2 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -82,21 +82,21 @@ new x; // okay -- undefined behavior at runtime var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B)); // error -- not declared abstract var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(B)); // okay var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } E.prototype.bar = function () { return 1; }; return E; @@ -104,7 +104,7 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } F.prototype.bar = function () { return 2; }; return F; diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index 4ecebdf7b32..efa1dfcefba 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -38,7 +38,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -51,7 +51,7 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } BB.prototype.bar = function () { }; return BB; @@ -59,14 +59,14 @@ var BB = (function (_super) { var CC = (function (_super) { __extends(CC, _super); function CC() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return CC; }(BB)); // error var DD = (function (_super) { __extends(DD, _super); function DD() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } DD.prototype.foo = function () { }; return DD; diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index 0197f48a429..c246844b9b5 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -42,7 +42,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.bar = function () { _super.prototype.foo.call(this); }; B.prototype.baz = function () { return this.foo; }; @@ -51,7 +51,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.foo = function () { return 2; }; C.prototype.qux = function () { return _super.prototype.foo.call(this) || _super.prototype.foo; }; // 2 errors, foo is abstract @@ -68,7 +68,7 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return BB; }(AA)); diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index 74b5d62aaf5..f5e0c7679d8 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -31,7 +31,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.foo = function () { return 1; }; return B; @@ -39,7 +39,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index 25cf1a307c7..028516efb9e 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -41,21 +41,21 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.foo = function () { }; return D; @@ -63,7 +63,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } E.prototype.foo = function () { }; return E; @@ -76,21 +76,21 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return BB; }(AA)); var CC = (function (_super) { __extends(CC, _super); function CC() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return CC; }(AA)); var DD = (function (_super) { __extends(DD, _super); function DD() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } DD.prototype.foo = function () { }; return DD; diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js index 4772ac68d11..c0d4622f8ea 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -51,7 +51,7 @@ var A = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); @@ -73,7 +73,7 @@ var D = (function () { var F = (function (_super) { __extends(F, _super); function F() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return F; }(D)); diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index d658349c2a5..9d140e41987 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -25,7 +25,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived.make = function () { new Base(); }; // ok return Derived; diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index 5a5440a92b5..254ac374816 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -33,7 +33,7 @@ var M; var O = (function (_super) { __extends(O, _super); function O() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return O; }(M.N)); diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js index 3dd1e7a4aaf..648c7709720 100644 --- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js +++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js @@ -17,7 +17,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(makeBaseClass())); diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index 076412e164d..450529a2622 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -31,7 +31,7 @@ var StringTreeCollectionBase = (function () { var StringTreeCollection = (function (_super) { __extends(StringTreeCollection, _super); function StringTreeCollection() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return StringTreeCollection; }(StringTreeCollectionBase)); diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index 59b62c60cfe..aa226998eb3 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -16,7 +16,7 @@ var D = (function () { var v = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(D)); diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index c0376c54c27..991592e2cf3 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(class_1, _super); function class_1() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.c = 3; return _this; } @@ -23,7 +23,7 @@ var C = (function (_super) { }((function (_super) { __extends(class_2, _super); function class_2() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.b = 2; return _this; } diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index 7312ab6567d..1e564b46752 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -22,7 +22,7 @@ var A = (function () { var C = (function (_super) { __extends(class_1, _super); function class_1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class_1; }(A)); diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index 4c95e3008ea..b01b646efd3 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -20,70 +20,70 @@ var __extends = (this && this.__extends) || function (d, b) { var C1 = (function (_super) { __extends(C1, _super); function C1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C1; }(Object)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(Function)); var C3 = (function (_super) { __extends(C3, _super); function C3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C3; }(String)); var C4 = (function (_super) { __extends(C4, _super); function C4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C4; }(Boolean)); var C5 = (function (_super) { __extends(C5, _super); function C5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C5; }(Number)); var C6 = (function (_super) { __extends(C6, _super); function C6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C6; }(Date)); var C7 = (function (_super) { __extends(C7, _super); function C7() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C7; }(RegExp)); var C8 = (function (_super) { __extends(C8, _super); function C8() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C8; }(Error)); var C9 = (function (_super) { __extends(C9, _super); function C9() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C9; }(Array)); var C10 = (function (_super) { __extends(C10, _super); function C10() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C10; }(Array)); diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index 91e3752980c..8cc5efc0fa1 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -47,7 +47,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); @@ -66,7 +66,7 @@ var C2 = (function () { var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(C2)); diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index bfc10c23563..2a5374f0331 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -68,7 +68,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D0 = (function (_super) { __extends(D0, _super); function D0() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D0; }(Base)); @@ -107,7 +107,7 @@ var D3 = (function (_super) { var D4 = (function (_super) { __extends(D4, _super); function D4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D4; }(getBase())); @@ -115,7 +115,7 @@ var D4 = (function (_super) { var D5 = (function (_super) { __extends(D5, _super); function D5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D5; }(getBadBase())); diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index 574d5004486..9ecfd3da7f1 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -27,49 +27,49 @@ function foo() { var C1 = (function (_super) { __extends(C1, _super); function C1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C1; }(undefined)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(true)); var C3 = (function (_super) { __extends(C3, _super); function C3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C3; }(false)); var C4 = (function (_super) { __extends(C4, _super); function C4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C4; }(42)); var C5 = (function (_super) { __extends(C5, _super); function C5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C5; }("hello")); var C6 = (function (_super) { __extends(C6, _super); function C6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C6; }(x)); var C7 = (function (_super) { __extends(C7, _super); function C7() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C7; }(foo)); diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index 8d5d73329aa..caa9ed57ba4 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -12,14 +12,12 @@ var __extends = (this && this.__extends) || function (d, b) { var C1 = (function (_super) { __extends(C1, _super); function C1() { - return _super.apply(this, arguments) || this; } return C1; }(null)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; } return C2; }((null))); diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 53cb45c2081..d8ccd189398 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -24,28 +24,28 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(number)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(string)); var C3 = (function (_super) { __extends(C3, _super); function C3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C3; }(boolean)); var C4 = (function (_super) { __extends(C4, _super); function C4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C4; }(Void)); @@ -58,28 +58,27 @@ void {}; var C5 = (function (_super) { __extends(C5, _super); function C5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C5; }(Null)); var C5a = (function (_super) { __extends(C5a, _super); function C5a() { - return _super.apply(this, arguments) || this; } return C5a; }(null)); var C6 = (function (_super) { __extends(C6, _super); function C6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C6; }(undefined)); var C7 = (function (_super) { __extends(C7, _super); function C7() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C7; }(Undefined)); @@ -90,7 +89,7 @@ var E; var C8 = (function (_super) { __extends(C8, _super); function C8() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C8; }(E)); diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index b32dc31a5b4..0ad4c6e945d 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -20,7 +20,6 @@ void {}; var C5a = (function (_super) { __extends(C5a, _super); function C5a() { - return _super.apply(this, arguments) || this; } return C5a; }(null)); diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index fced8c2a373..be0f4fe0714 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -23,7 +23,7 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(M.C)); diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index c133ceb87dc..0b7b56e56d5 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -24,7 +24,7 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(M.C)); diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index 5be0ab8f9c0..399dac024d6 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -37,7 +37,7 @@ exports.b = { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -62,7 +62,7 @@ exports.a = { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index 91f96450d87..542fdda7c8a 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -32,7 +32,7 @@ var Foo; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index 6c3dc789445..fdd438c3aef 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -23,7 +23,7 @@ var Foo; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index a19f5d5cdd6..3e96a872c2e 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -25,14 +25,14 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(I)); // error var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }({ foo: string })); // error @@ -40,7 +40,7 @@ var x; var C3 = (function (_super) { __extends(C3, _super); function C3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C3; }(x)); // error @@ -51,7 +51,7 @@ var M; var C4 = (function (_super) { __extends(C4, _super); function C4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C4; }(M)); // error @@ -59,14 +59,14 @@ function foo() { } var C5 = (function (_super) { __extends(C5, _super); function C5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C5; }(foo)); // error var C6 = (function (_super) { __extends(C6, _super); function C6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C6; }([])); // error diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index fbc364ca5da..ca3e2cff209 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -12,14 +12,14 @@ var __extends = (this && this.__extends) || function (d, b) { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }({ foo: string })); // error var C6 = (function (_super) { __extends(C6, _super); function C6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C6; }([])); // error diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index b5946224317..4d4936330bf 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -17,7 +17,7 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return A; }(Comparable)); @@ -29,7 +29,7 @@ var B = (function () { var A2 = (function (_super) { __extends(A2, _super); function A2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return A2; }(Comparable2)); diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index 9dcd8dd7279..10a17c8154c 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -20,7 +20,7 @@ function factory(a) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(factory(A))); diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index 9da8831a138..d7eefb3c7ed 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -24,21 +24,21 @@ var __extends = (this && this.__extends) || function (d, b) { var C1 = (function (_super) { __extends(C1, _super); function C1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C1; }(M.I1)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(M.I2)); var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(Mod.Nested.I)); diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index 36f2263d671..d8dfea40fa9 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -14,21 +14,21 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(C)); // error var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(D)); // error var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E; }(E)); // error diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index 0f3f48d2f2c..7ee58914d93 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -20,42 +20,42 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(E)); // error var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E; }(D)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(E2)); // error var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(C2)); var E2 = (function (_super) { __extends(E2, _super); function E2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E2; }(D2)); diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index e215a07c357..6db36996c56 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -31,7 +31,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(N.E)); // error @@ -40,7 +40,7 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); @@ -51,7 +51,7 @@ var N; var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E; }(M.D)); @@ -62,7 +62,7 @@ var O; var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(Q.E2)); // error @@ -71,7 +71,7 @@ var O; var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(C2)); @@ -82,7 +82,7 @@ var O; var E2 = (function (_super) { __extends(E2, _super); function E2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E2; }(P.D2)); diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index f8366d77e13..866f0a592aa 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -27,7 +27,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(E)); // error @@ -40,7 +40,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); @@ -53,7 +53,7 @@ var __extends = (this && this.__extends) || function (d, b) { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E; }(D)); @@ -66,7 +66,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(E2)); // error @@ -79,7 +79,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(C2)); @@ -92,7 +92,7 @@ var __extends = (this && this.__extends) || function (d, b) { var E2 = (function (_super) { __extends(E2, _super); function E2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E2; }(D2)); diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index cd9c28ad283..7adb3af9b6f 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -22,7 +22,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index 1eeb5172cad..37fcb0c6b2e 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -21,7 +21,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.call(this) || this; + _this = _super.call(this) || this; return Object.create(null); } return C; @@ -29,7 +29,6 @@ var C = (function (_super) { var D = (function (_super) { __extends(D, _super); function D() { - var _this; return Object.create(null); } return D; diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js index ddaadc2dc62..7d5790a8067 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -25,7 +25,7 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index 31bff6e430c..b97c57a9a57 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -16,7 +16,7 @@ var x = new foo(); // can be used as a constructor function var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(foo)); // error, cannot extend it though diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js index 12265f569bd..7102a96cdaf 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -17,7 +17,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index 5e3eae46543..5994e07d528 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -33,7 +33,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C2.prototype.foo = function () { return 1; diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index 5fd003e93b9..440bedc3962 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -37,7 +37,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(A)); diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index 477288972df..98f7849d5bb 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -40,7 +40,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(A)); diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index 0ec258ab77b..aefec9ee4c5 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -42,7 +42,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(A)); diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index 0771c56415c..dd2b4039d49 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -47,7 +47,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(A)); diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index 2e55c894645..7729d2b26ec 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -24,7 +24,7 @@ var C123 = (function () { var D123 = (function (_super) { __extends(D123, _super); function D123() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D123; }(C123)); diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index f68d76fad47..936cf0973ee 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -11,14 +11,14 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var A = (function (_super) { __extends(A, _super); function A() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return A; }(A)); diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index 52300987d8e..b4d730257a3 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -29,14 +29,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index 63490fa29b1..0d41a7f6e80 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -28,7 +28,7 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } A.prototype.foo = function () { this.bar(); }; return A; diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js index e21a5ed64cf..d1596d781cd 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -35,7 +35,7 @@ var baz = (function () { var foo = (function (_super) { __extends(foo, _super); function foo() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return foo; }(baz)); diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index 9443509032c..f1ec0e4d6f6 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -33,7 +33,7 @@ var A = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(A)); diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 53ef71d0e4b..3859cc297d2 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -157,7 +157,7 @@ var D = (function () { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.p1 = 0; return _this; } @@ -166,7 +166,7 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - var _this; + var _this = this; return _this; } // ERROR - super call required return F; @@ -205,7 +205,7 @@ var J = (function (_super) { var K = (function (_super) { __extends(K, _super); function K(p1) { - var _this; + var _this = this; _this.p1 = p1; var i = 0; _this = _super.call(this) || this; @@ -225,7 +225,7 @@ var L = (function (_super) { var M = (function (_super) { __extends(M, _super); function M(p1) { - var _this; + var _this = this; _this.p1 = p1; var i = 0; _this = _super.call(this) || this; diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index c25687d3c74..70a495d6dd1 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -54,7 +54,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(Base)); @@ -69,7 +69,7 @@ var Base2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(Base2)); @@ -80,7 +80,7 @@ var d2 = new D(1); // ok var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(Base2)); @@ -90,7 +90,7 @@ var d4 = new D(1); // ok var D3 = (function (_super) { __extends(D3, _super); function D3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D3; }(Base2)); diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index f445d22d18f..482512c1e4a 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -75,7 +75,7 @@ var NonGeneric; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C2)); @@ -103,7 +103,7 @@ var Generics; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C2)); diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 2cb8a4e0a50..f90c98f8699 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -48,7 +48,7 @@ C.g = function () { return ''; }; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.method = function () { // No errors diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 9e79780d5cc..af4e448d09b 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -45,7 +45,7 @@ var r3 = r.foo; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index a3059757d2f..5f40a3de86e 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -136,7 +136,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return b; }(a)); @@ -161,7 +161,7 @@ var m2; var c = (function (_super) { __extends(c, _super); function c() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return c; }(b)); @@ -177,7 +177,7 @@ var m2; var c = (function (_super) { __extends(c, _super); function c() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return c; }(m1.b)); diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index ea4bfcf301f..ab63e27b00b 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -43,7 +43,7 @@ var Shape = (function () { var Path = (function (_super) { __extends(Path, _super); function Path() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Path; }(Shape)); diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index 85c0e398fbd..964d5826773 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -68,7 +68,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(b.prototype, "prop2", { get: function () { @@ -88,7 +88,7 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(c.prototype, "prop2", { get: function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js index 81c069da169..1fce1338fe7 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -50,7 +50,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.prototype.foo = function () { function _super() { @@ -63,7 +63,7 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } c.prototype.foo = function () { var x = function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index 67b7f0e3991..a251c62a161 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -40,7 +40,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.prop2 = { doStuff: function () { function _super() { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index 26f782c0d17..0b89b219338 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -58,7 +58,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(b.prototype, "prop2", { get: function () { @@ -76,7 +76,7 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(c.prototype, "prop2", { get: function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index 0524d993ba1..888677ca422 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -36,7 +36,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.prototype.foo = function () { var _super = 10; // Should be error @@ -46,7 +46,7 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } c.prototype.foo = function () { var x = function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index d793e022c6b..aabc083deda 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -38,7 +38,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.prop2 = { doStuff: function () { var _super = 10; // Should be error diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index cb5636ec904..a6a36efcd1f 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -27,7 +27,7 @@ var base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Foo.prototype.x = function () { console.log(_super); // Error as this doesnt not resolve to user defined _super diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index ed19500f9d4..5ede279d859 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -23,7 +23,7 @@ var Foo = (function () { var Foo2 = (function (_super) { __extends(Foo2, _super); function Foo2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Foo2.prototype.x = function () { var lambda = function (_super) { diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index 9e8132c6883..9cd524ef8b8 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -34,7 +34,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.prototype.foo = function () { var _this = this; @@ -46,7 +46,7 @@ var b = (function (_super) { var b2 = (function (_super) { __extends(b2, _super); function b2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b2.prototype.foo = function () { var _this = this; diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index 3527f5d23bb..aa7b7910b02 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -258,7 +258,7 @@ c2_i = c3_i; var c4 = (function (_super) { __extends(c4, _super); function c4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return c4; }(c2)); diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index a263a30e382..82c9d1b65f7 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -227,14 +227,14 @@ var Base = (function () { var A2 = (function (_super) { __extends(A2, _super); function A2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return A2; }(Base)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index b8584522b7b..a18b5d19ebd 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -182,7 +182,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index 93e1e876a7f..5498a006e0c 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -182,7 +182,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index a8973bf2c10..431c19c0bbe 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -125,7 +125,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index 4539538782d..6669d835c10 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -163,7 +163,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index 5e8412bc361..0d047de4f9f 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -163,7 +163,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index d30c3586b12..0f32da7d9de 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -273,7 +273,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index 4235c1352d4..a5e64b0060a 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -235,7 +235,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index 9a6fecd668d..aad6778162f 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -121,7 +121,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index 5721a452486..70340933d15 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -178,7 +178,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index b6bf8a16e61..fa0f07f986f 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -178,7 +178,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index 690214fc00f..0db97fed414 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -92,7 +92,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -114,7 +114,7 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A2)); diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index 4f48e5fc2c5..99a04a07e53 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -57,7 +57,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived.createEmpty = function () { var item = new Derived(); diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js index 326c0830c4f..15b26480898 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || function (d, b) { var S18 = (function (_super) { __extends(S18, _super); function S18() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return S18; }(S18)); diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index ff9112755bd..6b8947f857f 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -25,7 +25,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype[_super.bar.call(this)] = function () { }; return C; diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index dad9c5c291a..f2085c1b4a8 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -30,7 +30,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.foo = function () { var obj = (_a = {}, diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index 5db7768270a..accb2b74e98 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -27,7 +27,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype[(_a = {}, _a[_super.bar.call(this)] = 1, _a)[0]] = function () { }; return C; diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index 381805659e2..742baeab1ef 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -19,7 +19,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype[(_this = _super.call(this) || this, "prop")] = function () { }; return C; diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 00cc765f4cc..e084849a509 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -32,7 +32,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.foo = function () { var _this = this; diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index b1bb0fec72c..2be00852432 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -36,7 +36,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(D.prototype, "get1", { // Computed properties diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index bf940f15014..87139b16220 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -40,7 +40,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(D.prototype, "set1", { set: function (p) { }, diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index 5b5d64f9bf0..7faaa5dd40e 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -41,7 +41,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(D.prototype, "set1", { set: function (p) { }, diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index 408571af42a..93f8f05e672 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -63,7 +63,7 @@ var X = (function () { var A = (function (_super) { __extends(A, _super); function A() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return A; }(X)); @@ -71,7 +71,7 @@ var A = (function (_super) { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(X)); diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 0ac935a582a..6dbcdf4842f 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -39,7 +39,7 @@ var X = (function () { var A = (function (_super) { __extends(A, _super); function A() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return A; }(X)); @@ -47,7 +47,7 @@ var A = (function (_super) { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(X)); diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 160191c5ca0..e222a7a9d6f 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -28,7 +28,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -36,7 +36,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -44,7 +44,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived3.prototype.biz = function () { }; return Derived3; diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index 509f9ba70e6..b92f23db351 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -29,7 +29,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -37,7 +37,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -45,7 +45,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived3.prototype.biz = function () { }; return Derived3; diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index 7908d36a56a..c574c483038 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -40,7 +40,7 @@ var GenericBase = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(GenericBase)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index 6b308d88896..0039746bf94 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -84,21 +84,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index 09abd6e0868..6d715ec31d1 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -129,21 +129,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index 4e9a8c59bf9..c6f9812e5c0 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -74,21 +74,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index 91ec3b313bb..ee94926864e 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -64,21 +64,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index edafb009916..017984442e4 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -67,21 +67,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index 45ed976e191..cf8b9b3274f 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -33,14 +33,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index a16694cdbf5..0e9ab1c59df 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -47,7 +47,7 @@ var NonGeneric; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); @@ -66,7 +66,7 @@ var Generic; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index c0ae9b452f9..4afc4e72272 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -31,7 +31,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { - var _this; + var _this = this; return _this; } Foo.prototype.bar1 = function () { }; diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index d4cd737ab46..e3d106a2b1e 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -525,7 +525,7 @@ method2(); var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.method2 = function () { return this.method1(2); diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index caf7ed445e5..d2d5ce60ede 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -28,14 +28,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index a6ce98f61e2..a7c19749b09 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -29,14 +29,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index e3bd1643cfb..d17e5b40f6e 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -26,14 +26,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index 89979da4812..36fbbe7272e 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -25,7 +25,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index 30ddc3f08bf..4ba73ff5067 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -12,7 +12,6 @@ var __extends = (this && this.__extends) || function (d, b) { var ExtendsNull = (function (_super) { __extends(ExtendsNull, _super); function ExtendsNull() { - return _super.apply(this, arguments) || this; } return ExtendsNull; }(null)); diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index 442007d9b9a..50b05111e90 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -23,7 +23,7 @@ var X = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(X)); diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index 47593dc9d68..ac62f03c4bf 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -26,7 +26,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index b2e99a73ad7..ecb37be15b0 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -91,7 +91,7 @@ exports.g = C.F5(); var h = (function (_super) { __extends(h, _super); function h() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return h; }(C.A)); diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index 17d885788dd..387a3fc2cb3 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -35,7 +35,7 @@ var X; var W = (function (_super) { __extends(W, _super); function W() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return W; }(A.B.Base.W)); @@ -53,7 +53,7 @@ var X; var W = (function (_super) { __extends(W, _super); function W() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return W; }(X.Y.base.W)); diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index 70d0cd5a3dd..1efbff93dbf 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -44,7 +44,7 @@ var A; var ContextMenu = (function (_super) { __extends(ContextMenu, _super); function ContextMenu() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ContextMenu; }(B.EventManager)); diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js index 726c7b22446..681d827b9f6 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js @@ -29,7 +29,7 @@ var Q = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(x)); diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js index 4081de6d3ed..836ac8a47b0 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js @@ -29,7 +29,7 @@ function getClass(c) { var MyClass = (function (_super) { __extends(MyClass, _super); function MyClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyClass; }(getClass(2))); diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index f36a7e250a2..b7d19e94112 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -70,7 +70,7 @@ function getExportedClass(c) { var MyClass = (function (_super) { __extends(MyClass, _super); function MyClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyClass; }(getLocalClass(undefined))); @@ -78,7 +78,7 @@ exports.MyClass = MyClass; var MyClass2 = (function (_super) { __extends(MyClass2, _super); function MyClass2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyClass2; }(getExportedClass(undefined))); @@ -86,7 +86,7 @@ exports.MyClass2 = MyClass2; var MyClass3 = (function (_super) { __extends(MyClass3, _super); function MyClass3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyClass3; }(getExportedClass(undefined))); @@ -94,7 +94,7 @@ exports.MyClass3 = MyClass3; var MyClass4 = (function (_super) { __extends(MyClass4, _super); function MyClass4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyClass4; }(getExportedClass(undefined))); diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends4.js b/tests/baselines/reference/declarationEmitExpressionInExtends4.js index b90c1275197..acdb2f417b2 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends4.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends4.js @@ -33,21 +33,21 @@ function getSomething() { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(getSomething())); var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(SomeUndefinedFunction())); var C3 = (function (_super) { __extends(C3, _super); function C3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C3; }(SomeUndefinedFunction)); diff --git a/tests/baselines/reference/declarationEmitNameConflicts3.js b/tests/baselines/reference/declarationEmitNameConflicts3.js index ffcfead83bf..26eb4300e6b 100644 --- a/tests/baselines/reference/declarationEmitNameConflicts3.js +++ b/tests/baselines/reference/declarationEmitNameConflicts3.js @@ -63,7 +63,7 @@ var M; var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E; }(C)); diff --git a/tests/baselines/reference/declarationEmitProtectedMembers.js b/tests/baselines/reference/declarationEmitProtectedMembers.js index 9ae8e8a2437..48e58bd95ab 100644 --- a/tests/baselines/reference/declarationEmitProtectedMembers.js +++ b/tests/baselines/reference/declarationEmitProtectedMembers.js @@ -88,7 +88,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C2.prototype.f = function () { return _super.prototype.f.call(this) + this.x; @@ -102,7 +102,7 @@ var C2 = (function (_super) { var C3 = (function (_super) { __extends(C3, _super); function C3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C3.prototype.f = function () { return _super.prototype.f.call(this); diff --git a/tests/baselines/reference/declarationEmitThisPredicates01.js b/tests/baselines/reference/declarationEmitThisPredicates01.js index ad9b7a70373..d2d169132ae 100644 --- a/tests/baselines/reference/declarationEmitThisPredicates01.js +++ b/tests/baselines/reference/declarationEmitThisPredicates01.js @@ -28,7 +28,7 @@ exports.C = C; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js index fe7995462ef..4d08678885d 100644 --- a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js +++ b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js @@ -28,7 +28,7 @@ exports.C = C; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/declareDottedExtend.js b/tests/baselines/reference/declareDottedExtend.js index 3c7588d2b6c..83917b40dab 100644 --- a/tests/baselines/reference/declareDottedExtend.js +++ b/tests/baselines/reference/declareDottedExtend.js @@ -21,14 +21,14 @@ var ab = A.B; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(ab.C)); var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E; }(A.B.C)); diff --git a/tests/baselines/reference/decoratorOnClassConstructor4.js b/tests/baselines/reference/decoratorOnClassConstructor4.js index 22414e89e43..ededadb0c23 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor4.js +++ b/tests/baselines/reference/decoratorOnClassConstructor4.js @@ -49,7 +49,7 @@ B = __decorate([ var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/decoratorOnClassMethod12.js b/tests/baselines/reference/decoratorOnClassMethod12.js index 7dd5f698182..bbd0ff5328c 100644 --- a/tests/baselines/reference/decoratorOnClassMethod12.js +++ b/tests/baselines/reference/decoratorOnClassMethod12.js @@ -32,7 +32,7 @@ var M; var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.method = function () { }; return C; diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index e76f3445c8e..d3ce94a0df7 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -47,7 +47,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; + var _this = this; return _this; } return Derived; @@ -60,7 +60,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this; + var _this = this; var r2 = function () { return _this = _super.call(this) || this; }; // error for misplaced super call (nested function) return _this; } @@ -69,7 +69,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var _this; + var _this = this; var r = function () { _this = _super.call(this) || this; }; // error return _this; } @@ -78,7 +78,7 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4() { - var _this; + var _this = this; var r = _this = _super.call(this) || this; // ok return _this; } diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index 7f6b83593ca..4c37be8b27b 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -38,7 +38,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived.prototype.x = function () { return 1; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index 8224473cb54..6bcd9ededde 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -68,7 +68,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -89,7 +89,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index 4753e395390..e25321ab1e9 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -32,7 +32,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -45,7 +45,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index 1a58c038fea..2544dc2a6c9 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -29,7 +29,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -41,7 +41,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 6797eef0e77..6e69a2bf996 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -131,7 +131,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index 06f80997600..49befa2566a 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -30,14 +30,14 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived1)); diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 7943d904dea..3a044f88831 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -129,7 +129,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index e42ff9c9e1d..eecdebae690 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -37,7 +37,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -49,7 +49,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index 27dcc4b7d5d..f724fc51149 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -109,7 +109,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(y) { - var _this; + var _this = this; var a = 1; _this = _super.call(this) || this; // ok return _this; @@ -119,7 +119,7 @@ var Derived = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2(y) { - var _this; + var _this = this; _this.y = y; var a = 1; _this = _super.call(this) || this; // error @@ -140,7 +140,7 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4(y) { - var _this; + var _this = this; _this.a = 1; var b = 2; _this = _super.call(this) || this; // error @@ -161,7 +161,7 @@ var Derived5 = (function (_super) { var Derived6 = (function (_super) { __extends(Derived6, _super); function Derived6(y) { - var _this; + var _this = this; _this.a = 1; var b = 2; _this = _super.call(this) || this; // error: "super" has to be called before "this" accessing @@ -172,7 +172,7 @@ var Derived6 = (function (_super) { var Derived7 = (function (_super) { __extends(Derived7, _super); function Derived7(y) { - var _this; + var _this = this; _this.a = 1; _this.a = 3; _this.b = 3; @@ -201,7 +201,7 @@ var Base2 = (function () { var Derived9 = (function (_super) { __extends(Derived9, _super); function Derived9(y) { - var _this; + var _this = this; _this.a = 1; _this.a = 3; _this.b = 3; diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index b778d7bbca2..1c4d3a88108 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -46,7 +46,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.a = _this = _super.call(this) || this; return _this; } diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index a76ac8101a0..0771054b475 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -36,7 +36,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.foo = function () { }; // ok to drop parameters return D; @@ -44,7 +44,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } E.prototype.foo = function (x) { }; // ok to add optional parameters return E; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index a3894863696..fb4119f04ca 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -36,7 +36,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.foo = function (x) { }; // ok to drop parameters return D; @@ -44,7 +44,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } E.prototype.foo = function (x, y) { }; // ok to add optional parameters return E; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index 71dfecb346f..d1df028fcf3 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -36,7 +36,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.foo = function (x) { }; // ok to drop parameters return D; @@ -44,7 +44,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } E.prototype.foo = function (x, y) { }; // ok to add optional parameters return E; diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index 0030ce702d8..f7a6814238e 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -36,7 +36,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.foo = function () { }; // ok to drop parameters return D; @@ -44,7 +44,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } E.prototype.foo = function (x) { }; // ok to add optional parameters return E; diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index 2a199e55861..39f998a71a6 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -91,7 +91,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(D.prototype, "X", { get: function () { @@ -119,7 +119,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(E.prototype, "X", { get: function () { return ''; }, diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 0542815c4e4..efcee63fe6b 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -46,7 +46,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived.prototype.fn = function () { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index 41869cad416..0672f888701 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -56,7 +56,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived.prototype.fn = function () { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 10ae3cb35c8..bfc273eb054 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -45,7 +45,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived.fn = function () { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index 3f2c2a3b811..debe82a7b6e 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -58,7 +58,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived.fn = function () { return ''; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index 7a6a7ecbb63..4bb883ec5ce 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -41,7 +41,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; return _this; @@ -59,7 +59,7 @@ var Base2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.x = 2; _this.y = null; return _this; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index 62beb4bf28f..007f0f59a42 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -49,7 +49,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; return _this; @@ -69,7 +69,7 @@ var Base2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.x = 2; _this.y = null; return _this; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index c96d0c96723..19bc3fc8790 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -73,7 +73,7 @@ var Derived = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; return _this; @@ -102,7 +102,7 @@ var D = (function (_super) { var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.x = 2; _this.y = null; return _this; diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index 3e097a9b139..6aeeca78fce 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -39,7 +39,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Red = (function (_super) { __extends(Red, _super); function Red() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Red.prototype.shade = function () { var _this = this; @@ -58,7 +58,7 @@ var Color = (function () { var Blue = (function (_super) { __extends(Blue, _super); function Blue() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Blue.prototype.shade = function () { var _this = this; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index 1822f3fcc47..912eb565fd9 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -64,7 +64,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(D.prototype, "X", { get: function () { @@ -92,7 +92,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(E.prototype, "X", { get: function () { return ''; } // error diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index c17922e05ee..0460aab8c7e 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -34,7 +34,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived.prototype.foo = function (x) { return null; diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index 6fe690fd692..f47c4c3803a 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -39,7 +39,7 @@ var Derived = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index 1f7ed8bfa94..1fce7faee20 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -43,7 +43,7 @@ var User = (function () { var RegisteredUser = (function (_super) { __extends(RegisteredUser, _super); function RegisteredUser() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } RegisteredUser.prototype.f = function () { (function () { diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index 3ed21cf217a..89895bc4e4b 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -14,7 +14,7 @@ var A = require(""); var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index ed2e1aa7f06..42e57602c88 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -30,7 +30,7 @@ var base = (function () { var derived = (function (_super) { __extends(derived, _super); function derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return derived; }(base)); diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 720894e50c0..bdad114da6d 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -132,7 +132,7 @@ var Derived = (function (_super) { __extends(Derived, _super); //super call with type arguments function Derived() { - var _this; + var _this = this; _super.prototype..call(_this); _this = _super.call(this) || this; return _this; @@ -147,7 +147,7 @@ var OtherBase = (function () { var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; //super call in class member initializer of derived type _this.t = _this = _super.call(this) || this; return _this; diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index e12a758b053..9ff7b0df9b3 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -247,7 +247,7 @@ var SomeDerived2 = (function (_super) { var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } SomeDerived3.fn = function () { _super.publicStaticMember = 3; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index 6dd9f62edcb..a5e9a55b128 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -135,7 +135,7 @@ var testClass6 = (function () { var testClass7 = (function (_super) { __extends(testClass7, _super); function testClass7() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return testClass7; }(Foo)); // error: could not find symbol V diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index 2eec250211e..e3dbcd226e8 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -28,7 +28,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; + var _this = this; if (true) { _this = _super.call(this, 'a1', 'b1') || this; } diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 533b332422d..ca9706334eb 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -314,7 +314,7 @@ var BaseClassWithConstructor = (function () { var ChildClassWithoutConstructor = (function (_super) { __extends(ChildClassWithoutConstructor, _super); function ChildClassWithoutConstructor() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ChildClassWithoutConstructor; }(BaseClassWithConstructor)); diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index f786fce4461..2dfcb32e5eb 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -17,7 +17,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar; }(M.Foo)); diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 7c1831ecac4..ae7efff7028 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -34,7 +34,7 @@ define(["require", "exports", "exportAssignmentOfGenericType1_0"], function (req var M = (function (_super) { __extends(M, _super); function M() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return M; }(q)); diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index b6d6d982a32..a779deea82f 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -32,7 +32,7 @@ var Bbb = (function () { var Aaa = (function (_super) { __extends(Aaa, _super); function Aaa() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Aaa; }(Bbb)); diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index 91dfba7a9bf..11ce0fe8634 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -37,7 +37,7 @@ var M; var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B)); @@ -47,7 +47,7 @@ var M; var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(M.B)); @@ -58,7 +58,7 @@ var N; var C3 = (function (_super) { __extends(C3, _super); function C3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C3; }(M.B)); diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index 3ab217eb019..df22b9a6294 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -21,7 +21,7 @@ var N; var C4 = (function (_super) { __extends(C4, _super); function C4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C4; }(M.B)); @@ -32,7 +32,7 @@ var M; var C5 = (function (_super) { __extends(C5, _super); function C5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C5; }(B)); diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 74bbf3a27ac..29b3dcb199a 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -28,7 +28,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.baz = function () { }; return D; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index fa7963487d5..7537ecd3f99 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -33,7 +33,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.baz = function () { }; return D; diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js index 596ab319b2c..c5f4281c360 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -12,7 +12,7 @@ var __extends = (this && this.__extends) || function (d, b) { var derived = (function (_super) { __extends(derived, _super); function derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return derived; }(base)); diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index 895cdedfaff..9865690859a 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -31,7 +31,7 @@ var x = foo1; var y = (function (_super) { __extends(y, _super); function y() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return y; }(x)); diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index 4bf92dd0315..f0f8edb87ff 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -20,7 +20,7 @@ var CStatic; var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E; }(CStatic)); diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index b23b601bc29..3963ddcae65 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -19,7 +19,7 @@ var x = A; var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(x)); // error, could not find symbol xs diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index 78dfaa91827..6cdebcc3c4d 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -18,7 +18,7 @@ var x = new Foo(); // legal, considered a constructor function var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(Foo)); // error, could not find symbol Foo diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js index 8893e9735ff..ee4b45357ea 100644 --- a/tests/baselines/reference/extendPrivateConstructorClass.js +++ b/tests/baselines/reference/extendPrivateConstructorClass.js @@ -18,7 +18,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(abc.XYZ)); diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index da081154d8a..eeebba01097 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -51,7 +51,7 @@ var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); @@ -67,7 +67,7 @@ var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index 267cd86eed0..ab99c984042 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -20,7 +20,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.baz = function () { }; return D; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index 76fbc3365af..40f3a068f37 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -20,7 +20,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.baz = function () { }; return D; diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js index ac44416e133..55ea547e466 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -35,7 +35,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.bar = function () { return this; @@ -45,7 +45,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.baz = function () { return this; diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index 15d771bf587..94b860dcd91 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -126,7 +126,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.boz = function () { for (var x in this.biz()) { } diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index d1181760a36..0a7272a702c 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -107,7 +107,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.boz = function () { for (var x in this.biz()) { } diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 3666ad930a6..75185335788 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -68,7 +68,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(C)); diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 433418af41d..0c57117971c 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -134,14 +134,14 @@ var AnotherClass = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index 86636b84a87..7fdb541adb8 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -236,7 +236,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -287,7 +287,7 @@ function f6() { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index 55917962184..9e3962af717 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -32,7 +32,7 @@ var EventBase = (function () { var StringEvent = (function (_super) { __extends(StringEvent, _super); function StringEvent() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } StringEvent.prototype.add = function (listener) { _super.prototype.add.call(this, listener); diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js index a676316459f..bcb6162e0e2 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -32,7 +32,7 @@ var EventBase = (function () { var StringEvent = (function (_super) { __extends(StringEvent, _super); function StringEvent() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } StringEvent.prototype.add = function (listener) { _super.prototype.add.call(this, listener); diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index 2a6911d9cf5..1b329f1093e 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -369,14 +369,14 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index a075eff9550..63e2519e6c7 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -26,7 +26,7 @@ var BaseClass = (function () { var SubClass = (function (_super) { __extends(SubClass, _super); function SubClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } SubClass.prototype.Error = function () { var x = this._getValue1(); diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js index 2b562742bf7..e2fc062b4d8 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -35,7 +35,7 @@ var BaseCollection2 = (function () { var DataView2 = (function (_super) { __extends(DataView2, _super); function DataView2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } DataView2.prototype.fillItems = function (item) { this._itemsByKey['dummy'] = item; diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index afef6224ba1..7b9433508a0 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -122,14 +122,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index 7b621b3ffd9..ca3806df629 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -46,14 +46,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index 892cda0ee2d..59f2e53cdf8 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -54,7 +54,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index addfbc756a8..3730c756aad 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -52,14 +52,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index c2ad2ba29a3..f3026144ab2 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -46,7 +46,7 @@ var M; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(C1)); diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index dc574dedb00..1a978687427 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -47,7 +47,7 @@ function B1() { return (function (_super) { __extends(class_1, _super); function class_1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class_1; }(A)); @@ -57,7 +57,7 @@ var B2 = (function () { this.anon = (function (_super) { __extends(class_2, _super); function class_2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class_2; }(A)); @@ -68,7 +68,7 @@ function B3() { return (function (_super) { __extends(Inner, _super); function Inner() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Inner; }(A)); @@ -77,14 +77,14 @@ function B3() { var K = (function (_super) { __extends(K, _super); function K() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return K; }(B1())); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }((new B2().anon))); @@ -92,7 +92,7 @@ var b3Number = B3(); var S = (function (_super) { __extends(S, _super); function S() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return S; }(b3Number)); diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index 1f3a6e17f14..c8012596bac 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -14,14 +14,14 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return A; }(B)); var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(C)); diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 4609e3bc9db..33440963f62 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -26,7 +26,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Bar.getFoo = function () { }; diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index 5371e2479aa..697edbd3fab 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -31,7 +31,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index 1b455073196..a5d7a3a7c05 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -26,7 +26,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index 0abd655e1da..d6473df6529 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -26,7 +26,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index 059a3213b7a..7f213f3b15a 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -24,7 +24,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index eac025cce9b..ad80ef6664b 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -29,7 +29,7 @@ var BaseEvent = (function () { var MyEvent = (function (_super) { __extends(MyEvent, _super); function MyEvent() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyEvent; }(BaseEvent)); @@ -41,7 +41,7 @@ var BaseEventWrapper = (function () { var MyEventWrapper = (function (_super) { __extends(MyEventWrapper, _super); function MyEventWrapper() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyEventWrapper; }(BaseEventWrapper)); diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index 9e3ede0019d..f40a225c2ab 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -28,7 +28,7 @@ var BaseEvent = (function () { var MyEvent = (function (_super) { __extends(MyEvent, _super); function MyEvent() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyEvent; }(BaseEvent)); @@ -40,7 +40,7 @@ var BaseEventWrapper = (function () { var MyEventWrapper = (function (_super) { __extends(MyEventWrapper, _super); function MyEventWrapper() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyEventWrapper; }(BaseEventWrapper)); diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index 401a2e94b68..003c4889929 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -57,7 +57,7 @@ var TypeScript2; var PullTypeSymbol = (function (_super) { __extends(PullTypeSymbol, _super); function PullTypeSymbol() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PullTypeSymbol; }(PullSymbol)); diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index c7643d4a9a2..60ee6dee616 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -58,7 +58,7 @@ var TypeScript; var PullTypeSymbol = (function (_super) { __extends(PullTypeSymbol, _super); function PullTypeSymbol() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this._elementType = null; return _this; } diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 687d593f01e..b728c666014 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -28,7 +28,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.bar = function () { return null; diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index 50dbe5debbd..f694b9b4c54 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -40,7 +40,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.bar = function () { return 1; }; return B; @@ -48,7 +48,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.baz = function () { return 1; }; return C; diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index 7bbd7351f1d..329a78b3cc6 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -44,7 +44,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.g = function (x) { var a = x; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index cf19feede34..2ebad804fa1 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -60,7 +60,7 @@ var g = function f(x) { var y; return y; }; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); @@ -76,7 +76,7 @@ var M; var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(M.E)); diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index 973ee231762..bb75347665a 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -55,14 +55,14 @@ var g = function f(x) { var y; return y; }; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(I)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(M.C)); diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index d6fb98b67ca..aad5b72ddda 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -31,7 +31,7 @@ define(["require", "exports"], function (require, exports) { var List = (function (_super) { __extends(List, _super); function List() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } List.prototype.Bar = function () { }; return List; @@ -46,7 +46,7 @@ define(["require", "exports"], function (require, exports) { var ListItem = (function (_super) { __extends(ListItem, _super); function ListItem() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ListItem; }(CollectionItem)); diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index 9b15cf743f0..dbc90aba9ed 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -160,14 +160,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 483370bee5c..2377fe48af2 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -177,7 +177,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(C)); diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 868d53daad5..95afb9e529b 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -34,7 +34,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; + var _this = this; var r2 = function () { return _this = _super.call(this) || this; }; var r3 = function () { _this = _super.call(this) || this; }; var r4 = function () { _this = _super.call(this) || this; }; diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index df725cde43a..09ebc1ffc52 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -16,7 +16,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index a5a5e02c156..385ce78bc53 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -99,21 +99,21 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar; }(Foo)); var Bar2 = (function (_super) { __extends(Bar2, _super); function Bar2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar2; }(Foo)); var Bar3 = (function (_super) { __extends(Bar3, _super); function Bar3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar3; }(Foo)); @@ -128,28 +128,28 @@ var M; var Baz = (function (_super) { __extends(Baz, _super); function Baz() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Baz; }(Foo)); var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar; }(Foo)); var Bar2 = (function (_super) { __extends(Bar2, _super); function Bar2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar2; }(Foo)); var Bar3 = (function (_super) { __extends(Bar3, _super); function Bar3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar3; }(Foo)); @@ -165,14 +165,14 @@ var M2; var Baz = (function (_super) { __extends(Baz, _super); function Baz() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Baz; }(Foo)); var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar; }(Foo)); @@ -183,14 +183,14 @@ var M2; var Bar2 = (function (_super) { __extends(Bar2, _super); function Bar2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar2; }(Foo)); var Bar3 = (function (_super) { __extends(Bar3, _super); function Bar3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar3; }(Foo)); diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index d0f74847141..976f1792998 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -75,28 +75,28 @@ var Bar4 = (function () { var Bar5 = (function (_super) { __extends(Bar5, _super); function Bar5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar5; }(Foo)); var Bar6 = (function (_super) { __extends(Bar6, _super); function Bar6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar6; }(Foo)); var Bar7 = (function (_super) { __extends(Bar7, _super); function Bar7() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar7; }(Foo)); var Bar8 = (function (_super) { __extends(Bar8, _super); function Bar8() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar8; }(Foo)); diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index b4f45cac806..284b1536db8 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -30,7 +30,7 @@ var Greeter = require("./importAsBaseClass_0"); var Hello = (function (_super) { __extends(Hello, _super); function Hello() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Hello; }(Greeter)); diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index 762f0778945..4de852423ba 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -45,7 +45,7 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -92,7 +92,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersAmd.js b/tests/baselines/reference/importHelpersAmd.js index fea93840fa9..6054e147386 100644 --- a/tests/baselines/reference/importHelpersAmd.js +++ b/tests/baselines/reference/importHelpersAmd.js @@ -32,7 +32,7 @@ define(["require", "exports", "tslib", "./a"], function (require, exports, tslib var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/importHelpersInIsolatedModules.js b/tests/baselines/reference/importHelpersInIsolatedModules.js index 5c395ea0b9f..429a71c1ab8 100644 --- a/tests/baselines/reference/importHelpersInIsolatedModules.js +++ b/tests/baselines/reference/importHelpersInIsolatedModules.js @@ -45,7 +45,7 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -77,7 +77,7 @@ var A = (function () { var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index 560e16d1cca..6a60008c6f1 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -44,7 +44,7 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -94,7 +94,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 65a004eb66c..99bb3e8656e 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -37,7 +37,7 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -84,7 +84,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersOutFile.js b/tests/baselines/reference/importHelpersOutFile.js index a45f6285782..572115ba4bb 100644 --- a/tests/baselines/reference/importHelpersOutFile.js +++ b/tests/baselines/reference/importHelpersOutFile.js @@ -35,7 +35,7 @@ define("b", ["require", "exports", "tslib", "a"], function (require, exports, ts var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(a_1.A)); @@ -46,7 +46,7 @@ define("c", ["require", "exports", "tslib", "a"], function (require, exports, ts var C = (function (_super) { tslib_2.__extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(a_2.A)); diff --git a/tests/baselines/reference/importHelpersSystem.js b/tests/baselines/reference/importHelpersSystem.js index 20f2d299c52..b7c10ee3c34 100644 --- a/tests/baselines/reference/importHelpersSystem.js +++ b/tests/baselines/reference/importHelpersSystem.js @@ -51,7 +51,7 @@ System.register(["tslib", "./a"], function (exports_1, context_1) { B = (function (_super) { tslib_1.__extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index 34cc0604e7a..a0587662a0d 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -31,7 +31,7 @@ define(["require", "exports", "Foo"], function (require, exports, Error) { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar; }(Error)); diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index a40c3a51a78..09ac46fdc0b 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -31,7 +31,7 @@ var foo = require("./importUsedInExtendsList1_require"); var Sub = (function (_super) { __extends(Sub, _super); function Sub() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Sub; }(foo.Super)); diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index d7357f021d0..d91206c2a99 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -42,7 +42,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -55,7 +55,7 @@ var F = (function () { var G = (function (_super) { __extends(G, _super); function G() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return G; }(F)); @@ -68,7 +68,7 @@ var H = (function () { var I = (function (_super) { __extends(I, _super); function I() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return I; }(H)); @@ -81,7 +81,7 @@ var J = (function () { var K = (function (_super) { __extends(K, _super); function K() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return K; }(J)); diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index 2f4f37b9b53..9f0fbeea3fe 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -11,14 +11,14 @@ var __extends = (this && this.__extends) || function (d, b) { var a = (function (_super) { __extends(a, _super); function a() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return a; }(b)); var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index 9171bb0eeb6..f3b9fe2fb8a 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -11,14 +11,14 @@ var __extends = (this && this.__extends) || function (d, b) { var a = (function (_super) { __extends(a, _super); function a() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return a; }(b)); var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index ad1a063bfb0..8b9b1e52a9a 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -43,7 +43,7 @@ var Base = (function () { var A = (function (_super) { __extends(A, _super); function A() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return A; }(Base)); diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index 40e6abd3e53..6495fd73d40 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(T)); diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index a0874eb1c72..7ff32437d72 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -24,14 +24,14 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(B)); diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index cbfef2d3382..d5cb8a76360 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -53,14 +53,14 @@ var B2 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1; }(B1)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(B2)); @@ -72,7 +72,7 @@ var N = (function () { var ND = (function (_super) { __extends(ND, _super); function ND() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ND; }(N)); @@ -86,7 +86,7 @@ var Good = (function () { var Baad = (function (_super) { __extends(Baad, _super); function Baad() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Baad.prototype.f = function () { return 0; }; Baad.prototype.g = function (n) { return 0; }; diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index 86de0b76350..8603ce3d22b 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -75,7 +75,7 @@ var Control = (function () { var Button = (function (_super) { __extends(Button, _super); function Button() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Button.prototype.select = function () { }; return Button; @@ -83,7 +83,7 @@ var Button = (function (_super) { var TextBox = (function (_super) { __extends(TextBox, _super); function TextBox() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } TextBox.prototype.select = function () { }; return TextBox; @@ -91,14 +91,14 @@ var TextBox = (function (_super) { var ImageBase = (function (_super) { __extends(ImageBase, _super); function ImageBase() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ImageBase; }(Control)); var Image1 = (function (_super) { __extends(Image1, _super); function Image1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Image1; }(Control)); diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 57a9c897583..8ba41b2d554 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -25,14 +25,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.myMethod = function () { }; return C; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index 83c5aa3e4cd..eb70b58a27a 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -25,14 +25,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.myMethod = function () { }; return C; diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index b11b6e318a7..8481a883b4b 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -25,14 +25,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.myMethod = function () { }; return C; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index 09ea08899d9..6854ec0257c 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -40,7 +40,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(b.prototype, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index 59d2abdaab2..92c4902867f 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -31,7 +31,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(b.prototype, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index 98a95747a8e..b1c716d6347 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -26,7 +26,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(b.prototype, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index 0d54e5d42fa..f265f2b2223 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -37,7 +37,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.prototype.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index 9af25c6fdb8..86af837a369 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -28,7 +28,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.prototype.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index 5c77ce08101..62206375b0d 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -23,7 +23,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.prototype.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index 82c7a94d17c..7b3b30751cb 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -37,7 +37,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index e6929218e63..52f7433ebee 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -26,7 +26,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index 85764cddc52..8792716aabd 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -21,7 +21,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index 28fe8144509..aa42fd5f844 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -21,7 +21,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 0cc71e168f4..0c91947b3ae 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -40,7 +40,7 @@ var N; var D1 = (function (_super) { __extends(D1, _super); function D1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1; }(M.C1)); @@ -48,7 +48,7 @@ var N; var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(M.C2)); diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index bb91ee5f9ea..9ccf523cf17 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -40,7 +40,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(b, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index 363852a84bf..e454e70741c 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -31,7 +31,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(b, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index ba8df7a5f0b..867ac6defe7 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -26,7 +26,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(b, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index e464029fba5..d7c925a8f94 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -37,7 +37,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index cc825cfa9b5..882df0cd929 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -32,7 +32,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index 466c65fa7d5..1f2e7028cfa 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -28,7 +28,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index dfc0ce2c13f..fb993e9240f 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -23,7 +23,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index da7850f2071..103bb0048bb 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -23,7 +23,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index d5916a9d452..3f6b7a7f3f6 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -23,7 +23,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } b.x = function () { return new b().x; diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index b4cae99b64b..aa68a8a06d7 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -21,7 +21,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index 38c637dd8d1..a4f0b4a7313 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -21,7 +21,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 49dc86fc500..ec698d903d4 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -36,7 +36,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index bcd63537540..9c443a94f5d 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -26,7 +26,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index c1bdd9b66a2..17e97d0dcb3 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -21,7 +21,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index 6a30836d728..5981c44c2e3 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -32,7 +32,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index 9a1b13a8434..249b6447858 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -53,14 +53,14 @@ var BaseBase2 = (function () { var Base = (function (_super) { __extends(Base, _super); function Base() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Base; }(BaseBase)); var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index cd49009fed9..195e4676165 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -38,7 +38,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); @@ -52,7 +52,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } E.bar = function () { return this.foo(); diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index b8f39c5b0e2..31f72babc30 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -115,14 +115,14 @@ var Animal = (function () { var Mammal = (function (_super) { __extends(Mammal, _super); function Mammal() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Mammal; }(Animal)); var Giraffe = (function (_super) { __extends(Giraffe, _super); function Giraffe() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Giraffe; }(Mammal)); diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index 8dc5227685f..c35d089ca90 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -69,7 +69,7 @@ var NonGeneric; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); @@ -101,7 +101,7 @@ var Generic; var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index 914f3796001..89dce0056ff 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -21,7 +21,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(C1)); diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index 54a574238e5..5e4cd56ea92 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -128,7 +128,7 @@ var A = (function () { var A1 = (function (_super) { __extends(A1, _super); function A1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return A1; }(A)); @@ -140,7 +140,7 @@ var A2 = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index bc496a63632..f74b8375b19 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -47,7 +47,7 @@ var c = (function () { var d = (function (_super) { __extends(d, _super); function d() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } d.prototype.foo = function () { return null; diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js index 6542376a19b..f7aebec3856 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -57,7 +57,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Bar.prototype.method = function (a) { return this.optionalProperty; diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js index 70a62da4131..648853ce488 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -53,7 +53,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Bar.prototype.classBarMethod = function () { return this; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 8324a001f91..1f65014d27d 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -32,7 +32,7 @@ var Control = (function () { var Button = (function (_super) { __extends(Button, _super); function Button() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Button.prototype.select = function () { }; return Button; @@ -40,7 +40,7 @@ var Button = (function (_super) { var TextBox = (function (_super) { __extends(TextBox, _super); function TextBox() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } TextBox.prototype.select = function () { }; return TextBox; @@ -48,7 +48,7 @@ var TextBox = (function (_super) { var Image = (function (_super) { __extends(Image, _super); function Image() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Image; }(Control)); diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index 1179ff101df..5bbe6a09d48 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -43,7 +43,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.foo = function (x) { return x; }; D.prototype.other = function (x) { return x; }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index 49b5efbd012..627f1e2ea9a 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -39,7 +39,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.x = 2; _this.y = 3; return _this; @@ -52,7 +52,7 @@ var D = (function (_super) { var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.x = ""; return _this; } diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index afb5a795264..43ce713f07d 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -64,21 +64,21 @@ var C3 = (function () { var C4 = (function (_super) { __extends(C4, _super); function C4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C4; }(C1)); var C5 = (function (_super) { __extends(C5, _super); function C5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C5; }(C2)); var C6 = (function (_super) { __extends(C6, _super); function C6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C6; }(C3)); @@ -90,7 +90,7 @@ var C7 = (function () { var C8 = (function (_super) { __extends(C8, _super); function C8() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C8; }(C7)); diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index 6e9b09c906f..20f029afd4a 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -95,7 +95,7 @@ var Y; var BB = (function (_super) { __extends(BB, _super); function BB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return BB; }(A)); @@ -110,7 +110,7 @@ var Y2; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(AA)); @@ -144,7 +144,7 @@ var YY; var BB = (function (_super) { __extends(BB, _super); function BB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return BB; }(A)); @@ -159,7 +159,7 @@ var YY2; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(AA)); @@ -193,7 +193,7 @@ var YYY; var BB = (function (_super) { __extends(BB, _super); function BB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return BB; }(A)); @@ -208,7 +208,7 @@ var YYY2; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(AA)); diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 340429cc398..105882b8e23 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -67,7 +67,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(C)); diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index a6b07b7d7bd..7a528745b1d 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -41,7 +41,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index 6f1d38dcbb5..d00c7f1f0dc 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -26,7 +26,7 @@ var ns = require("module"); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(module_2.c2.C)); diff --git a/tests/baselines/reference/jsxInExtendsClause.js b/tests/baselines/reference/jsxInExtendsClause.js index 8204067cb04..2ae0fb98d45 100644 --- a/tests/baselines/reference/jsxInExtendsClause.js +++ b/tests/baselines/reference/jsxInExtendsClause.js @@ -20,13 +20,13 @@ var __extends = (this && this.__extends) || function (d, b) { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Foo; }(createComponentClass(function () { return (function (_super) { __extends(class_1, _super); function class_1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } class_1.prototype.render = function () { return React.createElement("span", null, "Hello, world!"); diff --git a/tests/baselines/reference/jsxViaImport.2.js b/tests/baselines/reference/jsxViaImport.2.js index 19432238e0b..97852a3ce38 100644 --- a/tests/baselines/reference/jsxViaImport.2.js +++ b/tests/baselines/reference/jsxViaImport.2.js @@ -35,7 +35,7 @@ var BaseComponent_1 = require("BaseComponent"); var TestComponent = (function (_super) { __extends(TestComponent, _super); function TestComponent() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } TestComponent.prototype.render = function () { return ; diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 604787af744..80ec0a3ae01 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -35,7 +35,7 @@ var BaseComponent = require("BaseComponent"); var TestComponent = (function (_super) { __extends(TestComponent, _super); function TestComponent() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } TestComponent.prototype.render = function () { return ; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index 4b93897fdc4..3e430016032 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -445,7 +445,7 @@ var Shape = (function () { var TaggedShape = (function (_super) { __extends(TaggedShape, _super); function TaggedShape() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return TaggedShape; }(Shape)); diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index 47db7f3ce64..a01ae6168e4 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -56,7 +56,7 @@ var Event = (function () { var ItemSetEvent = (function (_super) { __extends(ItemSetEvent, _super); function ItemSetEvent() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } ItemSetEvent.prototype.add = function (listener) { _super.prototype.add.call(this, listener); diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index 100452b7a96..b58e3f63a76 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -300,7 +300,7 @@ function f6() { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -308,7 +308,7 @@ function f6() { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index e5a4d11f00c..35a2551ad66 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -42,7 +42,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(C1)); diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index b24e86eca58..92f679fcb7f 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -27,7 +27,7 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.foo = function () { }; return B; diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index d610e4ab46f..1c1be96e23e 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -47,7 +47,7 @@ define(["require", "exports", "./a"], function (require, exports, a_1) { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.setProtected = function () { }; diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index 0f598f2cf78..3e4448c998b 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -61,7 +61,7 @@ var BaseClass = (function () { var Child = (function (_super) { __extends(Child, _super); function Child() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Child.prototype.method = function () { }; return Child; @@ -75,7 +75,7 @@ var ChildNoBaseClass = (function () { var Grandchild = (function (_super) { __extends(Grandchild, _super); function Grandchild() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Grandchild; }(ChildNoBaseClass)); diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index 6dccf1dfdd9..5738ded2461 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -50,14 +50,14 @@ var C2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E; }(C2)); diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index a3ca796575c..b6075756d47 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -57,7 +57,7 @@ var C2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index fc0533a2470..78b4dbdf6f8 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -13,7 +13,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(M)); diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index 51d9eb89b1d..6fa1bbe91c4 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -31,7 +31,7 @@ define(["require", "exports"], function (require, exports) { var Test1 = (function (_super) { __extends(Test1, _super); function Test1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Test1; }(C1)); diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 4243c9849cf..45331425188 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -79,14 +79,14 @@ var A; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(AA)); var BB = (function (_super) { __extends(BB, _super); function BB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return BB; }(A)); @@ -130,7 +130,7 @@ var Y; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(AA)); @@ -138,7 +138,7 @@ var Y; var BB = (function (_super) { __extends(BB, _super); function BB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return BB; }(A)); diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index 9c0e865cdb7..b35c7d21bab 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -57,28 +57,28 @@ var B2 = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B1)); var D1 = (function (_super) { __extends(D1, _super); function D1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1; }(B1)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(B2)); var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E; }(D1)); @@ -90,7 +90,7 @@ var N = (function () { var ND = (function (_super) { __extends(ND, _super); function ND() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ND; }(N)); @@ -104,7 +104,7 @@ var Good = (function () { var Baad = (function (_super) { __extends(Baad, _super); function Baad() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Baad.prototype.f = function () { return 0; }; Baad.prototype.g = function (n) { return 0; }; diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 8b59564d465..0f35f3fb55b 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -25,7 +25,7 @@ var foo = (function () { var foo2 = (function (_super) { __extends(foo2, _super); function foo2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return foo2; }(foo)); diff --git a/tests/baselines/reference/noEmitHelpers.js b/tests/baselines/reference/noEmitHelpers.js index fdb7cbab7d4..1a9ad2579b9 100644 --- a/tests/baselines/reference/noEmitHelpers.js +++ b/tests/baselines/reference/noEmitHelpers.js @@ -13,7 +13,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index cc4c9422373..bde4958f647 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -26,7 +26,7 @@ var Parent = (function () { var Child = (function (_super) { __extends(Child, _super); function Child() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(Child.prototype, "message", { set: function (str) { diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index 1323955c05e..efe81c88d9f 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -25,7 +25,7 @@ var Parent = (function () { var Child = (function (_super) { __extends(Child, _super); function Child() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(Child.prototype, "message", { get: function () { diff --git a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js index b0a3365193d..f28e57c0d71 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -19,7 +19,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar; }(Foo)); // Valid diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index 92c8b380e00..a67b03dee8e 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -61,7 +61,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.bar = function () { return ''; }; return B; diff --git a/tests/baselines/reference/numericIndexerConstraint3.js b/tests/baselines/reference/numericIndexerConstraint3.js index 29cb75b4234..9f764b6b378 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -26,7 +26,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 135e169c4a9..5e4dcfd1d88 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -26,7 +26,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index 5b9e797bdec..a336eb6022f 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -26,7 +26,7 @@ var I = (function () { var I2 = (function (_super) { __extends(I2, _super); function I2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return I2; }(I)); diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 17045d65af0..e577cecca17 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -68,7 +68,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index e82cef9bdd6..c502906fa50 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -147,14 +147,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index abcea113670..5e050c57cbb 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -140,7 +140,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -162,14 +162,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index f5aeb177472..52ab0f5f2b7 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -147,14 +147,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index 3946027063f..d0316ad91a9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -145,14 +145,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 9cae6960a2e..566f1fea078 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -53,7 +53,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index 68754a583aa..b1e07379536 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -39,7 +39,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(C1)); @@ -53,7 +53,7 @@ var C3 = (function () { var C4 = (function (_super) { __extends(C4, _super); function C4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C4; }(C3)); diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index b0211bbbba7..ca17ffdb3bd 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -147,14 +147,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index 00d7d1e81d8..a1042a03c6b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -140,7 +140,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -162,14 +162,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index e460ab3fb15..75a13f41458 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -25,7 +25,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 28ed0bcd76e..853a77f00c1 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -109,7 +109,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.a = 1; return _this; } diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index 1312a89502a..c17c451ec57 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -22,7 +22,7 @@ var Z = (function () { var Y = (function (_super) { __extends(Y, _super); function Y() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Y.prototype.func = function (value) { }; return Y; diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index 5054c2a3c33..ab778aae771 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -28,7 +28,7 @@ define("b", ["require", "exports", "ref/a"], function (require, exports, a_1) { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index 34ab74816ad..79e8622529f 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -92,11 +92,11 @@ sourceFile:tests/cases/compiler/b.ts --- >>> function B() { 1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(19, 9) Source(2, 1) + SourceIndex(1) --- ->>> return _super.apply(this, arguments) || this; +>>> return _super !== null && _super.apply(this, arguments) || this; >>> } 1->^^^^^^^^ 2 > ^ diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index a615090f33a..5651fe47ddf 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -44,7 +44,7 @@ System.register("b", ["ref/a"], function (exports_2, context_2) { B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index 732214237fa..f0f66423932 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -109,11 +109,11 @@ sourceFile:tests/cases/compiler/b.ts --- >>> function B() { 1 >^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(35, 17) Source(2, 1) + SourceIndex(1) --- ->>> return _super.apply(this, arguments) || this; +>>> return _super !== null && _super.apply(this, arguments) || this; >>> } 1->^^^^^^^^^^^^^^^^ 2 > ^ diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index b9ff7c15b61..25ef1faf730 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -57,7 +57,7 @@ define("b", ["require", "exports", "ref/a"], function (require, exports, a_1) { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index ce41bae6de3..dac4465dde9 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -166,11 +166,11 @@ sourceFile:tests/cases/compiler/b.ts --- >>> function B() { 1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(26, 9) Source(2, 1) + SourceIndex(2) --- ->>> return _super.apply(this, arguments) || this; +>>> return _super !== null && _super.apply(this, arguments) || this; >>> } 1->^^^^^^^^ 2 > ^ diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index 41aafdfb29c..e214027ccd1 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -56,7 +56,7 @@ var O; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -64,7 +64,7 @@ var O; var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index f9d1c81b06b..d2ab4491f51 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -37,7 +37,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -45,7 +45,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -53,7 +53,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived3.prototype.biz = function () { }; return Derived3; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index a680a62ddfe..5359cf3ef62 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -25,14 +25,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.foo = function () { }; return C; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index 025e449fd6f..a1a2bdf7df8 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -27,14 +27,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.foo = function () { }; return C; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index 0f436a5f0b2..bed2f683c5e 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -27,7 +27,7 @@ var Z = (function () { var A = (function (_super) { __extends(A, _super); function A() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.x = 1; return _this; } @@ -36,14 +36,14 @@ var A = (function (_super) { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.foo = function () { }; return C; diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index e3f58c0f7d0..dc8f9bd85bf 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -26,7 +26,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -34,7 +34,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -42,7 +42,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived3.prototype.biz = function () { }; return Derived3; diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index e5cc35c39c4..33c995197d1 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -108,21 +108,21 @@ var SomeBase = (function () { var SomeDerived1 = (function (_super) { __extends(SomeDerived1, _super); function SomeDerived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return SomeDerived1; }(SomeBase)); var SomeDerived2 = (function (_super) { __extends(SomeDerived2, _super); function SomeDerived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return SomeDerived2; }(SomeBase)); var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return SomeDerived3; }(SomeBase)); diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 7c8b2e2ccb6..c1d4603f1b9 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -115,21 +115,21 @@ var SomeBase = (function () { var SomeDerived1 = (function (_super) { __extends(SomeDerived1, _super); function SomeDerived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return SomeDerived1; }(SomeBase)); var SomeDerived2 = (function (_super) { __extends(SomeDerived2, _super); function SomeDerived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return SomeDerived2; }(SomeBase)); var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return SomeDerived3; }(SomeBase)); diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 44bbfbcec2b..206f7c40b3a 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -116,21 +116,21 @@ var SomeBase = (function () { var SomeDerived1 = (function (_super) { __extends(SomeDerived1, _super); function SomeDerived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return SomeDerived1; }(SomeBase)); var SomeDerived2 = (function (_super) { __extends(SomeDerived2, _super); function SomeDerived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return SomeDerived2; }(SomeBase)); var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return SomeDerived3; }(SomeBase)); diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index 96f4f7baf24..ca0a2b44d97 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -40,7 +40,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -48,7 +48,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -56,7 +56,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived3.prototype.biz = function () { }; return Derived3; diff --git a/tests/baselines/reference/overloadingOnConstants2.js b/tests/baselines/reference/overloadingOnConstants2.js index 0c34d0f4b76..1f771fb5ee8 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -42,7 +42,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index ca5616450ba..b185bfe1c48 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -21,7 +21,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index a9ca0a6db73..50719268aae 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index d3648dc5b64..91a598a2374 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -21,7 +21,7 @@ var Type = (function () { var Any = (function (_super) { __extends(Any, _super); function Any() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Any; }(Type)); diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index 6b86353b959..5cccc236601 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -363,7 +363,7 @@ c2_i.nc_f1(); var c4 = (function (_super) { __extends(c4, _super); function c4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return c4; }(c2)); diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index a61b492b7a9..e88065ae6c2 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index f58f0ab00cb..e13e2e0aba1 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index 912aa8c6581..0eb120785d7 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index 054aaf0eb7a..69e5b4e7d0d 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index 1423edfe037..9b5d7906a90 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js index aa0679bb8f5..f128f279fda 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js index 1308c7c194b..5c0858c5c79 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js index b1471628fbd..e4fbdb65c3e 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index 641d296dc43..290176d0968 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -26,7 +26,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index b0f14a090ae..e0b858510b9 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -26,7 +26,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js index 9702595fffb..6baddeade3d 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js @@ -29,7 +29,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js index d20b35625e9..b0a85ce0613 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js @@ -48,7 +48,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 7b94b555eb1..0e52fcfca69 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -63,7 +63,7 @@ var baz = (function () { var foo = (function (_super) { __extends(foo, _super); function foo() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } foo.prototype.bar = function () { return undefined; }; ; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index 7e56edf2cf1..fe700c2594d 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -152,21 +152,21 @@ var m1; var m1_C1_private = (function (_super) { __extends(m1_C1_private, _super); function m1_C1_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C1_private; }(m1_c_public)); var m1_C2_private = (function (_super) { __extends(m1_C2_private, _super); function m1_C2_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C2_private; }(m1_c_private)); var m1_C3_public = (function (_super) { __extends(m1_C3_public, _super); function m1_C3_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C3_public; }(m1_c_public)); @@ -174,7 +174,7 @@ var m1; var m1_C4_public = (function (_super) { __extends(m1_C4_public, _super); function m1_C4_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C4_public; }(m1_c_private)); @@ -204,21 +204,21 @@ var m1; var m1_C9_private = (function (_super) { __extends(m1_C9_private, _super); function m1_C9_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C9_private; }(m1_c_public)); var m1_C10_private = (function (_super) { __extends(m1_C10_private, _super); function m1_C10_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C10_private; }(m1_c_private)); var m1_C11_public = (function (_super) { __extends(m1_C11_public, _super); function m1_C11_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C11_public; }(m1_c_public)); @@ -226,7 +226,7 @@ var m1; var m1_C12_public = (function (_super) { __extends(m1_C12_public, _super); function m1_C12_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C12_public; }(m1_c_private)); @@ -250,21 +250,21 @@ var m2; var m2_C1_private = (function (_super) { __extends(m2_C1_private, _super); function m2_C1_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m2_C1_private; }(m2_c_public)); var m2_C2_private = (function (_super) { __extends(m2_C2_private, _super); function m2_C2_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m2_C2_private; }(m2_c_private)); var m2_C3_public = (function (_super) { __extends(m2_C3_public, _super); function m2_C3_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m2_C3_public; }(m2_c_public)); @@ -272,7 +272,7 @@ var m2; var m2_C4_public = (function (_super) { __extends(m2_C4_public, _super); function m2_C4_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m2_C4_public; }(m2_c_private)); @@ -302,21 +302,21 @@ var m2; var m2_C9_private = (function (_super) { __extends(m2_C9_private, _super); function m2_C9_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m2_C9_private; }(m2_c_public)); var m2_C10_private = (function (_super) { __extends(m2_C10_private, _super); function m2_C10_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m2_C10_private; }(m2_c_private)); var m2_C11_public = (function (_super) { __extends(m2_C11_public, _super); function m2_C11_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m2_C11_public; }(m2_c_public)); @@ -324,7 +324,7 @@ var m2; var m2_C12_public = (function (_super) { __extends(m2_C12_public, _super); function m2_C12_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m2_C12_public; }(m2_c_private)); @@ -346,21 +346,21 @@ var glo_c_private = (function () { var glo_C1_private = (function (_super) { __extends(glo_C1_private, _super); function glo_C1_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return glo_C1_private; }(glo_c_public)); var glo_C2_private = (function (_super) { __extends(glo_C2_private, _super); function glo_C2_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return glo_C2_private; }(glo_c_private)); var glo_C3_public = (function (_super) { __extends(glo_C3_public, _super); function glo_C3_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return glo_C3_public; }(glo_c_public)); @@ -368,7 +368,7 @@ exports.glo_C3_public = glo_C3_public; var glo_C4_public = (function (_super) { __extends(glo_C4_public, _super); function glo_C4_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return glo_C4_public; }(glo_c_private)); @@ -398,21 +398,21 @@ exports.glo_C8_public = glo_C8_public; var glo_C9_private = (function (_super) { __extends(glo_C9_private, _super); function glo_C9_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return glo_C9_private; }(glo_c_public)); var glo_C10_private = (function (_super) { __extends(glo_C10_private, _super); function glo_C10_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return glo_C10_private; }(glo_c_private)); var glo_C11_public = (function (_super) { __extends(glo_C11_public, _super); function glo_C11_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return glo_C11_public; }(glo_c_public)); @@ -420,7 +420,7 @@ exports.glo_C11_public = glo_C11_public; var glo_C12_public = (function (_super) { __extends(glo_C12_public, _super); function glo_C12_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return glo_C12_public; }(glo_c_private)); diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index e0828809416..1962d4b1d0d 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -122,21 +122,21 @@ var publicModule; var privateClassExtendingPublicClassInModule = (function (_super) { __extends(privateClassExtendingPublicClassInModule, _super); function privateClassExtendingPublicClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return privateClassExtendingPublicClassInModule; }(publicClassInPublicModule)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return privateClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); var publicClassExtendingPublicClassInModule = (function (_super) { __extends(publicClassExtendingPublicClassInModule, _super); function publicClassExtendingPublicClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingPublicClassInModule; }(publicClassInPublicModule)); @@ -144,7 +144,7 @@ var publicModule; var publicClassExtendingPrivateClassInModule = (function (_super) { __extends(publicClassExtendingPrivateClassInModule, _super); function publicClassExtendingPrivateClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); @@ -152,14 +152,14 @@ var publicModule; var privateClassExtendingFromPrivateModuleClass = (function (_super) { __extends(privateClassExtendingFromPrivateModuleClass, _super); function privateClassExtendingFromPrivateModuleClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return privateClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); var publicClassExtendingFromPrivateModuleClass = (function (_super) { __extends(publicClassExtendingFromPrivateModuleClass, _super); function publicClassExtendingFromPrivateModuleClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); @@ -183,21 +183,21 @@ var privateModule; var privateClassExtendingPublicClassInModule = (function (_super) { __extends(privateClassExtendingPublicClassInModule, _super); function privateClassExtendingPublicClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return privateClassExtendingPublicClassInModule; }(publicClassInPrivateModule)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return privateClassExtendingPrivateClassInModule; }(privateClassInPrivateModule)); var publicClassExtendingPublicClassInModule = (function (_super) { __extends(publicClassExtendingPublicClassInModule, _super); function publicClassExtendingPublicClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingPublicClassInModule; }(publicClassInPrivateModule)); @@ -205,7 +205,7 @@ var privateModule; var publicClassExtendingPrivateClassInModule = (function (_super) { __extends(publicClassExtendingPrivateClassInModule, _super); function publicClassExtendingPrivateClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingPrivateClassInModule; }(privateClassInPrivateModule)); @@ -213,14 +213,14 @@ var privateModule; var privateClassExtendingFromPrivateModuleClass = (function (_super) { __extends(privateClassExtendingFromPrivateModuleClass, _super); function privateClassExtendingFromPrivateModuleClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return privateClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); var publicClassExtendingFromPrivateModuleClass = (function (_super) { __extends(publicClassExtendingFromPrivateModuleClass, _super); function publicClassExtendingFromPrivateModuleClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); @@ -242,21 +242,21 @@ var privateClass = (function () { var privateClassExtendingPublicClass = (function (_super) { __extends(privateClassExtendingPublicClass, _super); function privateClassExtendingPublicClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return privateClassExtendingPublicClass; }(publicClass)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return privateClassExtendingPrivateClassInModule; }(privateClass)); var publicClassExtendingPublicClass = (function (_super) { __extends(publicClassExtendingPublicClass, _super); function publicClassExtendingPublicClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingPublicClass; }(publicClass)); @@ -264,7 +264,7 @@ exports.publicClassExtendingPublicClass = publicClassExtendingPublicClass; var publicClassExtendingPrivateClass = (function (_super) { __extends(publicClassExtendingPrivateClass, _super); function publicClassExtendingPrivateClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingPrivateClass; }(privateClass)); @@ -272,14 +272,14 @@ exports.publicClassExtendingPrivateClass = publicClassExtendingPrivateClass; var privateClassExtendingFromPrivateModuleClass = (function (_super) { __extends(privateClassExtendingFromPrivateModuleClass, _super); function privateClassExtendingFromPrivateModuleClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return privateClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); var publicClassExtendingFromPrivateModuleClass = (function (_super) { __extends(publicClassExtendingFromPrivateModuleClass, _super); function publicClassExtendingFromPrivateModuleClass() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); @@ -308,21 +308,21 @@ var publicModuleInGlobal; var privateClassExtendingPublicClassInModule = (function (_super) { __extends(privateClassExtendingPublicClassInModule, _super); function privateClassExtendingPublicClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return privateClassExtendingPublicClassInModule; }(publicClassInPublicModule)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return privateClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); var publicClassExtendingPublicClassInModule = (function (_super) { __extends(publicClassExtendingPublicClassInModule, _super); function publicClassExtendingPublicClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingPublicClassInModule; }(publicClassInPublicModule)); @@ -330,7 +330,7 @@ var publicModuleInGlobal; var publicClassExtendingPrivateClassInModule = (function (_super) { __extends(publicClassExtendingPrivateClassInModule, _super); function publicClassExtendingPrivateClassInModule() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); @@ -344,7 +344,7 @@ var publicClassInGlobal = (function () { var publicClassExtendingPublicClassInGlobal = (function (_super) { __extends(publicClassExtendingPublicClassInGlobal, _super); function publicClassExtendingPublicClassInGlobal() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return publicClassExtendingPublicClassInGlobal; }(publicClassInGlobal)); diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index fa769a606ae..82c7cc6dfaf 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -84,21 +84,21 @@ var m1; var m1_C1_private = (function (_super) { __extends(m1_C1_private, _super); function m1_C1_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C1_private; }(m1_c_public)); var m1_C2_private = (function (_super) { __extends(m1_C2_private, _super); function m1_C2_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C2_private; }(m1_c_private)); var m1_C3_public = (function (_super) { __extends(m1_C3_public, _super); function m1_C3_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C3_public; }(m1_c_public)); @@ -106,7 +106,7 @@ var m1; var m1_C4_public = (function (_super) { __extends(m1_C4_public, _super); function m1_C4_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C4_public; }(m1_c_private)); @@ -136,21 +136,21 @@ var m1; var m1_C9_private = (function (_super) { __extends(m1_C9_private, _super); function m1_C9_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C9_private; }(m1_c_public)); var m1_C10_private = (function (_super) { __extends(m1_C10_private, _super); function m1_C10_private() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C10_private; }(m1_c_private)); var m1_C11_public = (function (_super) { __extends(m1_C11_public, _super); function m1_C11_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C11_public; }(m1_c_public)); @@ -158,7 +158,7 @@ var m1; var m1_C12_public = (function (_super) { __extends(m1_C12_public, _super); function m1_C12_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return m1_C12_public; }(m1_c_private)); @@ -174,7 +174,7 @@ var glo_c_public = (function () { var glo_C3_public = (function (_super) { __extends(glo_C3_public, _super); function glo_C3_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return glo_C3_public; }(glo_c_public)); @@ -186,7 +186,7 @@ var glo_C7_public = (function () { var glo_C11_public = (function (_super) { __extends(glo_C11_public, _super); function glo_C11_public() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return glo_C11_public; }(glo_c_public)); diff --git a/tests/baselines/reference/privateAccessInSubclass1.js b/tests/baselines/reference/privateAccessInSubclass1.js index 21ff4793fb3..5d05e7ce3c5 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -23,7 +23,7 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.myMethod = function () { this.options; diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index 6fa05178f91..26cbc4e9b51 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -27,7 +27,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.x = _super.prototype.foo; // error _this.z = _super.prototype.foo; // error return _this; diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index b732661edfc..a93a90e6096 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -40,7 +40,7 @@ var K = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.prototype.m2 = function () { var a = this.priv; // error diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index c1897e8503a..3d258c05107 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -22,7 +22,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.bing = function () { return Base.foo; }; // error return _this; } diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index a93823654d4..43f9547ed5d 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -29,7 +29,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js index 99a4842f636..a9e7e35691a 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -14,7 +14,7 @@ var m2; var class1 = (function (_super) { __extends(class1, _super); function class1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class1; }(m2.mExported.me.class1)); @@ -27,7 +27,7 @@ var m2; var class2 = (function (_super) { __extends(class2, _super); function class2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class2; }(m2.mExported.me.class1)); @@ -40,7 +40,7 @@ var m2; var class3 = (function (_super) { __extends(class3, _super); function class3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class3; }(mNonExported.mne.class1)); @@ -53,7 +53,7 @@ var m2; var class4 = (function (_super) { __extends(class4, _super); function class4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class4; }(mNonExported.mne.class1)); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js index 99a4842f636..a9e7e35691a 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -14,7 +14,7 @@ var m2; var class1 = (function (_super) { __extends(class1, _super); function class1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class1; }(m2.mExported.me.class1)); @@ -27,7 +27,7 @@ var m2; var class2 = (function (_super) { __extends(class2, _super); function class2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class2; }(m2.mExported.me.class1)); @@ -40,7 +40,7 @@ var m2; var class3 = (function (_super) { __extends(class3, _super); function class3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class3; }(mNonExported.mne.class1)); @@ -53,7 +53,7 @@ var m2; var class4 = (function (_super) { __extends(class4, _super); function class4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class4; }(mNonExported.mne.class1)); diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index 7ee160b82ef..4e2f220a2e7 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -18,7 +18,7 @@ var m; var child = (function (_super) { __extends(child, _super); function child() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return child; }(base)); diff --git a/tests/baselines/reference/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index 7ee160b82ef..4e2f220a2e7 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -18,7 +18,7 @@ var m; var child = (function (_super) { __extends(child, _super); function child() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return child; }(base)); diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js index b793b07534c..5c4a53e1af1 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -7,7 +7,7 @@ var __extends = (this && this.__extends) || function (d, b) { var ClassC = (function (_super) { __extends(ClassC, _super); function ClassC() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ClassC; }(test.ClassA)); diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js index b793b07534c..5c4a53e1af1 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -7,7 +7,7 @@ var __extends = (this && this.__extends) || function (d, b) { var ClassC = (function (_super) { __extends(ClassC, _super); function ClassC() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ClassC; }(test.ClassA)); diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index dff86f3954e..62cd3439e35 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -65,7 +65,7 @@ var P = (function () { var Q = (function (_super) { __extends(Q, _super); function Q() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Q; }(P)); diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 0a4c9082a21..66f41d392da 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -164,7 +164,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index d36d7e27efe..dfcd60fb7ed 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -97,7 +97,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.bar = function () { return ''; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index 4aedfe12b04..9a07927c219 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -72,7 +72,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.bar = function () { return ''; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index 3cb14438141..adf39f857ef 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -59,7 +59,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.bar = function () { return ''; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index 429dfdf6b14..b0f4a723b94 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -52,7 +52,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(C.prototype, "y", { get: function () { return this.x; }, @@ -93,7 +93,7 @@ var C = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return E; }(C)); diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index 0571b85ea9e..49ea1f06cbd 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -147,7 +147,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived1.prototype.method1 = function () { var B = (function () { @@ -173,7 +173,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived2.prototype.method2 = function () { var C = (function () { @@ -199,7 +199,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived3.prototype.method3 = function () { var D = (function () { @@ -225,7 +225,7 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived4.prototype.method4 = function () { var E = (function () { diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index a10b39b402e..c7af9d943e7 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -34,7 +34,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(C.prototype, "y", { get: function () { return this.x; }, diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js index a404b8049bc..a1fe3a78385 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -120,7 +120,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived1.prototype.method1 = function () { var b; @@ -139,7 +139,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived2.prototype.method2 = function () { var b; @@ -158,7 +158,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived3.prototype.method3 = function () { var b; @@ -177,7 +177,7 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived4.prototype.method4 = function () { var b; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js index 7d449bdcbd4..c5858b2df42 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -30,7 +30,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived.prototype.method1 = function () { this.x; // OK, accessed within a subclass of the declaring class diff --git a/tests/baselines/reference/protectedInstanceMemberAccessibility.js b/tests/baselines/reference/protectedInstanceMemberAccessibility.js index 3259d401270..61729cf1eb6 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -61,7 +61,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.g = function () { var t1 = this.x; @@ -93,7 +93,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index 46b4691dff7..9dc172f1080 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -137,7 +137,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C2.prototype.f = function () { return _super.prototype.f.call(this) + this.x; @@ -151,7 +151,7 @@ var C2 = (function (_super) { var C3 = (function (_super) { __extends(C3, _super); function C3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C3.prototype.f = function () { return _super.prototype.f.call(this); @@ -187,14 +187,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } C.foo = function (a, b, c, d, e) { a.x = 1; // Error, access must be through C or type derived from C @@ -208,7 +208,7 @@ var C = (function (_super) { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); @@ -239,7 +239,7 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -252,7 +252,7 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A3)); diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index ad1b1682aa7..cc88a85669a 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -63,7 +63,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived1.staticMethod1 = function () { Base.x; // OK, accessed within a class derived from their declaring class @@ -76,7 +76,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived2.staticMethod2 = function () { Base.x; // OK, accessed within a class derived from their declaring class @@ -89,7 +89,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived3.staticMethod3 = function () { Base.x; // OK, accessed within a class derived from their declaring class diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js index a2346b8be40..27987069ef9 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -38,7 +38,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived1.staticMethod1 = function () { this.x; // OK, accessed within a class derived from their declaring class @@ -49,7 +49,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived2.staticMethod3 = function () { this.x; // OK, accessed within a class derived from their declaring class diff --git a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js index a881eb55a18..516c2bb42b1 100644 --- a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js +++ b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js @@ -19,7 +19,7 @@ var Alpha; var Beta = (function (_super) { __extends(Beta, _super); function Beta() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Beta; }(Alpha.x)); diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index 250a9e0b618..81f9b83699c 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -13,14 +13,14 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return A; }(C)); var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index 7f0c6b5f95d..ee7cdc13da5 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var M = (function (_super) { __extends(M, _super); function M() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return M; }(M)); diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index 53a608baeca..795c065307f 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var S18 = (function (_super) { __extends(S18, _super); function S18() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return S18; }(S18)); diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index 344750974cb..8ba0f420710 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -21,7 +21,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(C1)); diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index 34aa110b7ee..9b37165d28b 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -28,7 +28,7 @@ var TypeScript2; var MemberNameArray = (function (_super) { __extends(MemberNameArray, _super); function MemberNameArray() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MemberNameArray; }(MemberName)); diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index a2cf3319474..62025c3def7 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -188,7 +188,7 @@ var AbstractMode = (function () { var Mode = (function (_super) { __extends(Mode, _super); function Mode() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } // scenario 2 Mode.prototype.getInitialState = function () { diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index f99a062e2c6..c7f6f47196d 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -1618,11 +1618,11 @@ sourceFile:recursiveClassReferenceTest.ts --- >>> function Mode() { 1 >^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(85, 21) Source(91, 2) + SourceIndex(0) --- ->>> return _super.apply(this, arguments) || this; +>>> return _super !== null && _super.apply(this, arguments) || this; >>> } 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index 8441ff9e15a..3af1f2023fa 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -51,21 +51,21 @@ var Symbol = (function () { var InferenceSymbol = (function (_super) { __extends(InferenceSymbol, _super); function InferenceSymbol() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return InferenceSymbol; }(Symbol)); var ParameterSymbol = (function (_super) { __extends(ParameterSymbol, _super); function ParameterSymbol() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ParameterSymbol; }(InferenceSymbol)); var TypeSymbol = (function (_super) { __extends(TypeSymbol, _super); function TypeSymbol() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return TypeSymbol; }(InferenceSymbol)); diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index 76224741e60..7b39ffb828d 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -52,7 +52,7 @@ var MsPortal; var ViewModel = (function (_super) { __extends(ViewModel, _super); function ViewModel() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ViewModel; }(ItemValue)); diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index a75a90d4d86..f374e7104b0 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -42,7 +42,7 @@ var foo2 = require("./foo2"); var x = (function (_super) { __extends(x, _super); function x() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return x; }(foo2.x)); diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index 94dc537298a..d0763988ae2 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1030,7 +1030,7 @@ var rionegrensis; var caniventer = (function (_super) { __extends(caniventer, _super); function caniventer() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } caniventer.prototype.salomonseni = function () { var _this = this; @@ -1068,7 +1068,7 @@ var rionegrensis; var veraecrucis = (function (_super) { __extends(veraecrucis, _super); function veraecrucis() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } veraecrucis.prototype.naso = function () { var _this = this; @@ -1247,7 +1247,7 @@ var julianae; var oralis = (function (_super) { __extends(oralis, _super); function oralis() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } oralis.prototype.cepapi = function () { var _this = this; @@ -1333,7 +1333,7 @@ var julianae; var sumatrana = (function (_super) { __extends(sumatrana, _super); function sumatrana() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } sumatrana.prototype.wolffsohni = function () { var _this = this; @@ -1533,7 +1533,7 @@ var julianae; var durangae = (function (_super) { __extends(durangae, _super); function durangae() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } durangae.prototype.Californium = function () { var _this = this; @@ -1607,7 +1607,7 @@ var Lanthanum; var nitidus = (function (_super) { __extends(nitidus, _super); function nitidus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } nitidus.prototype.granatensis = function () { var _this = this; @@ -1675,7 +1675,7 @@ var Lanthanum; var megalonyx = (function (_super) { __extends(megalonyx, _super); function megalonyx() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } megalonyx.prototype.phillipsii = function () { var _this = this; @@ -1824,7 +1824,7 @@ var rendalli; var zuluensis = (function (_super) { __extends(zuluensis, _super); function zuluensis() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } zuluensis.prototype.telfairi = function () { var _this = this; @@ -1982,7 +1982,7 @@ var rendalli; var crenulata = (function (_super) { __extends(crenulata, _super); function crenulata() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } crenulata.prototype.salvanius = function () { var _this = this; @@ -2065,7 +2065,7 @@ var trivirgatus; var mixtus = (function (_super) { __extends(mixtus, _super); function mixtus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } mixtus.prototype.ochrogaster = function () { var _this = this; @@ -2306,7 +2306,7 @@ var quasiater; var americanus = (function (_super) { __extends(americanus, _super); function americanus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } americanus.prototype.nasoloi = function () { var _this = this; @@ -2341,7 +2341,7 @@ var lavali; var wilsoni = (function (_super) { __extends(wilsoni, _super); function wilsoni() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } wilsoni.prototype.setiger = function () { var _this = this; @@ -2433,7 +2433,7 @@ var lavali; var otion = (function (_super) { __extends(otion, _super); function otion() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } otion.prototype.bonaerensis = function () { var _this = this; @@ -2597,7 +2597,7 @@ var lavali; var thaeleri = (function (_super) { __extends(thaeleri, _super); function thaeleri() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } thaeleri.prototype.coromandra = function () { var _this = this; @@ -2653,7 +2653,7 @@ var lavali; var lepturus = (function (_super) { __extends(lepturus, _super); function lepturus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } lepturus.prototype.ferrumequinum = function () { var _this = this; @@ -2676,7 +2676,7 @@ var dogramacii; var robustulus = (function (_super) { __extends(robustulus, _super); function robustulus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } robustulus.prototype.fossor = function () { var _this = this; @@ -2891,7 +2891,7 @@ var lutreolus; var schlegeli = (function (_super) { __extends(schlegeli, _super); function schlegeli() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } schlegeli.prototype.mittendorfi = function () { var _this = this; @@ -3118,7 +3118,7 @@ var panglima; var amphibius = (function (_super) { __extends(amphibius, _super); function amphibius() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } amphibius.prototype.bottegi = function () { var _this = this; @@ -3162,7 +3162,7 @@ var panglima; var fundatus = (function (_super) { __extends(fundatus, _super); function fundatus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } fundatus.prototype.crassulus = function () { var _this = this; @@ -3188,7 +3188,7 @@ var panglima; var abidi = (function (_super) { __extends(abidi, _super); function abidi() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } abidi.prototype.greyii = function () { var _this = this; @@ -3279,7 +3279,7 @@ var minutus; var himalayana = (function (_super) { __extends(himalayana, _super); function himalayana() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } himalayana.prototype.simoni = function () { var _this = this; @@ -3362,7 +3362,7 @@ var caurinus; var mahaganus = (function (_super) { __extends(mahaganus, _super); function mahaganus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } mahaganus.prototype.martiniquensis = function () { var _this = this; @@ -3436,7 +3436,7 @@ var howi; var angulatus = (function (_super) { __extends(angulatus, _super); function angulatus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } angulatus.prototype.pennatus = function () { var _this = this; @@ -3518,7 +3518,7 @@ var sagitta; var walkeri = (function (_super) { __extends(walkeri, _super); function walkeri() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } walkeri.prototype.maracajuensis = function () { var _this = this; @@ -3534,7 +3534,7 @@ var sagitta; var inez = (function (_super) { __extends(inez, _super); function inez() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } inez.prototype.vexillaris = function () { var _this = this; @@ -3550,7 +3550,7 @@ var sagitta; var konganensis = (function (_super) { __extends(konganensis, _super); function konganensis() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return konganensis; }(imperfecta.lasiurus)); @@ -3561,7 +3561,7 @@ var panamensis; var linulus = (function (_super) { __extends(linulus, _super); function linulus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } linulus.prototype.goslingi = function () { var _this = this; @@ -3712,7 +3712,7 @@ var samarensis; var pelurus = (function (_super) { __extends(pelurus, _super); function pelurus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } pelurus.prototype.Palladium = function () { var _this = this; @@ -3798,7 +3798,7 @@ var samarensis; var fuscus = (function (_super) { __extends(fuscus, _super); function fuscus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } fuscus.prototype.planifrons = function () { var _this = this; @@ -3958,7 +3958,7 @@ var samarensis; var leptoceros = (function (_super) { __extends(leptoceros, _super); function leptoceros() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } leptoceros.prototype.victus = function () { var _this = this; @@ -3998,7 +3998,7 @@ var samarensis; var nigricans = (function (_super) { __extends(nigricans, _super); function nigricans() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } nigricans.prototype.woosnami = function () { var _this = this; @@ -4023,7 +4023,7 @@ var dammermani; var pygmaea = (function (_super) { __extends(pygmaea, _super); function pygmaea() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } pygmaea.prototype.pajeros = function () { var _this = this; @@ -4052,7 +4052,7 @@ var chrysaeolus; var sarasinorum = (function (_super) { __extends(sarasinorum, _super); function sarasinorum() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } sarasinorum.prototype.belzebul = function () { var _this = this; @@ -4154,7 +4154,7 @@ var chrysaeolus; var oreas = (function (_super) { __extends(oreas, _super); function oreas() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } oreas.prototype.salamonis = function () { var _this = this; @@ -4380,7 +4380,7 @@ var provocax; var melanoleuca = (function (_super) { __extends(melanoleuca, _super); function melanoleuca() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } melanoleuca.prototype.Neodymium = function () { var _this = this; @@ -4422,7 +4422,7 @@ var provocax; var marcanoi = (function (_super) { __extends(marcanoi, _super); function marcanoi() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } marcanoi.prototype.formosae = function () { var _this = this; @@ -4824,7 +4824,7 @@ var gabriellae; var klossii = (function (_super) { __extends(klossii, _super); function klossii() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return klossii; }(imperfecta.lasiurus)); @@ -5027,7 +5027,7 @@ var imperfecta; var ciliolabrum = (function (_super) { __extends(ciliolabrum, _super); function ciliolabrum() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } ciliolabrum.prototype.leschenaultii = function () { var _this = this; @@ -5087,7 +5087,7 @@ var imperfecta; var sodyi = (function (_super) { __extends(sodyi, _super); function sodyi() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } sodyi.prototype.saundersiae = function () { var _this = this; @@ -5151,7 +5151,7 @@ var imperfecta; var megaphyllus = (function (_super) { __extends(megaphyllus, _super); function megaphyllus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } megaphyllus.prototype.montana = function () { var _this = this; @@ -5321,7 +5321,7 @@ var imperfecta; var cor = (function (_super) { __extends(cor, _super); function cor() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } cor.prototype.antinorii = function () { var _this = this; @@ -5411,7 +5411,7 @@ var imperfecta; var germaini = (function (_super) { __extends(germaini, _super); function germaini() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } germaini.prototype.sharpei = function () { var _this = this; @@ -5507,7 +5507,7 @@ var imperfecta; var melanops = (function (_super) { __extends(melanops, _super); function melanops() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } melanops.prototype.blarina = function () { var _this = this; @@ -5595,7 +5595,7 @@ var imperfecta; var peninsulae = (function (_super) { __extends(peninsulae, _super); function peninsulae() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } peninsulae.prototype.aitkeni = function () { var _this = this; @@ -5739,7 +5739,7 @@ var imperfecta; var Praseodymium = (function (_super) { __extends(Praseodymium, _super); function Praseodymium() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Praseodymium.prototype.clara = function () { var _this = this; @@ -5827,7 +5827,7 @@ var imperfecta; var johorensis = (function (_super) { __extends(johorensis, _super); function johorensis() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } johorensis.prototype.maini = function () { var _this = this; @@ -5951,7 +5951,7 @@ var imperfecta; var psilurus = (function (_super) { __extends(psilurus, _super); function psilurus() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } psilurus.prototype.socialis = function () { var _this = this; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index f786e994963..a2bdcce78fc 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -48,7 +48,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 1474f8ab29a..2cc5630685d 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -22,7 +22,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.c = function () { v = 1; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index 0baf0187009..9c06fce0a5f 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -22,7 +22,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.c = function () { v = 1; diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index 4906814f7eb..fa38a77fe40 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -18,7 +18,7 @@ var base = (function () { var derived = (function (_super) { __extends(derived, _super); function derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } derived.prototype.n = function () { }; return derived; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index 4bac0210c85..4b8b54c7f10 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -21,7 +21,7 @@ var AbstractGreeter = (function () { var Greeter = (function (_super) { __extends(Greeter, _super); function Greeter() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.a = 10; _this.nameA = "Ten"; return _this; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map index 6b18a783dfa..93070200e18 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map] -{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,kDAGC;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,qEAGC;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index 91e284fd063..bc4ff02779f 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -77,20 +77,20 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts --- >>> function Greeter() { 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(13, 5) Source(4, 1) + SourceIndex(0) --- ->>> var _this = _super.apply(this, arguments) || this; +>>> var _this = _super !== null && _super.apply(this, arguments) || this; 1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> 2 > class Greeter extends AbstractGreeter { > public a = 10; > public nameA = "Ten"; > } 1->Emitted(14, 9) Source(4, 1) + SourceIndex(0) -2 >Emitted(14, 59) Source(7, 2) + SourceIndex(0) +2 >Emitted(14, 78) Source(7, 2) + SourceIndex(0) --- >>> _this.a = 10; 1 >^^^^^^^^ diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index f65f42941bf..c7940a39dd7 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -36,7 +36,7 @@ var Model = (function () { var MyView = (function (_super) { __extends(MyView, _super); function MyView() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyView; }(View)); diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index b76afaff08c..e6e0f0668c0 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -27,7 +27,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived1.prototype.bar = function () { }; return Derived1; diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index de7588c3ebe..fc52005d8d9 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -31,7 +31,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Derived.prototype.foo = function () { return 2; }; return Derived; diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index d204c1aed47..aa18468ca89 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -27,7 +27,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.p1 = doThing(A); // OK _this.p2 = doThing(B); // OK return _this; diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index 7b8ca52b9a4..6b4da778d99 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -26,7 +26,7 @@ var SomeBase = (function () { var P = (function (_super) { __extends(P, _super); function P() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return P; }(SomeBase)); diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index 6240f8c454f..681f52bd10e 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -49,7 +49,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; + var _this = this; var x = 1; // should not error _this = _super.call(this) || this; return _this; @@ -60,7 +60,7 @@ B.s = 9; var C = (function (_super) { __extends(C, _super); function C() { - var _this; + var _this = this; _this.p = 10; var x = 1; // should error return _this; @@ -70,7 +70,7 @@ var C = (function (_super) { var D = (function (_super) { __extends(D, _super); function D() { - var _this; + var _this = this; _this.p = 11; var x = 1; // should error return _this; @@ -80,7 +80,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - var _this; + var _this = this; _this.p = 12; var x = 1; // should error return _this; diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index da45bda5c6e..7300e30903b 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -94,7 +94,7 @@ var C = (function (_super) { var D = (function (_super) { __extends(D, _super); function D() { - var _this; + var _this = this; _this.s = 9; var x = 1; // Error _this = _super.call(this) || this; @@ -125,7 +125,7 @@ Cs.s = 9; var Ds = (function (_super) { __extends(Ds, _super); function Ds() { - var _this; + var _this = this; var x = 1; // no Error _this = _super.call(this) || this; "use strict"; diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index 29715745890..3b23d890a74 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -48,7 +48,7 @@ function foo() { var myClass = (function (_super) { __extends(package, _super); function package() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return package; }(public)); diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index 1507e53d8cf..f920d3dc3e3 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -75,14 +75,14 @@ var F1 = (function () { var G = (function (_super) { __extends(G, _super); function G() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return G; }(package)); var H = (function (_super) { __extends(H, _super); function H() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return H; }(package.A)); diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index b532df7b120..c55450acdeb 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -55,7 +55,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.bar = function () { return ''; }; return B; diff --git a/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js b/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js index 15d6fc70da5..ffffa6ea36f 100644 --- a/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js +++ b/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js @@ -31,7 +31,7 @@ var Base = (function () { var Subclass = (function (_super) { __extends(Subclass, _super); function Subclass() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.instance1_1 = new Base(); // allowed _this.instance1_2 = new Subclass(); // allowed return _this; @@ -41,7 +41,7 @@ var Subclass = (function (_super) { var SubclassOfSubclass = (function (_super) { __extends(SubclassOfSubclass, _super); function SubclassOfSubclass() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.instance2_1 = new Base(); // allowed _this.instance2_2 = new Subclass(); // allowed _this.instance2_3 = new SubclassOfSubclass(); // allowed diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 38f5b5f1d4b..c2fcc07664d 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -120,7 +120,7 @@ var C3 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1; }(C3)); diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index 82bcbf14ecc..73b3bc95fb9 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -182,28 +182,28 @@ var C3 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1; }(C3)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(C3)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D3; }(C3)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D4; }(C3)); @@ -213,21 +213,21 @@ var D4 = (function (_super) { var D5 = (function (_super) { __extends(D5, _super); function D5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D5; }(C3)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D6; }(C3)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D7; }(C3)); @@ -236,21 +236,21 @@ var D7 = (function (_super) { var D8 = (function (_super) { __extends(D8, _super); function D8() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D8; }(C3)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D9; }(C3)); var D10 = (function (_super) { __extends(D10, _super); function D10() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D10; }(C3)); @@ -259,21 +259,21 @@ var D10 = (function (_super) { var D11 = (function (_super) { __extends(D11, _super); function D11() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D11; }(C3)); var D12 = (function (_super) { __extends(D12, _super); function D12() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D12; }(C3)); var D13 = (function (_super) { __extends(D13, _super); function D13() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D13; }(C3)); @@ -283,28 +283,28 @@ var D13 = (function (_super) { var D14 = (function (_super) { __extends(D14, _super); function D14() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D14; }(C3)); var D15 = (function (_super) { __extends(D15, _super); function D15() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D15; }(C3)); var D16 = (function (_super) { __extends(D16, _super); function D16() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D16; }(C3)); var D17 = (function (_super) { __extends(D17, _super); function D17() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D17; }(C3)); @@ -313,28 +313,28 @@ var D17 = (function (_super) { var D18 = (function (_super) { __extends(D18, _super); function D18() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D18; }(C3)); var D19 = (function (_super) { __extends(D19, _super); function D19() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D19; }(C3)); var D20 = (function (_super) { __extends(D20, _super); function D20() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D20; }(C3)); var D21 = (function (_super) { __extends(D21, _super); function D21() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D21; }(C3)); @@ -343,28 +343,28 @@ var D21 = (function (_super) { var D22 = (function (_super) { __extends(D22, _super); function D22() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D22; }(C3)); var D23 = (function (_super) { __extends(D23, _super); function D23() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D23; }(C3)); var D24 = (function (_super) { __extends(D24, _super); function D24() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D24; }(C3)); var D25 = (function (_super) { __extends(D25, _super); function D25() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D25; }(C3)); @@ -373,28 +373,28 @@ var D25 = (function (_super) { var D26 = (function (_super) { __extends(D26, _super); function D26() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D26; }(C3)); var D27 = (function (_super) { __extends(D27, _super); function D27() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D27; }(C3)); var D28 = (function (_super) { __extends(D28, _super); function D28() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D28; }(C3)); var D29 = (function (_super) { __extends(D29, _super); function D29() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D29; }(C3)); diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index e0baced37a4..0f681d9638b 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -118,63 +118,63 @@ var B1 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1; }(B1)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(B1)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D3; }(B1)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D4; }(B1)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D5; }(B1)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D6; }(B1)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D7; }(B1)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D8; }(B1)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D9; }(B1)); diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index 0b17fc07f24..60e1df58d91 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -217,63 +217,63 @@ var M1; var D1 = (function (_super) { __extends(D1, _super); function D1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1; }(Base)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(Base)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D3; }(Base)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D4; }(Base)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D5; }(Base)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D6; }(Base)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D7; }(Base)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D8; }(Base)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D9; }(Base)); @@ -288,63 +288,63 @@ var M2; var D1 = (function (_super) { __extends(D1, _super); function D1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1; }(Base2)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(Base2)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D3; }(Base2)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D4; }(Base2)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D5; }(Base2)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D6; }(Base2)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D7; }(Base2)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D8; }(Base2)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D9; }(Base2)); diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index 9c4c9011758..1693ffc68ef 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -33,14 +33,14 @@ var B = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(B)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(B)); diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index 3b5fada2012..1a8e59769f6 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -187,21 +187,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index 4ac7d3a7f24..8966c5ff8a7 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -136,21 +136,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index 94f549c62c1..f4b414dccf2 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -126,21 +126,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 1d12aeb945f..da262e26e1a 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -187,21 +187,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index 78582304cb8..c7849ccf9f7 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -138,21 +138,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index 17252fdb809..6210c393363 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -126,21 +126,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index a0561606393..717dd1410a3 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -64,21 +64,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index c508781e089..d61d2626f0e 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -67,21 +67,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index 3cf75dd83fd..57d1f7044f2 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -54,14 +54,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A)); @@ -75,28 +75,28 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B4; }(A)); diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index e9e8d39bf3c..12e5ad31fb3 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -58,14 +58,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A)); @@ -79,35 +79,35 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B4; }(A)); var B5 = (function (_super) { __extends(B5, _super); function B5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B5; }(A)); diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index 798e775083f..31ec12fd8ac 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -42,7 +42,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -56,14 +56,14 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A)); diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index 3675ed6a410..be8711242d2 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -81,14 +81,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Derived)); @@ -102,7 +102,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -114,7 +114,7 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -126,7 +126,7 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A3)); @@ -140,7 +140,7 @@ var TwoLevels; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -152,7 +152,7 @@ var TwoLevels; var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -164,7 +164,7 @@ var TwoLevels; var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index 404b6cbe988..b41750f5e1e 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -48,7 +48,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -60,7 +60,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -72,7 +72,7 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -84,7 +84,7 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index 8b168ea73b5..498fd5f61c3 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -48,7 +48,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -60,7 +60,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -72,7 +72,7 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -84,7 +84,7 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index 0a83b760218..7092e57d9ed 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -76,7 +76,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -90,7 +90,7 @@ var ExplicitPublic; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -102,7 +102,7 @@ var ExplicitPublic; var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -114,7 +114,7 @@ var ExplicitPublic; var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A3)); @@ -129,7 +129,7 @@ var ImplicitPublic; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -141,7 +141,7 @@ var ImplicitPublic; var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -153,7 +153,7 @@ var ImplicitPublic; var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index 195b7d2192e..1e4eae81a95 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -55,14 +55,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A)); @@ -76,28 +76,28 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B4; }(A)); diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index 0b2a57324eb..14a3845bc7b 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -58,14 +58,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A)); @@ -79,35 +79,35 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B4; }(A)); var B5 = (function (_super) { __extends(B5, _super); function B5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B5; }(A)); diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index 2937261ad05..2573633b6b9 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -42,7 +42,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); @@ -56,14 +56,14 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B3; }(A)); diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index 504e8542d4d..19ceafdfd16 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -58,7 +58,7 @@ var Base = (function () { var Sub1 = (function (_super) { __extends(Sub1, _super); function Sub1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Sub1.prototype.foo = function () { return "sub1" + _super.prototype.foo.call(this) + _super.prototype.bar.call(this); @@ -68,7 +68,7 @@ var Sub1 = (function (_super) { var SubSub1 = (function (_super) { __extends(SubSub1, _super); function SubSub1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } SubSub1.prototype.foo = function () { return "subsub1" + _super.prototype.foo.call(this); diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index 0094f696faf..dd34fc105fe 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -84,7 +84,7 @@ var Base1 = (function () { var Sub1 = (function (_super) { __extends(Sub1, _super); function Sub1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Sub1.prototype.bar = function () { return "base"; @@ -94,7 +94,7 @@ var Sub1 = (function (_super) { var SubSub1 = (function (_super) { __extends(SubSub1, _super); function SubSub1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } SubSub1.prototype.bar = function () { return _super.prototype["super"].foo; @@ -113,7 +113,7 @@ var Base2 = (function () { var SubE2 = (function (_super) { __extends(SubE2, _super); function SubE2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } SubE2.prototype.bar = function () { return _super.prototype.prototype.foo = null; @@ -132,7 +132,7 @@ var Base3 = (function () { var SubE3 = (function (_super) { __extends(SubE3, _super); function SubE3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } SubE3.prototype.bar = function () { return _super.prototype.bar.call(this); @@ -153,7 +153,7 @@ var Base4; var SubSub4 = (function (_super) { __extends(SubSub4, _super); function SubSub4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } SubSub4.prototype.x = function () { return _super.prototype.x.call(this); diff --git a/tests/baselines/reference/super2.js b/tests/baselines/reference/super2.js index 1d2331052db..7dc911baa8f 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -71,7 +71,7 @@ var Base5 = (function () { var Sub5 = (function (_super) { __extends(Sub5, _super); function Sub5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Sub5.prototype.x = function () { return "SubX"; @@ -81,7 +81,7 @@ var Sub5 = (function (_super) { var SubSub5 = (function (_super) { __extends(SubSub5, _super); function SubSub5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } SubSub5.prototype.x = function () { return _super.prototype.x.call(this); @@ -103,7 +103,7 @@ var Base6 = (function () { var Sub6 = (function (_super) { __extends(Sub6, _super); function Sub6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Sub6.prototype.y = function () { return "SubY"; @@ -113,7 +113,7 @@ var Sub6 = (function (_super) { var SubSub6 = (function (_super) { __extends(SubSub6, _super); function SubSub6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } SubSub6.prototype.y = function () { return _super.prototype.y.call(this); diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index 0bd9d305d2e..904782fe796 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -30,7 +30,7 @@ MyBase.S1 = 5; var MyDerived = (function (_super) { __extends(MyDerived, _super); function MyDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } MyDerived.prototype.foo = function () { var l3 = _super.prototype.S1; // Expected => Error: Only public instance methods of the base class are accessible via the 'super' keyword diff --git a/tests/baselines/reference/superAccessInFatArrow1.js b/tests/baselines/reference/superAccessInFatArrow1.js index a7f964309f7..d15b09d85a7 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -34,7 +34,7 @@ var test; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.bar = function (callback) { }; diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index 6e30cc64052..3c34e537b6a 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -24,7 +24,7 @@ var E = (function () { var H = (function (_super) { __extends(H, _super); function H() { - var _this; + var _this = this; var x = _this = _super.call(this, 5) || this; // Should be of type void, not E. x = 5; return _this; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 185767fefb6..666ce6f30c1 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -27,7 +27,7 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; + var _this = this; var x = function () { _this._t; }; x(); // no error; we only check super is called before this when the container is a constructor _this._t; // error diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index 91acb88ce22..8a3cfd5281a 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -24,19 +24,16 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this._t; + this._t; _this = _super.call(this) || this; - return _this; } return D; }(null)); var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.call(this) || this; - _this._t; - return _this; + _this = _super.call(this) || this; + this._t; } return E; }(null)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 57228538faf..3281a3f8b55 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -16,9 +16,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this._t; // No error - return _this; + this._t; // No error } return D; }(null)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index 9cfe8736774..9843ef2f588 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -27,7 +27,7 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; + var _this = this; var x = { j: _this._t }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index fe459b5e031..49b3d9c86c0 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -27,7 +27,7 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; + var _this = this; var x = { k: _this = _super.call(this, undefined) || this, j: _this._t diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index b31110fdf78..d1d87127e2a 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -62,7 +62,7 @@ var Doing = (function () { var Other = (function (_super) { __extends(Other, _super); function Other() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } // in static method Other.staticMethod = function () { diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index 05e44119608..e472d7ad720 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -35,7 +35,7 @@ var C = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; + var _this = this; var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index 3d55fe11cff..6a858c5e6a6 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -35,7 +35,7 @@ var C = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; + var _this = this; var D = (function (_super) { __extends(class_1, _super); function class_1() { diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index 636b03c227f..86782c7114f 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -28,7 +28,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; + var _this = this; var x = { x: _this = _super.call(this) || this }; diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 16f11088640..b64f990f192 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -18,7 +18,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Foo.prototype.m1 = function () { return _super.prototype.m1.call(this); diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index 99a3b78752c..ed320a81121 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -64,7 +64,7 @@ var OtherBase = (function () { var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this; + var _this = this; var p = ''; _this = _super.call(this) || this; return _this; diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 48b79acadf4..eb6ef0dbbdc 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -41,7 +41,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; + var _this = this; with (new C()) { foo(); _this = _super.call(this) || this; diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index e1fc0f97024..c1e8e7c0f4d 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -28,7 +28,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.m = function () { try { diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 8c99b649917..0f5b6ae72c9 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -28,7 +28,7 @@ var C = (function (_super) { __extends(C, _super); function C(a) { if (a === void 0) { a = _super.foo.call(_this); } - var _this; + var _this = this; return _this; } return C; diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index 816277e4e9e..9eed965ea17 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -100,7 +100,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.f = function () { var _this = this; diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index 30b07308bb2..fa2425ffd45 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -27,7 +27,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; + var _this = this; new _super.prototype(function (value) { return String(value); }); return _this; } diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index 7b5823e598b..a6496af6ad1 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -61,7 +61,7 @@ var MyBase = (function () { var MyDerived = (function (_super) { __extends(MyDerived, _super); function MyDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } MyDerived.prototype.foo = function () { _super.prototype.m1.call(this, "hi"); // Should be allowed, method on base prototype diff --git a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js index 956bce4ef2e..5647ecc7c59 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -29,7 +29,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } B.prototype.foo = function () { return 2; }; B.prototype.bar = function () { diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 45c32076be9..20b39d3951c 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -72,7 +72,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(B.prototype, "property", { set: function (value) { diff --git a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js index 3fcf7167ee5..a0ef21b93c4 100644 --- a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js +++ b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js @@ -30,7 +30,7 @@ var B = (function () { var C1 = (function (_super) { __extends(C1, _super); function C1() { - var _this; + var _this = this; _super.prototype.x.call(_this); _this = _super.call(this) || this; return _this; diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index dd37deb5af3..b4eeb79d8ea 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -31,7 +31,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Bar.prototype[symbol] = function () { return _super.prototype[symbol].call(this); diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index 8c8534b428a..5f5e53015e9 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -31,7 +31,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Bar[symbol] = function () { return _super[symbol].call(this); diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index a1c04975404..f47fbb716f4 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -23,7 +23,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; + var _this = this; _super.prototype..call(_this); return _this; } diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index 42a0e46d4c0..952889810e2 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -23,7 +23,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D(x) { - var _this; + var _this = this; _super.prototype..call(_this, x); return _this; } diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 803e5c264c2..ecf2fa0892f 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -28,7 +28,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; + var _this = this; _super.prototype..call(_this); return _this; } diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index 6815b71ce11..7c16ce42740 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -57,7 +57,7 @@ var F = (function () { var SuperObjectTest = (function (_super) { __extends(SuperObjectTest, _super); function SuperObjectTest() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } SuperObjectTest.prototype.testing = function () { var test = { diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index 2e1aecc7288..d244345a00c 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -98,7 +98,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index 78c09355fa0..79c435806f8 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -49,7 +49,7 @@ System.register(["./foo"], function (exports_1, context_1) { Bar = (function (_super) { __extends(Bar, _super); function Bar() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Bar; }(foo_1.Foo)); diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 7f299fd7e10..178332d5d21 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -98,7 +98,7 @@ genericFunc(undefined); // Should be an error var ErrClass3 = (function (_super) { __extends(ErrClass3, _super); function ErrClass3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ErrClass3; }(this)); diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 65a1ef1eee9..6681316822e 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -99,7 +99,7 @@ genericFunc(undefined); // Should be an error var ErrClass3 = (function (_super) { __extends(ErrClass3, _super); function ErrClass3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return ErrClass3; }(this)); diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 6400f410a09..9400cbcad07 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -227,7 +227,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D; }(C)); @@ -336,7 +336,7 @@ var Base1 = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived1; }(Base1)); @@ -350,7 +350,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 446bc15e6d9..7e40bac38bc 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -296,7 +296,7 @@ var Base1 = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived1; }(Base1)); @@ -310,7 +310,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js index f5d35ccaf77..9712e775482 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js @@ -29,7 +29,7 @@ var __extends = (this && this.__extends) || function (d, b) { var ShortDetails = (function (_super) { __extends(ShortDetails, _super); function ShortDetails() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } ShortDetails.prototype.render = function () { if (this.props.id < 1) { diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index d3bb404ceea..69355b62f0a 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -30,7 +30,7 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this._tagName = 'div'; return _this; } diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index 84debfd3e71..30815feac9f 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -30,7 +30,7 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this._tagName = 'div'; return _this; } diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 6166b99f4ac..3e3a483b124 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -30,7 +30,7 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this._tagName = 'div'; return _this; } diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index 928649264c8..c8c2c65baa9 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -30,7 +30,7 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this._tagName = 'div'; return _this; } diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 58e7f1c8d85..ead6ef040f2 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -42,7 +42,7 @@ var React = require("react"); var Button = (function (_super) { __extends(Button, _super); function Button() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Button.prototype.render = function () { return ; @@ -63,7 +63,7 @@ var button_1 = require("./button"); var App = (function (_super) { __extends(App, _super); function App() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } App.prototype.render = function () { return ; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index 88d91723501..7c839bee4f4 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -52,7 +52,7 @@ function Greet(x) { var BigGreeter = (function (_super) { __extends(BigGreeter, _super); function BigGreeter() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } BigGreeter.prototype.render = function () { return
; diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index 3520b5af372..66a6cae8787 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -35,7 +35,7 @@ var React = require("react"); var MyComponent = (function (_super) { __extends(MyComponent, _super); function MyComponent() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } MyComponent.prototype.render = function () { var AnyComponent = this.props.AnyComponent; @@ -49,7 +49,7 @@ React.createElement(MyComponent, { AnyComponent: function () { return React.crea var MyButtonComponent = (function (_super) { __extends(MyButtonComponent, _super); function MyButtonComponent() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return MyButtonComponent; }(React.Component)); diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index a57fb222a77..062b79ef436 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -74,7 +74,7 @@ var SomeBase = (function () { var SomeDerived = (function (_super) { __extends(SomeDerived, _super); function SomeDerived() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return SomeDerived; }(SomeBase)); diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index b88d1038969..675d4dd6d86 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -102,7 +102,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 99c25faaa88..14a58e37133 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -164,7 +164,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index 703c809274f..058b3068f8b 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -52,7 +52,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index c052ea7d72b..a4fa26fa058 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -161,7 +161,7 @@ var RoyalGuard = (function () { var LeadGuard = (function (_super) { __extends(LeadGuard, _super); function LeadGuard() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } LeadGuard.prototype.lead = function () { }; ; @@ -170,7 +170,7 @@ var LeadGuard = (function (_super) { var FollowerGuard = (function (_super) { __extends(FollowerGuard, _super); function FollowerGuard() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } FollowerGuard.prototype.follow = function () { }; ; @@ -224,7 +224,7 @@ var ArrowGuard = (function () { var ArrowElite = (function (_super) { __extends(ArrowElite, _super); function ArrowElite() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } ArrowElite.prototype.defend = function () { }; return ArrowElite; @@ -232,7 +232,7 @@ var ArrowElite = (function (_super) { var ArrowMedic = (function (_super) { __extends(ArrowMedic, _super); function ArrowMedic() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } ArrowMedic.prototype.heal = function () { }; return ArrowMedic; @@ -266,7 +266,7 @@ var MimicGuard = (function () { var MimicLeader = (function (_super) { __extends(MimicLeader, _super); function MimicLeader() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } MimicLeader.prototype.lead = function () { }; return MimicLeader; @@ -274,7 +274,7 @@ var MimicLeader = (function (_super) { var MimicFollower = (function (_super) { __extends(MimicFollower, _super); function MimicFollower() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } MimicFollower.prototype.follow = function () { }; return MimicFollower; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index a85a207a665..1d71f90525b 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -79,7 +79,7 @@ var RoyalGuard = (function () { var LeadGuard = (function (_super) { __extends(LeadGuard, _super); function LeadGuard() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } LeadGuard.prototype.lead = function () { }; ; @@ -88,7 +88,7 @@ var LeadGuard = (function (_super) { var FollowerGuard = (function (_super) { __extends(FollowerGuard, _super); function FollowerGuard() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } FollowerGuard.prototype.follow = function () { }; ; diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index a181a446a81..ec1a455ed23 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -91,7 +91,7 @@ var C2 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1; }(C1)); diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index 14e9259a9e7..537f203bc2c 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -56,7 +56,7 @@ var C2 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1; }(C1)); diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 52097af34f7..dcd3fd8e6bb 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -128,7 +128,7 @@ var Test; var Directory = (function (_super) { __extends(Directory, _super); function Directory() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Directory; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index c65445a3a5a..0f7379acfb8 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -78,7 +78,7 @@ var Test; var Directory = (function (_super) { __extends(Directory, _super); function Directory() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Directory; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 2cae93924bc..921729686c4 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -65,7 +65,7 @@ var Animal = (function () { var Giraffe = (function (_super) { __extends(Giraffe, _super); function Giraffe() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Giraffe; }(Animal)); diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index 179e981b8d1..4f67778694a 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -22,7 +22,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; + var _this = this; var x = _this = _super.call(this) || this; return _this; } diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index 15d1c3b396e..7130c7bd4fc 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(T)); diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index 2d0962f01d7..1d4335b1afb 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -21,14 +21,14 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(T)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(U)); diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 2738aa20528..4f9be559179 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -27,14 +27,14 @@ var Animal = (function () { var Cat = (function (_super) { __extends(Cat, _super); function Cat() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Cat; }(Animal)); var Dog = (function (_super) { __extends(Dog, _super); function Dog() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Dog; }(Animal)); diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index b3754436f26..cf10d82f8d9 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -27,14 +27,14 @@ var Animal = (function () { var Cat = (function (_super) { __extends(Cat, _super); function Cat() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Cat; }(Animal)); var Dog = (function (_super) { __extends(Dog, _super); function Dog() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Dog; }(Animal)); diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 2f97f4b0d1c..366b7a766db 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -72,7 +72,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; _this.self1 = _this; _this.self2 = _this.self; _this.self3 = _this.foo(); diff --git a/tests/baselines/reference/typeValueConflict1.js b/tests/baselines/reference/typeValueConflict1.js index 8711a656bf5..bfdb4f18b89 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -33,7 +33,7 @@ var M2; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(M1.A)); diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index 7abda8110b6..b80de751228 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -40,7 +40,7 @@ var M2; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(M1.A)); @@ -51,7 +51,7 @@ var M3; var B = (function (_super) { __extends(B, _super); function B() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return B; }(M1.A)); diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index f1ec6a77b14..107fd03e314 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -37,7 +37,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.baz = function (x) { }; D.prototype.foo = function () { }; diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index 045f7b40e55..8af2584f45a 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -56,14 +56,14 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index b4d42d819ed..25d6d68e41b 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -54,14 +54,14 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index 4b7813231cf..2c84db97a7a 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -14,7 +14,7 @@ var M; var C = (function (_super) { __extends(C, _super); function C() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C; }(M.I)); diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index 7e480d18a0a..3e14230fba3 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -136,105 +136,105 @@ var Base = (function () { var D0 = (function (_super) { __extends(D0, _super); function D0() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D0; }(Base)); var DA = (function (_super) { __extends(DA, _super); function DA() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return DA; }(Base)); var D1 = (function (_super) { __extends(D1, _super); function D1() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1; }(Base)); var D1A = (function (_super) { __extends(D1A, _super); function D1A() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D1A; }(Base)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2; }(Base)); var D2A = (function (_super) { __extends(D2A, _super); function D2A() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D2A; }(Base)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D3; }(Base)); var D3A = (function (_super) { __extends(D3A, _super); function D3A() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D3A; }(Base)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D4; }(Base)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D5; }(Base)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D6; }(Base)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D7; }(Base)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D8; }(Base)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D9; }(Base)); var D10 = (function (_super) { __extends(D10, _super); function D10() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D10; }(Base)); @@ -245,7 +245,7 @@ var E; var D11 = (function (_super) { __extends(D11, _super); function D11() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D11; }(Base)); @@ -256,7 +256,7 @@ function f() { } var D12 = (function (_super) { __extends(D12, _super); function D12() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D12; }(Base)); @@ -271,21 +271,21 @@ var c = (function () { var D13 = (function (_super) { __extends(D13, _super); function D13() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D13; }(Base)); var D14 = (function (_super) { __extends(D14, _super); function D14() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D14; }(Base)); var D15 = (function (_super) { __extends(D15, _super); function D15() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D15; }(Base)); @@ -295,14 +295,14 @@ var D15 = (function (_super) { var D16 = (function (_super) { __extends(D16, _super); function D16() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D16; }(Base)); var D17 = (function (_super) { __extends(D17, _super); function D17() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return D17; }(Base)); diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index c8e936af527..17f2ffb035c 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -57,7 +57,7 @@ var __extends = (this && this.__extends) || function (d, b) { var MyView = (function (_super) { __extends(MyView, _super); function MyView() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } MyView.prototype.getDataSeries = function () { var data = this.model.get("data"); diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.js b/tests/baselines/reference/underscoreThisInDerivedClass01.js index 000176c213f..7b3c9e0aea5 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass01.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.js @@ -47,7 +47,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; + var _this = this; var _this = "uh-oh?"; _this = _super.call(this) || this; return _this; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.js b/tests/baselines/reference/underscoreThisInDerivedClass02.js index c1e9494376b..28a4f91d871 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass02.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.js @@ -36,7 +36,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; + var _this = this; var _this = "uh-oh?"; return _this; } diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index e4d0acc893c..4464b8e6ede 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -34,7 +34,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.foo = function () { }; return D; diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index 83ad2a34394..b05af7138b8 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -54,7 +54,7 @@ var D = (function () { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } E.prototype.foo3 = function () { }; return E; @@ -62,7 +62,7 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } F.prototype.foo4 = function () { }; return F; diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index 231b8b27f3b..d558c3a2108 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -88,7 +88,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } D.prototype.foo1 = function () { }; return D; @@ -96,7 +96,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } E.prototype.foo2 = function () { }; return E; diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index 1343bea602e..21f63a8de97 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -169,7 +169,7 @@ var ts; var Type = (function (_super) { __extends(Type, _super); function Type() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Type.prototype.equals = function (that) { if (this === that) diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index b82a7cbc0ae..9a2a124e0c2 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -70,7 +70,7 @@ var r4 = c2(); // should be an error var C2 = (function (_super) { __extends(C2, _super); function C2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return C2; }(Function)); // error diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index 0ab1227bf3d..8325405e301 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -36,7 +36,7 @@ var Validation; var c3 = (function (_super) { __extends(c3, _super); function c3() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return c3; }(c1)); diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index dbb261e5f2a..a10458d9454 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -168,7 +168,7 @@ var Greeter; var class2 = (function (_super) { __extends(class2, _super); function class2() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } return class2; }(class1));