From 9dbab972b906ecba5984aaf255c5557b9c0a2857 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 1 Sep 2016 18:15:44 -0700 Subject: [PATCH 01/39] Emit '_this' declaration for derived classes; initialize it when calling 'super(...)'. --- src/compiler/transformers/es6.ts | 101 ++++++++++++++++++++++--------- 1 file changed, 72 insertions(+), 29 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 4e994c1acb0fc..aab894dc4ff2e 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -770,7 +770,7 @@ namespace ts { const statements: Statement[] = []; startLexicalEnvironment(); if (constructor) { - addCaptureThisForNodeIfNeeded(statements, constructor); + declareOrCaptureThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement); addDefaultValueAssignmentsIfNeeded(statements, constructor); addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper); } @@ -781,6 +781,13 @@ namespace ts { const body = saveStateAndInvoke(constructor, hasSynthesizedSuper ? transformConstructorBodyWithSynthesizedSuper : transformConstructorBodyWithoutSynthesizedSuper); addRange(statements, body); } + if (constructor ? hasSynthesizedSuper : extendsClauseElement) { + statements.push( + createReturn( + createIdentifier("_this") + ) + ); + } addRange(statements, endLexicalEnvironment()); const block = createBlock( @@ -800,11 +807,11 @@ namespace ts { } function transformConstructorBodyWithSynthesizedSuper(node: ConstructorDeclaration) { - return visitNodes(node.body.statements, visitor, isStatement, 1); + return visitNodes(node.body.statements, visitor, isStatement, /*start*/ 1); } function transformConstructorBodyWithoutSynthesizedSuper(node: ConstructorDeclaration) { - return visitNodes(node.body.statements, visitor, isStatement, 0); + return visitNodes(node.body.statements, visitor, isStatement, /*start*/ 0); } /** @@ -823,16 +830,27 @@ namespace ts { // If this is the case, or if the class has an `extends` clause but no // constructor, we emit a synthesized call to `_super`. if (constructor ? hasSynthesizedSuper : extendsClauseElement) { + const superCall = createFunctionApply( + createIdentifier("_super"), + createThis(), + createIdentifier("arguments"), + ); + const superReturnValueOrThis = createLogicalOr(superCall, createThis()); + statements.push( - createStatement( - createFunctionApply( - createIdentifier("_super"), - createThis(), - createIdentifier("arguments") - ), - /*location*/ extendsClauseElement - ) + createVariableStatement( + /*modifiers*/ undefined, + createVariableDeclarationList([ + createVariableDeclaration( + "_this", + /*type*/ undefined, + superReturnValueOrThis + ) + ]), + /*location*/ extendsClauseElement) ); + + enableSubstitutionsForCapturedThis(); } } @@ -1079,6 +1097,15 @@ namespace ts { statements.push(forStatement); } + function declareOrCaptureThisForConstructorIfNeeded(statements: Statement[], ctor: ConstructorDeclaration, hasExtendsClause: boolean) { + if (hasExtendsClause) { + captureThisForNode(statements, ctor, /*initializer*/ undefined); + } + else { + addCaptureThisForNodeIfNeeded(statements, ctor); + } + } + /** * Adds a statement to capture the `this` of a function declaration if it is needed. * @@ -1087,24 +1114,28 @@ namespace ts { */ function addCaptureThisForNodeIfNeeded(statements: Statement[], node: Node): void { if (node.transformFlags & TransformFlags.ContainsCapturedLexicalThis && node.kind !== SyntaxKind.ArrowFunction) { - enableSubstitutionsForCapturedThis(); - const captureThisStatement = createVariableStatement( - /*modifiers*/ undefined, - createVariableDeclarationList([ - createVariableDeclaration( - "_this", - /*type*/ undefined, - createThis() - ) - ]) - ); - - setNodeEmitFlags(captureThisStatement, NodeEmitFlags.NoComments | NodeEmitFlags.CustomPrologue); - setSourceMapRange(captureThisStatement, node); - statements.push(captureThisStatement); + captureThisForNode(statements, node, createThis()); } } + function captureThisForNode(statements: Statement[], node: Node, initializer: Expression | undefined) { + enableSubstitutionsForCapturedThis(); + const captureThisStatement = createVariableStatement( + /*modifiers*/ undefined, + createVariableDeclarationList([ + createVariableDeclaration( + "_this", + /*type*/ undefined, + initializer + ) + ]) + ); + + setNodeEmitFlags(captureThisStatement, NodeEmitFlags.NoComments | NodeEmitFlags.CustomPrologue); + setSourceMapRange(captureThisStatement, node); + statements.push(captureThisStatement); + } + /** * Adds statements to the class body function for a class to define the members of the * class. @@ -2468,11 +2499,12 @@ namespace ts { * * @param node a CallExpression. */ - function visitCallExpression(node: CallExpression): LeftHandSideExpression { + function visitCallExpression(node: CallExpression): CallExpression | BinaryExpression { // We are here either because SuperKeyword was used somewhere in the expression, or // because we contain a SpreadElementExpression. const { target, thisArg } = createCallBinding(node.expression, hoistVariableDeclaration); + let resultingCall: CallExpression | BinaryExpression; if (node.transformFlags & TransformFlags.ContainsSpreadElementExpression) { // [source] // f(...a, b) @@ -2488,7 +2520,7 @@ namespace ts { // _super.m.apply(this, a.concat([b])) // _super.prototype.m.apply(this, a.concat([b])) - return createFunctionApply( + resultingCall = createFunctionApply( visitNode(target, visitor, isExpression), visitNode(thisArg, visitor, isExpression), transformAndSpreadElements(node.arguments, /*needsUniqueCopy*/ false, /*multiLine*/ false, /*hasTrailingComma*/ false) @@ -2505,13 +2537,24 @@ namespace ts { // _super.m.call(this, a) // _super.prototype.m.call(this, a) - return createFunctionCall( + resultingCall = createFunctionCall( visitNode(target, visitor, isExpression), visitNode(thisArg, visitor, isExpression), visitNodes(node.arguments, visitor, isExpression), /*location*/ node ); } + + if (node.expression.kind === SyntaxKind.SuperKeyword) { + return createAssignment( + createIdentifier("_this"), + createLogicalOr( + resultingCall, + createThis() + ) + ); + } + return resultingCall; } /** From 99f1df4c0a7de520522cc3ab05aeb5e5ef92ccb9 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 1 Sep 2016 20:31:21 -0700 Subject: [PATCH 02/39] Accepted baselines. --- ...sClassHeritageListMemberTypeAnnotations.js | 3 +- ...accessibleTypeInTypeParameterConstraint.js | 3 +- .../reference/abstractClassInLocalScope.js | 3 +- .../abstractClassInLocalScopeIsAbstract.js | 3 +- tests/baselines/reference/abstractProperty.js | 3 +- .../reference/abstractPropertyNegative.js | 12 +- .../accessOverriddenBaseClassMember1.js | 3 +- .../accessors_spec_section-4.5_inference.js | 3 +- .../reference/aliasUsageInAccessorsOfClass.js | 3 +- .../baselines/reference/aliasUsageInArray.js | 3 +- .../aliasUsageInFunctionExpression.js | 3 +- .../reference/aliasUsageInGenericFunction.js | 3 +- .../reference/aliasUsageInIndexerOfClass.js | 3 +- .../reference/aliasUsageInObjectLiteral.js | 3 +- .../reference/aliasUsageInOrExpression.js | 3 +- ...aliasUsageInTypeArgumentOfExtendsClause.js | 6 +- .../reference/aliasUsageInVarAssignment.js | 3 +- .../reference/ambiguousOverloadResolution.js | 3 +- .../reference/apparentTypeSubtyping.js | 6 +- .../reference/apparentTypeSupertype.js | 3 +- .../reference/arrayAssignmentTest1.js | 3 +- .../reference/arrayAssignmentTest2.js | 3 +- .../reference/arrayBestCommonTypes.js | 6 +- .../reference/arrayLiteralTypeInference.js | 6 +- tests/baselines/reference/arrayLiterals.js | 6 +- .../arrayLiteralsWithRecursiveGenerics.js | 3 +- ...rayOfSubtypeIsAssignableToReadonlyArray.js | 6 +- .../reference/arrowFunctionContexts.js | 8 +- .../assignmentCompatWithCallSignatures3.js | 9 +- .../assignmentCompatWithCallSignatures4.js | 9 +- .../assignmentCompatWithCallSignatures5.js | 9 +- .../assignmentCompatWithCallSignatures6.js | 9 +- ...ssignmentCompatWithConstructSignatures3.js | 9 +- ...ssignmentCompatWithConstructSignatures4.js | 9 +- ...ssignmentCompatWithConstructSignatures5.js | 9 +- ...ssignmentCompatWithConstructSignatures6.js | 9 +- .../assignmentCompatWithNumericIndexer.js | 3 +- .../assignmentCompatWithNumericIndexer3.js | 3 +- .../assignmentCompatWithObjectMembers4.js | 12 +- ...nmentCompatWithObjectMembersOptionality.js | 6 +- ...mentCompatWithObjectMembersOptionality2.js | 6 +- .../assignmentCompatWithStringIndexer.js | 6 +- .../reference/assignmentLHSIsValue.js | 3 +- .../reference/asyncImportedPromise_es5.js | 3 +- .../reference/asyncMethodWithSuper_es5.js | 3 +- .../reference/asyncQualifiedReturnType_es5.js | 3 +- tests/baselines/reference/autolift4.js | 3 +- .../reference/awaitClassExpression_es5.js | 3 +- tests/baselines/reference/baseCheck.js | 15 +- .../reference/baseIndexSignatureResolution.js | 3 +- .../reference/baseTypeOrderChecking.js | 6 +- .../baseTypeWrappingInstantiationChain.js | 6 +- tests/baselines/reference/bases.js | 1 + .../bestCommonTypeOfConditionalExpressions.js | 6 +- ...bestCommonTypeOfConditionalExpressions2.js | 6 +- .../reference/bestCommonTypeOfTuple2.js | 6 +- ...allSignatureAssignabilityInInheritance2.js | 9 +- ...allSignatureAssignabilityInInheritance3.js | 9 +- ...allSignatureAssignabilityInInheritance4.js | 9 +- ...allSignatureAssignabilityInInheritance5.js | 9 +- ...allSignatureAssignabilityInInheritance6.js | 9 +- tests/baselines/reference/callWithSpread.js | 5 +- .../reference/captureThisInSuperCall.js | 4 +- tests/baselines/reference/castingTuple.js | 6 +- .../baselines/reference/chainedAssignment3.js | 3 +- ...arameterConstrainedToOtherTypeParameter.js | 6 +- .../reference/checkForObjectTooStrict.js | 6 +- .../checkSuperCallBeforeThisAccessing1.js | 3 +- .../checkSuperCallBeforeThisAccessing2.js | 3 +- .../checkSuperCallBeforeThisAccessing3.js | 3 +- .../checkSuperCallBeforeThisAccessing4.js | 6 +- .../checkSuperCallBeforeThisAccessing5.js | 3 +- .../checkSuperCallBeforeThisAccessing6.js | 4 +- .../checkSuperCallBeforeThisAccessing7.js | 4 +- .../checkSuperCallBeforeThisAccessing8.js | 3 +- .../reference/circularImportAlias.js | 3 +- .../circularTypeofWithFunctionModule.js | 3 +- .../classAbstractConstructorAssignability.js | 6 +- .../reference/classAbstractCrashedOnce.js | 3 +- .../reference/classAbstractExtends.js | 12 +- .../reference/classAbstractFactoryFunction.js | 3 +- .../reference/classAbstractGeneric.js | 18 ++- .../reference/classAbstractInAModule.js | 3 +- .../reference/classAbstractInheritance.js | 24 ++- .../reference/classAbstractInstantiations1.js | 6 +- .../reference/classAbstractInstantiations2.js | 12 +- .../classAbstractOverrideWithAbstract.js | 12 +- .../reference/classAbstractSuperCalls.js | 9 +- .../classAbstractUsingAbstractMethod1.js | 6 +- .../classAbstractUsingAbstractMethods2.js | 21 ++- .../classConstructorAccessibility2.js | 9 +- .../classConstructorAccessibility4.js | 6 +- .../classConstructorAccessibility5.js | 3 +- ...classConstructorParametersAccessibility.js | 3 +- ...lassConstructorParametersAccessibility2.js | 3 +- ...lassConstructorParametersAccessibility3.js | 3 +- ...clarationMergedInModuleWithContinuation.js | 3 +- .../classDoesNotDependOnBaseTypes.js | 3 +- tests/baselines/reference/classExpression2.js | 3 +- tests/baselines/reference/classExpression3.js | 6 +- .../classExpressionExtendingAbstractClass.js | 3 +- .../reference/classExtendingBuiltinType.js | 30 ++-- .../reference/classExtendingClass.js | 6 +- .../reference/classExtendingClassLikeType.js | 20 ++- .../reference/classExtendingNonConstructor.js | 21 ++- .../baselines/reference/classExtendingNull.js | 6 +- .../reference/classExtendingPrimitive.js | 27 ++-- .../reference/classExtendingPrimitive2.js | 3 +- .../reference/classExtendingQualifiedName.js | 3 +- .../reference/classExtendingQualifiedName2.js | 3 +- .../reference/classExtendsAcrossFiles.js | 6 +- ...sMergedWithModuleNotReferingConstructor.js | 3 +- ...tendsClauseClassNotReferringConstructor.js | 3 +- .../reference/classExtendsEveryObjectType.js | 18 ++- .../reference/classExtendsEveryObjectType2.js | 6 +- .../reference/classExtendsInterface.js | 6 +- .../classExtendsInterfaceInExpression.js | 3 +- .../classExtendsInterfaceInModule.js | 9 +- .../baselines/reference/classExtendsItself.js | 9 +- .../reference/classExtendsItselfIndirectly.js | 18 ++- .../classExtendsItselfIndirectly2.js | 18 ++- .../classExtendsItselfIndirectly3.js | 18 ++- .../classExtendsMultipleBaseClasses.js | 3 +- tests/baselines/reference/classExtendsNull.js | 4 +- ...classExtendsShadowedConstructorFunction.js | 3 +- .../classExtendsValidConstructorFunction.js | 3 +- .../classHeritageWithTrailingSeparator.js | 3 +- .../reference/classImplementsClass2.js | 3 +- .../reference/classImplementsClass3.js | 3 +- .../reference/classImplementsClass4.js | 3 +- .../reference/classImplementsClass5.js | 3 +- .../reference/classImplementsClass6.js | 3 +- tests/baselines/reference/classIndexer3.js | 3 +- tests/baselines/reference/classInheritence.js | 6 +- .../reference/classIsSubtypeOfBaseType.js | 6 +- tests/baselines/reference/classOrder2.js | 3 +- tests/baselines/reference/classOrderBug.js | 3 +- .../reference/classSideInheritance1.js | 3 +- .../reference/classSideInheritance2.js | 3 +- .../reference/classSideInheritance3.js | 6 +- tests/baselines/reference/classUpdateTests.js | 24 ++- .../classWithBaseClassButNoConstructor.js | 12 +- .../reference/classWithConstructors.js | 6 +- .../reference/classWithProtectedProperty.js | 3 +- .../reference/classWithStaticMembers.js | 3 +- tests/baselines/reference/classdecl.js | 9 +- .../reference/clodulesDerivedClasses.js | 3 +- ...llisionSuperAndLocalFunctionInAccessors.js | 6 +- ...isionSuperAndLocalFunctionInConstructor.js | 6 +- .../collisionSuperAndLocalFunctionInMethod.js | 6 +- ...ollisionSuperAndLocalFunctionInProperty.js | 3 +- .../collisionSuperAndLocalVarInAccessors.js | 6 +- .../collisionSuperAndLocalVarInConstructor.js | 6 +- .../collisionSuperAndLocalVarInMethod.js | 6 +- .../collisionSuperAndLocalVarInProperty.js | 3 +- .../collisionSuperAndNameResolution.js | 3 +- .../reference/collisionSuperAndParameter.js | 6 +- .../reference/collisionSuperAndParameter1.js | 3 +- ...perAndPropertyNameAsConstuctorParameter.js | 12 +- ...xpressionAndLocalVarWithSuperExperssion.js | 6 +- .../reference/commentsInheritance.js | 6 +- .../comparisonOperatorWithIdenticalObjects.js | 6 +- ...ithNoRelationshipObjectsOnCallSignature.js | 3 +- ...lationshipObjectsOnConstructorSignature.js | 3 +- ...thNoRelationshipObjectsOnIndexSignature.js | 3 +- ...nshipObjectsOnInstantiatedCallSignature.js | 3 +- ...jectsOnInstantiatedConstructorSignature.js | 3 +- ...peratorWithSubtypeObjectOnCallSignature.js | 3 +- ...WithSubtypeObjectOnConstructorSignature.js | 3 +- ...eratorWithSubtypeObjectOnIndexSignature.js | 3 +- ...ubtypeObjectOnInstantiatedCallSignature.js | 3 +- ...bjectOnInstantiatedConstructorSignature.js | 3 +- ...isonOperatorWithSubtypeObjectOnProperty.js | 6 +- .../reference/complexClassRelationships.js | 3 +- ...catedGenericRecursiveBaseClassReference.js | 3 +- .../reference/compoundAssignmentLHSIsValue.js | 3 +- ...poundExponentiationAssignmentLHSIsValue.js | 3 +- .../reference/computedPropertyNames24_ES5.js | 3 +- .../reference/computedPropertyNames25_ES5.js | 3 +- .../reference/computedPropertyNames26_ES5.js | 3 +- .../reference/computedPropertyNames27_ES5.js | 5 +- .../reference/computedPropertyNames28_ES5.js | 5 +- .../reference/computedPropertyNames30_ES5.js | 5 +- .../reference/computedPropertyNames31_ES5.js | 3 +- .../reference/computedPropertyNames43_ES5.js | 3 +- .../reference/computedPropertyNames44_ES5.js | 3 +- .../reference/computedPropertyNames45_ES5.js | 3 +- .../conditionalOperatorWithIdenticalBCT.js | 6 +- .../conditionalOperatorWithoutIdenticalBCT.js | 6 +- .../reference/constantOverloadFunction.js | 9 +- .../constantOverloadFunctionNoSubtypeError.js | 9 +- ...nstraintCheckInGenericBaseTypeReference.js | 3 +- ...uctSignatureAssignabilityInInheritance2.js | 9 +- ...uctSignatureAssignabilityInInheritance3.js | 9 +- ...uctSignatureAssignabilityInInheritance4.js | 9 +- ...uctSignatureAssignabilityInInheritance5.js | 9 +- ...uctSignatureAssignabilityInInheritance6.js | 9 +- tests/baselines/reference/constructorArgs.js | 3 +- ...uctorFunctionTypeIsAssignableToBaseType.js | 6 +- ...ctorFunctionTypeIsAssignableToBaseType2.js | 6 +- .../constructorHasPrototypeProperty.js | 6 +- .../reference/constructorOverloads2.js | 3 +- .../reference/constructorOverloads3.js | 1 + ...constructorWithIncompleteTypeAnnotation.js | 3 +- .../contextualTypingArrayOfLambdas.js | 6 +- ...contextualTypingOfConditionalExpression.js | 6 +- ...ontextualTypingOfConditionalExpression2.js | 6 +- ...urcePropertyIsRelatableToTargetProperty.js | 3 +- .../reference/declFileClassExtendsNull.js | 3 +- .../declFileForFunctionTypeAsTypeParameter.js | 3 +- ...ileGenericClassWithGenericExtendedClass.js | 3 +- .../reference/declFileGenericType.js | 3 +- .../reference/declFileGenericType2.js | 6 +- ...lictingWithClassReferredByExtendsClause.js | 6 +- ...dsClauseThatHasItsContainerNameConflict.js | 3 +- .../declarationEmitThisPredicates01.js | 3 +- ...tionEmitThisPredicatesWithPrivateName01.js | 3 +- .../declarationEmit_expressionInExtends.js | 3 +- .../declarationEmit_expressionInExtends2.js | 3 +- .../declarationEmit_expressionInExtends3.js | 12 +- .../declarationEmit_expressionInExtends4.js | 9 +- .../declarationEmit_nameConflicts3.js | 3 +- .../declarationEmit_protectedMembers.js | 6 +- .../reference/declareDottedExtend.js | 6 +- .../reference/decoratorOnClassConstructor2.js | 3 +- .../reference/decoratorOnClassConstructor3.js | 3 +- .../reference/decoratorOnClassMethod12.js | 3 +- ...derivedClassConstructorWithoutSuperCall.js | 10 +- ...ClassFunctionOverridesBaseClassAccessor.js | 3 +- .../derivedClassIncludesInheritedMembers.js | 6 +- ...idesIndexersWithAssignmentCompatibility.js | 6 +- .../derivedClassOverridesPrivateFunction1.js | 3 +- .../derivedClassOverridesPrivates.js | 6 +- .../derivedClassOverridesProtectedMembers.js | 3 +- .../derivedClassOverridesProtectedMembers2.js | 6 +- .../derivedClassOverridesProtectedMembers3.js | 30 ++-- .../derivedClassOverridesProtectedMembers4.js | 6 +- .../derivedClassOverridesPublicMembers.js | 6 +- .../derivedClassOverridesWithoutSubtype.js | 6 +- .../derivedClassParameterProperties.js | 30 ++-- ...dClassSuperCallsInNonConstructorMembers.js | 19 +-- .../derivedClassSuperCallsWithThisArg.js | 13 +- .../reference/derivedClassTransitivity.js | 6 +- .../reference/derivedClassTransitivity2.js | 6 +- .../reference/derivedClassTransitivity3.js | 6 +- .../reference/derivedClassTransitivity4.js | 6 +- .../reference/derivedClassWithAny.js | 6 +- ...ivateInstanceShadowingProtectedInstance.js | 3 +- ...hPrivateInstanceShadowingPublicInstance.js | 3 +- ...thPrivateStaticShadowingProtectedStatic.js | 3 +- ...sWithPrivateStaticShadowingPublicStatic.js | 3 +- .../derivedClassWithoutExplicitConstructor.js | 6 +- ...derivedClassWithoutExplicitConstructor2.js | 6 +- ...derivedClassWithoutExplicitConstructor3.js | 12 +- tests/baselines/reference/derivedClasses.js | 6 +- .../reference/derivedGenericClassWithAny.js | 6 +- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 3 +- .../derivedTypeDoesNotRequireExtendsClause.js | 3 +- .../destructuringParameterDeclaration5.js | 6 +- ...BeforeEmitParameterPropertyDeclaration1.js | 3 +- ...SuperCallBeforeEmitPropertyDeclaration1.js | 3 +- ...arationAndParameterPropertyDeclaration1.js | 3 +- .../reference/emitThisInSuperMethodCall.js | 3 +- tests/baselines/reference/emptyModuleName.js | 3 +- ...rorForwardReferenceForwadingConstructor.js | 3 +- tests/baselines/reference/errorSuperCalls.js | 32 ++-- .../reference/errorSuperPropertyAccess.js | 9 +- .../reference/errorsInGenericTypeReference.js | 3 +- .../reference/es6ClassSuperCodegenBug.js | 5 +- tests/baselines/reference/es6ClassTest.js | 3 +- tests/baselines/reference/es6ClassTest2.js | 6 +- tests/baselines/reference/es6ClassTest7.js | 3 +- .../exportAssignmentOfGenericType1.js | 3 +- .../exportDeclarationInInternalModule.js | 3 +- tests/baselines/reference/extBaseClass1.js | 9 +- tests/baselines/reference/extBaseClass2.js | 6 +- .../extendAndImplementTheSameBaseType.js | 3 +- .../extendAndImplementTheSameBaseType2.js | 3 +- .../extendBaseClassBeforeItsDeclared.js | 3 +- .../extendClassExpressionFromModule.js | 3 +- .../extendConstructSignatureInInterface.js | 3 +- .../reference/extendNonClassSymbol1.js | 3 +- .../reference/extendNonClassSymbol2.js | 3 +- ...xtendingClassFromAliasAndUsageInIndexer.js | 6 +- .../reference/extendsClauseAlreadySeen.js | 3 +- .../reference/extendsClauseAlreadySeen2.js | 3 +- tests/baselines/reference/fluentClasses.js | 6 +- tests/baselines/reference/for-inStatements.js | 3 +- .../reference/for-inStatementsInvalid.js | 3 +- .../forStatementsMultipleInvalidDecl.js | 3 +- .../reference/functionImplementationErrors.js | 6 +- .../reference/functionImplementations.js | 6 +- .../reference/functionSubtypingOfVarArgs.js | 3 +- .../reference/functionSubtypingOfVarArgs2.js | 3 +- .../reference/generatedContextualTyping.js | 6 +- .../genericBaseClassLiteralProperty.js | 3 +- .../genericBaseClassLiteralProperty2.js | 3 +- ...allWithConstraintsTypeArgumentInference.js | 6 +- .../genericCallWithObjectTypeArgs2.js | 6 +- ...icCallWithObjectTypeArgsAndConstraints2.js | 3 +- ...icCallWithObjectTypeArgsAndConstraints3.js | 6 +- .../genericCallbacksAndClassHierarchy.js | 3 +- .../genericClassExpressionInFunction.js | 18 ++- ...sInheritsConstructorFromNonGenericClass.js | 6 +- ...cClassPropertyInheritanceSpecialization.js | 3 +- .../reference/genericClassStaticMethod.js | 3 +- tests/baselines/reference/genericClasses3.js | 3 +- ...genericConstraintOnExtendedBuiltinTypes.js | 3 +- ...enericConstraintOnExtendedBuiltinTypes2.js | 3 +- .../genericDerivedTypeWithSpecializedBase.js | 3 +- .../genericDerivedTypeWithSpecializedBase2.js | 3 +- .../genericInheritedDefaultConstructors.js | 3 +- .../reference/genericPrototypeProperty2.js | 6 +- .../reference/genericPrototypeProperty3.js | 6 +- ...ericRecursiveImplicitConstructorErrors2.js | 3 +- ...ericRecursiveImplicitConstructorErrors3.js | 3 +- .../reference/genericTypeAssertions2.js | 3 +- .../reference/genericTypeAssertions4.js | 6 +- .../reference/genericTypeAssertions6.js | 3 +- .../reference/genericTypeConstraints.js | 3 +- ...genericTypeReferenceWithoutTypeArgument.js | 6 +- ...enericTypeReferenceWithoutTypeArgument2.js | 6 +- .../genericWithIndexerOfTypeParameterType2.js | 6 +- .../reference/heterogeneousArrayLiterals.js | 6 +- .../reference/ifDoWhileStatements.js | 3 +- .../illegalSuperCallsInConstructor.js | 11 +- .../implementClausePrecedingExtends.js | 3 +- ...gAnInterfaceExtendingClassWithPrivates2.js | 33 ++-- ...AnInterfaceExtendingClassWithProtecteds.js | 12 +- .../baselines/reference/importAsBaseClass.js | 3 +- tests/baselines/reference/importHelpers.js | 6 +- tests/baselines/reference/importHelpersAmd.js | 3 +- .../importHelpersInIsolatedModules.js | 6 +- .../reference/importHelpersNoHelpers.js | 6 +- .../reference/importHelpersNoModule.js | 6 +- .../reference/importHelpersOutFile.js | 6 +- .../reference/importHelpersSystem.js | 3 +- .../reference/importShadowsGlobalName.js | 3 +- .../reference/importUsedInExtendsList1.js | 3 +- .../reference/indexerConstraints2.js | 12 +- .../reference/indirectSelfReference.js | 6 +- .../reference/indirectSelfReferenceGeneric.js | 6 +- .../infinitelyExpandingTypesNonGenericBase.js | 3 +- .../inheritFromGenericTypeParameter.js | 3 +- ...SameNamePrivatePropertiesFromSameOrigin.js | 6 +- tests/baselines/reference/inheritance.js | 12 +- tests/baselines/reference/inheritance1.js | 12 +- ...itanceGrandParentPrivateMemberCollision.js | 6 +- ...tPrivateMemberCollisionWithPublicMember.js | 6 +- ...tPublicMemberCollisionWithPrivateMember.js | 6 +- ...ritanceMemberAccessorOverridingAccessor.js | 3 +- ...heritanceMemberAccessorOverridingMethod.js | 3 +- ...ritanceMemberAccessorOverridingProperty.js | 3 +- ...inheritanceMemberFuncOverridingAccessor.js | 3 +- .../inheritanceMemberFuncOverridingMethod.js | 3 +- ...inheritanceMemberFuncOverridingProperty.js | 3 +- ...ritanceMemberPropertyOverridingAccessor.js | 3 +- ...heritanceMemberPropertyOverridingMethod.js | 3 +- ...ritanceMemberPropertyOverridingProperty.js | 3 +- .../inheritanceOfGenericConstructorMethod1.js | 3 +- .../inheritanceOfGenericConstructorMethod2.js | 6 +- ...ritanceStaticAccessorOverridingAccessor.js | 3 +- ...heritanceStaticAccessorOverridingMethod.js | 3 +- ...ritanceStaticAccessorOverridingProperty.js | 3 +- ...inheritanceStaticFuncOverridingAccessor.js | 3 +- ...eStaticFuncOverridingAccessorOfFuncType.js | 3 +- .../inheritanceStaticFuncOverridingMethod.js | 3 +- ...inheritanceStaticFuncOverridingProperty.js | 3 +- ...eStaticFuncOverridingPropertyOfFuncType.js | 3 +- ...taticFunctionOverridingInstanceProperty.js | 3 +- .../inheritanceStaticMembersCompatible.js | 3 +- .../inheritanceStaticMembersIncompatible.js | 3 +- ...ritanceStaticPropertyOverridingAccessor.js | 3 +- ...heritanceStaticPropertyOverridingMethod.js | 3 +- ...ritanceStaticPropertyOverridingProperty.js | 3 +- .../inheritedConstructorWithRestParams.js | 3 +- .../inheritedConstructorWithRestParams2.js | 6 +- .../inheritedModuleMembersForClodule.js | 6 +- .../reference/instanceOfAssignability.js | 6 +- ...nstancePropertiesInheritedIntoClassType.js | 6 +- .../reference/instanceSubtypeCheck2.js | 3 +- ...nstanceofWithStructurallyIdenticalTypes.js | 6 +- .../instantiatedReturnTypeContravariance.js | 3 +- .../reference/interfaceClassMerging.js | 3 +- .../reference/interfaceClassMerging2.js | 3 +- .../reference/interfaceExtendsClass1.js | 9 +- .../interfaceExtendsClassWithPrivate1.js | 3 +- .../interfaceExtendsClassWithPrivate2.js | 6 +- .../reference/interfaceImplementation8.js | 12 +- .../invalidModuleWithStatementsOfEveryKind.js | 18 ++- .../invalidMultipleVariableDeclarations.js | 3 +- .../reference/invalidReturnStatements.js | 3 +- .../isolatedModulesImportExportElision.js | 3 +- tests/baselines/reference/jsxViaImport.js | 3 +- tests/baselines/reference/lambdaArgCrash.js | 3 +- tests/baselines/reference/lift.js | 3 +- tests/baselines/reference/localTypes1.js | 6 +- tests/baselines/reference/m7Bugs.js | 3 +- .../reference/mergedDeclarations5.js | 3 +- .../reference/mergedDeclarations6.js | 3 +- .../mergedInheritedClassInterface.js | 6 +- .../mergedInterfacesWithInheritedPrivates2.js | 6 +- .../mergedInterfacesWithInheritedPrivates3.js | 3 +- .../missingPropertiesOfClassExpression.js | 3 +- tests/baselines/reference/moduleAsBaseType.js | 3 +- .../moduleImportedForTypeArgumentPosition.js | 3 +- .../moduleWithStatementsOfEveryKind.js | 12 +- .../reference/multipleInheritance.js | 18 ++- .../mutuallyRecursiveGenericBaseTypes2.js | 3 +- tests/baselines/reference/noEmitHelpers.js | 3 +- ...enericClassExtendingGenericClassWithAny.js | 3 +- ...cIndexerConstrainsPropertyDeclarations2.js | 3 +- .../reference/numericIndexerConstraint3.js | 3 +- .../reference/numericIndexerConstraint4.js | 3 +- .../reference/numericIndexerTyping2.js | 3 +- ...objectCreationOfElementAccessExpression.js | 18 ++- ...objectTypeHidingMembersOfExtendedObject.js | 3 +- ...objectTypesIdentityWithNumericIndexers1.js | 6 +- ...objectTypesIdentityWithNumericIndexers2.js | 9 +- ...objectTypesIdentityWithNumericIndexers3.js | 6 +- .../objectTypesIdentityWithPrivates.js | 6 +- .../objectTypesIdentityWithPrivates2.js | 3 +- .../objectTypesIdentityWithPrivates3.js | 6 +- .../objectTypesIdentityWithStringIndexers.js | 6 +- .../objectTypesIdentityWithStringIndexers2.js | 9 +- .../optionalConstructorArgInSuper.js | 3 +- tests/baselines/reference/optionalMethods.js | 3 +- .../reference/optionalParamArgsTest.js | 3 +- .../reference/optionalParamInOverride.js | 3 +- .../reference/optionalParameterProperty.js | 3 +- .../baselines/reference/outModuleConcatAmd.js | 3 +- .../reference/outModuleConcatAmd.js.map | 2 +- .../outModuleConcatAmd.sourcemap.txt | 33 ++-- .../reference/outModuleConcatSystem.js | 3 +- .../reference/outModuleConcatSystem.js.map | 2 +- .../outModuleConcatSystem.sourcemap.txt | 33 ++-- .../reference/outModuleTripleSlashRefs.js | 3 +- .../reference/outModuleTripleSlashRefs.js.map | 2 +- .../outModuleTripleSlashRefs.sourcemap.txt | 33 ++-- tests/baselines/reference/overload1.js | 6 +- .../overloadOnConstConstraintChecks1.js | 9 +- .../overloadOnConstConstraintChecks2.js | 6 +- .../overloadOnConstConstraintChecks3.js | 6 +- .../overloadOnConstConstraintChecks4.js | 9 +- .../overloadOnConstantsInvalidOverload1.js | 9 +- .../baselines/reference/overloadResolution.js | 9 +- .../overloadResolutionClassConstructors.js | 9 +- .../overloadResolutionConstructors.js | 9 +- .../reference/overloadingOnConstants1.js | 9 +- .../reference/overloadingOnConstants2.js | 3 +- .../overridingPrivateStaticMembers.js | 3 +- .../reference/parseErrorInHeritageClause1.js | 3 +- tests/baselines/reference/parser509630.js | 3 +- tests/baselines/reference/parserAstSpans1.js | 9 +- .../reference/parserClassDeclaration1.js | 3 +- .../reference/parserClassDeclaration3.js | 3 +- .../reference/parserClassDeclaration4.js | 3 +- .../reference/parserClassDeclaration5.js | 3 +- .../reference/parserClassDeclaration6.js | 3 +- ...rrorRecovery_ExtendsOrImplementsClause2.js | 3 +- ...rrorRecovery_ExtendsOrImplementsClause4.js | 3 +- ...rrorRecovery_ExtendsOrImplementsClause5.js | 3 +- .../parserGenericsInTypeContexts1.js | 3 +- .../parserGenericsInTypeContexts2.js | 3 +- .../baselines/reference/parserRealSource10.js | 18 ++- .../baselines/reference/parserRealSource11.js | 144 ++++++++++++------ tests/baselines/reference/parserharness.js | 9 +- tests/baselines/reference/primitiveMembers.js | 3 +- tests/baselines/reference/privacyClass.js | 72 ++++++--- .../privacyClassExtendsClauseDeclFile.js | 69 ++++++--- tests/baselines/reference/privacyGloClass.js | 30 ++-- .../reference/privateAccessInSubclass1.js | 3 +- .../privateInstanceMemberAccessibility.js | 3 +- ...tedMembersAreNotAccessibleDestructuring.js | 3 +- .../privateStaticMemberAccessibility.js | 3 +- .../privateStaticNotAccessibleInClodule2.js | 3 +- .../amd/testGlo.js | 12 +- .../node/testGlo.js | 12 +- .../reference/project/prologueEmit/amd/out.js | 3 +- .../project/prologueEmit/node/out.js | 3 +- .../amd/m'ain.js | 3 +- .../node/m'ain.js | 3 +- .../reference/propertiesAndIndexers.js | 3 +- tests/baselines/reference/propertyAccess.js | 3 +- ...tyAccessOnTypeParameterWithConstraints2.js | 3 +- ...tyAccessOnTypeParameterWithConstraints3.js | 3 +- ...tyAccessOnTypeParameterWithConstraints5.js | 3 +- ...sPropertyAccessibleWithinNestedSubclass.js | 6 +- ...PropertyAccessibleWithinNestedSubclass1.js | 12 +- ...edClassPropertyAccessibleWithinSubclass.js | 3 +- ...dClassPropertyAccessibleWithinSubclass2.js | 12 +- ...dClassPropertyAccessibleWithinSubclass3.js | 3 +- .../protectedInstanceMemberAccessibility.js | 6 +- tests/baselines/reference/protectedMembers.js | 21 ++- ...icClassPropertyAccessibleWithinSubclass.js | 9 +- ...cClassPropertyAccessibleWithinSubclass2.js | 6 +- ...solution-does-not-affect-class-heritage.js | 3 +- .../readonlyConstructorAssignment.js | 9 +- .../reference/recursiveBaseCheck3.js | 6 +- .../reference/recursiveBaseCheck4.js | 3 +- .../reference/recursiveBaseCheck6.js | 3 +- .../recursiveBaseConstructorCreation1.js | 3 +- ...ssInstantiationsWithDefaultConstructors.js | 3 +- .../reference/recursiveClassReferenceTest.js | 3 +- .../recursiveClassReferenceTest.js.map | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 137 ++++++++--------- .../reference/recursiveComplicatedClasses.js | 9 +- ...sivelySpecializedConstructorDeclaration.js | 3 +- .../reference/reexportClassDefinition.js | 3 +- ...lassDeclarationWhenInBaseTypeResolution.js | 141 +++++++++++------ .../reference/returnInConstructor1.js | 6 +- tests/baselines/reference/returnStatements.js | 3 +- ...peCheckExtendedClassInsidePublicMethod2.js | 3 +- ...peCheckExtendedClassInsideStaticMethod1.js | 3 +- tests/baselines/reference/scopeTests.js | 3 +- .../reference/shadowPrivateMembers.js | 3 +- ...sWithDefaultConstructorAndExtendsClause.js | 3 +- ...hDefaultConstructorAndExtendsClause.js.map | 2 +- ...tConstructorAndExtendsClause.sourcemap.txt | 59 ++++--- .../specializedInheritedConstructors1.js | 3 +- .../specializedOverloadWithRestParameters.js | 3 +- tests/baselines/reference/staticFactory1.js | 3 +- .../baselines/reference/staticInheritance.js | 3 +- .../staticMemberAccessOffDerivedType1.js | 3 +- tests/baselines/reference/staticPropSuper.js | 6 +- .../reference/strictModeInConstructor.js | 18 ++- .../reference/strictModeReservedWord.js | 3 +- ...trictModeReservedWordInClassDeclaration.js | 6 +- ...gIndexerConstrainsPropertyDeclarations2.js | 3 +- .../reference/subtypesOfTypeParameter.js | 3 +- .../subtypesOfTypeParameterWithConstraints.js | 87 +++++++---- ...subtypesOfTypeParameterWithConstraints4.js | 27 ++-- ...OfTypeParameterWithRecursiveConstraints.js | 54 ++++--- .../reference/subtypingTransitivity.js | 6 +- .../reference/subtypingWithCallSignatures2.js | 9 +- .../reference/subtypingWithCallSignatures3.js | 9 +- .../reference/subtypingWithCallSignatures4.js | 9 +- .../subtypingWithConstructSignatures2.js | 9 +- .../subtypingWithConstructSignatures3.js | 9 +- .../subtypingWithConstructSignatures4.js | 9 +- .../subtypingWithConstructSignatures5.js | 9 +- .../subtypingWithConstructSignatures6.js | 9 +- .../reference/subtypingWithNumericIndexer.js | 18 ++- .../reference/subtypingWithNumericIndexer3.js | 21 ++- .../reference/subtypingWithNumericIndexer4.js | 9 +- .../reference/subtypingWithObjectMembers.js | 24 ++- .../reference/subtypingWithObjectMembers4.js | 12 +- ...subtypingWithObjectMembersAccessibility.js | 12 +- ...ubtypingWithObjectMembersAccessibility2.js | 21 ++- .../reference/subtypingWithStringIndexer.js | 18 ++- .../reference/subtypingWithStringIndexer3.js | 21 ++- .../reference/subtypingWithStringIndexer4.js | 9 +- tests/baselines/reference/super.js | 6 +- tests/baselines/reference/super1.js | 15 +- tests/baselines/reference/super2.js | 12 +- tests/baselines/reference/superAccess.js | 3 +- tests/baselines/reference/superAccess2.js | 4 +- .../reference/superAccessInFatArrow1.js | 3 +- .../reference/superCallArgsMustMatch.js | 3 +- .../reference/superCallAssignResult.js | 3 +- .../superCallBeforeThisAccessing1.js | 3 +- .../superCallBeforeThisAccessing2.js | 4 +- .../superCallBeforeThisAccessing3.js | 4 +- .../superCallBeforeThisAccessing4.js | 6 +- .../superCallBeforeThisAccessing5.js | 1 + .../superCallBeforeThisAccessing6.js | 3 +- .../superCallBeforeThisAccessing7.js | 3 +- .../superCallBeforeThisAccessing8.js | 3 +- ...allFromClassThatDerivesFromGenericType1.js | 3 +- ...allFromClassThatDerivesFromGenericType2.js | 3 +- ...eButWithIncorrectNumberOfTypeArguments1.js | 3 +- ...sFromGenericTypeButWithNoTypeArguments1.js | 3 +- ...ivesNonGenericTypeButWithTypeArguments1.js | 3 +- .../superCallFromClassThatHasNoBaseType1.js | 2 +- .../reference/superCallFromFunction1.js | 2 +- .../superCallInConstructorWithNoBaseType.js | 4 +- .../reference/superCallInNonStaticMethod.js | 4 +- .../reference/superCallInStaticMethod.js | 3 +- .../superCallInsideClassDeclaration.js | 4 +- .../superCallInsideClassExpression.js | 4 +- .../superCallInsideObjectLiteralExpression.js | 3 +- .../reference/superCallOutsideConstructor.js | 9 +- .../superCallParameterContextualTyping1.js | 3 +- .../superCallParameterContextualTyping2.js | 3 +- .../superCallParameterContextualTyping3.js | 5 +- .../superCallWithMissingBaseClass.js | 3 +- tests/baselines/reference/superCalls.js | 8 +- .../reference/superCallsInConstructor.js | 5 +- tests/baselines/reference/superErrors.js | 3 +- .../baselines/reference/superInCatchBlock1.js | 3 +- .../reference/superInConstructorParam1.js | 1 + tests/baselines/reference/superInLambdas.js | 16 +- .../reference/superInObjectLiterals_ES5.js | 3 +- tests/baselines/reference/superNewCall1.js | 1 + .../reference/superPropertyAccess.js | 3 +- .../reference/superPropertyAccess1.js | 3 +- .../reference/superPropertyAccess2.js | 3 +- ...essInComputedPropertiesOfNestedType_ES5.js | 3 +- .../reference/superPropertyAccessNoError.js | 3 +- .../reference/superPropertyAccess_ES5.js | 6 +- .../reference/superSymbolIndexedAccess5.js | 3 +- .../reference/superSymbolIndexedAccess6.js | 3 +- .../superWithGenericSpecialization.js | 3 +- .../baselines/reference/superWithGenerics.js | 3 +- .../reference/superWithTypeArgument.js | 1 + .../reference/superWithTypeArgument2.js | 1 + .../reference/superWithTypeArgument3.js | 1 + ...side-object-literal-getters-and-setters.js | 3 +- tests/baselines/reference/switchStatements.js | 3 +- .../reference/systemModuleWithSuperClass.js | 3 +- .../reference/targetTypeBaseCalls.js | 3 +- .../reference/thisInInvalidContexts.js | 9 +- .../thisInInvalidContextsExternalModule.js | 9 +- tests/baselines/reference/thisInSuperCall.js | 9 +- tests/baselines/reference/thisInSuperCall1.js | 3 +- tests/baselines/reference/thisInSuperCall2.js | 6 +- tests/baselines/reference/thisInSuperCall3.js | 3 +- .../reference/thisTypeInFunctions.js | 9 +- .../reference/thisTypeInFunctionsNegative.js | 6 +- .../baselines/reference/tsxDynamicTagName5.js | 3 +- .../baselines/reference/tsxDynamicTagName7.js | 3 +- .../baselines/reference/tsxDynamicTagName8.js | 3 +- .../baselines/reference/tsxDynamicTagName9.js | 3 +- .../reference/tsxExternalModuleEmit1.js | 6 +- .../tsxStatelessFunctionComponents2.js | 3 +- .../reference/tsxUnionTypeComponent1.js | 6 +- tests/baselines/reference/typeAssertions.js | 3 +- .../baselines/reference/typeGuardFunction.js | 3 +- .../reference/typeGuardFunctionErrors.js | 3 +- .../reference/typeGuardFunctionGenerics.js | 3 +- .../reference/typeGuardFunctionOfFormThis.js | 18 ++- .../typeGuardFunctionOfFormThisErrors.js | 6 +- .../reference/typeGuardOfFormInstanceOf.js | 3 +- .../reference/typeGuardOfFormIsType.js | 3 +- .../reference/typeGuardOfFormThisMember.js | 6 +- .../typeGuardOfFormThisMemberErrors.js | 6 +- tests/baselines/reference/typeMatch2.js | 3 +- tests/baselines/reference/typeOfSuperCall.js | 3 +- .../reference/typeParameterAsBaseClass.js | 3 +- .../reference/typeParameterAsBaseType.js | 6 +- .../reference/typeParameterExtendingUnion1.js | 6 +- .../reference/typeParameterExtendingUnion2.js | 6 +- .../baselines/reference/typeRelationships.js | 3 +- .../baselines/reference/typeValueConflict1.js | 3 +- .../baselines/reference/typeValueConflict2.js | 6 +- tests/baselines/reference/typeofClass2.js | 3 +- .../typesWithSpecializedCallSignatures.js | 6 +- ...typesWithSpecializedConstructSignatures.js | 6 +- tests/baselines/reference/undeclaredBase.js | 3 +- .../undefinedIsSubtypeOfEverything.js | 66 +++++--- .../baselines/reference/underscoreMapFirst.js | 3 +- .../reference/unionTypeEquivalence.js | 3 +- .../reference/unionTypeFromArrayLiteral.js | 6 +- .../reference/unionTypesAssignability.js | 6 +- tests/baselines/reference/unknownSymbols1.js | 3 +- .../reference/unspecializedConstraints.js | 12 +- ...untypedFunctionCallsWithTypeParameters1.js | 3 +- .../reference/unusedClassesinNamespace4.js | 3 +- .../unusedIdentifiersConsolidated1.js | 3 +- .../reference/validUseOfThisInSuper.js | 4 +- .../reference/varArgsOnConstructorTypes.js | 3 +- 661 files changed, 2983 insertions(+), 1586 deletions(-) diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index 7dcbfef1d727d..de8e08843a2d6 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -38,7 +38,8 @@ var A; var Point3d = (function (_super) { __extends(Point3d, _super); function Point3d() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Point3d; }(Point)); diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index 8f175621af44a..58c7bd4c3c1f6 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -41,7 +41,8 @@ var A; var Point3d = (function (_super) { __extends(Point3d, _super); function Point3d() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Point3d; }(Point)); diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index a49da04c8a175..04407cfc08c2e 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -22,7 +22,8 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index 1f6c1dfdd7a00..09109c40675df 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -22,7 +22,8 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index 87b5475111bbd..803df9f1d56cb 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -35,7 +35,8 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.raw = "edge"; this.ro = "readonly please"; } diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index 5fc340c58d04f..d6e1ce1813fe9 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -57,7 +57,8 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.ro = "readonly please"; } Object.defineProperty(C.prototype, "concreteWithNoBody", { @@ -77,7 +78,8 @@ var WrongTypeProperty = (function () { var WrongTypePropertyImpl = (function (_super) { __extends(WrongTypePropertyImpl, _super); function WrongTypePropertyImpl() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.num = "nope, wrong"; } return WrongTypePropertyImpl; @@ -90,7 +92,8 @@ var WrongTypeAccessor = (function () { var WrongTypeAccessorImpl = (function (_super) { __extends(WrongTypeAccessorImpl, _super); function WrongTypeAccessorImpl() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(WrongTypeAccessorImpl.prototype, "num", { get: function () { return "nope, wrong"; }, @@ -102,7 +105,8 @@ var WrongTypeAccessorImpl = (function (_super) { var WrongTypeAccessorImpl2 = (function (_super) { __extends(WrongTypeAccessorImpl2, _super); function WrongTypeAccessorImpl2() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.num = "nope, wrong"; } return WrongTypeAccessorImpl2; diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index c04532078e994..d60f260a163db 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -34,7 +34,8 @@ var Point = (function () { var ColoredPoint = (function (_super) { __extends(ColoredPoint, _super); function ColoredPoint(x, y, color) { - _super.call(this, x, y); + var _this; + _this = _super.call(this, x, y) || this; this.color = color; } ColoredPoint.prototype.toString = function () { 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 7294aa1aff74a..860d74f5204fb 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,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index 905ed9bce0e58..d717da94d382c 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -46,7 +46,8 @@ var Backbone = require("./aliasUsage1_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index 2d9f7cfed6ec4..f08363776cc2e 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -40,7 +40,8 @@ var Backbone = require("./aliasUsageInArray_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 21565dc99fc67..06e3e266ee956 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -39,7 +39,8 @@ var Backbone = require("./aliasUsageInFunctionExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index af24b61cf3330..96121364837be 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -43,7 +43,8 @@ var Backbone = require("./aliasUsageInGenericFunction_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index 3b21f15777c90..bbfe295259478 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -45,7 +45,8 @@ var Backbone = require("./aliasUsageInIndexerOfClass_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index b380104b461c1..3b036f52a9d74 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -40,7 +40,8 @@ var Backbone = require("./aliasUsageInObjectLiteral_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 1e9a54203453f..4167294e5f23d 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -43,7 +43,8 @@ var Backbone = require("./aliasUsageInOrExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 76b90c01bf0e3..1893f6586ee03 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -43,7 +43,8 @@ var Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return VisualizationModel; }(Backbone.Model)); @@ -64,7 +65,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.x = moduleA; } return D; diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 7c73fac2d67d5..0ba5cbbc8d080 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -39,7 +39,8 @@ var Backbone = require("./aliasUsageInVarAssignment_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 275bbf676024e..27e6dd714baec 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -22,7 +22,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index 2d04b059a9a9a..914679c7de26a 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -38,7 +38,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -51,7 +52,8 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index de1b1ba11bd72..01fdb92a24ef5 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -28,7 +28,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index e2ca36cbd1de8..911df30a423d5 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -101,7 +101,8 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C2.prototype.C2M1 = function () { return null; }; return C2; diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index a15df1b14b7e6..aff812247a27c 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -75,7 +75,8 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C2.prototype.C2M1 = function () { return null; }; return C2; diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index f45f67a876545..7df398365421e 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -128,7 +128,8 @@ var EmptyTypes; var derived = (function (_super) { __extends(derived, _super); function derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return derived; }(base)); @@ -187,7 +188,8 @@ var NonEmptyTypes; var derived = (function (_super) { __extends(derived, _super); function derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return derived; }(base)); diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index f54dec83c9c2e..81155544cab8e 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -65,14 +65,16 @@ var Action = (function () { var ActionA = (function (_super) { __extends(ActionA, _super); function ActionA() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ActionA; }(Action)); var ActionB = (function (_super) { __extends(ActionB, _super); function ActionB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ActionB; }(Action)); diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 4dbf88f868851..53066c7039179 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -70,7 +70,8 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived1; }(Base)); @@ -78,7 +79,8 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index c15782a8e2044..3c5f436505371 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -39,7 +39,8 @@ var List = (function () { var DerivedList = (function (_super) { __extends(DerivedList, _super); function DerivedList() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return DerivedList; }(List)); diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index 255b52e16c989..aba7a7cbc8cc1 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -33,14 +33,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(Array)); diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index 73e3be15e1189..bfd49be6bbf59 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -116,8 +116,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = this; - _super.call(this, function () { return _this; }); + var _this; + _this = _super.call(this, function () { return _this; }) || this; } return Derived; }(Base)); @@ -158,8 +158,8 @@ var M2; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = this; - _super.call(this, function () { return _this; }); + var _this; + _this = _super.call(this, function () { return _this; }) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index 24f95ec61eaee..80a9aa9cf148a 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -114,21 +114,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 43608565039b2..5932aec049a67 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -115,21 +115,24 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index b3318dd53e814..7ea579d87edaf 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -80,21 +80,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index becbfea57a037..0fb5867836cf1 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -57,21 +57,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index d062a563a4dd3..b933425ffb083 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -114,21 +114,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index 5744424f8786c..e407c3acdb00b 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -115,21 +115,24 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index de42671c9f1f6..59c816dcc5c2b 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -80,21 +80,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index 206ae7768baf6..b3b349ebc06fc 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -57,21 +57,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 56b206786f1e2..6e14fb66ecdc0 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -72,7 +72,8 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index 53f92dd3b592b..3b32f327b073d 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -59,7 +59,8 @@ b = a; // ok var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A)); diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 092de2ca7073b..ce80efc3c7a74 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -108,14 +108,16 @@ var OnlyDerived; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); @@ -167,14 +169,16 @@ var WithBase; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 791ae494ab21d..d95eb43f0e570 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -103,14 +103,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index d93ddf8b3a4b5..f4c401979cf8c 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -105,14 +105,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index ef6befe268eb7..54839da4b5a75 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -82,7 +82,8 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -93,7 +94,8 @@ var Generics; var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A)); diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 8a3b4b35d0b87..070c151ee51fb 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -118,7 +118,8 @@ value; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.call(this); + var _this; + _this = _super.call(this) || this; _super.prototype. = value; } Derived.prototype.foo = function () { _super.prototype. = value; }; diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index 54d1b0fdac824..6fcc24b06bf34 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -19,7 +19,8 @@ var __extends = (this && this.__extends) || function (d, b) { var Task = (function (_super) { __extends(Task, _super); function Task() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Task; }(Promise)); diff --git a/tests/baselines/reference/asyncMethodWithSuper_es5.js b/tests/baselines/reference/asyncMethodWithSuper_es5.js index 87debbdc55c2e..22ca0aa0cbefe 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es5.js +++ b/tests/baselines/reference/asyncMethodWithSuper_es5.js @@ -61,7 +61,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 19de38325e2cc..0081a30d93005 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es5.js +++ b/tests/baselines/reference/asyncQualifiedReturnType_es5.js @@ -13,7 +13,8 @@ var X; var MyPromise = (function (_super) { __extends(MyPromise, _super); function MyPromise() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyPromise; }(Promise)); diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index e6790021f63f1..85dd3725639a3 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -43,7 +43,8 @@ Point.origin = new Point(0, 0); var Point3D = (function (_super) { __extends(Point3D, _super); function Point3D(x, y, z, m) { - _super.call(this, x, y); + var _this; + _this = _super.call(this, x, y) || this; this.z = z; } Point3D.prototype.getDist = function () { diff --git a/tests/baselines/reference/awaitClassExpression_es5.js b/tests/baselines/reference/awaitClassExpression_es5.js index 9123f5f2ea86a..f81b580092901 100644 --- a/tests/baselines/reference/awaitClassExpression_es5.js +++ b/tests/baselines/reference/awaitClassExpression_es5.js @@ -17,7 +17,8 @@ function func() { _a = function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }; diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index c4210f3f6a531..800742ff63b2b 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -43,14 +43,16 @@ var C = (function () { var ELoc = (function (_super) { __extends(ELoc, _super); function ELoc(x) { - _super.call(this, 0, x); + var _this; + _this = _super.call(this, 0, x) || this; } return ELoc; }(C)); var ELocVar = (function (_super) { __extends(ELocVar, _super); function ELocVar(x) { - _super.call(this, 0, loc); + var _this; + _this = _super.call(this, 0, loc) || this; } ELocVar.prototype.m = function () { var loc = 10; @@ -60,7 +62,8 @@ var ELocVar = (function (_super) { var D = (function (_super) { __extends(D, _super); function D(z) { - _super.call(this, this.z); + var _this; + _this = _super.call(this, this.z) || this; this.z = z; } return D; @@ -68,7 +71,8 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E(z) { - _super.call(this, 0, this.z); + var _this; + _this = _super.call(this, 0, this.z) || this; this.z = z; } return E; @@ -76,7 +80,8 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F(z) { - _super.call(this, "hello", this.z); + var _this; + _this = _super.call(this, "hello", this.z) || this; this.z = z; } return F; diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index 3f3fa3cc0b9ca..6629ef35dda61 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -38,7 +38,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index 66d2135f01d7d..187a354553df8 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -51,7 +51,8 @@ var Class1 = (function () { var Class2 = (function (_super) { __extends(Class2, _super); function Class2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Class2; }(Class1)); @@ -63,7 +64,8 @@ var Class3 = (function () { var Class4 = (function (_super) { __extends(Class4, _super); function Class4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Class4; }(Class3)); diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index dc52eeeaee600..bbf57046a975c 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -41,7 +41,8 @@ var CBaseBase = (function () { var CBase = (function (_super) { __extends(CBase, _super); function CBase() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return CBase; }(CBaseBase)); @@ -59,7 +60,8 @@ var Wrapper = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C.prototype.works = function () { new CBaseBase(this); diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index f67f754d06372..fcf1d7fe124ac 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -36,6 +36,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { + var _this; this.x; any; } diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index 1c2fc896a6ad4..a9e38f0520c8f 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -44,14 +44,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 21a69f517fc4c..9af685812c298 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -40,14 +40,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index e38ce2854bd7d..36232ad04b1e8 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -46,7 +46,8 @@ var E = (function () { var F = (function (_super) { __extends(F, _super); function F() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return F; }(C)); @@ -59,7 +60,8 @@ var C1 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.i = "bar"; } return D1; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 6b3bf8e125ef5..4fd0dc2cefc27 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -84,21 +84,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index a823047fc0d4e..710725f145be3 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -131,21 +131,24 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index b60cf2014f1e8..154aee0693b06 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -64,21 +64,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index 434af36123e8f..7359d330cd6fb 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -64,21 +64,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index 9776d14612eb8..594d2dcafb774 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -67,21 +67,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index e89e9d9345bc8..2149db744b06f 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -99,8 +99,9 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this, 1, 2); - _super.apply(this, [1, 2].concat(a)); + var _this; + _this = _super.call(this, 1, 2) || this; + _this = _super.apply(this, [1, 2].concat(a)) || this; } D.prototype.foo = function () { _super.prototype.foo.call(this, 1, 2); diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 791b6f4c97956..0c36877d9dcbc 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -22,8 +22,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = this; - _super.call(this, { test: function () { return _this.someMethod(); } }); + var _this; + _this = _super.call(this, { test: function () { return _this.someMethod(); } }) || this; } B.prototype.someMethod = function () { }; return B; diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index bcff0938157c0..426889df7de6b 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -59,7 +59,8 @@ var D = (function () { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E; }(A)); @@ -67,7 +68,8 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return F; }(A)); diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index b4b6330a7cf76..71b345a311ca2 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -36,7 +36,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index c53910e00acad..7c428751b2844 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -42,14 +42,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B)); diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index cdc19a5688de4..48825a01a675f 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -49,14 +49,16 @@ var Foo; var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return Bar; }(Foo.Object)); var Baz = (function (_super) { __extends(Baz, _super); function Baz() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return Baz; }(Object)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index cfb5726dac1f1..dc70f3e8d0816 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -24,7 +24,8 @@ var Based = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.call(this); + var _this; + _this = _super.call(this) || this; this; this.x = 10; var that = this; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index afbc15cf912a9..f1fcdb48daef8 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -24,8 +24,9 @@ var Based = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { + var _this; this.x = 100; - _super.call(this); + _this = _super.call(this) || this; this.x = 10; var that = this; } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 7e9c23c1f8337..d2ede7d04b15f 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -29,13 +29,14 @@ var Based = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { + var _this; var innver = (function () { function innver() { this.y = true; } return innver; }()); - _super.call(this); + _this = _super.call(this) || this; this.x = 10; var that = this; } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 1257b446ccbaa..c6eddf4ef4898 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 = this; + var _this; (function () { _this; // No error }); @@ -43,8 +43,8 @@ var Derived = (function (_super) { (function () { _this; // No error })(); - _super.call(this); - _super.call(this); + _this = _super.call(this) || this; + _this = _super.call(this) || this; this.x = 10; var that = this; } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index 1889ee998ca91..e58d55fd274f7 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -25,7 +25,8 @@ var Based = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.call(this, this.x); + var _this; + _this = _super.call(this, this.x) || this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 39db4dec17467..15fcbff4c89e9 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -28,9 +28,9 @@ var Base = (function () { var Super = (function (_super) { __extends(Super, _super); function Super() { - var _this = this; + var _this; (function () { return _this; }); // No Error - _super.call(this); + _this = _super.call(this) || this; } return Super; }(Base)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index d071c05db5d4e..0cade04664dea 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -23,8 +23,8 @@ var Base = (function () { var Super = (function (_super) { __extends(Super, _super); function Super() { - var _this = this; - _super.call(this, (function () { return _this; })); // No error + var _this; + _this = _super.call(this, (function () { return _this; })) || this; // No error } return Super; }(Base)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index f334cc7f42b86..cf0da205d7189 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -28,8 +28,9 @@ var Base = (function () { var Super = (function (_super) { __extends(Super, _super); function Super() { + var _this; var that = this; - _super.call(this); + _this = _super.call(this) || this; } return Super; }(Base)); diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 19c156176bfbd..9d0e7648dcb82 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -32,7 +32,8 @@ var B; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(B.a.C)); diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js index 6ce1dd62fc5d7..811e86b21cafc 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -32,7 +32,8 @@ var maker; var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar; }(Foo)); diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index 5695e6c79d3cb..8738b43bb3fb3 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -28,14 +28,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B)); diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index 46f0a8938c417..02d31377de87f 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -24,7 +24,8 @@ var foo = (function () { var bar = (function (_super) { __extends(bar, _super); function bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } bar.prototype.test = function () { this. diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index 8d7128cc03d30..8ac2cc9de3de7 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -31,28 +31,32 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B)); var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(B)); var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } E.prototype.bar = function () { }; return E; diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js index d5b0417f99596..4f612e3d9c692 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -31,7 +31,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index c9409e9746687..b76117fddfc01 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -39,28 +39,32 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); // error -- inherits abstract methods var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(A)); // error -- inherits abstract methods var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } E.prototype.foo = function () { return this.t; }; return E; @@ -68,7 +72,8 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } F.prototype.bar = function (t) { }; return F; @@ -76,7 +81,8 @@ var F = (function (_super) { var G = (function (_super) { __extends(G, _super); function G() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 17fbf568601b9..aa66ba540a80b 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -24,7 +24,8 @@ var M; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index 4d5c804e55784..0bd5dab31a997 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -35,14 +35,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); @@ -54,42 +56,48 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return BB; }(AA)); var CC = (function (_super) { __extends(CC, _super); function CC() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return CC; }(AA)); var DD = (function (_super) { __extends(DD, _super); function DD() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return DD; }(BB)); var EE = (function (_super) { __extends(EE, _super); function EE() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return EE; }(BB)); var FF = (function (_super) { __extends(FF, _super); function FF() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return FF; }(CC)); var GG = (function (_super) { __extends(GG, _super); function GG() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return GG; }(CC)); diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index 0263e9e97b36c..aef8f58fab256 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -41,14 +41,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B)); diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index 379e0b18cccde..2e6cd648dc08a 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -82,21 +82,24 @@ new x; // okay -- undefined behavior at runtime var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B)); // error -- not declared abstract var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(B)); // okay var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } E.prototype.bar = function () { return 1; }; return E; @@ -104,7 +107,8 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } F.prototype.bar = function () { return 2; }; return F; diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index d613dd1fe31f5..5cb07934658d1 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -38,7 +38,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -51,7 +52,8 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } BB.prototype.bar = function () { }; return BB; @@ -59,14 +61,16 @@ var BB = (function (_super) { var CC = (function (_super) { __extends(CC, _super); function CC() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return CC; }(BB)); // error var DD = (function (_super) { __extends(DD, _super); function DD() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } DD.prototype.foo = function () { }; return DD; diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index 7ada903974cb8..44b15710c732e 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -42,7 +42,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.bar = function () { _super.prototype.foo.call(this); }; B.prototype.baz = function () { return this.foo; }; @@ -51,7 +52,8 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 +70,8 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return BB; }(AA)); diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index 457195f5449aa..ae6b08e4bcac5 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -31,7 +31,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.foo = function () { return 1; }; return B; @@ -39,7 +40,8 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index dc025b11ddec1..9f43ee1a6b3cb 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -41,21 +41,24 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.foo = function () { }; return D; @@ -63,7 +66,8 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } E.prototype.foo = function () { }; return E; @@ -76,21 +80,24 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return BB; }(AA)); var CC = (function (_super) { __extends(CC, _super); function CC() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return CC; }(AA)); var DD = (function (_super) { __extends(DD, _super); function DD() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } DD.prototype.foo = function () { }; return DD; diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index 03b7af3e716c1..95206681372ee 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -77,7 +77,8 @@ var BaseC = (function () { var DerivedA = (function (_super) { __extends(DerivedA, _super); function DerivedA(x) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; this.x = x; } DerivedA.prototype.createInstance = function () { new DerivedA(5); }; @@ -88,7 +89,8 @@ var DerivedA = (function (_super) { var DerivedB = (function (_super) { __extends(DerivedB, _super); function DerivedB(x) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; this.x = x; } DerivedB.prototype.createInstance = function () { new DerivedB(7); }; @@ -99,7 +101,8 @@ var DerivedB = (function (_super) { var DerivedC = (function (_super) { __extends(DerivedC, _super); function DerivedC(x) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; this.x = x; } DerivedC.prototype.createInstance = function () { new DerivedC(9); }; diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js index 6342facae21fa..dfbc70de115b0 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -51,7 +51,8 @@ var A = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); @@ -73,7 +74,8 @@ var D = (function () { var F = (function (_super) { __extends(F, _super); function F() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return F; }(D)); diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index ec9e9f83a8e41..b73ecb4a92b39 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -25,7 +25,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived.make = function () { new Base(); }; // ok return Derived; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index c31fd8bf9dd15..1f282ba71322d 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -59,7 +59,8 @@ c3.p; // protected, error var Derived = (function (_super) { __extends(Derived, _super); function Derived(p) { - _super.call(this, p); + var _this; + _this = _super.call(this, p) || this; this.p; // OK } return Derived; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index 7f52a6a581fc2..81ad696ddc86c 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -59,7 +59,8 @@ c3.p; // protected, error var Derived = (function (_super) { __extends(Derived, _super); function Derived(p) { - _super.call(this, p); + var _this; + _this = _super.call(this, p) || this; this.p; // OK } return Derived; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index 0da9449a3a71f..95509867cc574 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -28,7 +28,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(p) { - _super.call(this, p); + var _this; + _this = _super.call(this, p) || this; this.p = p; this.p; // OK } diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index 7ab6cb2cecaf4..83152355a137b 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -35,7 +35,8 @@ var M; var O = (function (_super) { __extends(O, _super); function O() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return O; }(M.N)); diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index 5a455edc082a7..ef584afd6e9e4 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -31,7 +31,8 @@ var StringTreeCollectionBase = (function () { var StringTreeCollection = (function (_super) { __extends(StringTreeCollection, _super); function StringTreeCollection() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return StringTreeCollection; }(StringTreeCollectionBase)); diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index ed9497c8729c0..f7405cfd38ac3 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -16,7 +16,8 @@ var D = (function () { var v = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(D)); diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index 508dc039387e9..b91d541361129 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -15,14 +15,16 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(class_1, _super); function class_1() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.c = 3; } return class_1; }((function (_super) { __extends(class_2, _super); function class_2() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.b = 2; } return class_2; diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index c4da02cb3219d..8673e48d65f8f 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -22,7 +22,8 @@ var A = (function () { var C = (function (_super) { __extends(class_1, _super); function class_1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return class_1; }(A)); diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index ace4cf19feef9..2a01c1aa8b3d2 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -20,70 +20,80 @@ var __extends = (this && this.__extends) || function (d, b) { var C1 = (function (_super) { __extends(C1, _super); function C1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C1; }(Object)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(Function)); var C3 = (function (_super) { __extends(C3, _super); function C3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C3; }(String)); var C4 = (function (_super) { __extends(C4, _super); function C4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C4; }(Boolean)); var C5 = (function (_super) { __extends(C5, _super); function C5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C5; }(Number)); var C6 = (function (_super) { __extends(C6, _super); function C6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C6; }(Date)); var C7 = (function (_super) { __extends(C7, _super); function C7() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C7; }(RegExp)); var C8 = (function (_super) { __extends(C8, _super); function C8() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C8; }(Error)); var C9 = (function (_super) { __extends(C9, _super); function C9() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C9; }(Array)); var C10 = (function (_super) { __extends(C10, _super); function C10() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C10; }(Array)); diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index 8073271b5eac1..4218bfbea98f4 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -47,7 +47,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); @@ -66,7 +67,8 @@ var C2 = (function () { var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(C2)); diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index a41bb14451aad..031253a19ade2 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -68,14 +68,16 @@ var __extends = (this && this.__extends) || function (d, b) { var D0 = (function (_super) { __extends(D0, _super); function D0() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D0; }(Base)); var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.call(this, "abc", "def"); + var _this; + _this = _super.call(this, "abc", "def") || this; this.x = "x"; this.y = "y"; } @@ -84,8 +86,9 @@ var D1 = (function (_super) { var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.call(this, 10); - _super.call(this, 10, 20); + var _this; + _this = _super.call(this, 10) || this; + _this = _super.call(this, 10, 20) || this; this.x = 1; this.y = 2; } @@ -94,7 +97,8 @@ var D2 = (function (_super) { var D3 = (function (_super) { __extends(D3, _super); function D3() { - _super.call(this, "abc", 42); + var _this; + _this = _super.call(this, "abc", 42) || this; this.x = "x"; this.y = 2; } @@ -104,7 +108,8 @@ var D3 = (function (_super) { var D4 = (function (_super) { __extends(D4, _super); function D4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D4; }(getBase())); @@ -112,7 +117,8 @@ var D4 = (function (_super) { var D5 = (function (_super) { __extends(D5, _super); function D5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D5; }(getBadBase())); diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index c46e3c5ddbe85..d33e6b4edefd7 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -27,49 +27,56 @@ function foo() { var C1 = (function (_super) { __extends(C1, _super); function C1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C1; }(undefined)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(true)); var C3 = (function (_super) { __extends(C3, _super); function C3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C3; }(false)); var C4 = (function (_super) { __extends(C4, _super); function C4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C4; }(42)); var C5 = (function (_super) { __extends(C5, _super); function C5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C5; }("hello")); var C6 = (function (_super) { __extends(C6, _super); function C6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C6; }(x)); var C7 = (function (_super) { __extends(C7, _super); function C7() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C7; }(foo)); diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index fa6f0357b0dc1..d6188aaf988c6 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -12,14 +12,16 @@ var __extends = (this && this.__extends) || function (d, b) { var C1 = (function (_super) { __extends(C1, _super); function C1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C1; }(null)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }((null))); diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 8ecad9c24a57c..c23683470d037 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -24,28 +24,32 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(number)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(string)); var C3 = (function (_super) { __extends(C3, _super); function C3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C3; }(boolean)); var C4 = (function (_super) { __extends(C4, _super); function C4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C4; }(Void)); @@ -58,28 +62,32 @@ void {}; var C5 = (function (_super) { __extends(C5, _super); function C5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C5; }(Null)); var C5a = (function (_super) { __extends(C5a, _super); function C5a() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C5a; }(null)); var C6 = (function (_super) { __extends(C6, _super); function C6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C6; }(undefined)); var C7 = (function (_super) { __extends(C7, _super); function C7() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C7; }(Undefined)); @@ -90,7 +98,8 @@ var E; var C8 = (function (_super) { __extends(C8, _super); function C8() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C8; }(E)); diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index af76697796741..072dc8138c78b 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -20,7 +20,8 @@ void {}; var C5a = (function (_super) { __extends(C5a, _super); function C5a() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C5a; }(null)); diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index 17d888834ec10..b5cf4ae13820e 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -23,7 +23,8 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(M.C)); diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index 4f1d872e75339..d1ee8b48b3a23 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -24,7 +24,8 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(M.C)); diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index 0805389f2684e..0dcf4103f49da 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -37,7 +37,8 @@ exports.b = { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -62,7 +63,8 @@ exports.a = { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index 80b4b7c175d56..f1a695c0b2ac4 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -33,7 +33,8 @@ var Foo; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index 4c593761f0099..f754e140d37df 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -23,7 +23,8 @@ var Foo; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index 8b4663ad2cb31..584b31b7e8e8e 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -25,14 +25,16 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(I)); // error var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }({ foo: string })); // error @@ -40,7 +42,8 @@ var x; var C3 = (function (_super) { __extends(C3, _super); function C3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C3; }(x)); // error @@ -51,7 +54,8 @@ var M; var C4 = (function (_super) { __extends(C4, _super); function C4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C4; }(M)); // error @@ -59,14 +63,16 @@ function foo() { } var C5 = (function (_super) { __extends(C5, _super); function C5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C5; }(foo)); // error var C6 = (function (_super) { __extends(C6, _super); function C6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C6; }([])); // error diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index 6aceb0ffebf2a..e01e90d512d68 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -12,14 +12,16 @@ var __extends = (this && this.__extends) || function (d, b) { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }({ foo: string })); // error var C6 = (function (_super) { __extends(C6, _super); function C6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C6; }([])); // error diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index b324f7382d820..7047eaad658c2 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -17,7 +17,8 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return A; }(Comparable)); @@ -29,7 +30,8 @@ var B = (function () { var A2 = (function (_super) { __extends(A2, _super); function A2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return A2; }(Comparable2)); diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index 69e63f925707c..64d519d6952b7 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -20,7 +20,8 @@ function factory(a) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(factory(A))); diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index 454154887003f..ced164bca102f 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -24,21 +24,24 @@ var __extends = (this && this.__extends) || function (d, b) { var C1 = (function (_super) { __extends(C1, _super); function C1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C1; }(M.I1)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(M.I2)); var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(Mod.Nested.I)); diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index 279d0ad6899da..654cd35c400e7 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -14,21 +14,24 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(C)); // error var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(D)); // error var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E; }(E)); // error diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index f8ea40ee69ccc..ae5852d91f9a1 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -20,42 +20,48 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(E)); // error var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E; }(D)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(E2)); // error var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(C2)); var E2 = (function (_super) { __extends(E2, _super); function E2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E2; }(D2)); diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index 269edb851e9fd..63eeb5bc17840 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -31,7 +31,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(N.E)); // error @@ -40,7 +41,8 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); @@ -51,7 +53,8 @@ var N; var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E; }(M.D)); @@ -62,7 +65,8 @@ var O; var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(Q.E2)); // error @@ -71,7 +75,8 @@ var O; var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(C2)); @@ -82,7 +87,8 @@ var O; var E2 = (function (_super) { __extends(E2, _super); function E2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E2; }(P.D2)); diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index 2d2cf938156fb..4e67909f2d3be 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -27,7 +27,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(E)); // error @@ -40,7 +41,8 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); @@ -53,7 +55,8 @@ var __extends = (this && this.__extends) || function (d, b) { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E; }(D)); @@ -66,7 +69,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(E2)); // error @@ -79,7 +83,8 @@ var __extends = (this && this.__extends) || function (d, b) { var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(C2)); @@ -92,7 +97,8 @@ var __extends = (this && this.__extends) || function (d, b) { var E2 = (function (_super) { __extends(E2, _super); function E2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E2; }(D2)); diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index 61db0a41a5ca2..a185f6cf40a51 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -22,7 +22,8 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index afb2be21c686f..3ff1c92a56e4c 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -21,7 +21,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.call(this); + var _this; + _this = _super.call(this) || this; return Object.create(null); } return C; @@ -29,6 +30,7 @@ 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 ae2f73cadc182..a7f4a4bb9d951 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -25,7 +25,8 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index 00cd35693f132..519074358cc7b 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -16,7 +16,8 @@ var x = new foo(); // can be used as a constructor function var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(foo)); // error, cannot extend it though diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js index 7f85e4e25d731..d3134a97ccd4f 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -17,7 +17,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index 09cdd5c779bb2..d525fb8a6ad07 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -33,7 +33,8 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C2.prototype.foo = function () { return 1; diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index b47514b1286be..3257e51b5b883 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -37,7 +37,8 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(A)); diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index 32ae1ef3e8824..f0b8698c64d3d 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -40,7 +40,8 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(A)); diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index 923ac9c98299d..bf5d0141a1973 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -42,7 +42,8 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(A)); diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index a807590749ef5..f1929cdc798d0 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -47,7 +47,8 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(A)); diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index 39fb844613e93..ab825abcd3185 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -24,7 +24,8 @@ var C123 = (function () { var D123 = (function (_super) { __extends(D123, _super); function D123() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D123; }(C123)); diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index e6e7a1eaf427b..11b0c5e3ae2dc 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -11,14 +11,16 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var A = (function (_super) { __extends(A, _super); function A() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return A; }(A)); diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index b51488dbe1e2d..6caa97781dd98 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -29,14 +29,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index ec49320b4be5c..49b2a428e069a 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -28,7 +28,8 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } A.prototype.foo = function () { this.bar(); }; return A; diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js index d937197fad534..1381df2797d04 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -35,7 +35,8 @@ var baz = (function () { var foo = (function (_super) { __extends(foo, _super); function foo() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return foo; }(baz)); diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index 0e3897a4f466c..7898ae8a2b2e8 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -33,7 +33,8 @@ var A = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(A)); diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index 72fd4af1eedac..c5c506d1af681 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -29,7 +29,8 @@ var __extends = (this && this.__extends) || function (d, b) { var SubText = (function (_super) { __extends(SubText, _super); function SubText(text, span) { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return SubText; }(TextBase)); diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index b708489c518fb..d9e4c3f148208 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -33,7 +33,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B(x, data) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; this.data = data; } return B; @@ -41,7 +42,8 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C(x) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; } return C; }(A)); diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 581575d0d468b..7b13fa1bf4c48 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -157,7 +157,8 @@ var D = (function () { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.p1 = 0; } return E; @@ -165,34 +166,38 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { + var _this; } // ERROR - super call required return F; }(E)); var G = (function (_super) { __extends(G, _super); function G() { - _super.call(this); + var _this; + _this = _super.call(this) || this; this.p1 = 0; } // NO ERROR return G; }(D)); var H = (function () { function H() { - _super.call(this); + _this = _super.call(this) || this; } // ERROR - no super call allowed return H; }()); var I = (function (_super) { __extends(I, _super); function I() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } // ERROR - no super call allowed return I; }(Object)); var J = (function (_super) { __extends(J, _super); function J(p1) { - _super.call(this); // NO ERROR + var _this; + _this = _super.call(this) || this; // NO ERROR this.p1 = p1; } return J; @@ -200,16 +205,18 @@ var J = (function (_super) { var K = (function (_super) { __extends(K, _super); function K(p1) { + var _this; this.p1 = p1; var i = 0; - _super.call(this); + _this = _super.call(this) || this; } return K; }(G)); var L = (function (_super) { __extends(L, _super); function L(p1) { - _super.call(this); // NO ERROR + var _this; + _this = _super.call(this) || this; // NO ERROR this.p1 = p1; } return L; @@ -217,9 +224,10 @@ var L = (function (_super) { var M = (function (_super) { __extends(M, _super); function M(p1) { + var _this; this.p1 = p1; var i = 0; - _super.call(this); + _this = _super.call(this) || this; } return M; }(G)); diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index e94a47005068c..6ff5ae2ac5b2c 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -54,7 +54,8 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(Base)); @@ -69,7 +70,8 @@ var Base2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(Base2)); @@ -80,7 +82,8 @@ var d2 = new D(1); // ok var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(Base2)); @@ -90,7 +93,8 @@ var d4 = new D(1); // ok var D3 = (function (_super) { __extends(D3, _super); function D3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D3; }(Base2)); diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index 04dcfa2325c20..6bb9387f67388 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -75,7 +75,8 @@ var NonGeneric; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C2)); @@ -103,7 +104,8 @@ var Generics; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C2)); diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 2b2e01e59df10..fb07eb3d0b232 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -48,7 +48,8 @@ C.g = function () { return ''; }; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.method = function () { // No errors diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 327adead6b89e..cd23c22023172 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -45,7 +45,8 @@ var r3 = r.foo; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index a8a440fa17d2a..d4f6bb11ca9ba 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -136,7 +136,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return b; }(a)); @@ -161,7 +162,8 @@ var m2; var c = (function (_super) { __extends(c, _super); function c() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return c; }(b)); @@ -177,7 +179,8 @@ var m2; var c = (function (_super) { __extends(c, _super); function c() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return c; }(m1.b)); diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index 7e6f26ad59103..dbbbe340ba7b5 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -44,7 +44,8 @@ var Shape; var Path = (function (_super) { __extends(Path, _super); function Path() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Path; }(Shape)); diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index fc64a8012eeb9..eaf031c2571c6 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -68,7 +68,8 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(b.prototype, "prop2", { get: function () { @@ -88,7 +89,8 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(c.prototype, "prop2", { get: function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index b6e7cb121d67e..b961b8fa4a5fa 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -42,7 +42,8 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.call(this); + var _this; + _this = _super.call(this) || this; function _super() { } } @@ -51,7 +52,8 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - _super.call(this); + var _this; + _this = _super.call(this) || this; var x = function () { function _super() { } diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js index 14b8bf4669706..14965b53abdfe 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -50,7 +50,8 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.prototype.foo = function () { function _super() { @@ -63,7 +64,8 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } c.prototype.foo = function () { var x = function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index 2af7a6a870e8c..da4175fe5c711 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -40,7 +40,8 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this; + _this = _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 6887a22ae204d..55db3a5e62536 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -58,7 +58,8 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(b.prototype, "prop2", { get: function () { @@ -76,7 +77,8 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(c.prototype, "prop2", { get: function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index d3b5e7a20306f..b3ef300076262 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -36,7 +36,8 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.call(this); + var _this; + _this = _super.call(this) || this; var _super = 10; // Should be error } return b; @@ -44,7 +45,8 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - _super.call(this); + var _this; + _this = _super.call(this) || this; var x = function () { var _super = 10; // Should be error }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index 4553608756df1..c5bb6ebcd0163 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -36,7 +36,8 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.prototype.foo = function () { var _super = 10; // Should be error @@ -46,7 +47,8 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } c.prototype.foo = function () { var x = function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index df5d812cf54d9..598bb5b6e8568 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -38,7 +38,8 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this; + _this = _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 2db90d8b02663..5501b3e2df439 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -27,7 +27,8 @@ var base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Foo.prototype.x = function () { console.log(_super); // Error as this doesnt not resolve to user defined _super diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index 29b5ad3b496ee..9909ca512ce90 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -94,7 +94,8 @@ var Foo = (function () { var Foo2 = (function (_super) { __extends(Foo2, _super); function Foo2(_super) { - _super.call(this); + var _this; + _this = _super.call(this) || this; this.prop4 = { doStuff: function (_super) { } @@ -123,7 +124,8 @@ var Foo2 = (function (_super) { var Foo4 = (function (_super) { __extends(Foo4, _super); function Foo4(_super) { - _super.call(this); + var _this; + _this = _super.call(this) || this; } Foo4.prototype.y = function (_super) { var _this = this; diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index 517c126ab449f..105fe8497671a 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -23,7 +23,8 @@ var Foo = (function () { var Foo2 = (function (_super) { __extends(Foo2, _super); function Foo2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Foo2.prototype.x = function () { var lambda = function (_super) { diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index f94a9fde5f252..6a8dd340a2066 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -44,14 +44,16 @@ var a = (function () { var b1 = (function (_super) { __extends(b1, _super); function b1(_super) { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return b1; }(a)); var b2 = (function (_super) { __extends(b2, _super); function b2(_super) { - _super.call(this); + var _this; + _this = _super.call(this) || this; this._super = _super; } return b2; @@ -59,14 +61,16 @@ var b2 = (function (_super) { var b3 = (function (_super) { __extends(b3, _super); function b3(_super) { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return b3; }(a)); var b4 = (function (_super) { __extends(b4, _super); function b4(_super) { - _super.call(this); + var _this; + _this = _super.call(this) || this; this._super = _super; } return b4; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index c71b0dcf1ddff..59b64e4a9bac4 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -34,7 +34,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.prototype.foo = function () { var _this = this; @@ -46,7 +47,8 @@ var b = (function (_super) { var b2 = (function (_super) { __extends(b2, _super); function b2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b2.prototype.foo = function () { var _this = this; diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index 42df3cca3893b..860c0b90e4839 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -227,7 +227,8 @@ var c2 = (function () { var c3 = (function (_super) { __extends(c3, _super); function c3() { - _super.call(this, 10); + var _this; + _this = _super.call(this, 10) || this; } /** c3 f1*/ c3.prototype.f1 = function () { @@ -258,7 +259,8 @@ c2_i = c3_i; var c4 = (function (_super) { __extends(c4, _super); function c4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return c4; }(c2)); diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index 0de25c1501337..fb7a811cba3e0 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -227,14 +227,16 @@ var Base = (function () { var A2 = (function (_super) { __extends(A2, _super); function A2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return A2; }(Base)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index 4185af60dbc9f..675235ae3241c 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -182,7 +182,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index 90c67439773a7..ceb386b3e141e 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -182,7 +182,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index 736b57e08bacc..03494b4f88d1f 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -125,7 +125,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index ca7eea70ad651..ee8185802d4c7 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -163,7 +163,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index c64e33827c58e..5a36f91c7ca23 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -163,7 +163,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index dc7a12eecdc94..f23588dcbc5d7 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -273,7 +273,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index d4be6df98dd05..cc6fe9ce64068 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -235,7 +235,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index ee5ad2fbd076c..d401defc2ed60 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -121,7 +121,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index 79e4bfd0bbfcb..b4b531b8084cf 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -178,7 +178,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index 31c0dd3c7c557..69f46e2ccd207 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -178,7 +178,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index 5decd7a21fb09..171f21e77fcfa 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -92,7 +92,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -114,7 +115,8 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A2)); diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index 46974055171c9..523002e5b571e 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -57,7 +57,8 @@ var __extends = (this && this.__extends) || function (d, b) { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived.createEmpty = function () { var item = new Derived(); diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js index 3d885d3eef12c..1201dcf3d3de7 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -14,7 +14,8 @@ var __extends = (this && this.__extends) || function (d, b) { var S18 = (function (_super) { __extends(S18, _super); function S18() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return S18; }(S18)); diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index a55c068d4a422..2057d63b38fac 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -197,7 +197,8 @@ value; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.call(this); + var _this; + _this = _super.call(this) || this; _super.prototype. *= value; _super.prototype. += value; } diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index 16500b823b8f6..ef29163eda65d 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -139,7 +139,8 @@ _a = Math.pow(['', ''], value), '' = _a[0], '' = _a[1]; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.call(this); + var _this; + _this = _super.call(this) || this; (_a = _super.prototype). = Math.pow(_a., value); var _a; } diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index 24cfe77d93cdf..00186f40a2817 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -25,7 +25,8 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 b03dd285ced24..afc0e20eca9e1 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -30,7 +30,8 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 41a20ac6477f3..6b75da57e9af1 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -27,7 +27,8 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 bdef47165b19f..3c89ecd50c068 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -19,8 +19,9 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } - C.prototype[(_super.call(this), "prop")] = function () { }; + C.prototype[(_this = _super.call(this) || this, "prop")] = function () { }; return C; }(Base)); diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index ed15bbf0145cf..aaac258504cdc 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -24,9 +24,10 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.call(this); + var _this; + _this = _super.call(this) || this; var obj = (_a = {}, - _a[(_super.call(this), "prop")] = function () { }, + _a[(_this = _super.call(this) || this, "prop")] = function () { }, _a); var _a; } diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index a900fd44c677e..c31d873ffb942 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -29,13 +29,14 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.call(this); + var _this; + _this = _super.call(this) || this; (function () { var obj = (_a = {}, // Ideally, we would capture this. But the reference is // illegal, and not capturing this is consistent with //treatment of other similar violations. - _a[(_super.call(this), "prop")] = function () { }, + _a[(_this = _super.call(_this) || _this, "prop")] = function () { }, _a); var _a; }); diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 2e38e2a131f14..7b803e9c98793 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -32,7 +32,8 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 c79a4d8d6d10a..293d017734ec3 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -36,7 +36,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 78e20a7d6a3d4..c990298c4ac76 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -40,7 +40,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 9c7482a471393..f5a31fffabbf8 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -41,7 +41,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(D.prototype, "set1", { set: function (p) { }, diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index 3514965f1cebc..a6d00d847f32a 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -63,7 +63,8 @@ var X = (function () { var A = (function (_super) { __extends(A, _super); function A() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return A; }(X)); @@ -71,7 +72,8 @@ var A = (function (_super) { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(X)); diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 8780c92fc1e80..58b050c5ebeef 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -39,7 +39,8 @@ var X = (function () { var A = (function (_super) { __extends(A, _super); function A() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return A; }(X)); @@ -47,7 +48,8 @@ var A = (function (_super) { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(X)); diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 09ff39f582e0b..934c7eceb0e5b 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -28,7 +28,8 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -36,7 +37,8 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -44,7 +46,8 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived3.prototype.biz = function () { }; return Derived3; diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index 37c1b1737cd99..217cf23f9cb62 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -29,7 +29,8 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -37,7 +38,8 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -45,7 +47,8 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived3.prototype.biz = function () { }; return Derived3; diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index 4fd63cf60d0d8..511c293d41736 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -40,7 +40,8 @@ var GenericBase = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(GenericBase)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index 88f35f53b175d..0e14e958b284c 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -84,21 +84,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index 96318a0d61604..cb2cadb76987d 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -129,21 +129,24 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index 171c4bc6210fe..25c6983911784 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -74,21 +74,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index 26757c43defce..dcd972d3a971b 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -64,21 +64,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index ae1d0d904454b..69fdebe8f5cf4 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -67,21 +67,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 1d533506e1531..3345708ddaa9c 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -29,7 +29,8 @@ var Super = (function () { var Sub = (function (_super) { __extends(Sub, _super); function Sub(options) { - _super.call(this, options.value); + var _this; + _this = _super.call(this, options.value) || this; this.options = options; } return Sub; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index d06faa80f2004..b16721d0accf3 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -33,14 +33,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index 1c3d6bf16d0f4..a235e2555f3b0 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -47,7 +47,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(x) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; } return Derived; }(Base)); @@ -55,7 +56,8 @@ var Derived2 = (function (_super) { __extends(Derived2, _super); // ok, not enforcing assignability relation on this function Derived2(x) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; return 1; } return Derived2; diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index 960b76f52c446..956e8cd2e0d2e 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -47,7 +47,8 @@ var NonGeneric; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); @@ -66,7 +67,8 @@ var Generic; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index 76481ec1bc691..a0ed6d890d4f8 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -40,7 +40,8 @@ var FooBase = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; } Foo.prototype.bar1 = function () { }; return Foo; diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index 61f0d50db03af..7bc7989f7a316 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -31,6 +31,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { + var _this; } Foo.prototype.bar1 = function () { }; return Foo; diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index 905c12e07e34b..1b91e8a131a90 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -525,7 +525,8 @@ method2(); var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.method2 = function () { return this.method1(2); diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index 5775e0f064dbf..365e17afc9b5e 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -28,14 +28,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index 29bb48e797069..7be8079cfd9f2 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -29,14 +29,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index 1d84d74e5902e..102562a841ae5 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -26,14 +26,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index c385eff83d5e7..5fafe95c1a8f6 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -25,7 +25,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index e9081acab55ed..58bff801774b1 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -12,7 +12,8 @@ var __extends = (this && this.__extends) || function (d, b) { var ExtendsNull = (function (_super) { __extends(ExtendsNull, _super); function ExtendsNull() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ExtendsNull; }(null)); diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index 4b9535cd2c340..d58dcd1f536f4 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -23,7 +23,8 @@ var X = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(X)); diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index 117bb6a7bd5d9..2f68300a4bf8c 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -26,7 +26,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index 0974f9d7b3692..2ed404342d733 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -91,7 +91,8 @@ exports.g = C.F5(); var h = (function (_super) { __extends(h, _super); function h() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return h; }(C.A)); diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index a4636d829939e..4ccc090f4f240 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -58,7 +58,8 @@ var templa; var AbstractElementController = (function (_super) { __extends(AbstractElementController, _super); function AbstractElementController() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return AbstractElementController; }(templa.mvc.AbstractController)); @@ -78,7 +79,8 @@ var templa; var AbstractCompositeElementController = (function (_super) { __extends(AbstractCompositeElementController, _super); function AbstractCompositeElementController() { - _super.call(this); + var _this; + _this = _super.call(this) || this; this._controllers = []; } return AbstractCompositeElementController; diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index 4ac08f97a527c..c9c569f86762c 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -35,7 +35,8 @@ var X; var W = (function (_super) { __extends(W, _super); function W() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return W; }(A.B.Base.W)); @@ -54,7 +55,8 @@ var X; var W = (function (_super) { __extends(W, _super); function W() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return W; }(X.Y.base.W)); diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index 6dfce6e8e6334..3681f9fa859ee 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -45,7 +45,8 @@ var A; var ContextMenu = (function (_super) { __extends(ContextMenu, _super); function ContextMenu() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ContextMenu; }(B.EventManager)); diff --git a/tests/baselines/reference/declarationEmitThisPredicates01.js b/tests/baselines/reference/declarationEmitThisPredicates01.js index d05b5c46dad09..0b364e90e45b7 100644 --- a/tests/baselines/reference/declarationEmitThisPredicates01.js +++ b/tests/baselines/reference/declarationEmitThisPredicates01.js @@ -28,7 +28,8 @@ exports.C = C; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js index e34dcc9810fc4..aea36311add1d 100644 --- a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js +++ b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js @@ -28,7 +28,8 @@ exports.C = C; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/declarationEmit_expressionInExtends.js b/tests/baselines/reference/declarationEmit_expressionInExtends.js index 061042aa34b5f..9fbb3a4bf6394 100644 --- a/tests/baselines/reference/declarationEmit_expressionInExtends.js +++ b/tests/baselines/reference/declarationEmit_expressionInExtends.js @@ -29,7 +29,8 @@ var Q = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(x)); diff --git a/tests/baselines/reference/declarationEmit_expressionInExtends2.js b/tests/baselines/reference/declarationEmit_expressionInExtends2.js index da0478e26d053..d74f9361e282f 100644 --- a/tests/baselines/reference/declarationEmit_expressionInExtends2.js +++ b/tests/baselines/reference/declarationEmit_expressionInExtends2.js @@ -29,7 +29,8 @@ function getClass(c) { var MyClass = (function (_super) { __extends(MyClass, _super); function MyClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyClass; }(getClass(2))); diff --git a/tests/baselines/reference/declarationEmit_expressionInExtends3.js b/tests/baselines/reference/declarationEmit_expressionInExtends3.js index 10ef42d68388d..5b7754dff64bb 100644 --- a/tests/baselines/reference/declarationEmit_expressionInExtends3.js +++ b/tests/baselines/reference/declarationEmit_expressionInExtends3.js @@ -70,7 +70,8 @@ function getExportedClass(c) { var MyClass = (function (_super) { __extends(MyClass, _super); function MyClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyClass; }(getLocalClass(undefined))); @@ -78,7 +79,8 @@ exports.MyClass = MyClass; var MyClass2 = (function (_super) { __extends(MyClass2, _super); function MyClass2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyClass2; }(getExportedClass(undefined))); @@ -86,7 +88,8 @@ exports.MyClass2 = MyClass2; var MyClass3 = (function (_super) { __extends(MyClass3, _super); function MyClass3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyClass3; }(getExportedClass(undefined))); @@ -94,7 +97,8 @@ exports.MyClass3 = MyClass3; var MyClass4 = (function (_super) { __extends(MyClass4, _super); function MyClass4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyClass4; }(getExportedClass(undefined))); diff --git a/tests/baselines/reference/declarationEmit_expressionInExtends4.js b/tests/baselines/reference/declarationEmit_expressionInExtends4.js index 39ee7ce1e6909..d304422f03853 100644 --- a/tests/baselines/reference/declarationEmit_expressionInExtends4.js +++ b/tests/baselines/reference/declarationEmit_expressionInExtends4.js @@ -33,21 +33,24 @@ function getSomething() { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(getSomething())); var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(SomeUndefinedFunction())); var C3 = (function (_super) { __extends(C3, _super); function C3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C3; }(SomeUndefinedFunction)); diff --git a/tests/baselines/reference/declarationEmit_nameConflicts3.js b/tests/baselines/reference/declarationEmit_nameConflicts3.js index f1ea96973b80e..81236200ade93 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts3.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts3.js @@ -64,7 +64,8 @@ var M; var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E; }(C)); diff --git a/tests/baselines/reference/declarationEmit_protectedMembers.js b/tests/baselines/reference/declarationEmit_protectedMembers.js index 192f0647ed6df..e118e164dfce4 100644 --- a/tests/baselines/reference/declarationEmit_protectedMembers.js +++ b/tests/baselines/reference/declarationEmit_protectedMembers.js @@ -88,7 +88,8 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C2.prototype.f = function () { return _super.prototype.f.call(this) + this.x; @@ -102,7 +103,8 @@ var C2 = (function (_super) { var C3 = (function (_super) { __extends(C3, _super); function C3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C3.prototype.f = function () { return _super.prototype.f.call(this); diff --git a/tests/baselines/reference/declareDottedExtend.js b/tests/baselines/reference/declareDottedExtend.js index f1e9ea0b4deb0..f167928087d05 100644 --- a/tests/baselines/reference/declareDottedExtend.js +++ b/tests/baselines/reference/declareDottedExtend.js @@ -21,14 +21,16 @@ var ab = A.B; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(ab.C)); var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E; }(A.B.C)); diff --git a/tests/baselines/reference/decoratorOnClassConstructor2.js b/tests/baselines/reference/decoratorOnClassConstructor2.js index 5fc5501c32986..d50912fbeac59 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor2.js +++ b/tests/baselines/reference/decoratorOnClassConstructor2.js @@ -45,7 +45,8 @@ var _0_ts_2 = require("./0.ts"); var C = (function (_super) { __extends(C, _super); function C(prop) { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return C; }(_0_ts_1.base)); diff --git a/tests/baselines/reference/decoratorOnClassConstructor3.js b/tests/baselines/reference/decoratorOnClassConstructor3.js index 66946fab8bd6a..6f37ad9dea146 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor3.js +++ b/tests/baselines/reference/decoratorOnClassConstructor3.js @@ -48,7 +48,8 @@ var _0_2 = require("./0"); var C = (function (_super) { __extends(C, _super); function C(prop) { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return C; }(_0_1.base)); diff --git a/tests/baselines/reference/decoratorOnClassMethod12.js b/tests/baselines/reference/decoratorOnClassMethod12.js index 6e9b9763a3ab9..6d95c696176ed 100644 --- a/tests/baselines/reference/decoratorOnClassMethod12.js +++ b/tests/baselines/reference/decoratorOnClassMethod12.js @@ -32,7 +32,8 @@ var M; var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C.prototype.method = function () { }; return C; diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index 2e6ac2c793482..75901c708b35e 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -47,6 +47,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { + var _this; } return Derived; }(Base)); @@ -58,21 +59,24 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var r2 = function () { return _super.call(this); }; // error for misplaced super call (nested function) + var _this; + var r2 = function () { return _this = _super.call(_this) || _this; }; // error for misplaced super call (nested function) } return Derived2; }(Base2)); var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var r = function () { _super.call(this); }; // error + var _this; + var r = function () { _this = _super.call(this) || this; }; // error } return Derived3; }(Base2)); var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4() { - var r = _super.call(this); // ok + var _this; + var r = _this = _super.call(this) || this; // ok } return Derived4; }(Base2)); diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index 7dbb901362f97..6dcf8f3fd8358 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -38,7 +38,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived.prototype.x = function () { return 1; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index 0c7a21232e61c..2fe5906e74629 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -68,7 +68,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -89,7 +90,8 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index a44d4340b8f35..dc63ccb21d8ab 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -32,7 +32,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -45,7 +46,8 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index c81c6f048f51f..605ad6afa454d 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -32,7 +32,8 @@ var BaseClass = (function () { var DerivedClass = (function (_super) { __extends(DerivedClass, _super); function DerivedClass() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } DerivedClass.prototype._init = function () { }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index cd486152c1c78..7ab70d93ff281 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -29,7 +29,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -41,7 +42,8 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index 5b8af9e85bfe1..d3e3fe5d4c9ab 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -66,7 +66,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(a) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 5c7d73d5dfd1a..1f43469596a7a 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -94,7 +94,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(a) { - _super.call(this, a); + var _this; + _this = _super.call(this, a) || this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { @@ -131,7 +132,8 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index ebb675a26db2e..d678f5ce59f8a 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -103,14 +103,16 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1(a) { - _super.call(this, a); + var _this; + _this = _super.call(this, a) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2(a) { - _super.call(this, a); + var _this; + _this = _super.call(this, a) || this; } Derived2.prototype.b = function (a) { }; return Derived2; @@ -118,7 +120,8 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3(a) { - _super.call(this, a); + var _this; + _this = _super.call(this, a) || this; } Object.defineProperty(Derived3.prototype, "c", { get: function () { return x; }, @@ -130,7 +133,8 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4(a) { - _super.call(this, a); + var _this; + _this = _super.call(this, a) || this; } Object.defineProperty(Derived4.prototype, "c", { set: function (v) { }, @@ -142,21 +146,24 @@ var Derived4 = (function (_super) { var Derived5 = (function (_super) { __extends(Derived5, _super); function Derived5(a) { - _super.call(this, a); + var _this; + _this = _super.call(this, a) || this; } return Derived5; }(Base)); var Derived6 = (function (_super) { __extends(Derived6, _super); function Derived6(a) { - _super.call(this, a); + var _this; + _this = _super.call(this, a) || this; } return Derived6; }(Base)); var Derived7 = (function (_super) { __extends(Derived7, _super); function Derived7(a) { - _super.call(this, a); + var _this; + _this = _super.call(this, a) || this; } Derived7.s = function (a) { }; return Derived7; @@ -164,7 +171,8 @@ var Derived7 = (function (_super) { var Derived8 = (function (_super) { __extends(Derived8, _super); function Derived8(a) { - _super.call(this, a); + var _this; + _this = _super.call(this, a) || this; } Object.defineProperty(Derived8, "t", { get: function () { return x; }, @@ -176,7 +184,8 @@ var Derived8 = (function (_super) { var Derived9 = (function (_super) { __extends(Derived9, _super); function Derived9(a) { - _super.call(this, a); + var _this; + _this = _super.call(this, a) || this; } Object.defineProperty(Derived9, "t", { set: function (v) { }, @@ -188,7 +197,8 @@ var Derived9 = (function (_super) { var Derived10 = (function (_super) { __extends(Derived10, _super); function Derived10(a) { - _super.call(this, a); + var _this; + _this = _super.call(this, a) || this; } return Derived10; }(Base)); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index b8a15ee8b6c8f..eeaf80061af82 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -30,14 +30,16 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived1)); diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index b62f0d8f7d372..7839398551dc9 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -92,7 +92,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(a) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { @@ -129,7 +130,8 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index 147e6edbbb4e6..f2d8f72edfb7d 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -37,7 +37,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -49,7 +50,8 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index 8e5fa82cf0f24..f7afd6529c0a1 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -109,24 +109,27 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(y) { + var _this; var a = 1; - _super.call(this); // ok + _this = _super.call(this) || this; // ok } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2(y) { + var _this; this.y = y; var a = 1; - _super.call(this); // error + _this = _super.call(this) || this; // error } return Derived2; }(Base)); var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3(y) { - _super.call(this); // ok + var _this; + _this = _super.call(this) || this; // ok this.y = y; var a = 1; } @@ -135,16 +138,18 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4(y) { + var _this; this.a = 1; var b = 2; - _super.call(this); // error + _this = _super.call(this) || this; // error } return Derived4; }(Base)); var Derived5 = (function (_super) { __extends(Derived5, _super); function Derived5(y) { - _super.call(this); // ok + var _this; + _this = _super.call(this) || this; // ok this.a = 1; var b = 2; } @@ -153,26 +158,29 @@ var Derived5 = (function (_super) { var Derived6 = (function (_super) { __extends(Derived6, _super); function Derived6(y) { + var _this; this.a = 1; var b = 2; - _super.call(this); // error: "super" has to be called before "this" accessing + _this = _super.call(this) || this; // error: "super" has to be called before "this" accessing } return Derived6; }(Base)); var Derived7 = (function (_super) { __extends(Derived7, _super); function Derived7(y) { + var _this; this.a = 1; this.a = 3; this.b = 3; - _super.call(this); // error + _this = _super.call(this) || this; // error } return Derived7; }(Base)); var Derived8 = (function (_super) { __extends(Derived8, _super); function Derived8(y) { - _super.call(this); // ok + var _this; + _this = _super.call(this) || this; // ok this.a = 1; this.a = 3; this.b = 3; @@ -188,17 +196,19 @@ var Base2 = (function () { var Derived9 = (function (_super) { __extends(Derived9, _super); function Derived9(y) { + var _this; this.a = 1; this.a = 3; this.b = 3; - _super.call(this); // error + _this = _super.call(this) || this; // error } return Derived9; }(Base2)); var Derived10 = (function (_super) { __extends(Derived10, _super); function Derived10(y) { - _super.call(this); // ok + var _this; + _this = _super.call(this) || this; // ok this.a = 1; this.a = 3; this.b = 3; diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index 50408d3bee764..ad2dc22debf54 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -46,37 +46,38 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); - this.a = _super.call(this); + var _this; + _this = _super.apply(this, arguments) || this; + this.a = _this = _super.call(this) || this; } Derived.prototype.b = function () { - _super.call(this); + _this = _super.call(this) || this; }; Object.defineProperty(Derived.prototype, "C", { get: function () { - _super.call(this); + _this = _super.call(this) || this; return 1; }, set: function (v) { - _super.call(this); + _this = _super.call(this) || this; }, enumerable: true, configurable: true }); Derived.b = function () { - _super.call(this); + _this = _super.call(this) || this; }; Object.defineProperty(Derived, "C", { get: function () { - _super.call(this); + _this = _super.call(this) || this; return 1; }, set: function (v) { - _super.call(this); + _this = _super.call(this) || this; }, enumerable: true, configurable: true }); return Derived; }(Base)); -Derived.a = _super.call(this); +Derived.a = _this = _super.call(this) || this; diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 1c88306bf3add..a464970fe509d 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -42,14 +42,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.call(this, this); // ok + var _this; + _this = _super.call(this, this) || this; // ok } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2(a) { - _super.call(this, this); // error + var _this; + _this = _super.call(this, this) || this; // error this.a = a; } return Derived2; @@ -57,8 +59,8 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3(a) { - var _this = this; - _super.call(this, function () { return _this; }); // error + var _this; + _this = _super.call(this, function () { return _this; }) || this; // error this.a = a; } return Derived3; @@ -66,7 +68,8 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4(a) { - _super.call(this, function () { return this; }); // ok + var _this; + _this = _super.call(this, function () { return this; }) || this; // ok this.a = a; } return Derived4; diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index 38c465492e68b..0e88d3664c660 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -36,7 +36,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.foo = function () { }; // ok to drop parameters return D; @@ -44,7 +45,8 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 5d08905a60545..5a3f8f3cf57dd 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -36,7 +36,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.foo = function (x) { }; // ok to drop parameters return D; @@ -44,7 +45,8 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 be7e97a8fc599..f6aa6963795a7 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -36,7 +36,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.foo = function (x) { }; // ok to drop parameters return D; @@ -44,7 +45,8 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 0c70f03218ec5..8d18e311d8879 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -36,7 +36,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.foo = function () { }; // ok to drop parameters return D; @@ -44,7 +45,8 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 34af167011d0c..70885570373e5 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -91,7 +91,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(D.prototype, "X", { get: function () { @@ -119,7 +120,8 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(E.prototype, "X", { get: function () { return ''; }, diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 2c0775efc1930..24d43468dcf81 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -46,7 +46,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived.prototype.fn = function () { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index 540be97d165f8..a6b7710ec6dce 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -56,7 +56,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived.prototype.fn = function () { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 93d5b49fcd03d..3da7720b77e79 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -45,7 +45,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived.fn = function () { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index b58acc01082d8..57f474affe759 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -58,7 +58,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived.fn = function () { return ''; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index 479beebbbfeef..84028f1d3f2e5 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -41,7 +41,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.x = 1; this.y = 'hello'; } @@ -58,7 +59,8 @@ var Base2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.x = 2; this.y = null; } diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index 4dc35c5e006e1..6c3ce90d6f0ae 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -49,7 +49,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.x = 1; this.y = 'hello'; } @@ -68,7 +69,8 @@ var Base2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.x = 2; this.y = null; } diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index 3b0a673d37805..295fbac60e192 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -63,7 +63,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(y, z) { - _super.call(this, 2); + var _this; + _this = _super.call(this, 2) || this; this.b = ''; this.b = y; } @@ -72,7 +73,8 @@ var Derived = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.x = 1; this.y = 'hello'; } @@ -90,7 +92,8 @@ var Base2 = (function () { var D = (function (_super) { __extends(D, _super); function D(y, z) { - _super.call(this, 2); + var _this; + _this = _super.call(this, 2) || this; this.b = null; this.b = y; } @@ -99,7 +102,8 @@ var D = (function (_super) { var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.x = 2; this.y = null; } diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index b6103940b33b3..27947b4f05f19 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -39,7 +39,8 @@ var __extends = (this && this.__extends) || function (d, b) { var Red = (function (_super) { __extends(Red, _super); function Red() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Red.prototype.shade = function () { var _this = this; @@ -58,7 +59,8 @@ var Color = (function () { var Blue = (function (_super) { __extends(Blue, _super); function Blue() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Blue.prototype.shade = function () { var _this = this; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index 56daf4b7310d4..e31b18e11e71f 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -64,7 +64,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(D.prototype, "X", { get: function () { @@ -92,7 +93,8 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 2e0a561e846e8..4430ad5a31b82 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -34,7 +34,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived.prototype.foo = function (x) { return null; diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index cfbe44166c94e..f6415d8496553 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -39,7 +39,8 @@ var Derived = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index 2df6ce46b2c6b..a1f109ed49ea2 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -65,7 +65,8 @@ var Class = (function () { var SubClass = (function (_super) { __extends(SubClass, _super); function SubClass() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return SubClass; }(Class)); @@ -77,7 +78,8 @@ var D = (function () { var SubD = (function (_super) { __extends(SubD, _super); function SubD() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return SubD; }(D)); diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index 88ce3f1418b29..4e07d5c8655b7 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -28,9 +28,10 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B(x) { + var _this; "use strict"; 'someStringForEgngInject'; - _super.call(this); + _this = _super.call(this) || this; this.x = x; } return B; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index 920ad1f7bdacb..b6eabb2a418a7 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -30,9 +30,10 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { + var _this; "use strict"; 'someStringForEgngInject'; - _super.call(this); + _this = _super.call(this) || this; this.blub = 12; } return B; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index 3fa18140034df..0e866e98f4670 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -28,9 +28,10 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B(x) { + var _this; "use strict"; 'someStringForEgngInject'; - _super.call(this); + _this = _super.call(this) || this; this.x = x; this.blah = 2; } diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index 1350ed9d4c86e..4bb83a7c172a2 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -43,7 +43,8 @@ var User = (function () { var RegisteredUser = (function (_super) { __extends(RegisteredUser, _super); function RegisteredUser() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } RegisteredUser.prototype.f = function () { (function () { diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index 5c85d39e1ec20..2292f0a494ae9 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -14,7 +14,8 @@ var A = require(""); var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index 96f6c65b85c7b..7b05688b8c8de 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -30,7 +30,8 @@ var base = (function () { var derived = (function (_super) { __extends(derived, _super); function derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return derived; }(base)); diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 3e778535bb71b..765fdf083b53c 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -83,38 +83,38 @@ var __extends = (this && this.__extends) || function (d, b) { //super call in class constructor with no base type var NoBase = (function () { function NoBase() { - _super.call(this); + _this = _super.call(this) || this; //super call in class member initializer with no base type - this.p = _super.call(this); + this.p = _this = _super.call(this) || this; } //super call in class member function with no base type NoBase.prototype.fn = function () { - _super.call(this); + _this = _super.call(this) || this; }; Object.defineProperty(NoBase.prototype, "foo", { //super call in class accessor (get and set) with no base type get: function () { - _super.call(this); + _this = _super.call(this) || this; return null; }, set: function (v) { - _super.call(this); + _this = _super.call(this) || this; }, enumerable: true, configurable: true }); //super call in static class member function with no base type NoBase.fn = function () { - _super.call(this); + _this = _super.call(this) || this; }; Object.defineProperty(NoBase, "q", { //super call in static class accessor (get and set) with no base type get: function () { - _super.call(this); + _this = _super.call(this) || this; return null; }, set: function (n) { - _super.call(this); + _this = _super.call(this) || this; }, enumerable: true, configurable: true @@ -122,7 +122,7 @@ var NoBase = (function () { return NoBase; }()); //super call in static class member initializer with no base type -NoBase.k = _super.call(this); +NoBase.k = _this = _super.call(this) || this; var Base = (function () { function Base() { } @@ -132,8 +132,9 @@ var Derived = (function (_super) { __extends(Derived, _super); //super call with type arguments function Derived() { + var _this; _super.prototype..call(this); - _super.call(this); + _this = _super.call(this) || this; } return Derived; }(Base)); @@ -145,22 +146,23 @@ var OtherBase = (function () { var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; //super call in class member initializer of derived type - this.t = _super.call(this); + this.t = _this = _super.call(this) || this; } OtherDerived.prototype.fn = function () { //super call in class member function of derived type - _super.call(this); + _this = _super.call(this) || this; }; Object.defineProperty(OtherDerived.prototype, "foo", { //super call in class accessor (get and set) of derived type get: function () { - _super.call(this); + _this = _super.call(this) || this; return null; }, set: function (n) { - _super.call(this); + _this = _super.call(this) || this; }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index dbfbdb4694023..18c98868e937e 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -186,7 +186,8 @@ SomeBase.publicStaticMember = 0; var SomeDerived1 = (function (_super) { __extends(SomeDerived1, _super); function SomeDerived1() { - _super.call(this); + var _this; + _this = _super.call(this) || this; _super.prototype.publicMember = 1; } SomeDerived1.prototype.fn = function () { @@ -219,7 +220,8 @@ var SomeDerived1 = (function (_super) { var SomeDerived2 = (function (_super) { __extends(SomeDerived2, _super); function SomeDerived2() { - _super.call(this); + var _this; + _this = _super.call(this) || this; _super.prototype.privateMember = 1; } SomeDerived2.prototype.fn = function () { @@ -245,7 +247,8 @@ var SomeDerived2 = (function (_super) { var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } SomeDerived3.fn = function () { _super.publicStaticMember = 3; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index a7898810e1075..d3d275ff25b35 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -135,7 +135,8 @@ var testClass6 = (function () { var testClass7 = (function (_super) { __extends(testClass7, _super); function testClass7() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 c32865478e32b..88000a12bbe53 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -28,11 +28,12 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { + var _this; if (true) { - _super.call(this, 'a1', 'b1'); + _this = _super.call(this, 'a1', 'b1') || this; } else { - _super.call(this, 'a2', 'b2'); + _this = _super.call(this, 'a2', 'b2') || this; } } return B; diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index a722cce167033..0a6323630fb4b 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -102,8 +102,9 @@ var Bar = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y, z) { + var _this; if (z === void 0) { z = 0; } - _super.call(this, x); + _this = _super.call(this, x) || this; this.y = y; this.z = z; this.gar = 0; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 1881e6b8c878c..ebf779f7bba71 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -267,7 +267,8 @@ var SuperParent = (function () { var SuperChild = (function (_super) { __extends(SuperChild, _super); function SuperChild() { - _super.call(this, 1); + var _this; + _this = _super.call(this, 1) || this; } SuperChild.prototype.b = function () { _super.prototype.b.call(this, 'str'); @@ -314,7 +315,8 @@ var BaseClassWithConstructor = (function () { var ChildClassWithoutConstructor = (function (_super) { __extends(ChildClassWithoutConstructor, _super); function ChildClassWithoutConstructor() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ChildClassWithoutConstructor; }(BaseClassWithConstructor)); diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index 14662410a1405..6e30a1d7879e9 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -17,7 +17,8 @@ var __extends = (this && this.__extends) || function (d, b) { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar; }(M.Foo)); diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 0504bad39c7b0..439f74a9c9d0a 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -34,7 +34,8 @@ define(["require", "exports", "exportAssignmentOfGenericType1_0"], function (req var M = (function (_super) { __extends(M, _super); function M() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return M; }(q)); diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index a9ea4bf5eda00..b6eec928a071b 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -32,7 +32,8 @@ var Bbb = (function () { var Aaa = (function (_super) { __extends(Aaa, _super); function Aaa() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Aaa; }(Bbb)); diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index 446c6df9c94d9..508eea66500a7 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -37,7 +37,8 @@ var M; var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B)); @@ -48,7 +49,8 @@ var M; var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(M.B)); @@ -59,7 +61,8 @@ var N; var C3 = (function (_super) { __extends(C3, _super); function C3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C3; }(M.B)); diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index f7bd85d685c25..14f3d69ef3eb5 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -21,7 +21,8 @@ var N; var C4 = (function (_super) { __extends(C4, _super); function C4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C4; }(M.B)); @@ -32,7 +33,8 @@ var M; var C5 = (function (_super) { __extends(C5, _super); function C5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C5; }(B)); diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index e52e5b497acce..03bf54db78dba 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -28,7 +28,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.baz = function () { }; return D; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index 1f4f62a42ee82..50db54a05e9ba 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -33,7 +33,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.baz = function () { }; return D; diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js index d598389d0fa2a..6cab3a8c7f609 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -12,7 +12,8 @@ var __extends = (this && this.__extends) || function (d, b) { var derived = (function (_super) { __extends(derived, _super); function derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return derived; }(base)); diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index 6532603b73c50..c0cb5d4902327 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -31,7 +31,8 @@ var x = foo1; var y = (function (_super) { __extends(y, _super); function y() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return y; }(x)); diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index 20f43a948b895..6985657ced311 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -20,7 +20,8 @@ var CStatic; var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E; }(CStatic)); diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index 558e6d6ba5773..829b1ae1a3234 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -19,7 +19,8 @@ var x = A; var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 3785c7c58469e..9a2d4fb2adf5d 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -18,7 +18,8 @@ var x = new Foo(); // legal, considered a constructor function var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(Foo)); // error, could not find symbol Foo diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index 6542492e200cf..db2fcdbbf3660 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -51,7 +51,8 @@ var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return VisualizationModel; }(Backbone.Model)); @@ -67,7 +68,8 @@ var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index fb9a3f1237858..db11c06d78261 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -20,7 +20,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.baz = function () { }; return D; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index 9423789dd3538..f61317c2d5061 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -20,7 +20,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.baz = function () { }; return D; diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js index 3d5efcc1b1a64..68a2960b03f33 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -35,7 +35,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.bar = function () { return this; @@ -45,7 +46,8 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C.prototype.baz = function () { return this; diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index 5c097a68ccc3b..7176a27ebc999 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -126,7 +126,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 caec9bd1987ce..cca8e94dcab99 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -107,7 +107,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 aff01bc85655a..82910ff043543 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -68,7 +68,8 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(C)); diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 2dc6c8a1bc442..465ea54b73f5c 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -134,14 +134,16 @@ var AnotherClass = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index 6e37f929efef7..e26e49c1b7a24 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -236,7 +236,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -287,7 +288,8 @@ function f6() { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index 7485abe192735..c604461f32d1a 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -32,7 +32,8 @@ var EventBase = (function () { var StringEvent = (function (_super) { __extends(StringEvent, _super); function StringEvent() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 33d0e8c7e03e9..38a98a3f11496 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -32,7 +32,8 @@ var EventBase = (function () { var StringEvent = (function (_super) { __extends(StringEvent, _super); function StringEvent() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 e5488121d34eb..5c512883a1064 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -369,14 +369,16 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index 5aa43d78826a6..25dfb7ae72250 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -26,7 +26,8 @@ var BaseClass = (function () { var SubClass = (function (_super) { __extends(SubClass, _super); function SubClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } SubClass.prototype.Error = function () { var x = this._getValue1(); diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js index 3226f1cd6595b..e39353b6a7f38 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -35,7 +35,8 @@ var BaseCollection2 = (function () { var DataView2 = (function (_super) { __extends(DataView2, _super); function DataView2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 04d5bd2d99794..53c02a85113f0 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -122,14 +122,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index 509dd9a11360b..3835a4dd78728 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -46,14 +46,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index d3f18e0bfcb24..a16f8bcac685e 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -54,7 +54,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index acab51690d343..410675804af89 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -52,14 +52,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index 31b4cd181b97e..3fbb7c8a90117 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -46,7 +46,8 @@ var M; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(C1)); diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index f334da5262567..d14b70b631291 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -47,7 +47,8 @@ function B1() { return (function (_super) { __extends(class_1, _super); function class_1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return class_1; }(A)); @@ -57,7 +58,8 @@ var B2 = (function () { this.anon = (function (_super) { __extends(class_2, _super); function class_2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return class_2; }(A)); @@ -68,7 +70,8 @@ function B3() { return (function (_super) { __extends(Inner, _super); function Inner() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Inner; }(A)); @@ -77,14 +80,16 @@ function B3() { var K = (function (_super) { __extends(K, _super); function K() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return K; }(B1())); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }((new B2().anon))); @@ -92,7 +97,8 @@ var b3Number = B3(); var S = (function (_super) { __extends(S, _super); function S() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return S; }(b3Number)); diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index 9f71ace88a96c..a6c14b9ba0f65 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -14,14 +14,16 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return A; }(B)); var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(C)); diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 8f90c2fb6e437..0cc1f5867a24d 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -109,7 +109,8 @@ var PortalFx; var Validator = (function (_super) { __extends(Validator, _super); function Validator(message) { - _super.call(this, message); + var _this; + _this = _super.call(this, message) || this; } return Validator; }(Portal.Controls.Validators.Validator)); diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 394e6650e0a0e..2124f41417265 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -26,7 +26,8 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Bar.getFoo = function () { }; diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index 2bd33efb3dcfb..6f10b979c4a14 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -31,7 +31,8 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B)); diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index d2bf12667fc9e..4581ecc31ecca 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -52,7 +52,8 @@ var EndGate; var NumberTween = (function (_super) { __extends(NumberTween, _super); function NumberTween(from) { - _super.call(this, from); + var _this; + _this = _super.call(this, from) || this; } return NumberTween; }(Tweening.Tween)); diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index f61f57cb6157f..8f1e9c8365fea 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -51,7 +51,8 @@ var EndGate; var NumberTween = (function (_super) { __extends(NumberTween, _super); function NumberTween(from) { - _super.call(this, from); + var _this; + _this = _super.call(this, from) || this; } return NumberTween; }(Tweening.Tween)); diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index 906145850f15a..454bc77ae5b42 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -26,7 +26,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index 1c73075acc4f4..26749718d4366 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -26,7 +26,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index 170ef89abb2c4..e7c32cbe73ff7 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -24,7 +24,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index 3f1b6e21adc86..ccaf6fa88076d 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -29,7 +29,8 @@ var BaseEvent = (function () { var MyEvent = (function (_super) { __extends(MyEvent, _super); function MyEvent() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyEvent; }(BaseEvent)); @@ -41,7 +42,8 @@ var BaseEventWrapper = (function () { var MyEventWrapper = (function (_super) { __extends(MyEventWrapper, _super); function MyEventWrapper() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyEventWrapper; }(BaseEventWrapper)); diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index b7cca85561c63..8565859370503 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -28,7 +28,8 @@ var BaseEvent = (function () { var MyEvent = (function (_super) { __extends(MyEvent, _super); function MyEvent() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyEvent; }(BaseEvent)); @@ -40,7 +41,8 @@ var BaseEventWrapper = (function () { var MyEventWrapper = (function (_super) { __extends(MyEventWrapper, _super); function MyEventWrapper() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyEventWrapper; }(BaseEventWrapper)); diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index 73012f714e8af..e567e2a8042be 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -57,7 +57,8 @@ var TypeScript2; var PullTypeSymbol = (function (_super) { __extends(PullTypeSymbol, _super); function PullTypeSymbol() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PullTypeSymbol; }(PullSymbol)); diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index 61cb758c48e76..226fede58b693 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -59,7 +59,8 @@ var TypeScript; var PullTypeSymbol = (function (_super) { __extends(PullTypeSymbol, _super); function PullTypeSymbol() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this._elementType = null; } PullTypeSymbol.prototype.toString = function (scopeSymbol, useConstraintInName) { diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 02a51aed35de1..31d2b3976db6d 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -28,7 +28,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.bar = function () { return null; diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index 2c5bbf51d7f89..41a187edb6a12 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -40,7 +40,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.bar = function () { return 1; }; return B; @@ -48,7 +49,8 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C.prototype.baz = function () { return 1; }; return C; diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index 5bc7a943163d4..b776668f2e2e7 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -44,7 +44,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.g = function (x) { var a = x; diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index 5f4bb41a83fc9..761220ae11af5 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -38,7 +38,8 @@ var Bar = (function () { var BarExtended = (function (_super) { __extends(BarExtended, _super); function BarExtended() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return BarExtended; }(Bar)); diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index 7fe6c49d65efd..39468204a5af1 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -60,7 +60,8 @@ var g = function f(x) { var y; return y; }; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); @@ -76,7 +77,8 @@ var M; var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(M.E)); diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index 12be456a8a829..a41d459b445c4 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -55,14 +55,16 @@ var g = function f(x) { var y; return y; }; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(I)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(M.C)); diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index 1f016b401ede4..c0498b351e13b 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -31,7 +31,8 @@ define(["require", "exports"], function (require, exports) { var List = (function (_super) { __extends(List, _super); function List() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } List.prototype.Bar = function () { }; return List; @@ -46,7 +47,8 @@ define(["require", "exports"], function (require, exports) { var ListItem = (function (_super) { __extends(ListItem, _super); function ListItem() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ListItem; }(CollectionItem)); diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index e482f0d33d3c2..e3c50cfa8f7e8 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -160,14 +160,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 75762ffbb54de..af1e3be18ff26 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -177,7 +177,8 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(C)); diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 88671ce1ceeea..e27a9789cb149 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -34,16 +34,17 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var r2 = function () { return _super.call(this); }; - var r3 = function () { _super.call(this); }; - var r4 = function () { _super.call(this); }; + var _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; }; var r5 = { get foo() { - _super.call(this); + _this = _super.call(this) || this; return 1; }, set foo(v) { - _super.call(this); + _this = _super.call(this) || this; } }; } diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index ba3583c3051aa..0dfc867a2f77d 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -16,7 +16,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index 8fec5dc27da52..033d615019407 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -99,21 +99,24 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar; }(Foo)); var Bar2 = (function (_super) { __extends(Bar2, _super); function Bar2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar2; }(Foo)); var Bar3 = (function (_super) { __extends(Bar3, _super); function Bar3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar3; }(Foo)); @@ -128,28 +131,32 @@ var M; var Baz = (function (_super) { __extends(Baz, _super); function Baz() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Baz; }(Foo)); var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar; }(Foo)); var Bar2 = (function (_super) { __extends(Bar2, _super); function Bar2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar2; }(Foo)); var Bar3 = (function (_super) { __extends(Bar3, _super); function Bar3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar3; }(Foo)); @@ -165,14 +172,16 @@ var M2; var Baz = (function (_super) { __extends(Baz, _super); function Baz() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Baz; }(Foo)); var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar; }(Foo)); @@ -183,14 +192,16 @@ var M2; var Bar2 = (function (_super) { __extends(Bar2, _super); function Bar2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar2; }(Foo)); var Bar3 = (function (_super) { __extends(Bar3, _super); function Bar3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar3; }(Foo)); diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index 915e652056cc4..78cfb6b51b94e 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -75,28 +75,32 @@ var Bar4 = (function () { var Bar5 = (function (_super) { __extends(Bar5, _super); function Bar5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar5; }(Foo)); var Bar6 = (function (_super) { __extends(Bar6, _super); function Bar6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar6; }(Foo)); var Bar7 = (function (_super) { __extends(Bar7, _super); function Bar7() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar7; }(Foo)); var Bar8 = (function (_super) { __extends(Bar8, _super); function Bar8() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar8; }(Foo)); diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index 60e142dd5f71b..d9f40f83051d6 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -30,7 +30,8 @@ var Greeter = require("./importAsBaseClass_0"); var Hello = (function (_super) { __extends(Hello, _super); function Hello() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Hello; }(Greeter)); diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index f850b5cf17727..6641ef9d212f2 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -45,7 +45,8 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -93,7 +94,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersAmd.js b/tests/baselines/reference/importHelpersAmd.js index bb02cbf04173a..89fab70bdba62 100644 --- a/tests/baselines/reference/importHelpersAmd.js +++ b/tests/baselines/reference/importHelpersAmd.js @@ -32,7 +32,8 @@ define(["require", "exports", "tslib", "./a"], function (require, exports, tslib var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/importHelpersInIsolatedModules.js b/tests/baselines/reference/importHelpersInIsolatedModules.js index a5929bc152cf2..2a97d3d2d872e 100644 --- a/tests/baselines/reference/importHelpersInIsolatedModules.js +++ b/tests/baselines/reference/importHelpersInIsolatedModules.js @@ -45,7 +45,8 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -78,7 +79,8 @@ var A = (function () { var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index 8c5afc99ece8b..d5f8db60f9766 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -39,7 +39,8 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -87,7 +88,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 36bc0c5f76bee..5891922f9f296 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -37,7 +37,8 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -85,7 +86,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersOutFile.js b/tests/baselines/reference/importHelpersOutFile.js index cb50330c20c65..b4c2040aa7137 100644 --- a/tests/baselines/reference/importHelpersOutFile.js +++ b/tests/baselines/reference/importHelpersOutFile.js @@ -35,7 +35,8 @@ define("b", ["require", "exports", "tslib", "a"], function (require, exports, ts var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(a_1.A)); @@ -46,7 +47,8 @@ define("c", ["require", "exports", "tslib", "a"], function (require, exports, ts var C = (function (_super) { tslib_2.__extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(a_2.A)); diff --git a/tests/baselines/reference/importHelpersSystem.js b/tests/baselines/reference/importHelpersSystem.js index 3c1ee19ec48a9..552bd0ed4046b 100644 --- a/tests/baselines/reference/importHelpersSystem.js +++ b/tests/baselines/reference/importHelpersSystem.js @@ -51,7 +51,8 @@ System.register(["tslib", "./a"], function (exports_1, context_1) { B = (function (_super) { tslib_1.__extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index 316a94d9069b2..b4950b039f3e3 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -31,7 +31,8 @@ define(["require", "exports", "Foo"], function (require, exports, Error) { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar; }(Error)); diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index b9827d5bc9368..956e20a104520 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -31,7 +31,8 @@ var foo = require("./importUsedInExtendsList1_require"); var Sub = (function (_super) { __extends(Sub, _super); function Sub() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Sub; }(foo.Super)); diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index dd143da97e672..c8b910abb2dcd 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -42,7 +42,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -55,7 +56,8 @@ var F = (function () { var G = (function (_super) { __extends(G, _super); function G() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return G; }(F)); @@ -68,7 +70,8 @@ var H = (function () { var I = (function (_super) { __extends(I, _super); function I() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return I; }(H)); @@ -81,7 +84,8 @@ var J = (function () { var K = (function (_super) { __extends(K, _super); function K() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return K; }(J)); diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index 66d23a45b7267..c1c77ec5fc97e 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -11,14 +11,16 @@ var __extends = (this && this.__extends) || function (d, b) { var a = (function (_super) { __extends(a, _super); function a() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return a; }(b)); var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return b; }(a)); diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index 99ab918e63142..366ad1f0af54d 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -11,14 +11,16 @@ var __extends = (this && this.__extends) || function (d, b) { var a = (function (_super) { __extends(a, _super); function a() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return a; }(b)); var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return b; }(a)); diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index 6321f77d31fb0..9b145b55d0401 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -43,7 +43,8 @@ var Base = (function () { var A = (function (_super) { __extends(A, _super); function A() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return A; }(Base)); diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index f5bc099cb8dcf..5db269f7c58e2 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(T)); diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index 9462df7a3c3af..7f3e872245bb3 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -24,14 +24,16 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(B)); diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index 52fbfaffddeca..c4acea2226021 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -53,14 +53,16 @@ var B2 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1; }(B1)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(B2)); @@ -72,7 +74,8 @@ var N = (function () { var ND = (function (_super) { __extends(ND, _super); function ND() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ND; }(N)); @@ -86,7 +89,8 @@ var Good = (function () { var Baad = (function (_super) { __extends(Baad, _super); function Baad() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 c65155ee55ccc..f555d5bf69464 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -75,7 +75,8 @@ var Control = (function () { var Button = (function (_super) { __extends(Button, _super); function Button() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Button.prototype.select = function () { }; return Button; @@ -83,7 +84,8 @@ var Button = (function (_super) { var TextBox = (function (_super) { __extends(TextBox, _super); function TextBox() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } TextBox.prototype.select = function () { }; return TextBox; @@ -91,14 +93,16 @@ var TextBox = (function (_super) { var ImageBase = (function (_super) { __extends(ImageBase, _super); function ImageBase() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ImageBase; }(Control)); var Image1 = (function (_super) { __extends(Image1, _super); function Image1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Image1; }(Control)); diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index b416cf3fb93de..2ed366d7b8ac6 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -25,14 +25,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C.prototype.myMethod = function () { }; return C; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index 25a977531ca45..369c6b20a14d8 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -25,14 +25,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C.prototype.myMethod = function () { }; return C; diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index dfd055569257f..d884364d95c74 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -25,14 +25,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C.prototype.myMethod = function () { }; return C; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index b4efaa896211b..c1289f99a78e6 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -40,7 +40,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(b.prototype, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index 5044a8e03ac29..665b547154dbc 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -31,7 +31,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(b.prototype, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index 6ebdc336a6445..a9a92003542f3 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -26,7 +26,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(b.prototype, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index 3ddff027c1a01..17541ee163da1 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -37,7 +37,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.prototype.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index a6c3beea4efb3..a154d0426a974 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -28,7 +28,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.prototype.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index 94b602d29d9ee..be10895642e7d 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -23,7 +23,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.prototype.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index a8fc4d5a3dd71..6895077abda36 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -37,7 +37,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index 7d5cdb43e96c8..00c1093053bdc 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -26,7 +26,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index 648f1d1622e92..6cbb7ae7e8ca4 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -21,7 +21,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index 59675c56e5fd0..370e27514c183 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -21,7 +21,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 97464233027b9..a61b6bafabd24 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -40,7 +40,8 @@ var N; var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1; }(M.C1)); @@ -48,7 +49,8 @@ var N; var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(M.C2)); diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index 49145b010d4ba..9f71208e5dbcd 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -40,7 +40,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(b, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index 4a202b7649792..2e0c3dc90d0c1 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -31,7 +31,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(b, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index a0dd1177cfb45..95bf94572b15f 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -26,7 +26,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(b, "x", { get: function () { diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index 06f907371ea1b..25d75bea5afd2 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -37,7 +37,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index ea36c40480f0b..5c39c10e73854 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -32,7 +32,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index ae523d53d9bcf..c37caf8d53c93 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -28,7 +28,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index 93890bd829457..eb185d56d0bc3 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -23,7 +23,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index 4d0f2438459d2..0779cc10d3759 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -23,7 +23,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.x = function () { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index f2dfda4e48ffa..4934947233f05 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -23,7 +23,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } b.x = function () { return new b().x; diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index 0dc736a375d7a..27a65d513fd80 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -21,7 +21,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index 51c474430ad1f..7cfafdf1f9d65 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -21,7 +21,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index d138ac3eba8f7..1840a7829e8d6 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -36,7 +36,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index 3d3f550713ebc..8e498273b86cb 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -26,7 +26,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index e23917e40a411..c003eaa60b4e8 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -21,7 +21,8 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index 2d312d9859daa..ca6a379816fc2 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -32,7 +32,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index 0ad25b302f059..b323aefbd4839 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -53,14 +53,16 @@ var BaseBase2 = (function () { var Base = (function (_super) { __extends(Base, _super); function Base() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Base; }(BaseBase)); var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index 95b71069584ce..1de6f5f638aee 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -38,7 +38,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); @@ -53,7 +54,8 @@ var D; var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } E.bar = function () { return this.foo(); diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index 775afe869461b..f78378f0885a2 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -115,14 +115,16 @@ var Animal = (function () { var Mammal = (function (_super) { __extends(Mammal, _super); function Mammal() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Mammal; }(Animal)); var Giraffe = (function (_super) { __extends(Giraffe, _super); function Giraffe() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Giraffe; }(Mammal)); diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index a507a19a456ee..cf056e768d837 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -69,7 +69,8 @@ var NonGeneric; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); @@ -101,7 +102,8 @@ var Generic; var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index d72f29e93bf0d..e70dc7b64811f 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -21,7 +21,8 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(C1)); diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index 97be21377229d..de2789caa68a8 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -128,7 +128,8 @@ var A = (function () { var A1 = (function (_super) { __extends(A1, _super); function A1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return A1; }(A)); @@ -140,7 +141,8 @@ var A2 = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index 4d5e437630809..83ad38e64f034 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -47,7 +47,8 @@ var c = (function () { var d = (function (_super) { __extends(d, _super); function d() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } d.prototype.foo = function () { return null; diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js index 8138e7888b344..6111e7f8cee77 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -57,7 +57,8 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Bar.prototype.method = function (a) { return this.optionalProperty; diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js index 99f5b07696d57..499bd21990543 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -53,7 +53,8 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Bar.prototype.classBarMethod = function () { return this; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 43c7c6f6fa473..70ceaa8acd3bf 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -32,7 +32,8 @@ var Control = (function () { var Button = (function (_super) { __extends(Button, _super); function Button() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Button.prototype.select = function () { }; return Button; @@ -40,7 +41,8 @@ var Button = (function (_super) { var TextBox = (function (_super) { __extends(TextBox, _super); function TextBox() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } TextBox.prototype.select = function () { }; return TextBox; @@ -48,7 +50,8 @@ var TextBox = (function (_super) { var Image = (function (_super) { __extends(Image, _super); function Image() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Image; }(Control)); diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index e1bdbff85dd9d..5e6695dd20088 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -43,7 +43,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 1592b1a723b54..6f35c3f0e40ab 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -39,7 +39,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.x = 2; this.y = 3; } @@ -51,7 +52,8 @@ var D = (function (_super) { var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.x = ""; } D2.prototype.foo = function (x) { return x; }; diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index edfb33bfe1b4f..f3bfa4db6a586 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -64,21 +64,24 @@ var C3 = (function () { var C4 = (function (_super) { __extends(C4, _super); function C4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C4; }(C1)); var C5 = (function (_super) { __extends(C5, _super); function C5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C5; }(C2)); var C6 = (function (_super) { __extends(C6, _super); function C6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C6; }(C3)); @@ -90,7 +93,8 @@ var C7 = (function () { var C8 = (function (_super) { __extends(C8, _super); function C8() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C8; }(C7)); diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index cb3c22b52eb16..75bf3f9188442 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -95,7 +95,8 @@ var Y; var BB = (function (_super) { __extends(BB, _super); function BB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return BB; }(A)); @@ -110,7 +111,8 @@ var Y2; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(AA)); @@ -144,7 +146,8 @@ var YY; var BB = (function (_super) { __extends(BB, _super); function BB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return BB; }(A)); @@ -159,7 +162,8 @@ var YY2; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(AA)); @@ -193,7 +197,8 @@ var YYY; var BB = (function (_super) { __extends(BB, _super); function BB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return BB; }(A)); @@ -208,7 +213,8 @@ var YYY2; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(AA)); diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 0c90c6d002598..b4fbd6f369899 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -67,7 +67,8 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(C)); diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index 0f5b0d3e08dd5..1409b1c59a8b2 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -41,7 +41,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index 2d391a64fe72b..baf2d1de129cb 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -26,7 +26,8 @@ var ns = require("module"); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(module_2.c2.C)); diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 63c84090c9cb2..c149d4e3c3d72 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -35,7 +35,8 @@ var BaseComponent = require("BaseComponent"); var TestComponent = (function (_super) { __extends(TestComponent, _super); function TestComponent() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } TestComponent.prototype.render = function () { return ; diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index 822aa71efd047..16653cfb4f3a2 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -56,7 +56,8 @@ var Event = (function () { var ItemSetEvent = (function (_super) { __extends(ItemSetEvent, _super); function ItemSetEvent() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } ItemSetEvent.prototype.add = function (listener) { _super.prototype.add.call(this, listener); diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index 568379948bcf3..bfbf75b17310b 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -32,7 +32,8 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C(y, z, w) { - _super.call(this, y); + var _this; + _this = _super.call(this, y) || this; var x = 10 + w; var ll = x * w; } diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index a4f835c8669c7..96c9337817d4d 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -300,7 +300,8 @@ function f6() { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -308,7 +309,8 @@ function f6() { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B)); diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index 6292356faf553..19cd9ee463030 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -42,7 +42,8 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(C1)); diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index ce4b929c7f99c..53a8c983399f6 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -27,7 +27,8 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.foo = function () { }; return B; diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index 2ff9d3e660423..50108773a7071 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -47,7 +47,8 @@ define(["require", "exports", "./a"], function (require, exports, a_1) { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.setProtected = function () { }; diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index 72ac1c8a92882..fd0bea5494c80 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -61,7 +61,8 @@ var BaseClass = (function () { var Child = (function (_super) { __extends(Child, _super); function Child() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Child.prototype.method = function () { }; return Child; @@ -75,7 +76,8 @@ var ChildNoBaseClass = (function () { var Grandchild = (function (_super) { __extends(Grandchild, _super); function Grandchild() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Grandchild; }(ChildNoBaseClass)); diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index a7e341c31cebd..a3baa1920e3fe 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -50,14 +50,16 @@ var C2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E; }(C2)); diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index 3d9c4e1175ed8..e21ca151c8707 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -57,7 +57,8 @@ var C2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index 54834397b64c2..c1f4480241c19 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -15,7 +15,8 @@ var __extends = (this && this.__extends) || function (d, b) { var George = (function (_super) { __extends(George, _super); function George() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return George; }((function () { diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index 71f168463635a..598ddaef2de0d 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -13,7 +13,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(M)); diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index cd2df2633aed0..2f4ac430cc127 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -31,7 +31,8 @@ define(["require", "exports"], function (require, exports) { var Test1 = (function (_super) { __extends(Test1, _super); function Test1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Test1; }(C1)); diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index ec434286f4327..11053d76d2dfe 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -79,14 +79,16 @@ var A; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(AA)); var BB = (function (_super) { __extends(BB, _super); function BB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return BB; }(A)); @@ -130,7 +132,8 @@ var Y; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(AA)); @@ -138,7 +141,8 @@ var Y; var BB = (function (_super) { __extends(BB, _super); function BB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return BB; }(A)); diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index 26372bfb71827..80e9a469398af 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -57,28 +57,32 @@ var B2 = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B1)); var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1; }(B1)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(B2)); var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E; }(D1)); @@ -90,7 +94,8 @@ var N = (function () { var ND = (function (_super) { __extends(ND, _super); function ND() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ND; }(N)); @@ -104,7 +109,8 @@ var Good = (function () { var Baad = (function (_super) { __extends(Baad, _super); function Baad() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 c8cca671327e1..7c5ec66c6be58 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -25,7 +25,8 @@ var foo = (function () { var foo2 = (function (_super) { __extends(foo2, _super); function foo2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return foo2; }(foo)); diff --git a/tests/baselines/reference/noEmitHelpers.js b/tests/baselines/reference/noEmitHelpers.js index b2c26c6af75df..c3d27cac8a968 100644 --- a/tests/baselines/reference/noEmitHelpers.js +++ b/tests/baselines/reference/noEmitHelpers.js @@ -13,7 +13,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js index b9927ebf193e9..bbab8e9ccdd6e 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -19,7 +19,8 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar; }(Foo)); // Valid diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index cef2759e1d530..1901e16944749 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -61,7 +61,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.bar = function () { return ''; }; return B; diff --git a/tests/baselines/reference/numericIndexerConstraint3.js b/tests/baselines/reference/numericIndexerConstraint3.js index 9f7a61fe30d0d..97c3e56d42379 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -26,7 +26,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index a9eace23833da..732f7e2672ce5 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -26,7 +26,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index 47fb46794f093..1d38f844384f1 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -26,7 +26,8 @@ var I = (function () { var I2 = (function (_super) { __extends(I2, _super); function I2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return I2; }(I)); diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index dce09972c8387..ddfbce8fc127f 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -81,7 +81,8 @@ var Food = (function () { var MonsterFood = (function (_super) { __extends(MonsterFood, _super); function MonsterFood(name, flavor) { - _super.call(this, name); + var _this; + _this = _super.call(this, name) || this; this.flavor = flavor; } return MonsterFood; @@ -89,7 +90,8 @@ var MonsterFood = (function (_super) { var IceCream = (function (_super) { __extends(IceCream, _super); function IceCream(flavor) { - _super.call(this, "Ice Cream", flavor); + var _this; + _this = _super.call(this, "Ice Cream", flavor) || this; this.flavor = flavor; } return IceCream; @@ -97,7 +99,8 @@ var IceCream = (function (_super) { var Cookie = (function (_super) { __extends(Cookie, _super); function Cookie(flavor, isGlutenFree) { - _super.call(this, "Cookie", flavor); + var _this; + _this = _super.call(this, "Cookie", flavor) || this; this.flavor = flavor; this.isGlutenFree = isGlutenFree; } @@ -106,7 +109,8 @@ var Cookie = (function (_super) { var PetFood = (function (_super) { __extends(PetFood, _super); function PetFood(name, whereToBuy) { - _super.call(this, name); + var _this; + _this = _super.call(this, name) || this; this.whereToBuy = whereToBuy; } return PetFood; @@ -114,7 +118,8 @@ var PetFood = (function (_super) { var ExpensiveOrganicDogFood = (function (_super) { __extends(ExpensiveOrganicDogFood, _super); function ExpensiveOrganicDogFood(whereToBuy) { - _super.call(this, "Origen", whereToBuy); + var _this; + _this = _super.call(this, "Origen", whereToBuy) || this; this.whereToBuy = whereToBuy; } return ExpensiveOrganicDogFood; @@ -122,7 +127,8 @@ var ExpensiveOrganicDogFood = (function (_super) { var ExpensiveOrganicCatFood = (function (_super) { __extends(ExpensiveOrganicCatFood, _super); function ExpensiveOrganicCatFood(whereToBuy, containsFish) { - _super.call(this, "Nature's Logic", whereToBuy); + var _this; + _this = _super.call(this, "Nature's Logic", whereToBuy) || this; this.whereToBuy = whereToBuy; this.containsFish = containsFish; } diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 9c5bcfb8e2d43..76c1890094511 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -68,7 +68,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index 29781229b5abe..3df18cb27cb09 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -147,14 +147,16 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index 7ecb597a2d9ab..e7d2f603d5c31 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -140,7 +140,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -162,14 +163,16 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index 9710afe700d05..e0b75f54208f9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -147,14 +147,16 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index 7d6be5eaf8fbe..681af407bd402 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -145,14 +145,16 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index cb9c677f024ef..2011b741df2f9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -53,7 +53,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index 241fbcaf27e96..80bdd4c87e1e2 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -39,7 +39,8 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(C1)); @@ -53,7 +54,8 @@ var C3 = (function () { var C4 = (function (_super) { __extends(C4, _super); function C4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C4; }(C3)); diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index c0578c2fba18b..3eac80c60fcb4 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -147,14 +147,16 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index 0670d45a5a529..d55ef5eb28c5a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -140,7 +140,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -162,14 +163,16 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return PB; }(B)); diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 3e6a47b4de21a..04056fa9c14d8 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -25,7 +25,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 42decf512e4d7..408f73b653302 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -109,7 +109,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.a = 1; } Derived.prototype.f = function () { return 1; }; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 6d42c38f90738..f53f0c74a541b 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -161,8 +161,9 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2(v2) { + var _this; if (v2 === void 0) { v2 = 6; } - _super.call(this, v2); + _this = _super.call(this, v2) || this; } return C2; }(C1)); diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index f6ccdbe3fab16..a8bd88ed3a8b1 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -22,7 +22,8 @@ var Z = (function () { var Y = (function (_super) { __extends(Y, _super); function Y() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Y.prototype.func = function (value) { }; return Y; diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index 48cefeef22ce6..b23da97c7902d 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -25,7 +25,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D(p) { - _super.call(this); + var _this; + _this = _super.call(this) || this; this.p = p; } return D; diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index 8a478e675c69e..5643875efd362 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -28,7 +28,8 @@ define("b", ["require", "exports", "ref/a"], function (require, exports, a_1) { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/outModuleConcatAmd.js.map b/tests/baselines/reference/outModuleConcatAmd.js.map index 7f9893b234677..25873d9cd0763 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js.map +++ b/tests/baselines/reference/outModuleConcatAmd.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAlB,cAAkB;;;;ICAlB;QAAuB,qBAAC;QAAxB;YAAuB,8BAAC;QAAG,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAlB,cAAkB;;;;ICAlB;QAAuB,qBAAC;QAAxB;YAAuB,kDAAC;;QAAG,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index ba7f1d932451e..2fa35a323a081 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -92,34 +92,35 @@ sourceFile:tests/cases/compiler/b.ts --- >>> function B() { 1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(19, 9) Source(2, 1) + SourceIndex(1) --- ->>> _super.apply(this, arguments); +>>> var _this = _super.apply(this, arguments) || this; 1->^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A 1->Emitted(20, 13) Source(2, 24) + SourceIndex(1) -2 >Emitted(20, 43) Source(2, 25) + SourceIndex(1) +2 >Emitted(20, 63) Source(2, 25) + SourceIndex(1) --- +>>> return _this; >>> } 1 >^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^-> 1 > { 2 > } -1 >Emitted(21, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(21, 10) Source(2, 29) + SourceIndex(1) +1 >Emitted(22, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(22, 10) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(22, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(22, 17) Source(2, 29) + SourceIndex(1) +1->Emitted(23, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(23, 17) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^ @@ -135,20 +136,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(23, 5) Source(2, 28) + SourceIndex(1) -2 >Emitted(23, 6) Source(2, 29) + SourceIndex(1) -3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(23, 7) Source(2, 24) + SourceIndex(1) -5 >Emitted(23, 12) Source(2, 25) + SourceIndex(1) -6 >Emitted(23, 15) Source(2, 29) + SourceIndex(1) +1 >Emitted(24, 5) Source(2, 28) + SourceIndex(1) +2 >Emitted(24, 6) Source(2, 29) + SourceIndex(1) +3 >Emitted(24, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(24, 7) Source(2, 24) + SourceIndex(1) +5 >Emitted(24, 12) Source(2, 25) + SourceIndex(1) +6 >Emitted(24, 15) Source(2, 29) + SourceIndex(1) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > export class B extends A { } -1->Emitted(24, 5) Source(2, 1) + SourceIndex(1) -2 >Emitted(24, 19) Source(2, 29) + SourceIndex(1) +1->Emitted(25, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(25, 19) Source(2, 29) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index b23b73caf83ae..eecb410195812 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -44,7 +44,8 @@ System.register("b", ["ref/a"], function (exports_2, context_2) { B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/outModuleConcatSystem.js.map b/tests/baselines/reference/outModuleConcatSystem.js.map index 59ab70de53188..f77bed44ffcf6 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js.map +++ b/tests/baselines/reference/outModuleConcatSystem.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;oBAAuB,8BAAC;gBAAG,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;oBAAuB,kDAAC;;gBAAG,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index 86573493e2011..5287a760ac8eb 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -109,34 +109,35 @@ sourceFile:tests/cases/compiler/b.ts --- >>> function B() { 1 >^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(35, 17) Source(2, 1) + SourceIndex(1) --- ->>> _super.apply(this, arguments); +>>> var _this = _super.apply(this, arguments) || this; 1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A 1->Emitted(36, 21) Source(2, 24) + SourceIndex(1) -2 >Emitted(36, 51) Source(2, 25) + SourceIndex(1) +2 >Emitted(36, 71) Source(2, 25) + SourceIndex(1) --- +>>> return _this; >>> } 1 >^^^^^^^^^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^-> 1 > { 2 > } -1 >Emitted(37, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(37, 18) Source(2, 29) + SourceIndex(1) +1 >Emitted(38, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(38, 18) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(38, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(38, 25) Source(2, 29) + SourceIndex(1) +1->Emitted(39, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(39, 25) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^^^^^^^^^ @@ -152,12 +153,12 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(39, 13) Source(2, 28) + SourceIndex(1) -2 >Emitted(39, 14) Source(2, 29) + SourceIndex(1) -3 >Emitted(39, 14) Source(2, 1) + SourceIndex(1) -4 >Emitted(39, 15) Source(2, 24) + SourceIndex(1) -5 >Emitted(39, 20) Source(2, 25) + SourceIndex(1) -6 >Emitted(39, 23) Source(2, 29) + SourceIndex(1) +1 >Emitted(40, 13) Source(2, 28) + SourceIndex(1) +2 >Emitted(40, 14) Source(2, 29) + SourceIndex(1) +3 >Emitted(40, 14) Source(2, 1) + SourceIndex(1) +4 >Emitted(40, 15) Source(2, 24) + SourceIndex(1) +5 >Emitted(40, 20) Source(2, 25) + SourceIndex(1) +6 >Emitted(40, 23) Source(2, 29) + SourceIndex(1) --- >>> exports_2("B", B); >>> } @@ -165,8 +166,8 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^ 1-> 2 > -1->Emitted(41, 9) Source(2, 29) + SourceIndex(1) -2 >Emitted(41, 10) Source(2, 30) + SourceIndex(1) +1->Emitted(42, 9) Source(2, 29) + SourceIndex(1) +2 >Emitted(42, 10) Source(2, 30) + SourceIndex(1) --- >>> }; >>>}); diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index 90f8feab7bc52..ac2f2510b642c 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -57,7 +57,8 @@ define("b", ["require", "exports", "ref/a"], function (require, exports, a_1) { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js.map b/tests/baselines/reference/outModuleTripleSlashRefs.js.map index c6e1aab6bc886..1cdbef49afac2 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js.map +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFD,cAEC;;;;ICHD;QAAuB,qBAAC;QAAxB;YAAuB,8BAAC;QAAG,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFD,cAEC;;;;ICHD;QAAuB,qBAAC;QAAxB;YAAuB,kDAAC;;QAAG,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index 8be4382641967..e940429a74bb3 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -168,34 +168,35 @@ sourceFile:tests/cases/compiler/b.ts --- >>> function B() { 1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(26, 9) Source(2, 1) + SourceIndex(2) --- ->>> _super.apply(this, arguments); +>>> var _this = _super.apply(this, arguments) || this; 1->^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A 1->Emitted(27, 13) Source(2, 24) + SourceIndex(2) -2 >Emitted(27, 43) Source(2, 25) + SourceIndex(2) +2 >Emitted(27, 63) Source(2, 25) + SourceIndex(2) --- +>>> return _this; >>> } 1 >^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^-> 1 > { 2 > } -1 >Emitted(28, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(28, 10) Source(2, 29) + SourceIndex(2) +1 >Emitted(29, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(29, 10) Source(2, 29) + SourceIndex(2) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(29, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(29, 17) Source(2, 29) + SourceIndex(2) +1->Emitted(30, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(30, 17) Source(2, 29) + SourceIndex(2) --- >>> }(a_1.A)); 1 >^^^^ @@ -211,20 +212,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(30, 5) Source(2, 28) + SourceIndex(2) -2 >Emitted(30, 6) Source(2, 29) + SourceIndex(2) -3 >Emitted(30, 6) Source(2, 1) + SourceIndex(2) -4 >Emitted(30, 7) Source(2, 24) + SourceIndex(2) -5 >Emitted(30, 12) Source(2, 25) + SourceIndex(2) -6 >Emitted(30, 15) Source(2, 29) + SourceIndex(2) +1 >Emitted(31, 5) Source(2, 28) + SourceIndex(2) +2 >Emitted(31, 6) Source(2, 29) + SourceIndex(2) +3 >Emitted(31, 6) Source(2, 1) + SourceIndex(2) +4 >Emitted(31, 7) Source(2, 24) + SourceIndex(2) +5 >Emitted(31, 12) Source(2, 25) + SourceIndex(2) +6 >Emitted(31, 15) Source(2, 29) + SourceIndex(2) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > export class B extends A { } -1->Emitted(31, 5) Source(2, 1) + SourceIndex(2) -2 >Emitted(31, 19) Source(2, 29) + SourceIndex(2) +1->Emitted(32, 5) Source(2, 1) + SourceIndex(2) +2 >Emitted(32, 19) Source(2, 29) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index fd05873c64795..d83c8aea7add5 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -56,7 +56,8 @@ var O; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -64,7 +65,8 @@ var O; var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B)); diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index a3b7a32986150..ad49f8e9d7af3 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -37,7 +37,8 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -45,7 +46,8 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -53,7 +55,8 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived3.prototype.biz = function () { }; return Derived3; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index efb57153b13a6..2b521b4baf5cb 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -25,14 +25,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C.prototype.foo = function () { }; return C; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index 181f9d8129c50..df5e0065adb90 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -27,14 +27,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C.prototype.foo = function () { }; return C; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index d73c59863adca..6a75061239549 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -27,7 +27,8 @@ var Z = (function () { var A = (function (_super) { __extends(A, _super); function A() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.x = 1; } return A; @@ -35,14 +36,16 @@ var A = (function (_super) { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C.prototype.foo = function () { }; return C; diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index c98075c04a180..5d0546d0edc56 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -26,7 +26,8 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -34,7 +35,8 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -42,7 +44,8 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived3.prototype.biz = function () { }; return Derived3; diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index 0d25322fdfcd8..c34d037b350ca 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -108,21 +108,24 @@ var SomeBase = (function () { var SomeDerived1 = (function (_super) { __extends(SomeDerived1, _super); function SomeDerived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return SomeDerived1; }(SomeBase)); var SomeDerived2 = (function (_super) { __extends(SomeDerived2, _super); function SomeDerived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return SomeDerived2; }(SomeBase)); var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return SomeDerived3; }(SomeBase)); diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 9fa55fe1e95a1..0a899584c182e 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -115,21 +115,24 @@ var SomeBase = (function () { var SomeDerived1 = (function (_super) { __extends(SomeDerived1, _super); function SomeDerived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return SomeDerived1; }(SomeBase)); var SomeDerived2 = (function (_super) { __extends(SomeDerived2, _super); function SomeDerived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return SomeDerived2; }(SomeBase)); var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return SomeDerived3; }(SomeBase)); diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 12d8480eefb3c..42dceff061e6b 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -116,21 +116,24 @@ var SomeBase = (function () { var SomeDerived1 = (function (_super) { __extends(SomeDerived1, _super); function SomeDerived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return SomeDerived1; }(SomeBase)); var SomeDerived2 = (function (_super) { __extends(SomeDerived2, _super); function SomeDerived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return SomeDerived2; }(SomeBase)); var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return SomeDerived3; }(SomeBase)); diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index b261201be40d9..52d8a1b7abe3a 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -40,7 +40,8 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -48,7 +49,8 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -56,7 +58,8 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived3.prototype.biz = function () { }; return Derived3; diff --git a/tests/baselines/reference/overloadingOnConstants2.js b/tests/baselines/reference/overloadingOnConstants2.js index 977ae7ec5b9ad..85976ae7fcdf0 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -42,7 +42,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index ddd9fae642989..b7ad5b665546a 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -21,7 +21,8 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index e2f66bfadd77d..0a29bdf2da0a4 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index 4d94ea619ecc0..cdef63aa80f46 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -21,7 +21,8 @@ var Type = (function () { var Any = (function (_super) { __extends(Any, _super); function Any() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Any; }(Type)); diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index 41f07380e97fa..6e6a423fe906f 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -318,7 +318,8 @@ var c2 = (function () { var c3 = (function (_super) { __extends(c3, _super); function c3() { - _super.call(this, 10); + var _this; + _this = _super.call(this, 10) || this; this.p1 = _super.prototype.c2_p1; } /** c3 f1*/ @@ -362,7 +363,8 @@ c2_i.nc_f1(); var c4 = (function (_super) { __extends(c4, _super); function c4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return c4; }(c2)); @@ -404,7 +406,8 @@ var c5 = (function () { var c6 = (function (_super) { __extends(c6, _super); function c6() { - _super.call(this); + var _this; + _this = _super.call(this) || this; this.d = _super.prototype.b; } return c6; diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index 41ecc9135c043..f91efad621e1f 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index c375b4b5a211c..9d51b0ed25e18 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(B)); diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index f19ac06c35cc4..7c91281d05cac 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index 272edc89fb6d5..aeb7ce0919054 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index 88d8481d52a91..b14257310c4ec 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js index b53c41fb45c33..c4a2fd297114b 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js index 500f6d38c6d38..ae9d5068e294d 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js index 8c02a996ea514..8992706cd169b 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index f6f4f39393fb4..0ec560c130625 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -26,7 +26,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index 99e19586c52da..d4c754fb0b154 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -26,7 +26,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 255cad3ca21aa..429a388c894b2 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -826,7 +826,8 @@ var TypeScript; var NumberLiteralToken = (function (_super) { __extends(NumberLiteralToken, _super); function NumberLiteralToken(value, hasEmptyFraction) { - _super.call(this, TokenID.NumberLiteral); + var _this; + _this = _super.call(this, TokenID.NumberLiteral) || this; this.value = value; this.hasEmptyFraction = hasEmptyFraction; } @@ -842,7 +843,8 @@ var TypeScript; var StringLiteralToken = (function (_super) { __extends(StringLiteralToken, _super); function StringLiteralToken(value) { - _super.call(this, TokenID.StringLiteral); + var _this; + _this = _super.call(this, TokenID.StringLiteral) || this; this.value = value; } StringLiteralToken.prototype.getText = function () { @@ -857,7 +859,8 @@ var TypeScript; var IdentifierToken = (function (_super) { __extends(IdentifierToken, _super); function IdentifierToken(value, hasEscapeSequence) { - _super.call(this, TokenID.Identifier); + var _this; + _this = _super.call(this, TokenID.Identifier) || this; this.value = value; this.hasEscapeSequence = hasEscapeSequence; } @@ -873,7 +876,8 @@ var TypeScript; var WhitespaceToken = (function (_super) { __extends(WhitespaceToken, _super); function WhitespaceToken(tokenId, value) { - _super.call(this, tokenId); + var _this; + _this = _super.call(this, tokenId) || this; this.value = value; } WhitespaceToken.prototype.getText = function () { @@ -888,7 +892,8 @@ var TypeScript; var CommentToken = (function (_super) { __extends(CommentToken, _super); function CommentToken(tokenID, value, isBlock, startPos, line, endsLine) { - _super.call(this, tokenID); + var _this; + _this = _super.call(this, tokenID) || this; this.value = value; this.isBlock = isBlock; this.startPos = startPos; @@ -907,7 +912,8 @@ var TypeScript; var RegularExpressionLiteralToken = (function (_super) { __extends(RegularExpressionLiteralToken, _super); function RegularExpressionLiteralToken(regex) { - _super.call(this, TokenID.RegularExpressionLiteral); + var _this; + _this = _super.call(this, TokenID.RegularExpressionLiteral) || this; this.regex = regex; } RegularExpressionLiteralToken.prototype.getText = function () { diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 0c1d106425564..4be1ed2076762 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2386,7 +2386,8 @@ var TypeScript; var AST = (function (_super) { __extends(AST, _super); function AST(nodeType) { - _super.call(this); + var _this; + _this = _super.call(this) || this; this.nodeType = nodeType; this.type = null; this.flags = ASTFlags.Writeable; @@ -2542,7 +2543,8 @@ var TypeScript; var IncompleteAST = (function (_super) { __extends(IncompleteAST, _super); function IncompleteAST(min, lim) { - _super.call(this, NodeType.Error); + var _this; + _this = _super.call(this, NodeType.Error) || this; this.minChar = min; this.limChar = lim; } @@ -2552,7 +2554,8 @@ var TypeScript; var ASTList = (function (_super) { __extends(ASTList, _super); function ASTList() { - _super.call(this, NodeType.List); + var _this; + _this = _super.call(this, NodeType.List) || this; this.enclosingScope = null; this.members = new AST[]; } @@ -2619,7 +2622,8 @@ var TypeScript; // To change text, and to avoid running into a situation where 'actualText' does not // match 'text', always use setText. function Identifier(actualText, hasEscapeSequence) { - _super.call(this, NodeType.Name); + var _this; + _this = _super.call(this, NodeType.Name) || this; this.actualText = actualText; this.hasEscapeSequence = hasEscapeSequence; this.sym = null; @@ -2663,7 +2667,8 @@ var TypeScript; var MissingIdentifier = (function (_super) { __extends(MissingIdentifier, _super); function MissingIdentifier() { - _super.call(this, "__missing"); + var _this; + _this = _super.call(this, "__missing") || this; } MissingIdentifier.prototype.isMissing = function () { return true; @@ -2677,7 +2682,8 @@ var TypeScript; var Label = (function (_super) { __extends(Label, _super); function Label(id) { - _super.call(this, NodeType.Label); + var _this; + _this = _super.call(this, NodeType.Label) || this; this.id = id; } Label.prototype.printLabel = function () { return this.id.actualText + ":"; }; @@ -2701,7 +2707,8 @@ var TypeScript; var Expression = (function (_super) { __extends(Expression, _super); function Expression(nodeType) { - _super.call(this, nodeType); + var _this; + _this = _super.call(this, nodeType) || this; } Expression.prototype.isExpression = function () { return true; }; Expression.prototype.isStatementOrExpression = function () { return true; }; @@ -2711,7 +2718,8 @@ var TypeScript; var UnaryExpression = (function (_super) { __extends(UnaryExpression, _super); function UnaryExpression(nodeType, operand) { - _super.call(this, nodeType); + var _this; + _this = _super.call(this, nodeType) || this; this.operand = operand; this.targetType = null; // Target type for an object literal (null if no target type) this.castTerm = null; @@ -2855,7 +2863,8 @@ var TypeScript; var CallExpression = (function (_super) { __extends(CallExpression, _super); function CallExpression(nodeType, target, arguments) { - _super.call(this, nodeType); + var _this; + _this = _super.call(this, nodeType) || this; this.target = target; this.arguments = arguments; this.signature = null; @@ -2887,7 +2896,8 @@ var TypeScript; var BinaryExpression = (function (_super) { __extends(BinaryExpression, _super); function BinaryExpression(nodeType, operand1, operand2) { - _super.call(this, nodeType); + var _this; + _this = _super.call(this, nodeType) || this; this.operand1 = operand1; this.operand2 = operand2; } @@ -3039,7 +3049,8 @@ var TypeScript; var ConditionalExpression = (function (_super) { __extends(ConditionalExpression, _super); function ConditionalExpression(operand1, operand2, operand3) { - _super.call(this, NodeType.ConditionalExpression); + var _this; + _this = _super.call(this, NodeType.ConditionalExpression) || this; this.operand1 = operand1; this.operand2 = operand2; this.operand3 = operand3; @@ -3064,7 +3075,8 @@ var TypeScript; var NumberLiteral = (function (_super) { __extends(NumberLiteral, _super); function NumberLiteral(value, hasEmptyFraction) { - _super.call(this, NodeType.NumberLit); + var _this; + _this = _super.call(this, NodeType.NumberLit) || this; this.value = value; this.hasEmptyFraction = hasEmptyFraction; this.isNegativeZero = false; @@ -3105,7 +3117,8 @@ var TypeScript; var RegexLiteral = (function (_super) { __extends(RegexLiteral, _super); function RegexLiteral(regex) { - _super.call(this, NodeType.Regex); + var _this; + _this = _super.call(this, NodeType.Regex) || this; this.regex = regex; } RegexLiteral.prototype.typeCheck = function (typeFlow) { @@ -3125,7 +3138,8 @@ var TypeScript; var StringLiteral = (function (_super) { __extends(StringLiteral, _super); function StringLiteral(text) { - _super.call(this, NodeType.QString); + var _this; + _this = _super.call(this, NodeType.QString) || this; this.text = text; } StringLiteral.prototype.emit = function (emitter, tokenId, startLine) { @@ -3151,7 +3165,8 @@ var TypeScript; var ModuleElement = (function (_super) { __extends(ModuleElement, _super); function ModuleElement(nodeType) { - _super.call(this, nodeType); + var _this; + _this = _super.call(this, nodeType) || this; } return ModuleElement; }(AST)); @@ -3159,7 +3174,8 @@ var TypeScript; var ImportDeclaration = (function (_super) { __extends(ImportDeclaration, _super); function ImportDeclaration(id, alias) { - _super.call(this, NodeType.ImportDeclaration); + var _this; + _this = _super.call(this, NodeType.ImportDeclaration) || this; this.id = id; this.alias = alias; this.varFlags = VarFlags.None; @@ -3218,7 +3234,8 @@ var TypeScript; var BoundDecl = (function (_super) { __extends(BoundDecl, _super); function BoundDecl(id, nodeType, nestingLevel) { - _super.call(this, nodeType); + var _this; + _this = _super.call(this, nodeType) || this; this.id = id; this.nestingLevel = nestingLevel; this.init = null; @@ -3242,7 +3259,8 @@ var TypeScript; var VarDecl = (function (_super) { __extends(VarDecl, _super); function VarDecl(id, nest) { - _super.call(this, id, NodeType.VarDecl, nest); + var _this; + _this = _super.call(this, id, NodeType.VarDecl, nest) || this; } VarDecl.prototype.isAmbient = function () { return hasFlag(this.varFlags, VarFlags.Ambient); }; VarDecl.prototype.isExported = function () { return hasFlag(this.varFlags, VarFlags.Exported); }; @@ -3259,7 +3277,8 @@ var TypeScript; var ArgDecl = (function (_super) { __extends(ArgDecl, _super); function ArgDecl(id) { - _super.call(this, id, NodeType.ArgDecl, 0); + var _this; + _this = _super.call(this, id, NodeType.ArgDecl, 0) || this; this.isOptional = false; this.parameterPropertySym = null; } @@ -3281,7 +3300,8 @@ var TypeScript; var FuncDecl = (function (_super) { __extends(FuncDecl, _super); function FuncDecl(name, bod, isConstructor, arguments, vars, scopes, statics, nodeType) { - _super.call(this, nodeType); + var _this; + _this = _super.call(this, nodeType) || this; this.name = name; this.bod = bod; this.isConstructor = isConstructor; @@ -3421,7 +3441,8 @@ var TypeScript; var Script = (function (_super) { __extends(Script, _super); function Script(vars, scopes) { - _super.call(this, new Identifier("script"), null, false, null, vars, scopes, null, NodeType.Script); + var _this; + _this = _super.call(this, new Identifier("script"), null, false, null, vars, scopes, null, NodeType.Script) || this; this.locationInfo = null; this.referencedFiles = []; this.requiresGlobal = false; @@ -3490,7 +3511,8 @@ var TypeScript; var NamedDeclaration = (function (_super) { __extends(NamedDeclaration, _super); function NamedDeclaration(nodeType, name, members) { - _super.call(this, nodeType); + var _this; + _this = _super.call(this, nodeType) || this; this.name = name; this.members = members; this.leftCurlyCount = 0; @@ -3502,7 +3524,8 @@ var TypeScript; var ModuleDeclaration = (function (_super) { __extends(ModuleDeclaration, _super); function ModuleDeclaration(name, members, vars, scopes, endingToken) { - _super.call(this, NodeType.ModuleDeclaration, name, members); + var _this; + _this = _super.call(this, NodeType.ModuleDeclaration, name, members) || this; this.endingToken = endingToken; this.modFlags = ModuleFlags.ShouldEmitModuleDecl; this.amdDependencies = []; @@ -3537,7 +3560,8 @@ var TypeScript; var TypeDeclaration = (function (_super) { __extends(TypeDeclaration, _super); function TypeDeclaration(nodeType, name, extendsList, implementsList, members) { - _super.call(this, nodeType, name, members); + var _this; + _this = _super.call(this, nodeType, name, members) || this; this.extendsList = extendsList; this.implementsList = implementsList; this.varFlags = VarFlags.None; @@ -3554,7 +3578,8 @@ var TypeScript; var ClassDeclaration = (function (_super) { __extends(ClassDeclaration, _super); function ClassDeclaration(name, members, extendsList, implementsList) { - _super.call(this, NodeType.ClassDeclaration, name, extendsList, implementsList, members); + var _this; + _this = _super.call(this, NodeType.ClassDeclaration, name, extendsList, implementsList, members) || this; this.knownMemberNames = {}; this.constructorDecl = null; this.constructorNestingLevel = 0; @@ -3572,7 +3597,8 @@ var TypeScript; var InterfaceDeclaration = (function (_super) { __extends(InterfaceDeclaration, _super); function InterfaceDeclaration(name, members, extendsList, implementsList) { - _super.call(this, NodeType.InterfaceDeclaration, name, extendsList, implementsList, members); + var _this; + _this = _super.call(this, NodeType.InterfaceDeclaration, name, extendsList, implementsList, members) || this; } InterfaceDeclaration.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckInterface(this); @@ -3585,7 +3611,8 @@ var TypeScript; var Statement = (function (_super) { __extends(Statement, _super); function Statement(nodeType) { - _super.call(this, nodeType); + var _this; + _this = _super.call(this, nodeType) || this; this.flags |= ASTFlags.IsStatement; } Statement.prototype.isLoop = function () { return false; }; @@ -3601,7 +3628,8 @@ var TypeScript; var LabeledStatement = (function (_super) { __extends(LabeledStatement, _super); function LabeledStatement(labels, stmt) { - _super.call(this, NodeType.LabeledStatement); + var _this; + _this = _super.call(this, NodeType.LabeledStatement) || this; this.labels = labels; this.stmt = stmt; } @@ -3635,7 +3663,8 @@ var TypeScript; var Block = (function (_super) { __extends(Block, _super); function Block(statements, isStatementBlock) { - _super.call(this, NodeType.Block); + var _this; + _this = _super.call(this, NodeType.Block) || this; this.statements = statements; this.isStatementBlock = isStatementBlock; } @@ -3690,7 +3719,8 @@ var TypeScript; var Jump = (function (_super) { __extends(Jump, _super); function Jump(nodeType) { - _super.call(this, nodeType); + var _this; + _this = _super.call(this, nodeType) || this; this.target = null; this.resolvedTarget = null; } @@ -3741,7 +3771,8 @@ var TypeScript; var WhileStatement = (function (_super) { __extends(WhileStatement, _super); function WhileStatement(cond) { - _super.call(this, NodeType.While); + var _this; + _this = _super.call(this, NodeType.While) || this; this.cond = cond; this.body = null; } @@ -3793,7 +3824,8 @@ var TypeScript; var DoWhileStatement = (function (_super) { __extends(DoWhileStatement, _super); function DoWhileStatement() { - _super.call(this, NodeType.DoWhile); + var _this; + _this = _super.call(this, NodeType.DoWhile) || this; this.body = null; this.whileAST = null; this.cond = null; @@ -3849,7 +3881,8 @@ var TypeScript; var IfStatement = (function (_super) { __extends(IfStatement, _super); function IfStatement(cond) { - _super.call(this, NodeType.If); + var _this; + _this = _super.call(this, NodeType.If) || this; this.cond = cond; this.elseBod = null; this.statement = new ASTSpan(); @@ -3927,7 +3960,8 @@ var TypeScript; var ReturnStatement = (function (_super) { __extends(ReturnStatement, _super); function ReturnStatement() { - _super.call(this, NodeType.Return); + var _this; + _this = _super.call(this, NodeType.Return) || this; this.returnExpression = null; } ReturnStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -3958,7 +3992,8 @@ var TypeScript; var EndCode = (function (_super) { __extends(EndCode, _super); function EndCode() { - _super.call(this, NodeType.EndCode); + var _this; + _this = _super.call(this, NodeType.EndCode) || this; } return EndCode; }(AST)); @@ -3966,7 +4001,8 @@ var TypeScript; var ForInStatement = (function (_super) { __extends(ForInStatement, _super); function ForInStatement(lval, obj) { - _super.call(this, NodeType.ForIn); + var _this; + _this = _super.call(this, NodeType.ForIn) || this; this.lval = lval; this.obj = obj; this.statement = new ASTSpan(); @@ -4081,7 +4117,8 @@ var TypeScript; var ForStatement = (function (_super) { __extends(ForStatement, _super); function ForStatement(init) { - _super.call(this, NodeType.For); + var _this; + _this = _super.call(this, NodeType.For) || this; this.init = init; } ForStatement.prototype.isLoop = function () { return true; }; @@ -4172,7 +4209,8 @@ var TypeScript; var WithStatement = (function (_super) { __extends(WithStatement, _super); function WithStatement(expr) { - _super.call(this, NodeType.With); + var _this; + _this = _super.call(this, NodeType.With) || this; this.expr = expr; this.withSym = null; } @@ -4198,7 +4236,8 @@ var TypeScript; var SwitchStatement = (function (_super) { __extends(SwitchStatement, _super); function SwitchStatement(val) { - _super.call(this, NodeType.Switch); + var _this; + _this = _super.call(this, NodeType.Switch) || this; this.val = val; this.defaultCase = null; this.statement = new ASTSpan(); @@ -4270,7 +4309,8 @@ var TypeScript; var CaseStatement = (function (_super) { __extends(CaseStatement, _super); function CaseStatement() { - _super.call(this, NodeType.Case); + var _this; + _this = _super.call(this, NodeType.Case) || this; this.expr = null; } CaseStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -4323,7 +4363,8 @@ var TypeScript; var TypeReference = (function (_super) { __extends(TypeReference, _super); function TypeReference(term, arrayCount) { - _super.call(this, NodeType.TypeRef); + var _this; + _this = _super.call(this, NodeType.TypeRef) || this; this.term = term; this.arrayCount = arrayCount; } @@ -4353,7 +4394,8 @@ var TypeScript; var TryFinally = (function (_super) { __extends(TryFinally, _super); function TryFinally(tryNode, finallyNode) { - _super.call(this, NodeType.TryFinally); + var _this; + _this = _super.call(this, NodeType.TryFinally) || this; this.tryNode = tryNode; this.finallyNode = finallyNode; } @@ -4398,7 +4440,8 @@ var TypeScript; var TryCatch = (function (_super) { __extends(TryCatch, _super); function TryCatch(tryNode, catchNode) { - _super.call(this, NodeType.TryCatch); + var _this; + _this = _super.call(this, NodeType.TryCatch) || this; this.tryNode = tryNode; this.catchNode = catchNode; } @@ -4448,7 +4491,8 @@ var TypeScript; var Try = (function (_super) { __extends(Try, _super); function Try(body) { - _super.call(this, NodeType.Try); + var _this; + _this = _super.call(this, NodeType.Try) || this; this.body = body; } Try.prototype.emit = function (emitter, tokenId, startLine) { @@ -4476,7 +4520,8 @@ var TypeScript; var Catch = (function (_super) { __extends(Catch, _super); function Catch(param, body) { - _super.call(this, NodeType.Catch); + var _this; + _this = _super.call(this, NodeType.Catch) || this; this.param = param; this.body = body; this.statement = new ASTSpan(); @@ -4549,7 +4594,8 @@ var TypeScript; var Finally = (function (_super) { __extends(Finally, _super); function Finally(body) { - _super.call(this, NodeType.Finally); + var _this; + _this = _super.call(this, NodeType.Finally) || this; this.body = body; } Finally.prototype.emit = function (emitter, tokenId, startLine) { @@ -4577,7 +4623,8 @@ var TypeScript; var Comment = (function (_super) { __extends(Comment, _super); function Comment(content, isBlockComment, endsLine) { - _super.call(this, NodeType.Comment); + var _this; + _this = _super.call(this, NodeType.Comment) || this; this.content = content; this.isBlockComment = isBlockComment; this.endsLine = endsLine; @@ -4603,7 +4650,8 @@ var TypeScript; var DebuggerStatement = (function (_super) { __extends(DebuggerStatement, _super); function DebuggerStatement() { - _super.call(this, NodeType.Debugger); + var _this; + _this = _super.call(this, NodeType.Debugger) || this; } DebuggerStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 1a525c49d197f..3f7e05e7164c9 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2380,7 +2380,8 @@ var Harness; var TestCase = (function (_super) { __extends(TestCase, _super); function TestCase(description, block) { - _super.call(this, description, block); + var _this; + _this = _super.call(this, description, block) || this; this.description = description; this.block = block; } @@ -2414,7 +2415,8 @@ var Harness; var Scenario = (function (_super) { __extends(Scenario, _super); function Scenario(description, block) { - _super.call(this, description, block); + var _this; + _this = _super.call(this, description, block) || this; this.description = description; this.block = block; } @@ -2469,7 +2471,8 @@ var Harness; var Run = (function (_super) { __extends(Run, _super); function Run() { - _super.call(this, 'Test Run', null); + var _this; + _this = _super.call(this, 'Test Run', null) || this; } Run.prototype.run = function () { emitLog('start'); diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index caf41fe27086a..5425696b13344 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -63,7 +63,8 @@ var baz = (function () { var foo = (function (_super) { __extends(foo, _super); function foo() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } foo.prototype.bar = function () { return undefined; }; ; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index a149aa26f7529..8181d0612a846 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -152,21 +152,24 @@ var m1; var m1_C1_private = (function (_super) { __extends(m1_C1_private, _super); function m1_C1_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C1_private; }(m1_c_public)); var m1_C2_private = (function (_super) { __extends(m1_C2_private, _super); function m1_C2_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C2_private; }(m1_c_private)); var m1_C3_public = (function (_super) { __extends(m1_C3_public, _super); function m1_C3_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C3_public; }(m1_c_public)); @@ -174,7 +177,8 @@ var m1; var m1_C4_public = (function (_super) { __extends(m1_C4_public, _super); function m1_C4_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C4_public; }(m1_c_private)); @@ -204,21 +208,24 @@ var m1; var m1_C9_private = (function (_super) { __extends(m1_C9_private, _super); function m1_C9_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C9_private; }(m1_c_public)); var m1_C10_private = (function (_super) { __extends(m1_C10_private, _super); function m1_C10_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C10_private; }(m1_c_private)); var m1_C11_public = (function (_super) { __extends(m1_C11_public, _super); function m1_C11_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C11_public; }(m1_c_public)); @@ -226,7 +233,8 @@ var m1; var m1_C12_public = (function (_super) { __extends(m1_C12_public, _super); function m1_C12_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C12_public; }(m1_c_private)); @@ -250,21 +258,24 @@ var m2; var m2_C1_private = (function (_super) { __extends(m2_C1_private, _super); function m2_C1_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m2_C1_private; }(m2_c_public)); var m2_C2_private = (function (_super) { __extends(m2_C2_private, _super); function m2_C2_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m2_C2_private; }(m2_c_private)); var m2_C3_public = (function (_super) { __extends(m2_C3_public, _super); function m2_C3_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m2_C3_public; }(m2_c_public)); @@ -272,7 +283,8 @@ var m2; var m2_C4_public = (function (_super) { __extends(m2_C4_public, _super); function m2_C4_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m2_C4_public; }(m2_c_private)); @@ -302,21 +314,24 @@ var m2; var m2_C9_private = (function (_super) { __extends(m2_C9_private, _super); function m2_C9_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m2_C9_private; }(m2_c_public)); var m2_C10_private = (function (_super) { __extends(m2_C10_private, _super); function m2_C10_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m2_C10_private; }(m2_c_private)); var m2_C11_public = (function (_super) { __extends(m2_C11_public, _super); function m2_C11_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m2_C11_public; }(m2_c_public)); @@ -324,7 +339,8 @@ var m2; var m2_C12_public = (function (_super) { __extends(m2_C12_public, _super); function m2_C12_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m2_C12_public; }(m2_c_private)); @@ -346,21 +362,24 @@ var glo_c_private = (function () { var glo_C1_private = (function (_super) { __extends(glo_C1_private, _super); function glo_C1_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return glo_C1_private; }(glo_c_public)); var glo_C2_private = (function (_super) { __extends(glo_C2_private, _super); function glo_C2_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return glo_C2_private; }(glo_c_private)); var glo_C3_public = (function (_super) { __extends(glo_C3_public, _super); function glo_C3_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return glo_C3_public; }(glo_c_public)); @@ -368,7 +387,8 @@ exports.glo_C3_public = glo_C3_public; var glo_C4_public = (function (_super) { __extends(glo_C4_public, _super); function glo_C4_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return glo_C4_public; }(glo_c_private)); @@ -398,21 +418,24 @@ exports.glo_C8_public = glo_C8_public; var glo_C9_private = (function (_super) { __extends(glo_C9_private, _super); function glo_C9_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return glo_C9_private; }(glo_c_public)); var glo_C10_private = (function (_super) { __extends(glo_C10_private, _super); function glo_C10_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return glo_C10_private; }(glo_c_private)); var glo_C11_public = (function (_super) { __extends(glo_C11_public, _super); function glo_C11_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return glo_C11_public; }(glo_c_public)); @@ -420,7 +443,8 @@ exports.glo_C11_public = glo_C11_public; var glo_C12_public = (function (_super) { __extends(glo_C12_public, _super); function glo_C12_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return glo_C12_public; }(glo_c_private)); diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index e2bb58781dec0..fe3ae6ba6d0f3 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -122,21 +122,24 @@ var publicModule; var privateClassExtendingPublicClassInModule = (function (_super) { __extends(privateClassExtendingPublicClassInModule, _super); function privateClassExtendingPublicClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return privateClassExtendingPublicClassInModule; }(publicClassInPublicModule)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return privateClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); var publicClassExtendingPublicClassInModule = (function (_super) { __extends(publicClassExtendingPublicClassInModule, _super); function publicClassExtendingPublicClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingPublicClassInModule; }(publicClassInPublicModule)); @@ -144,7 +147,8 @@ var publicModule; var publicClassExtendingPrivateClassInModule = (function (_super) { __extends(publicClassExtendingPrivateClassInModule, _super); function publicClassExtendingPrivateClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); @@ -152,14 +156,16 @@ var publicModule; var privateClassExtendingFromPrivateModuleClass = (function (_super) { __extends(privateClassExtendingFromPrivateModuleClass, _super); function privateClassExtendingFromPrivateModuleClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return privateClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); var publicClassExtendingFromPrivateModuleClass = (function (_super) { __extends(publicClassExtendingFromPrivateModuleClass, _super); function publicClassExtendingFromPrivateModuleClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); @@ -183,21 +189,24 @@ var privateModule; var privateClassExtendingPublicClassInModule = (function (_super) { __extends(privateClassExtendingPublicClassInModule, _super); function privateClassExtendingPublicClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return privateClassExtendingPublicClassInModule; }(publicClassInPrivateModule)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return privateClassExtendingPrivateClassInModule; }(privateClassInPrivateModule)); var publicClassExtendingPublicClassInModule = (function (_super) { __extends(publicClassExtendingPublicClassInModule, _super); function publicClassExtendingPublicClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingPublicClassInModule; }(publicClassInPrivateModule)); @@ -205,7 +214,8 @@ var privateModule; var publicClassExtendingPrivateClassInModule = (function (_super) { __extends(publicClassExtendingPrivateClassInModule, _super); function publicClassExtendingPrivateClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingPrivateClassInModule; }(privateClassInPrivateModule)); @@ -213,14 +223,16 @@ var privateModule; var privateClassExtendingFromPrivateModuleClass = (function (_super) { __extends(privateClassExtendingFromPrivateModuleClass, _super); function privateClassExtendingFromPrivateModuleClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return privateClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); var publicClassExtendingFromPrivateModuleClass = (function (_super) { __extends(publicClassExtendingFromPrivateModuleClass, _super); function publicClassExtendingFromPrivateModuleClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); @@ -242,21 +254,24 @@ var privateClass = (function () { var privateClassExtendingPublicClass = (function (_super) { __extends(privateClassExtendingPublicClass, _super); function privateClassExtendingPublicClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return privateClassExtendingPublicClass; }(publicClass)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return privateClassExtendingPrivateClassInModule; }(privateClass)); var publicClassExtendingPublicClass = (function (_super) { __extends(publicClassExtendingPublicClass, _super); function publicClassExtendingPublicClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingPublicClass; }(publicClass)); @@ -264,7 +279,8 @@ exports.publicClassExtendingPublicClass = publicClassExtendingPublicClass; var publicClassExtendingPrivateClass = (function (_super) { __extends(publicClassExtendingPrivateClass, _super); function publicClassExtendingPrivateClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingPrivateClass; }(privateClass)); @@ -272,14 +288,16 @@ exports.publicClassExtendingPrivateClass = publicClassExtendingPrivateClass; var privateClassExtendingFromPrivateModuleClass = (function (_super) { __extends(privateClassExtendingFromPrivateModuleClass, _super); function privateClassExtendingFromPrivateModuleClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return privateClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); var publicClassExtendingFromPrivateModuleClass = (function (_super) { __extends(publicClassExtendingFromPrivateModuleClass, _super); function publicClassExtendingFromPrivateModuleClass() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); @@ -308,21 +326,24 @@ var publicModuleInGlobal; var privateClassExtendingPublicClassInModule = (function (_super) { __extends(privateClassExtendingPublicClassInModule, _super); function privateClassExtendingPublicClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return privateClassExtendingPublicClassInModule; }(publicClassInPublicModule)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return privateClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); var publicClassExtendingPublicClassInModule = (function (_super) { __extends(publicClassExtendingPublicClassInModule, _super); function publicClassExtendingPublicClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingPublicClassInModule; }(publicClassInPublicModule)); @@ -330,7 +351,8 @@ var publicModuleInGlobal; var publicClassExtendingPrivateClassInModule = (function (_super) { __extends(publicClassExtendingPrivateClassInModule, _super); function publicClassExtendingPrivateClassInModule() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); @@ -344,7 +366,8 @@ var publicClassInGlobal = (function () { var publicClassExtendingPublicClassInGlobal = (function (_super) { __extends(publicClassExtendingPublicClassInGlobal, _super); function publicClassExtendingPublicClassInGlobal() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return publicClassExtendingPublicClassInGlobal; }(publicClassInGlobal)); diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index e8c8c447cf9f9..481a39219212f 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -84,21 +84,24 @@ var m1; var m1_C1_private = (function (_super) { __extends(m1_C1_private, _super); function m1_C1_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C1_private; }(m1_c_public)); var m1_C2_private = (function (_super) { __extends(m1_C2_private, _super); function m1_C2_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C2_private; }(m1_c_private)); var m1_C3_public = (function (_super) { __extends(m1_C3_public, _super); function m1_C3_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C3_public; }(m1_c_public)); @@ -106,7 +109,8 @@ var m1; var m1_C4_public = (function (_super) { __extends(m1_C4_public, _super); function m1_C4_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C4_public; }(m1_c_private)); @@ -136,21 +140,24 @@ var m1; var m1_C9_private = (function (_super) { __extends(m1_C9_private, _super); function m1_C9_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C9_private; }(m1_c_public)); var m1_C10_private = (function (_super) { __extends(m1_C10_private, _super); function m1_C10_private() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C10_private; }(m1_c_private)); var m1_C11_public = (function (_super) { __extends(m1_C11_public, _super); function m1_C11_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C11_public; }(m1_c_public)); @@ -158,7 +165,8 @@ var m1; var m1_C12_public = (function (_super) { __extends(m1_C12_public, _super); function m1_C12_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return m1_C12_public; }(m1_c_private)); @@ -174,7 +182,8 @@ var glo_c_public = (function () { var glo_C3_public = (function (_super) { __extends(glo_C3_public, _super); function glo_C3_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return glo_C3_public; }(glo_c_public)); @@ -186,7 +195,8 @@ var glo_C7_public = (function () { var glo_C11_public = (function (_super) { __extends(glo_C11_public, _super); function glo_C11_public() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return glo_C11_public; }(glo_c_public)); diff --git a/tests/baselines/reference/privateAccessInSubclass1.js b/tests/baselines/reference/privateAccessInSubclass1.js index 188c3149fd03a..ca432ee7ab76b 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -23,7 +23,8 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.myMethod = function () { this.options; diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index 8fbe5121136fb..cfdc137aedff9 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -27,7 +27,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.x = _super.prototype.foo; // error this.z = _super.prototype.foo; // error } diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index 058a6ba1b6544..8b516a5a19c79 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -40,7 +40,8 @@ var K = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 352256ac9bd66..aad41d01b075f 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -22,7 +22,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.bing = function () { return Base.foo; }; // error } return Derived; diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index 7ed6f3d679266..44adec751bf08 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -29,7 +29,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 3b6e407d045c0..ed9768b06c292 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -14,7 +14,8 @@ var m2; var class1 = (function (_super) { __extends(class1, _super); function class1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return class1; }(m2.mExported.me.class1)); @@ -27,7 +28,8 @@ var m2; var class2 = (function (_super) { __extends(class2, _super); function class2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return class2; }(m2.mExported.me.class1)); @@ -40,7 +42,8 @@ var m2; var class3 = (function (_super) { __extends(class3, _super); function class3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return class3; }(mNonExported.mne.class1)); @@ -53,7 +56,8 @@ var m2; var class4 = (function (_super) { __extends(class4, _super); function class4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 3b6e407d045c0..ed9768b06c292 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -14,7 +14,8 @@ var m2; var class1 = (function (_super) { __extends(class1, _super); function class1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return class1; }(m2.mExported.me.class1)); @@ -27,7 +28,8 @@ var m2; var class2 = (function (_super) { __extends(class2, _super); function class2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return class2; }(m2.mExported.me.class1)); @@ -40,7 +42,8 @@ var m2; var class3 = (function (_super) { __extends(class3, _super); function class3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return class3; }(mNonExported.mne.class1)); @@ -53,7 +56,8 @@ var m2; var class4 = (function (_super) { __extends(class4, _super); function class4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 6a07c9a92ca1c..deb734487949b 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -18,7 +18,8 @@ var m; var child = (function (_super) { __extends(child, _super); function child() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 6a07c9a92ca1c..deb734487949b 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -18,7 +18,8 @@ var m; var child = (function (_super) { __extends(child, _super); function child() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 64a207a7cad2c..b5147a28919d4 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -7,7 +7,8 @@ var __extends = (this && this.__extends) || function (d, b) { var ClassC = (function (_super) { __extends(ClassC, _super); function ClassC() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 64a207a7cad2c..b5147a28919d4 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -7,7 +7,8 @@ var __extends = (this && this.__extends) || function (d, b) { var ClassC = (function (_super) { __extends(ClassC, _super); function ClassC() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ClassC; }(test.ClassA)); diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index 591c4760e58ee..a22f966375414 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -65,7 +65,8 @@ var P = (function () { var Q = (function (_super) { __extends(Q, _super); function Q() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Q; }(P)); diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 2dbb316d84852..31b90bcf7ac2b 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -164,7 +164,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index bbd2def2206cb..c570642a1ba3e 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -97,7 +97,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.bar = function () { return ''; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index 76da06166d4f8..aebdc2c3ce30e 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -72,7 +72,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.bar = function () { return ''; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index c49153c59b066..442ae29e27883 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -59,7 +59,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.bar = function () { return ''; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index 255c05ac3ac93..40a1365b7e1c7 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -52,7 +52,8 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(C.prototype, "y", { get: function () { return this.x; }, @@ -93,7 +94,8 @@ var C = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return E; }(C)); diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index 02ad29bd31285..e6c768a67592c 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -147,7 +147,8 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived1.prototype.method1 = function () { var B = (function () { @@ -173,7 +174,8 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived2.prototype.method2 = function () { var C = (function () { @@ -199,7 +201,8 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived3.prototype.method3 = function () { var D = (function () { @@ -225,7 +228,8 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived4.prototype.method4 = function () { var E = (function () { diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index a87f67e15f288..3f46b69ecf35d 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -34,7 +34,8 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 05dc85e251e1d..44a4fbdf284c3 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -120,7 +120,8 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived1.prototype.method1 = function () { var b; @@ -139,7 +140,8 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived2.prototype.method2 = function () { var b; @@ -158,7 +160,8 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived3.prototype.method3 = function () { var b; @@ -177,7 +180,8 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived4.prototype.method4 = function () { var b; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js index 6675589226e93..4cc09bac99d15 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -30,7 +30,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 eba89aac28ee8..003e2f50e6f8f 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -61,7 +61,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.g = function () { var t1 = this.x; @@ -93,7 +94,8 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index dcc68e0c946c4..984527b2c0d2b 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -137,7 +137,8 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C2.prototype.f = function () { return _super.prototype.f.call(this) + this.x; @@ -151,7 +152,8 @@ var C2 = (function (_super) { var C3 = (function (_super) { __extends(C3, _super); function C3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } C3.prototype.f = function () { return _super.prototype.f.call(this); @@ -187,14 +189,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 +212,8 @@ var C = (function (_super) { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); @@ -239,7 +244,8 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A2)); @@ -252,7 +258,8 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A3)); diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index 323a5a2f2b6c3..a272ad42fa129 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -63,7 +63,8 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived1.staticMethod1 = function () { Base.x; // OK, accessed within a class derived from their declaring class @@ -76,7 +77,8 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived2.staticMethod2 = function () { Base.x; // OK, accessed within a class derived from their declaring class @@ -89,7 +91,8 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 1295dc7448e28..2add5e7e154d7 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -38,7 +38,8 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived1.staticMethod1 = function () { this.x; // OK, accessed within a class derived from their declaring class @@ -49,7 +50,8 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 f396c2483e80e..225acf74bbe69 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,8 @@ var Alpha; var Beta = (function (_super) { __extends(Beta, _super); function Beta() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Beta; }(Alpha.x)); diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index 40c292e4ce884..1c1e2a94ff171 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -56,7 +56,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B(x) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; // Fails, x is readonly this.x = 1; } @@ -67,7 +68,8 @@ var C = (function (_super) { // This is the usual behavior of readonly properties: // if one is redeclared in a base class, then it can be assigned to. function C(x) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; this.x = x; this.x = 1; } @@ -84,7 +86,8 @@ var D = (function () { var E = (function (_super) { __extends(E, _super); function E(x) { - _super.call(this, x); + var _this; + _this = _super.call(this, x) || this; this.x = x; this.x = 1; } diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index b032ce6774db3..5b3e829d2e6e5 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -13,14 +13,16 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return A; }(C)); var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index 07ba40c68b133..b515c7ab318ef 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var M = (function (_super) { __extends(M, _super); function M() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return M; }(M)); diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index 5b880c294b736..1871eff20d4bb 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var S18 = (function (_super) { __extends(S18, _super); function S18() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return S18; }(S18)); diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index dd79ba068bba2..c2f884aa8e4bb 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -21,7 +21,8 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(C1)); diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index 62e5958715e98..f84c7ad3daef0 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -28,7 +28,8 @@ var TypeScript2; var MemberNameArray = (function (_super) { __extends(MemberNameArray, _super); function MemberNameArray() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MemberNameArray; }(MemberName)); diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index 3aa066d158d6b..2baa854e4625c 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -190,7 +190,8 @@ var Sample; var Mode = (function (_super) { __extends(Mode, _super); function Mode() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } // scenario 2 Mode.prototype.getInitialState = function () { diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index 7e0b27b82b45c..56c0fc4e6eb16 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js.map +++ b/tests/baselines/reference/recursiveClassReferenceTest.js.map @@ -1,2 +1,2 @@ //// [recursiveClassReferenceTest.js.map] -{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,IAAO,MAAM,CAoBZ;AApBD,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;wBAA0B,8BAAY;oBAQtC,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file +{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,IAAO,MAAM,CAoBZ;AApBD,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;wBAA0B,kDAAY;;oBAQtC,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index 7e9da7dddf3cb..9656c07834342 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -1692,18 +1692,19 @@ sourceFile:recursiveClassReferenceTest.ts --- >>> function Mode() { 1 >^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(87, 21) Source(91, 2) + SourceIndex(0) --- ->>> _super.apply(this, arguments); +>>> var _this = _super.apply(this, arguments) || this; 1->^^^^^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class Mode extends 2 > AbstractMode 1->Emitted(88, 25) Source(91, 28) + SourceIndex(0) -2 >Emitted(88, 55) Source(91, 40) + SourceIndex(0) +2 >Emitted(88, 75) Source(91, 40) + SourceIndex(0) --- +>>> return _this; >>> } 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^ @@ -1718,8 +1719,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(89, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(89, 22) Source(99, 3) + SourceIndex(0) +1 >Emitted(90, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(90, 22) Source(99, 3) + SourceIndex(0) --- >>> // scenario 2 1->^^^^^^^^^^^^^^^^^^^^ @@ -1727,8 +1728,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > // scenario 2 -1->Emitted(90, 21) Source(93, 3) + SourceIndex(0) -2 >Emitted(90, 34) Source(93, 16) + SourceIndex(0) +1->Emitted(91, 21) Source(93, 3) + SourceIndex(0) +2 >Emitted(91, 34) Source(93, 16) + SourceIndex(0) --- >>> Mode.prototype.getInitialState = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1738,9 +1739,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getInitialState 3 > -1->Emitted(91, 21) Source(94, 10) + SourceIndex(0) -2 >Emitted(91, 51) Source(94, 25) + SourceIndex(0) -3 >Emitted(91, 54) Source(94, 3) + SourceIndex(0) +1->Emitted(92, 21) Source(94, 10) + SourceIndex(0) +2 >Emitted(92, 51) Source(94, 25) + SourceIndex(0) +3 >Emitted(92, 54) Source(94, 3) + SourceIndex(0) --- >>> return new State(self); 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1762,15 +1763,15 @@ sourceFile:recursiveClassReferenceTest.ts 7 > self 8 > ) 9 > ; -1 >Emitted(92, 25) Source(95, 4) + SourceIndex(0) -2 >Emitted(92, 31) Source(95, 10) + SourceIndex(0) -3 >Emitted(92, 32) Source(95, 11) + SourceIndex(0) -4 >Emitted(92, 36) Source(95, 15) + SourceIndex(0) -5 >Emitted(92, 41) Source(95, 20) + SourceIndex(0) -6 >Emitted(92, 42) Source(95, 21) + SourceIndex(0) -7 >Emitted(92, 46) Source(95, 25) + SourceIndex(0) -8 >Emitted(92, 47) Source(95, 26) + SourceIndex(0) -9 >Emitted(92, 48) Source(95, 27) + SourceIndex(0) +1 >Emitted(93, 25) Source(95, 4) + SourceIndex(0) +2 >Emitted(93, 31) Source(95, 10) + SourceIndex(0) +3 >Emitted(93, 32) Source(95, 11) + SourceIndex(0) +4 >Emitted(93, 36) Source(95, 15) + SourceIndex(0) +5 >Emitted(93, 41) Source(95, 20) + SourceIndex(0) +6 >Emitted(93, 42) Source(95, 21) + SourceIndex(0) +7 >Emitted(93, 46) Source(95, 25) + SourceIndex(0) +8 >Emitted(93, 47) Source(95, 26) + SourceIndex(0) +9 >Emitted(93, 48) Source(95, 27) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1779,8 +1780,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(93, 21) Source(96, 3) + SourceIndex(0) -2 >Emitted(93, 22) Source(96, 4) + SourceIndex(0) +1 >Emitted(94, 21) Source(96, 3) + SourceIndex(0) +2 >Emitted(94, 22) Source(96, 4) + SourceIndex(0) --- >>> return Mode; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1791,8 +1792,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(94, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(94, 32) Source(99, 3) + SourceIndex(0) +1->Emitted(95, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(95, 32) Source(99, 3) + SourceIndex(0) --- >>> }(AbstractMode)); 1->^^^^^^^^^^^^^^^^ @@ -1816,12 +1817,12 @@ sourceFile:recursiveClassReferenceTest.ts > > > } -1->Emitted(95, 17) Source(99, 2) + SourceIndex(0) -2 >Emitted(95, 18) Source(99, 3) + SourceIndex(0) -3 >Emitted(95, 18) Source(91, 2) + SourceIndex(0) -4 >Emitted(95, 19) Source(91, 28) + SourceIndex(0) -5 >Emitted(95, 31) Source(91, 40) + SourceIndex(0) -6 >Emitted(95, 34) Source(99, 3) + SourceIndex(0) +1->Emitted(96, 17) Source(99, 2) + SourceIndex(0) +2 >Emitted(96, 18) Source(99, 3) + SourceIndex(0) +3 >Emitted(96, 18) Source(91, 2) + SourceIndex(0) +4 >Emitted(96, 19) Source(91, 28) + SourceIndex(0) +5 >Emitted(96, 31) Source(91, 40) + SourceIndex(0) +6 >Emitted(96, 34) Source(99, 3) + SourceIndex(0) --- >>> PlainText.Mode = Mode; 1->^^^^^^^^^^^^^^^^ @@ -1841,10 +1842,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(96, 17) Source(91, 15) + SourceIndex(0) -2 >Emitted(96, 31) Source(91, 19) + SourceIndex(0) -3 >Emitted(96, 38) Source(99, 3) + SourceIndex(0) -4 >Emitted(96, 39) Source(99, 3) + SourceIndex(0) +1->Emitted(97, 17) Source(91, 15) + SourceIndex(0) +2 >Emitted(97, 31) Source(91, 19) + SourceIndex(0) +3 >Emitted(97, 38) Source(99, 3) + SourceIndex(0) +4 >Emitted(97, 39) Source(99, 3) + SourceIndex(0) --- >>> })(PlainText = Languages.PlainText || (Languages.PlainText = {})); 1->^^^^^^^^^^^^ @@ -1890,15 +1891,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(97, 13) Source(100, 1) + SourceIndex(0) -2 >Emitted(97, 14) Source(100, 2) + SourceIndex(0) -3 >Emitted(97, 16) Source(76, 31) + SourceIndex(0) -4 >Emitted(97, 25) Source(76, 40) + SourceIndex(0) -5 >Emitted(97, 28) Source(76, 31) + SourceIndex(0) -6 >Emitted(97, 47) Source(76, 40) + SourceIndex(0) -7 >Emitted(97, 52) Source(76, 31) + SourceIndex(0) -8 >Emitted(97, 71) Source(76, 40) + SourceIndex(0) -9 >Emitted(97, 79) Source(100, 2) + SourceIndex(0) +1->Emitted(98, 13) Source(100, 1) + SourceIndex(0) +2 >Emitted(98, 14) Source(100, 2) + SourceIndex(0) +3 >Emitted(98, 16) Source(76, 31) + SourceIndex(0) +4 >Emitted(98, 25) Source(76, 40) + SourceIndex(0) +5 >Emitted(98, 28) Source(76, 31) + SourceIndex(0) +6 >Emitted(98, 47) Source(76, 40) + SourceIndex(0) +7 >Emitted(98, 52) Source(76, 31) + SourceIndex(0) +8 >Emitted(98, 71) Source(76, 40) + SourceIndex(0) +9 >Emitted(98, 79) Source(100, 2) + SourceIndex(0) --- >>> })(Languages = Thing.Languages || (Thing.Languages = {})); 1 >^^^^^^^^ @@ -1943,15 +1944,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(98, 9) Source(100, 1) + SourceIndex(0) -2 >Emitted(98, 10) Source(100, 2) + SourceIndex(0) -3 >Emitted(98, 12) Source(76, 21) + SourceIndex(0) -4 >Emitted(98, 21) Source(76, 30) + SourceIndex(0) -5 >Emitted(98, 24) Source(76, 21) + SourceIndex(0) -6 >Emitted(98, 39) Source(76, 30) + SourceIndex(0) -7 >Emitted(98, 44) Source(76, 21) + SourceIndex(0) -8 >Emitted(98, 59) Source(76, 30) + SourceIndex(0) -9 >Emitted(98, 67) Source(100, 2) + SourceIndex(0) +1 >Emitted(99, 9) Source(100, 1) + SourceIndex(0) +2 >Emitted(99, 10) Source(100, 2) + SourceIndex(0) +3 >Emitted(99, 12) Source(76, 21) + SourceIndex(0) +4 >Emitted(99, 21) Source(76, 30) + SourceIndex(0) +5 >Emitted(99, 24) Source(76, 21) + SourceIndex(0) +6 >Emitted(99, 39) Source(76, 30) + SourceIndex(0) +7 >Emitted(99, 44) Source(76, 21) + SourceIndex(0) +8 >Emitted(99, 59) Source(76, 30) + SourceIndex(0) +9 >Emitted(99, 67) Source(100, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1996,15 +1997,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(99, 5) Source(100, 1) + SourceIndex(0) -2 >Emitted(99, 6) Source(100, 2) + SourceIndex(0) -3 >Emitted(99, 8) Source(76, 15) + SourceIndex(0) -4 >Emitted(99, 13) Source(76, 20) + SourceIndex(0) -5 >Emitted(99, 16) Source(76, 15) + SourceIndex(0) -6 >Emitted(99, 28) Source(76, 20) + SourceIndex(0) -7 >Emitted(99, 33) Source(76, 15) + SourceIndex(0) -8 >Emitted(99, 45) Source(76, 20) + SourceIndex(0) -9 >Emitted(99, 53) Source(100, 2) + SourceIndex(0) +1 >Emitted(100, 5) Source(100, 1) + SourceIndex(0) +2 >Emitted(100, 6) Source(100, 2) + SourceIndex(0) +3 >Emitted(100, 8) Source(76, 15) + SourceIndex(0) +4 >Emitted(100, 13) Source(76, 20) + SourceIndex(0) +5 >Emitted(100, 16) Source(76, 15) + SourceIndex(0) +6 >Emitted(100, 28) Source(76, 20) + SourceIndex(0) +7 >Emitted(100, 33) Source(76, 15) + SourceIndex(0) +8 >Emitted(100, 45) Source(76, 20) + SourceIndex(0) +9 >Emitted(100, 53) Source(100, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -2046,12 +2047,12 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(100, 1) Source(100, 1) + SourceIndex(0) -2 >Emitted(100, 2) Source(100, 2) + SourceIndex(0) -3 >Emitted(100, 4) Source(76, 8) + SourceIndex(0) -4 >Emitted(100, 10) Source(76, 14) + SourceIndex(0) -5 >Emitted(100, 15) Source(76, 8) + SourceIndex(0) -6 >Emitted(100, 21) Source(76, 14) + SourceIndex(0) -7 >Emitted(100, 29) Source(100, 2) + SourceIndex(0) +1 >Emitted(101, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(101, 2) Source(100, 2) + SourceIndex(0) +3 >Emitted(101, 4) Source(76, 8) + SourceIndex(0) +4 >Emitted(101, 10) Source(76, 14) + SourceIndex(0) +5 >Emitted(101, 15) Source(76, 8) + SourceIndex(0) +6 >Emitted(101, 21) Source(76, 14) + SourceIndex(0) +7 >Emitted(101, 29) Source(100, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=recursiveClassReferenceTest.js.map \ No newline at end of file diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index a57560244582f..ea31184d8567a 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -51,21 +51,24 @@ var Symbol = (function () { var InferenceSymbol = (function (_super) { __extends(InferenceSymbol, _super); function InferenceSymbol() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return InferenceSymbol; }(Symbol)); var ParameterSymbol = (function (_super) { __extends(ParameterSymbol, _super); function ParameterSymbol() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ParameterSymbol; }(InferenceSymbol)); var TypeSymbol = (function (_super) { __extends(TypeSymbol, _super); function TypeSymbol() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return TypeSymbol; }(InferenceSymbol)); diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index 92cc2f72cac4f..72c97c309660a 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -52,7 +52,8 @@ var MsPortal; var ViewModel = (function (_super) { __extends(ViewModel, _super); function ViewModel() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ViewModel; }(ItemValue)); diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index a4b68115ac258..95ce777e446f3 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -42,7 +42,8 @@ var foo2 = require("./foo2"); var x = (function (_super) { __extends(x, _super); function x() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return x; }(foo2.x)); diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index 6e621a1880595..d2ec8e168bfad 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1030,7 +1030,8 @@ var rionegrensis; var caniventer = (function (_super) { __extends(caniventer, _super); function caniventer() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } caniventer.prototype.salomonseni = function () { var _this = this; @@ -1068,7 +1069,8 @@ var rionegrensis; var veraecrucis = (function (_super) { __extends(veraecrucis, _super); function veraecrucis() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } veraecrucis.prototype.naso = function () { var _this = this; @@ -1247,7 +1249,8 @@ var julianae; var oralis = (function (_super) { __extends(oralis, _super); function oralis() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } oralis.prototype.cepapi = function () { var _this = this; @@ -1333,7 +1336,8 @@ var julianae; var sumatrana = (function (_super) { __extends(sumatrana, _super); function sumatrana() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } sumatrana.prototype.wolffsohni = function () { var _this = this; @@ -1533,7 +1537,8 @@ var julianae; var durangae = (function (_super) { __extends(durangae, _super); function durangae() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } durangae.prototype.Californium = function () { var _this = this; @@ -1607,7 +1612,8 @@ var Lanthanum; var nitidus = (function (_super) { __extends(nitidus, _super); function nitidus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } nitidus.prototype.granatensis = function () { var _this = this; @@ -1675,7 +1681,8 @@ var Lanthanum; var megalonyx = (function (_super) { __extends(megalonyx, _super); function megalonyx() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } megalonyx.prototype.phillipsii = function () { var _this = this; @@ -1824,7 +1831,8 @@ var rendalli; var zuluensis = (function (_super) { __extends(zuluensis, _super); function zuluensis() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } zuluensis.prototype.telfairi = function () { var _this = this; @@ -1982,7 +1990,8 @@ var rendalli; var crenulata = (function (_super) { __extends(crenulata, _super); function crenulata() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } crenulata.prototype.salvanius = function () { var _this = this; @@ -2065,7 +2074,8 @@ var trivirgatus; var mixtus = (function (_super) { __extends(mixtus, _super); function mixtus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } mixtus.prototype.ochrogaster = function () { var _this = this; @@ -2307,7 +2317,8 @@ var ruatanica; var americanus = (function (_super) { __extends(americanus, _super); function americanus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } americanus.prototype.nasoloi = function () { var _this = this; @@ -2342,7 +2353,8 @@ var lavali; var wilsoni = (function (_super) { __extends(wilsoni, _super); function wilsoni() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } wilsoni.prototype.setiger = function () { var _this = this; @@ -2434,7 +2446,8 @@ var lavali; var otion = (function (_super) { __extends(otion, _super); function otion() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } otion.prototype.bonaerensis = function () { var _this = this; @@ -2598,7 +2611,8 @@ var lavali; var thaeleri = (function (_super) { __extends(thaeleri, _super); function thaeleri() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } thaeleri.prototype.coromandra = function () { var _this = this; @@ -2654,7 +2668,8 @@ var lavali; var lepturus = (function (_super) { __extends(lepturus, _super); function lepturus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } lepturus.prototype.ferrumequinum = function () { var _this = this; @@ -2677,7 +2692,8 @@ var dogramacii; var robustulus = (function (_super) { __extends(robustulus, _super); function robustulus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } robustulus.prototype.fossor = function () { var _this = this; @@ -2892,7 +2908,8 @@ var lutreolus; var schlegeli = (function (_super) { __extends(schlegeli, _super); function schlegeli() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } schlegeli.prototype.mittendorfi = function () { var _this = this; @@ -3119,7 +3136,8 @@ var panglima; var amphibius = (function (_super) { __extends(amphibius, _super); function amphibius() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } amphibius.prototype.bottegi = function () { var _this = this; @@ -3163,7 +3181,8 @@ var panglima; var fundatus = (function (_super) { __extends(fundatus, _super); function fundatus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } fundatus.prototype.crassulus = function () { var _this = this; @@ -3189,7 +3208,8 @@ var panglima; var abidi = (function (_super) { __extends(abidi, _super); function abidi() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } abidi.prototype.greyii = function () { var _this = this; @@ -3281,7 +3301,8 @@ var minutus; var himalayana = (function (_super) { __extends(himalayana, _super); function himalayana() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } himalayana.prototype.simoni = function () { var _this = this; @@ -3364,7 +3385,8 @@ var caurinus; var mahaganus = (function (_super) { __extends(mahaganus, _super); function mahaganus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } mahaganus.prototype.martiniquensis = function () { var _this = this; @@ -3438,7 +3460,8 @@ var howi; var angulatus = (function (_super) { __extends(angulatus, _super); function angulatus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } angulatus.prototype.pennatus = function () { var _this = this; @@ -3521,7 +3544,8 @@ var sagitta; var walkeri = (function (_super) { __extends(walkeri, _super); function walkeri() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } walkeri.prototype.maracajuensis = function () { var _this = this; @@ -3538,7 +3562,8 @@ var minutus; var inez = (function (_super) { __extends(inez, _super); function inez() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } inez.prototype.vexillaris = function () { var _this = this; @@ -3555,7 +3580,8 @@ var macrorhinos; var konganensis = (function (_super) { __extends(konganensis, _super); function konganensis() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return konganensis; }(imperfecta.lasiurus)); @@ -3566,7 +3592,8 @@ var panamensis; var linulus = (function (_super) { __extends(linulus, _super); function linulus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } linulus.prototype.goslingi = function () { var _this = this; @@ -3718,7 +3745,8 @@ var samarensis; var pelurus = (function (_super) { __extends(pelurus, _super); function pelurus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } pelurus.prototype.Palladium = function () { var _this = this; @@ -3804,7 +3832,8 @@ var samarensis; var fuscus = (function (_super) { __extends(fuscus, _super); function fuscus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } fuscus.prototype.planifrons = function () { var _this = this; @@ -3965,7 +3994,8 @@ var sagitta; var leptoceros = (function (_super) { __extends(leptoceros, _super); function leptoceros() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } leptoceros.prototype.victus = function () { var _this = this; @@ -4006,7 +4036,8 @@ var daubentonii; var nigricans = (function (_super) { __extends(nigricans, _super); function nigricans() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } nigricans.prototype.woosnami = function () { var _this = this; @@ -4032,7 +4063,8 @@ var argurus; var pygmaea = (function (_super) { __extends(pygmaea, _super); function pygmaea() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } pygmaea.prototype.pajeros = function () { var _this = this; @@ -4061,7 +4093,8 @@ var chrysaeolus; var sarasinorum = (function (_super) { __extends(sarasinorum, _super); function sarasinorum() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } sarasinorum.prototype.belzebul = function () { var _this = this; @@ -4165,7 +4198,8 @@ var argurus; var oreas = (function (_super) { __extends(oreas, _super); function oreas() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } oreas.prototype.salamonis = function () { var _this = this; @@ -4392,7 +4426,8 @@ var provocax; var melanoleuca = (function (_super) { __extends(melanoleuca, _super); function melanoleuca() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } melanoleuca.prototype.Neodymium = function () { var _this = this; @@ -4436,7 +4471,8 @@ var howi; var marcanoi = (function (_super) { __extends(marcanoi, _super); function marcanoi() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } marcanoi.prototype.formosae = function () { var _this = this; @@ -4843,7 +4879,8 @@ var gabriellae; var klossii = (function (_super) { __extends(klossii, _super); function klossii() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return klossii; }(imperfecta.lasiurus)); @@ -5046,7 +5083,8 @@ var imperfecta; var ciliolabrum = (function (_super) { __extends(ciliolabrum, _super); function ciliolabrum() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } ciliolabrum.prototype.leschenaultii = function () { var _this = this; @@ -5108,7 +5146,8 @@ var petrophilus; var sodyi = (function (_super) { __extends(sodyi, _super); function sodyi() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } sodyi.prototype.saundersiae = function () { var _this = this; @@ -5173,7 +5212,8 @@ var caurinus; var megaphyllus = (function (_super) { __extends(megaphyllus, _super); function megaphyllus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } megaphyllus.prototype.montana = function () { var _this = this; @@ -5346,7 +5386,8 @@ var lutreolus; var cor = (function (_super) { __extends(cor, _super); function cor() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } cor.prototype.antinorii = function () { var _this = this; @@ -5438,7 +5479,8 @@ var argurus; var germaini = (function (_super) { __extends(germaini, _super); function germaini() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } germaini.prototype.sharpei = function () { var _this = this; @@ -5536,7 +5578,8 @@ var dammermani; var melanops = (function (_super) { __extends(melanops, _super); function melanops() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } melanops.prototype.blarina = function () { var _this = this; @@ -5625,7 +5668,8 @@ var argurus; var peninsulae = (function (_super) { __extends(peninsulae, _super); function peninsulae() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } peninsulae.prototype.aitkeni = function () { var _this = this; @@ -5771,7 +5815,8 @@ var ruatanica; var Praseodymium = (function (_super) { __extends(Praseodymium, _super); function Praseodymium() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Praseodymium.prototype.clara = function () { var _this = this; @@ -5860,7 +5905,8 @@ var caurinus; var johorensis = (function (_super) { __extends(johorensis, _super); function johorensis() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } johorensis.prototype.maini = function () { var _this = this; @@ -5988,7 +6034,8 @@ var caurinus; var psilurus = (function (_super) { __extends(psilurus, _super); function psilurus() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } psilurus.prototype.socialis = function () { var _this = this; diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index fab0fe8fe0916..cd3a9f4c34682 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -123,7 +123,8 @@ var G = (function () { var H = (function (_super) { __extends(H, _super); function H() { - _super.call(this); + var _this; + _this = _super.call(this) || this; return new G(); //error } return H; @@ -131,7 +132,8 @@ var H = (function (_super) { var I = (function (_super) { __extends(I, _super); function I() { - _super.call(this); + var _this; + _this = _super.call(this) || this; return new G(); } return I; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index a543ad3bddae7..659eea55689ba 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -48,7 +48,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 3833a5caf7a82..02c812454459b 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -22,7 +22,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.c = function () { v = 1; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index d5de584e77958..781fd5ac6eef1 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -22,7 +22,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.c = function () { v = 1; diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 833e84ee5f3ae..e9394a64c9b83 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -25,7 +25,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this); + var _this; + _this = _super.call(this) || this; this.v = 1; this.p = 1; C.s = 1; diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index a1474a24777c1..d7e1b69e27451 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -18,7 +18,8 @@ var base = (function () { var derived = (function (_super) { __extends(derived, _super); function derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } derived.prototype.n = function () { }; return derived; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index 1d852127963ae..ea71fbc20c0d6 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -21,7 +21,8 @@ var AbstractGreeter = (function () { var Greeter = (function (_super) { __extends(Greeter, _super); function Greeter() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.a = 10; this.nameA = "Ten"; } diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map index 9c350133f2bf9..e36f2eaaf8ece 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;;QACW,MAAC,GAAG,EAAE,CAAC;QACP,UAAK,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,UAGC;;QAFU,MAAC,GAAG,EAAE,CAAC;QACP,UAAK,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 f305238465126..3da1d42edcde7 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -77,11 +77,23 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts --- >>> function Greeter() { 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(13, 5) Source(4, 1) + SourceIndex(0) --- ->>> _super.apply(this, arguments); +>>> var _this; +1->^^^^^^^^ +2 > ^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> +2 > class Greeter extends AbstractGreeter { + > public a = 10; + > public nameA = "Ten"; + > } +1->Emitted(14, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(14, 19) Source(7, 2) + SourceIndex(0) +--- +>>> _this = _super.apply(this, arguments) || this; >>> this.a = 10; 1->^^^^^^^^ 2 > ^^^^^^ @@ -89,17 +101,16 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 4 > ^^ 5 > ^ 6 > ^^^^^^^^-> -1->class Greeter extends AbstractGreeter { - > public +1-> 2 > a 3 > = 4 > 10 5 > ; -1->Emitted(15, 9) Source(5, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(5, 13) + SourceIndex(0) -3 >Emitted(15, 18) Source(5, 16) + SourceIndex(0) -4 >Emitted(15, 20) Source(5, 18) + SourceIndex(0) -5 >Emitted(15, 21) Source(5, 19) + SourceIndex(0) +1->Emitted(16, 9) Source(5, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(5, 13) + SourceIndex(0) +3 >Emitted(16, 18) Source(5, 16) + SourceIndex(0) +4 >Emitted(16, 20) Source(5, 18) + SourceIndex(0) +5 >Emitted(16, 21) Source(5, 19) + SourceIndex(0) --- >>> this.nameA = "Ten"; 1->^^^^^^^^ @@ -113,11 +124,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > "Ten" 5 > ; -1->Emitted(16, 9) Source(6, 12) + SourceIndex(0) -2 >Emitted(16, 19) Source(6, 17) + SourceIndex(0) -3 >Emitted(16, 22) Source(6, 20) + SourceIndex(0) -4 >Emitted(16, 27) Source(6, 25) + SourceIndex(0) -5 >Emitted(16, 28) Source(6, 26) + SourceIndex(0) +1->Emitted(17, 9) Source(6, 12) + SourceIndex(0) +2 >Emitted(17, 19) Source(6, 17) + SourceIndex(0) +3 >Emitted(17, 22) Source(6, 20) + SourceIndex(0) +4 >Emitted(17, 27) Source(6, 25) + SourceIndex(0) +5 >Emitted(17, 28) Source(6, 26) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -126,8 +137,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1 > > 2 > } -1 >Emitted(17, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(17, 6) Source(7, 2) + SourceIndex(0) +1 >Emitted(18, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(18, 6) Source(7, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ @@ -135,8 +146,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > ^^^-> 1-> 2 > } -1->Emitted(18, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(18, 19) Source(7, 2) + SourceIndex(0) +1->Emitted(19, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(19, 19) Source(7, 2) + SourceIndex(0) --- >>>}(AbstractGreeter)); 1-> @@ -155,11 +166,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(19, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(19, 2) Source(7, 2) + SourceIndex(0) -3 >Emitted(19, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(19, 3) Source(4, 23) + SourceIndex(0) -5 >Emitted(19, 18) Source(4, 38) + SourceIndex(0) -6 >Emitted(19, 21) Source(7, 2) + SourceIndex(0) +1->Emitted(20, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(20, 2) Source(7, 2) + SourceIndex(0) +3 >Emitted(20, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(20, 3) Source(4, 23) + SourceIndex(0) +5 >Emitted(20, 18) Source(4, 38) + SourceIndex(0) +6 >Emitted(20, 21) Source(7, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map \ No newline at end of file diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index f521ba14838b6..4f14cb6db97d5 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -36,7 +36,8 @@ var Model = (function () { var MyView = (function (_super) { __extends(MyView, _super); function MyView() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyView; }(View)); diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index 62688f7cb7ef3..3b909a8083646 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -27,7 +27,8 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived1.prototype.bar = function () { }; return Derived1; diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index 6ccd30e37d15a..d229c5330ba5a 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -31,7 +31,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Derived.prototype.foo = function () { return 2; }; return Derived; diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index 52868930792a8..8b4b8326cab07 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -27,7 +27,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this.p1 = doThing(A); // OK this.p2 = doThing(B); // OK } diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index 1c76a2512208f..a07bea081a9fa 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -26,7 +26,8 @@ var SomeBase = (function () { var P = (function (_super) { __extends(P, _super); function P() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return P; }(SomeBase)); diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index c25c406746dfb..b2eea36eece14 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -49,8 +49,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { + var _this; var x = 1; // should not error - _super.call(this); + _this = _super.call(this) || this; } return B; }(A)); @@ -58,6 +59,7 @@ B.s = 9; var C = (function (_super) { __extends(C, _super); function C() { + var _this; this.p = 10; var x = 1; // should error } @@ -66,6 +68,7 @@ var C = (function (_super) { var D = (function (_super) { __extends(D, _super); function D() { + var _this; this.p = 11; var x = 1; // should error } @@ -74,6 +77,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { + var _this; this.p = 12; var x = 1; // should error } diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 446fed5b76a2f..e40e0c45a59a1 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -74,8 +74,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { + var _this; "use strict"; // No error - _super.call(this); + _this = _super.call(this) || this; this.s = 9; } return B; @@ -83,7 +84,8 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - _super.call(this); // No error + var _this; + _this = _super.call(this) || this; // No error this.s = 9; "use strict"; } @@ -92,9 +94,10 @@ var C = (function (_super) { var D = (function (_super) { __extends(D, _super); function D() { + var _this; this.s = 9; var x = 1; // Error - _super.call(this); + _this = _super.call(this) || this; "use strict"; } return D; @@ -102,8 +105,9 @@ var D = (function (_super) { var Bs = (function (_super) { __extends(Bs, _super); function Bs() { + var _this; "use strict"; // No error - _super.call(this); + _this = _super.call(this) || this; } return Bs; }(A)); @@ -111,7 +115,8 @@ Bs.s = 9; var Cs = (function (_super) { __extends(Cs, _super); function Cs() { - _super.call(this); // No error + var _this; + _this = _super.call(this) || this; // No error "use strict"; } return Cs; @@ -120,8 +125,9 @@ Cs.s = 9; var Ds = (function (_super) { __extends(Ds, _super); function Ds() { + var _this; var x = 1; // no Error - _super.call(this); + _this = _super.call(this) || this; "use strict"; } return Ds; diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index 210d9ec75be64..af01ca1716f9d 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -48,7 +48,8 @@ function foo() { var myClass = (function (_super) { __extends(package, _super); function package() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return package; }(public)); diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index 281b4ade5d6b7..300d83b9bbceb 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -75,14 +75,16 @@ var F1 = (function () { var G = (function (_super) { __extends(G, _super); function G() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return G; }(package)); var H = (function (_super) { __extends(H, _super); function H() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return H; }(package.A)); diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index 08a26230f3742..eb5052f51d7db 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -55,7 +55,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.bar = function () { return ''; }; return B; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 10d9e3e42eca4..cbe42a510b34d 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -120,7 +120,8 @@ var C3 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1; }(C3)); diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index 0753c52dc9eb7..568002483939a 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -182,28 +182,32 @@ var C3 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1; }(C3)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(C3)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D3; }(C3)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D4; }(C3)); @@ -213,21 +217,24 @@ var D4 = (function (_super) { var D5 = (function (_super) { __extends(D5, _super); function D5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D5; }(C3)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D6; }(C3)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D7; }(C3)); @@ -236,21 +243,24 @@ var D7 = (function (_super) { var D8 = (function (_super) { __extends(D8, _super); function D8() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D8; }(C3)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D9; }(C3)); var D10 = (function (_super) { __extends(D10, _super); function D10() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D10; }(C3)); @@ -259,21 +269,24 @@ var D10 = (function (_super) { var D11 = (function (_super) { __extends(D11, _super); function D11() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D11; }(C3)); var D12 = (function (_super) { __extends(D12, _super); function D12() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D12; }(C3)); var D13 = (function (_super) { __extends(D13, _super); function D13() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D13; }(C3)); @@ -283,28 +296,32 @@ var D13 = (function (_super) { var D14 = (function (_super) { __extends(D14, _super); function D14() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D14; }(C3)); var D15 = (function (_super) { __extends(D15, _super); function D15() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D15; }(C3)); var D16 = (function (_super) { __extends(D16, _super); function D16() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D16; }(C3)); var D17 = (function (_super) { __extends(D17, _super); function D17() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D17; }(C3)); @@ -313,28 +330,32 @@ var D17 = (function (_super) { var D18 = (function (_super) { __extends(D18, _super); function D18() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D18; }(C3)); var D19 = (function (_super) { __extends(D19, _super); function D19() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D19; }(C3)); var D20 = (function (_super) { __extends(D20, _super); function D20() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D20; }(C3)); var D21 = (function (_super) { __extends(D21, _super); function D21() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D21; }(C3)); @@ -343,28 +364,32 @@ var D21 = (function (_super) { var D22 = (function (_super) { __extends(D22, _super); function D22() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D22; }(C3)); var D23 = (function (_super) { __extends(D23, _super); function D23() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D23; }(C3)); var D24 = (function (_super) { __extends(D24, _super); function D24() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D24; }(C3)); var D25 = (function (_super) { __extends(D25, _super); function D25() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D25; }(C3)); @@ -373,28 +398,32 @@ var D25 = (function (_super) { var D26 = (function (_super) { __extends(D26, _super); function D26() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D26; }(C3)); var D27 = (function (_super) { __extends(D27, _super); function D27() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D27; }(C3)); var D28 = (function (_super) { __extends(D28, _super); function D28() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D28; }(C3)); var D29 = (function (_super) { __extends(D29, _super); function D29() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D29; }(C3)); diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index f388bd4e04759..e4e35262d80d6 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -118,63 +118,72 @@ var B1 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1; }(B1)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(B1)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D3; }(B1)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D4; }(B1)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D5; }(B1)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D6; }(B1)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D7; }(B1)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D8; }(B1)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D9; }(B1)); diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index cffda7d7f5527..0d1347cd33c91 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -217,63 +217,72 @@ var M1; var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1; }(Base)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(Base)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D3; }(Base)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D4; }(Base)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D5; }(Base)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D6; }(Base)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D7; }(Base)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D8; }(Base)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D9; }(Base)); @@ -288,63 +297,72 @@ var M2; var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1; }(Base2)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(Base2)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D3; }(Base2)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D4; }(Base2)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D5; }(Base2)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D6; }(Base2)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D7; }(Base2)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D8; }(Base2)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D9; }(Base2)); diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index 9d3df207a0ce1..9ba7ac52df58a 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -33,14 +33,16 @@ var B = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(B)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(B)); diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index 014ce4a30038f..d4cd66a5e0a41 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -187,21 +187,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index 55f5fa60e7154..93b1cbebd0aad 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -136,21 +136,24 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index b8839316e8669..5cab9f1e7c483 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -126,21 +126,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index c4168febf4eea..ec551f5f58cbf 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -187,21 +187,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index 171e52505e0a9..ba833c31e7a60 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -138,21 +138,24 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index 1152dde04dd29..0b624fcbc51ad 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -126,21 +126,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index 24a5ce77dd00d..3d2d4d50d6e91 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -64,21 +64,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index 8778255dbd576..1cec204ff877e 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -67,21 +67,24 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index cd447c116daee..2aa4d834395a4 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -54,14 +54,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A)); @@ -75,28 +77,32 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B4; }(A)); diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index 104141b761d5f..60f463546c856 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -58,14 +58,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A)); @@ -79,35 +81,40 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B4; }(A)); var B5 = (function (_super) { __extends(B5, _super); function B5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B5; }(A)); diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index 59f8cd95ad01d..f40804bd55f0f 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -42,7 +42,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -56,14 +57,16 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A)); diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index c3cef6601e6b0..420be798293c0 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -81,14 +81,16 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Derived)); @@ -102,7 +104,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -114,7 +117,8 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A2)); @@ -126,7 +130,8 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A3)); @@ -140,7 +145,8 @@ var TwoLevels; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -152,7 +158,8 @@ var TwoLevels; var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A2)); @@ -164,7 +171,8 @@ var TwoLevels; var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index d5c1107e45d56..0bb50afe98540 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -48,7 +48,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -60,7 +61,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -72,7 +74,8 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A2)); @@ -84,7 +87,8 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index 25faacad88e4c..ec3b8382ecab1 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -48,7 +48,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -60,7 +61,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -72,7 +74,8 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A2)); @@ -84,7 +87,8 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index 7b0398143a28c..24f36819ff655 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -76,7 +76,8 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived; }(Base)); @@ -90,7 +91,8 @@ var ExplicitPublic; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -102,7 +104,8 @@ var ExplicitPublic; var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A2)); @@ -114,7 +117,8 @@ var ExplicitPublic; var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A3)); @@ -129,7 +133,8 @@ var ImplicitPublic; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -141,7 +146,8 @@ var ImplicitPublic; var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A2)); @@ -153,7 +159,8 @@ var ImplicitPublic; var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index 0740743a5d9c3..95a71a018d162 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -55,14 +55,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A)); @@ -76,28 +78,32 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B4; }(A)); diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index 5ed44177d5283..fd9b400cb3da8 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -58,14 +58,16 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A)); @@ -79,35 +81,40 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B4; }(A)); var B5 = (function (_super) { __extends(B5, _super); function B5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B5; }(A)); diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index d6fb874c0900b..46178d1dc321a 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -42,7 +42,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); @@ -56,14 +57,16 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B3; }(A)); diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index 81d76aec62bc3..54afddcc11913 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -58,7 +58,8 @@ var Base = (function () { var Sub1 = (function (_super) { __extends(Sub1, _super); function Sub1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Sub1.prototype.foo = function () { return "sub1" + _super.prototype.foo.call(this) + _super.prototype.bar.call(this); @@ -68,7 +69,8 @@ var Sub1 = (function (_super) { var SubSub1 = (function (_super) { __extends(SubSub1, _super); function SubSub1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 4179843b79a02..8ef621cdf2b51 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -84,7 +84,8 @@ var Base1 = (function () { var Sub1 = (function (_super) { __extends(Sub1, _super); function Sub1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Sub1.prototype.bar = function () { return "base"; @@ -94,7 +95,8 @@ var Sub1 = (function (_super) { var SubSub1 = (function (_super) { __extends(SubSub1, _super); function SubSub1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } SubSub1.prototype.bar = function () { return _super.prototype.super.foo; @@ -113,7 +115,8 @@ var Base2 = (function () { var SubE2 = (function (_super) { __extends(SubE2, _super); function SubE2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } SubE2.prototype.bar = function () { return _super.prototype.prototype.foo = null; @@ -132,7 +135,8 @@ var Base3 = (function () { var SubE3 = (function (_super) { __extends(SubE3, _super); function SubE3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } SubE3.prototype.bar = function () { return _super.prototype.bar.call(this); @@ -153,7 +157,8 @@ var Base4; var SubSub4 = (function (_super) { __extends(SubSub4, _super); function SubSub4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 979bdba84e418..80e26c36f7c89 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -71,7 +71,8 @@ var Base5 = (function () { var Sub5 = (function (_super) { __extends(Sub5, _super); function Sub5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Sub5.prototype.x = function () { return "SubX"; @@ -81,7 +82,8 @@ var Sub5 = (function (_super) { var SubSub5 = (function (_super) { __extends(SubSub5, _super); function SubSub5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } SubSub5.prototype.x = function () { return _super.prototype.x.call(this); @@ -103,7 +105,8 @@ var Base6 = (function () { var Sub6 = (function (_super) { __extends(Sub6, _super); function Sub6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Sub6.prototype.y = function () { return "SubY"; @@ -113,7 +116,8 @@ var Sub6 = (function (_super) { var SubSub6 = (function (_super) { __extends(SubSub6, _super); function SubSub6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 6e5cd9aca4476..8c9d93f3a36a2 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -30,7 +30,8 @@ MyBase.S1 = 5; var MyDerived = (function (_super) { __extends(MyDerived, _super); function MyDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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/superAccess2.js b/tests/baselines/reference/superAccess2.js index 8de13b5ef51cc..ff711ca8d75ac 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -41,11 +41,11 @@ var Q = (function (_super) { __extends(Q, _super); // Super is not allowed in constructor args function Q(z, zz, zzz) { - var _this = this; + var _this; if (z === void 0) { z = _super.; } if (zz === void 0) { zz = _super.; } if (zzz === void 0) { zzz = function () { return _super.; }; } - _super.call(this); + _this = _super.call(this) || this; this.z = z; this.xx = _super.prototype.; } diff --git a/tests/baselines/reference/superAccessInFatArrow1.js b/tests/baselines/reference/superAccessInFatArrow1.js index 3cd4e199c6218..be97707b12a55 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -34,7 +34,8 @@ var test; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.bar = function (callback) { }; diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index 9dcdbda8e31ae..3dec9369dd427 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -40,9 +40,10 @@ var T5 = (function () { var T6 = (function (_super) { __extends(T6, _super); function T6() { + var _this; // Should error; base constructor has type T for first arg, // which is instantiated with 'number' in the extends clause - _super.call(this, "hi"); + _this = _super.call(this, "hi") || this; var x = this.foo; } return T6; diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index 7002f94eb7d45..4eeabdfa2822c 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -24,7 +24,8 @@ var E = (function () { var H = (function (_super) { __extends(H, _super); function H() { - var x = _super.call(this, 5); // Should be of type void, not E. + var _this; + var x = _this = _super.call(this, 5) || this; // Should be of type void, not E. x = 5; } return H; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index 1fc7ab39c9179..e70dde9fd8e13 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -30,7 +30,8 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this, i); + var _this; + _this = _super.call(this, i) || this; var s = { t: this._t }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index e5acf06bbfd49..8ab6c5f349c25 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -24,8 +24,8 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = this; - _super.call(this, function () { _this._t; }); // no error. only check when this is directly accessing in constructor + var _this; + _this = _super.call(this, function () { _this._t; }) || this; // no error. only check when this is directly accessing in constructor } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 101d74e4bc724..1f4c81149133a 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -27,11 +27,11 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = this; + var _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 - _super.call(this, undefined); + _this = _super.call(this, undefined) || this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index 9c3c5ab60c4c9..2645eaa9795dc 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -24,15 +24,17 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { + var _this; this._t; - _super.call(this); + _this = _super.call(this) || this; } return D; }(null)); var E = (function (_super) { __extends(E, _super); function E() { - _super.call(this); + var _this; + _this = _super.call(this) || this; this._t; } return E; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 3281a3f8b55da..df345ec5c26b8 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -16,6 +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 D; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index 746ce9f2791f1..d4e8c97955262 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -24,7 +24,8 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this, this); + var _this; + _this = _super.call(this, this) || this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index c3aa1655cf75c..f6c41b144eba4 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -27,10 +27,11 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { + var _this; var x = { j: this._t }; - _super.call(this, undefined); + _this = _super.call(this, undefined) || this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index 0865c4305a5ff..7d09351621a64 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -27,8 +27,9 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { + var _this; var x = { - k: _super.call(this, undefined), + k: _this = _super.call(this, undefined) || this, j: this._t }; } diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index 50830480b1a47..6de41cb518831 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -20,7 +20,8 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return D; }(B)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index ef77098588896..5ae8f8b38748e 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -19,7 +19,8 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return D; }(B)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index ebb70023b538a..bc85d74c4c8c7 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -25,7 +25,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.call(this, function (value) { return String(value); }); + var _this; + _this = _super.call(this, function (value) { return String(value); }) || this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index d619343ba142b..a1736bb45f021 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -25,7 +25,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.call(this, function (value) { return String(value); }); + var _this; + _this = _super.call(this, function (value) { return String(value); }) || this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index e9ee84be15224..c5beb5df5b5ba 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -25,7 +25,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.call(this, function (value) { return String(value); }); + var _this; + _this = _super.call(this, function (value) { return String(value); }) || this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js b/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js index d793e9bb2ae0b..e4b358c9a0a61 100644 --- a/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js +++ b/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js @@ -19,7 +19,7 @@ var A = (function () { }()); var B = (function () { function B() { - _super.call(this, function (value) { return String(value); }); + _this = _super.call(this, function (value) { return String(value); }) || this; } return B; }()); diff --git a/tests/baselines/reference/superCallFromFunction1.js b/tests/baselines/reference/superCallFromFunction1.js index a7fcbaaeff0d5..7f34628c58a89 100644 --- a/tests/baselines/reference/superCallFromFunction1.js +++ b/tests/baselines/reference/superCallFromFunction1.js @@ -6,5 +6,5 @@ function foo() { //// [superCallFromFunction1.js] function foo() { - _super.call(this, function (value) { return String(value); }); + _this = _super.call(this, function (value) { return String(value); }) || this; } diff --git a/tests/baselines/reference/superCallInConstructorWithNoBaseType.js b/tests/baselines/reference/superCallInConstructorWithNoBaseType.js index 9746ab6a9de5d..dcbebeaa452e6 100644 --- a/tests/baselines/reference/superCallInConstructorWithNoBaseType.js +++ b/tests/baselines/reference/superCallInConstructorWithNoBaseType.js @@ -14,13 +14,13 @@ class D { //// [superCallInConstructorWithNoBaseType.js] var C = (function () { function C() { - _super.call(this); // error + _this = _super.call(this) || this; // error } return C; }()); var D = (function () { function D(x) { - _super.call(this); // error + _this = _super.call(this) || this; // error this.x = x; } return D; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 3ff07edf4c9ef..6640a32be5a02 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -66,8 +66,8 @@ var Doing = (function () { var Other = (function (_super) { __extends(Other, _super); function Other() { - var _this = this; - _super.call(this); + var _this; + _this = _super.call(this) || this; this.propertyInitializer = _super.prototype.instanceMethod.call(this); this.functionProperty = function () { _super.prototype.instanceMethod.call(_this); }; _super.prototype.instanceMethod.call(this); diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index 91558e47d3f88..6cf9f79e7a413 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -62,7 +62,8 @@ var Doing = (function () { var Other = (function (_super) { __extends(Other, _super); function Other() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } // in static method Other.staticMethod = function () { diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index e677c426e0241..f47b50d4915d4 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -35,10 +35,12 @@ var C = (function () { var B = (function (_super) { __extends(B, _super); function B() { + var _this; var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return D; }(C)); diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index ee373f69f4600..b9e1f6c97866f 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -35,10 +35,12 @@ var C = (function () { var B = (function (_super) { __extends(B, _super); function B() { + var _this; var D = (function (_super) { __extends(class_1, _super); function class_1() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return class_1; }(C)); diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index 3f9a0a9ce9c87..68a9c19e819cb 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -28,8 +28,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { + var _this; var x = { - x: _super.call(this) + x: _this = _super.call(this) || this }; } return B; diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 202ed531a10c2..fd91de4cc8e1d 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -37,13 +37,14 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this); - this.x = _super.call(this); + var _this; + _this = _super.call(this) || this; + this.x = _this = _super.call(this) || this; var y = function () { - _super.call(this); + _this = _super.call(_this) || _this; }; var y2 = function () { - _super.call(this); + _this = _super.call(this) || this; }; } return D; diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index 5bfe3927a512e..a311ce95fc733 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -28,7 +28,8 @@ var B = (function (_super) { __extends(B, _super); // Ensure 'value' is of type 'number (and not '{}') by using its 'toExponential()' method. function B() { - _super.call(this, function (value) { return String(value.toExponential()); }); + var _this; + _this = _super.call(this, function (value) { return String(value.toExponential()); }) || this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index 539ecbed065e4..9439871f38c28 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -27,7 +27,8 @@ var C = (function (_super) { __extends(C, _super); // Ensure 'value' is not of type 'any' by invoking it with type arguments. function C() { - _super.call(this, function (value) { return String(value()); }); + var _this; + _this = _super.call(this, function (value) { return String(value()); }) || this; } return C; }(A)); diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index d35a1707bb74c..cfa3fd1c07431 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -47,13 +47,14 @@ var CBase = (function () { var C = (function (_super) { __extends(C, _super); function C() { + var _this; // Should be okay. // 'p' should have type 'string'. - _super.call(this, { + _this = _super.call(this, { method: function (p) { p.length; } - }); + }) || this; // Should be okay. // 'p' should have type 'string'. _super.prototype.foo.call(this, { diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 7758bcfd89d99..561b7300fe428 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -18,7 +18,8 @@ var __extends = (this && this.__extends) || function (d, b) { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 ae8327ec20022..96b0061f47e90 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -47,10 +47,11 @@ var Derived = (function (_super) { __extends(Derived, _super); //super call in class constructor of derived type function Derived(q) { - _super.call(this, ''); + var _this; + _this = _super.call(this, '') || this; this.q = q; //type of super call expression is void - var p = _super.call(this, ''); + var p = _this = _super.call(this, '') || this; var p = v(); } return Derived; @@ -63,8 +64,9 @@ var OtherBase = (function () { var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { + var _this; var p = ''; - _super.call(this); + _this = _super.call(this) || this; } return OtherDerived; }(OtherBase)); diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 434f730c76b82..be34657a0c1db 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -41,14 +41,15 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { + var _this; with (new C()) { foo(); - _super.call(this); + _this = _super.call(this) || this; bar(); } try { } catch (e) { - _super.call(this); + _this = _super.call(this) || this; } } return Derived; diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index fd70114d0fd0c..f962876a391c0 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -76,7 +76,8 @@ var User = (function () { var RegisteredUser = (function (_super) { __extends(RegisteredUser, _super); function RegisteredUser() { - _super.call(this); + var _this; + _this = _super.call(this) || this; this.name = "Frank"; // super call in an inner function in a constructor function inner() { diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index 9d5cb1affdcaa..9eb7df62c1ab9 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -28,7 +28,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.m = function () { try { diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 3c6eb0bdad2c2..ab1744929a995 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -27,6 +27,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C(a) { + var _this; if (a === void 0) { a = _super.foo.call(this); } } return C; diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index b0940b1d53809..f2c84cb7e64ba 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -85,8 +85,8 @@ var User = (function () { var RegisteredUser = (function (_super) { __extends(RegisteredUser, _super); function RegisteredUser() { - var _this = this; - _super.call(this); + var _this; + _this = _super.call(this) || this; this.name = "Frank"; // super call in a constructor _super.prototype.sayHello.call(this); @@ -105,8 +105,8 @@ var RegisteredUser = (function (_super) { var RegisteredUser2 = (function (_super) { __extends(RegisteredUser2, _super); function RegisteredUser2() { - var _this = this; - _super.call(this); + var _this; + _this = _super.call(this) || this; this.name = "Joe"; // super call in a nested lambda in a constructor var x = function () { return function () { return function () { return _super.prototype.sayHello.call(_this); }; }; }; @@ -121,8 +121,8 @@ var RegisteredUser2 = (function (_super) { var RegisteredUser3 = (function (_super) { __extends(RegisteredUser3, _super); function RegisteredUser3() { - var _this = this; - _super.call(this); + var _this; + _this = _super.call(this) || this; this.name = "Sam"; // super property in a nested lambda in a constructor var superName = function () { return function () { return function () { return _super.prototype.name; }; }; }; @@ -137,8 +137,8 @@ var RegisteredUser3 = (function (_super) { var RegisteredUser4 = (function (_super) { __extends(RegisteredUser4, _super); function RegisteredUser4() { - var _this = this; - _super.call(this); + var _this; + _this = _super.call(this) || this; this.name = "Mark"; // super in a nested lambda in a constructor var x = function () { return function () { return _super.prototype.; }; }; diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index 5d1fed24b4f1a..adeda5835cb83 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -100,7 +100,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.f = function () { var _this = this; diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index 01ae169b598d5..32c4da4d4e4ed 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -27,6 +27,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { + var _this; new _super.prototype(function (value) { return String(value); }); } return B; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index 0e1e878344860..b1377eb9cde35 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -61,7 +61,8 @@ var MyBase = (function () { var MyDerived = (function (_super) { __extends(MyDerived, _super); function MyDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } MyDerived.prototype.foo = function () { _super.prototype.m1.call(this, "hi"); // Should be allowed, method on base prototype diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index 4df9398024c84..86f059a2fb22b 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -50,7 +50,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this); + var _this; + _this = _super.call(this) || this; _super.prototype.bar.call(this); _super.prototype.x; // error } diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index ec74a2ea0694b..be0c44b40818e 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -50,7 +50,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this); + var _this; + _this = _super.call(this) || this; _super.prototype.bar.call(this); // error _super.prototype.x; // error } diff --git a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js index a91dfc76e3daf..1397a0748ae5e 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -29,7 +29,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } B.prototype.foo = function () { return 2; }; B.prototype.bar = function () { diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index df230ce3703db..f7663eab6e057 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -99,7 +99,8 @@ var SomeBaseClass = (function () { var SomeDerivedClass = (function (_super) { __extends(SomeDerivedClass, _super); function SomeDerivedClass() { - _super.call(this); + var _this; + _this = _super.call(this) || this; var x = _super.prototype.func.call(this); var x; } diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 63f5f6f316aae..14492c2788ab1 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -49,7 +49,8 @@ var MyBase = (function () { var MyDerived = (function (_super) { __extends(MyDerived, _super); function MyDerived() { - _super.call(this); + var _this; + _this = _super.call(this) || this; var f1 = _super.prototype.getValue.call(this); var f2 = _super.prototype.value; } @@ -71,7 +72,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(B.prototype, "property", { set: function (value) { diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index 3acd26d297456..0796c912d8cfa 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -31,7 +31,8 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _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 8b04075c41193..ee376cec2cb27 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -31,7 +31,8 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Bar[symbol] = function () { return _super[symbol].call(this); diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index a54ee1bbcbc94..499c0a6de1fd0 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -28,7 +28,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this); // uses the type parameter type of the base class, ie string + var _this; + _this = _super.call(this) || this; // uses the type parameter type of the base class, ie string } return D; }(C)); diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index b4fe56bee4c0a..471c7cd36acfa 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -20,7 +20,8 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - _super.call(this); + var _this; + _this = _super.call(this) || this; } return D; }(B)); diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index 766b5f7920e28..a4acd321f503f 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -23,6 +23,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { + var _this; _super.prototype..call(this); } return D; diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index e0d2a40633f32..ca399c4de78c0 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -23,6 +23,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D(x) { + var _this; _super.prototype..call(this, x); } return D; diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 586dc595b3976..5a124586d0cfb 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -28,6 +28,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { + var _this; _super.prototype..call(this); } D.prototype.bar = function () { 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 db6db37ac8a58..ed71cebe3c78a 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,8 @@ var F = (function () { var SuperObjectTest = (function (_super) { __extends(SuperObjectTest, _super); function SuperObjectTest() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } SuperObjectTest.prototype.testing = function () { var test = { diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index 093a7fb2f2c19..7aac6cb47e0c2 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -98,7 +98,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index 31cd542d2e23b..59aff947e5c06 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -49,7 +49,8 @@ System.register(["./foo"], function (exports_1, context_1) { Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Bar; }(foo_1.Foo)); diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index d028c04d711d8..a9bbc34123fbe 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -35,7 +35,8 @@ new Foo(function (s) { s = 5; }); // error, if types are applied correctly var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.call(this, function (s) { s = 5; }); + var _this; + _this = _super.call(this, function (s) { s = 5; }) || this; } return Bar; }(Foo)); // error, if types are applied correctly diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 76eeef0139c76..2a86b144ae51d 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -70,7 +70,8 @@ var ClassWithNoInitializer = (function (_super) { __extends(ClassWithNoInitializer, _super); //'this' in optional super call function ClassWithNoInitializer() { - _super.call(this, this); // Error + var _this; + _this = _super.call(this, this) || this; // Error } return ClassWithNoInitializer; }(BaseErrClass)); @@ -78,7 +79,8 @@ var ClassWithInitializer = (function (_super) { __extends(ClassWithInitializer, _super); //'this' in required super call function ClassWithInitializer() { - _super.call(this, this); // Error + var _this; + _this = _super.call(this, this) || this; // Error this.t = 4; } return ClassWithInitializer; @@ -96,7 +98,8 @@ genericFunc(undefined); // Should be an error var ErrClass3 = (function (_super) { __extends(ErrClass3, _super); function ErrClass3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ErrClass3; }(this)); diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 634b5ef0a2024..3748ebaa42f6b 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -71,7 +71,8 @@ var ClassWithNoInitializer = (function (_super) { __extends(ClassWithNoInitializer, _super); //'this' in optional super call function ClassWithNoInitializer() { - _super.call(this, this); // error: "super" has to be called before "this" accessing + var _this; + _this = _super.call(this, this) || this; // error: "super" has to be called before "this" accessing } return ClassWithNoInitializer; }(BaseErrClass)); @@ -79,7 +80,8 @@ var ClassWithInitializer = (function (_super) { __extends(ClassWithInitializer, _super); //'this' in required super call function ClassWithInitializer() { - _super.call(this, this); // Error + var _this; + _this = _super.call(this, this) || this; // Error this.t = 4; } return ClassWithInitializer; @@ -97,7 +99,8 @@ genericFunc(undefined); // Should be an error var ErrClass3 = (function (_super) { __extends(ErrClass3, _super); function ErrClass3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return ErrClass3; }(this)); diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index 827d101c95aed..91e71522e4df8 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -36,14 +36,16 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - _super.call(this, this); // error: "super" has to be called before "this" accessing + var _this; + _this = _super.call(this, this) || this; // error: "super" has to be called before "this" accessing } return Foo; }(Base)); var Foo2 = (function (_super) { __extends(Foo2, _super); function Foo2() { - _super.call(this, this); // error + var _this; + _this = _super.call(this, this) || this; // error this.p = 0; } return Foo2; @@ -51,7 +53,8 @@ var Foo2 = (function (_super) { var Foo3 = (function (_super) { __extends(Foo3, _super); function Foo3(p) { - _super.call(this, this); // error + var _this; + _this = _super.call(this, this) || this; // error this.p = p; } return Foo3; diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index a1cfc196ac634..8e68c47eb2717 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -24,7 +24,8 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo(x) { - _super.call(this, this); + var _this; + _this = _super.call(this, this) || this; this.x = x; } return Foo; diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index fdffdd27d6d4b..6771f15c99b5c 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -33,14 +33,16 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - _super.call(this, this); // error: "super" has to be called before "this" accessing + var _this; + _this = _super.call(this, this) || this; // error: "super" has to be called before "this" accessing } return Foo; }(Base)); var Foo2 = (function (_super) { __extends(Foo2, _super); function Foo2() { - _super.call(this, this); // error + var _this; + _this = _super.call(this, this) || this; // error this.x = 0; } return Foo2; diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index 09ad6b705a942..4b6c1747d17df 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -26,7 +26,8 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - _super.call(this, this); + var _this; + _this = _super.call(this, this) || this; this.x = 0; } return Foo; diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index cfe1706ae99db..6eaaed5c497ec 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -227,7 +227,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D; }(C)); @@ -336,7 +337,8 @@ var Base1 = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived1; }(Base1)); @@ -350,7 +352,8 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 4b40ca2e1e78f..08e12f49dca76 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -296,7 +296,8 @@ var Base1 = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived1; }(Base1)); @@ -310,7 +311,8 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index a8d154998e16a..9a64ef6cee6c1 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -30,7 +30,8 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this._tagName = 'div'; } Text.prototype.render = function () { diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index dbe171f968276..30500b37ce5c0 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -30,7 +30,8 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this._tagName = 'div'; } Text.prototype.render = function () { diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index e6f63b6a9bf00..a6cf3bb45b888 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -30,7 +30,8 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this._tagName = 'div'; } Text.prototype.render = function () { diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index 589cc7cd226de..aa63e614d1547 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -30,7 +30,8 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - _super.apply(this, arguments); + var _this; + _this = _super.apply(this, arguments) || this; this._tagName = 'div'; } Text.prototype.render = function () { diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 0d4e58d7008e0..0f6b8716ed012 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -42,7 +42,8 @@ var React = require("react"); var Button = (function (_super) { __extends(Button, _super); function Button() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Button.prototype.render = function () { return ; @@ -63,7 +64,8 @@ var button_1 = require("./button"); var App = (function (_super) { __extends(App, _super); function App() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } App.prototype.render = function () { return ; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index b93832567d567..f7ac96cff1f8c 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -52,7 +52,8 @@ function Greet(x) { var BigGreeter = (function (_super) { __extends(BigGreeter, _super); function BigGreeter() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } BigGreeter.prototype.render = function () { return
; diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index 444542068be3e..56a6896f05277 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -35,7 +35,8 @@ var React = require("react"); var MyComponent = (function (_super) { __extends(MyComponent, _super); function MyComponent() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } MyComponent.prototype.render = function () { var AnyComponent = this.props.AnyComponent; @@ -49,7 +50,8 @@ React.createElement(MyComponent, { AnyComponent: function () { return React.crea var MyButtonComponent = (function (_super) { __extends(MyButtonComponent, _super); function MyButtonComponent() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return MyButtonComponent; }(React.Component)); diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index 1d33fa927a79b..083cb5e94b391 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -74,7 +74,8 @@ var SomeBase = (function () { var SomeDerived = (function (_super) { __extends(SomeDerived, _super); function SomeDerived() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return SomeDerived; }(SomeBase)); diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index fcd6435ca1d6b..45bf0853b138a 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -102,7 +102,8 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index f3ff5ffab4afc..727640ee8af7f 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -164,7 +164,8 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index 2b5bd5e826598..dad77edf2329b 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -52,7 +52,8 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index ad85f679e0ab2..eec648976c6cb 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -161,7 +161,8 @@ var RoyalGuard = (function () { var LeadGuard = (function (_super) { __extends(LeadGuard, _super); function LeadGuard() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } LeadGuard.prototype.lead = function () { }; ; @@ -170,7 +171,8 @@ var LeadGuard = (function (_super) { var FollowerGuard = (function (_super) { __extends(FollowerGuard, _super); function FollowerGuard() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } FollowerGuard.prototype.follow = function () { }; ; @@ -224,7 +226,8 @@ var ArrowGuard = (function () { var ArrowElite = (function (_super) { __extends(ArrowElite, _super); function ArrowElite() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } ArrowElite.prototype.defend = function () { }; return ArrowElite; @@ -232,7 +235,8 @@ var ArrowElite = (function (_super) { var ArrowMedic = (function (_super) { __extends(ArrowMedic, _super); function ArrowMedic() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } ArrowMedic.prototype.heal = function () { }; return ArrowMedic; @@ -266,7 +270,8 @@ var MimicGuard = (function () { var MimicLeader = (function (_super) { __extends(MimicLeader, _super); function MimicLeader() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } MimicLeader.prototype.lead = function () { }; return MimicLeader; @@ -274,7 +279,8 @@ var MimicLeader = (function (_super) { var MimicFollower = (function (_super) { __extends(MimicFollower, _super); function MimicFollower() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } MimicFollower.prototype.follow = function () { }; return MimicFollower; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index 73622bf60cc18..a82d3d2527fe9 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -79,7 +79,8 @@ var RoyalGuard = (function () { var LeadGuard = (function (_super) { __extends(LeadGuard, _super); function LeadGuard() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } LeadGuard.prototype.lead = function () { }; ; @@ -88,7 +89,8 @@ var LeadGuard = (function (_super) { var FollowerGuard = (function (_super) { __extends(FollowerGuard, _super); function FollowerGuard() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } FollowerGuard.prototype.follow = function () { }; ; diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index a6881cf3cea15..a94d5fe93e775 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -91,7 +91,8 @@ var C2 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1; }(C1)); diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index 3f55b9d41ea9e..2d83a62ad3e6b 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -56,7 +56,8 @@ var C2 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1; }(C1)); diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 9d71613ed8ffe..63c79ce4c9192 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -118,7 +118,8 @@ var Test; var File = (function (_super) { __extends(File, _super); function File(path, content) { - _super.call(this, path); + var _this; + _this = _super.call(this, path) || this; this.content = content; } return File; @@ -127,7 +128,8 @@ var Test; var Directory = (function (_super) { __extends(Directory, _super); function Directory() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Directory; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index 5991fdd316971..5c28921a6a7a3 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -68,7 +68,8 @@ var Test; var File = (function (_super) { __extends(File, _super); function File(path, content) { - _super.call(this, path); + var _this; + _this = _super.call(this, path) || this; this.content = content; } return File; @@ -77,7 +78,8 @@ var Test; var Directory = (function (_super) { __extends(Directory, _super); function Directory() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Directory; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 57ba67752e239..03408c6196b0d 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -65,7 +65,8 @@ var Animal = (function () { var Giraffe = (function (_super) { __extends(Giraffe, _super); function Giraffe() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Giraffe; }(Animal)); diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index 94215d4ae1bf9..70ace4becb416 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -22,7 +22,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var x = _super.call(this); + var _this; + var x = _this = _super.call(this) || this; } return D; }(C)); diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index a01b6a0cac2ac..d67259304c3a8 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -11,7 +11,8 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(T)); diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index 9c3a9bcfcd0c6..24f8789a82d66 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -21,14 +21,16 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(T)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(U)); diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 75614f46d2194..55bc51bbdbb3b 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -27,14 +27,16 @@ var Animal = (function () { var Cat = (function (_super) { __extends(Cat, _super); function Cat() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Cat; }(Animal)); var Dog = (function (_super) { __extends(Dog, _super); function Dog() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Dog; }(Animal)); diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index b32c43bc5ec5a..75f62e94c679c 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -27,14 +27,16 @@ var Animal = (function () { var Cat = (function (_super) { __extends(Cat, _super); function Cat() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Cat; }(Animal)); var Dog = (function (_super) { __extends(Dog, _super); function Dog() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Dog; }(Animal)); diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 6f8f1ccd4ccc9..43c1f7ee14638 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -72,7 +72,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this; + _this = _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 eaca97d31dde0..a1ecef212dae8 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -33,7 +33,8 @@ var M2; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(M1.A)); diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index d89ab0fd357ca..a0cfeda07ecdc 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -40,7 +40,8 @@ var M2; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(M1.A)); @@ -51,7 +52,8 @@ var M3; var B = (function (_super) { __extends(B, _super); function B() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return B; }(M1.A)); diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index a0c30c1b1665f..b3da31103df5a 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -37,7 +37,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.baz = function (x) { }; D.prototype.foo = function () { }; diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index e83fd36ae625d..853cb5eafd7bf 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -56,14 +56,16 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index 63d5e9bb5b2c9..9931459744099 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -54,14 +54,16 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index 3dd27a3dbfbdb..64117b1935a3c 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -14,7 +14,8 @@ var M; var C = (function (_super) { __extends(C, _super); function C() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C; }(M.I)); diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index 513464daa85b1..451aec91affe6 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -136,105 +136,120 @@ var Base = (function () { var D0 = (function (_super) { __extends(D0, _super); function D0() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D0; }(Base)); var DA = (function (_super) { __extends(DA, _super); function DA() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return DA; }(Base)); var D1 = (function (_super) { __extends(D1, _super); function D1() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1; }(Base)); var D1A = (function (_super) { __extends(D1A, _super); function D1A() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D1A; }(Base)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2; }(Base)); var D2A = (function (_super) { __extends(D2A, _super); function D2A() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D2A; }(Base)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D3; }(Base)); var D3A = (function (_super) { __extends(D3A, _super); function D3A() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D3A; }(Base)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D4; }(Base)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D5; }(Base)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D6; }(Base)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D7; }(Base)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D8; }(Base)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D9; }(Base)); var D10 = (function (_super) { __extends(D10, _super); function D10() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D10; }(Base)); @@ -245,7 +260,8 @@ var E; var D11 = (function (_super) { __extends(D11, _super); function D11() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D11; }(Base)); @@ -257,7 +273,8 @@ var f; var D12 = (function (_super) { __extends(D12, _super); function D12() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D12; }(Base)); @@ -273,21 +290,24 @@ var c; var D13 = (function (_super) { __extends(D13, _super); function D13() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D13; }(Base)); var D14 = (function (_super) { __extends(D14, _super); function D14() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D14; }(Base)); var D15 = (function (_super) { __extends(D15, _super); function D15() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D15; }(Base)); @@ -297,14 +317,16 @@ var D15 = (function (_super) { var D16 = (function (_super) { __extends(D16, _super); function D16() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D16; }(Base)); var D17 = (function (_super) { __extends(D17, _super); function D17() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return D17; }(Base)); diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index a615faea805e9..61f1bf2c9f9b6 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -57,7 +57,8 @@ var __extends = (this && this.__extends) || function (d, b) { var MyView = (function (_super) { __extends(MyView, _super); function MyView() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } MyView.prototype.getDataSeries = function () { var data = this.model.get("data"); diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index 1ff47f68e5f1b..b0be82122de83 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -34,7 +34,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.foo = function () { }; return D; diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index 95dd9d398536b..72cf61f72fd88 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -54,7 +54,8 @@ var D = (function () { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } E.prototype.foo3 = function () { }; return E; @@ -62,7 +63,8 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } F.prototype.foo4 = function () { }; return F; diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index c710560800406..fafc4ec85fa99 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -88,7 +88,8 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } D.prototype.foo1 = function () { }; return D; @@ -96,7 +97,8 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } E.prototype.foo2 = function () { }; return E; diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 03ed4990c29ed..46ee4ed02d5cb 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -63,7 +63,8 @@ var C3 = (function () { var C4 = (function (_super) { __extends(C4, _super); function C4() { - _super.call(this, asdf); + var _this; + _this = _super.call(this, asdf) || this; } return C4; }(C3)); diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index 7b3938c7099d1..b2ea2cac9ebcf 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -169,7 +169,8 @@ var ts; var Type = (function (_super) { __extends(Type, _super); function Type() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Type.prototype.equals = function (that) { if (this === that) @@ -233,7 +234,8 @@ var ts; var Property = (function (_super) { __extends(Property, _super); function Property(name, type, flags) { - _super.call(this); + var _this; + _this = _super.call(this) || this; this.name = name; this.type = type; this.flags = flags; @@ -253,7 +255,8 @@ var ts; var Signature = (function (_super) { __extends(Signature, _super); function Signature(typeParameters, parameters, returnType) { - _super.call(this); + var _this; + _this = _super.call(this) || this; this.typeParameters = typeParameters; this.parameters = parameters; this.returnType = returnType; @@ -273,7 +276,8 @@ var ts; var Parameter = (function (_super) { __extends(Parameter, _super); function Parameter(name, type, flags) { - _super.call(this); + var _this; + _this = _super.call(this) || this; this.name = name; this.type = type; this.flags = flags; diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index e991db69367f3..324dc784b67f4 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -70,7 +70,8 @@ var r4 = c2(); // should be an error var C2 = (function (_super) { __extends(C2, _super); function C2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return C2; }(Function)); // error diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index 65198c1c1aa7e..3c1dd16874e5e 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -36,7 +36,8 @@ var Validation; var c3 = (function (_super) { __extends(c3, _super); function c3() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return c3; }(c1)); diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index 521f17bf5ef7e..fd7d859ac3710 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -168,7 +168,8 @@ var Greeter; var class2 = (function (_super) { __extends(class2, _super); function class2() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } return class2; }(class1)); diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index 027ba254ae019..96802932f12fa 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -24,8 +24,8 @@ var Base = (function () { var Super = (function (_super) { __extends(Super, _super); function Super() { - var _this = this; - _super.call(this, (function () { return _this; })()); // ok since this is not the case: The constructor declares parameter properties or the containing class declares instance member variables with initializers. + var _this; + _this = _super.call(this, (function () { return _this; })()) || this; // ok since this is not the case: The constructor declares parameter properties or the containing class declares instance member variables with initializers. } return Super; }(Base)); diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index db8f566702aa3..e892cc28a3c8f 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -41,7 +41,8 @@ define(["require", "exports"], function (require, exports) { var B = (function (_super) { __extends(B, _super); function B(element, url) { - _super.call(this, element); + var _this; + _this = _super.call(this, element) || this; this.p1 = element; this.p2 = url; } From d778e78f1ef118befdd2ae4866864bfd1465f389 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 2 Sep 2016 00:08:26 -0700 Subject: [PATCH 03/39] Transform other instances of 'this' to '_this' when in the constructor of a derived class. --- src/compiler/transformers/es6.ts | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index aab894dc4ff2e..5dd2b154c01f5 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -722,7 +722,10 @@ namespace ts { function addConstructor(statements: Statement[], node: ClassExpression | ClassDeclaration, extendsClauseElement: ExpressionWithTypeArguments): void { const constructor = getFirstConstructorWithBody(node); const hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined); - statements.push( + const savedUseCapturedThis = useCapturedThis; + useCapturedThis = true; + + const constructorFunction = createFunctionDeclaration( /*decorators*/ undefined, /*modifiers*/ undefined, @@ -733,8 +736,13 @@ namespace ts { /*type*/ undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper), /*location*/ constructor || node - ) - ); + ); + + if (extendsClauseElement) { + setNodeEmitFlags(constructorFunction, NodeEmitFlags.CapturesThis); + } + useCapturedThis = savedUseCapturedThis; + statements.push(constructorFunction); } /** @@ -769,6 +777,7 @@ namespace ts { function transformConstructorBody(constructor: ConstructorDeclaration, node: ClassDeclaration | ClassExpression, extendsClauseElement: ExpressionWithTypeArguments, hasSynthesizedSuper: boolean) { const statements: Statement[] = []; startLexicalEnvironment(); + if (constructor) { declareOrCaptureThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement); addDefaultValueAssignmentsIfNeeded(statements, constructor); @@ -830,12 +839,14 @@ namespace ts { // If this is the case, or if the class has an `extends` clause but no // constructor, we emit a synthesized call to `_super`. if (constructor ? hasSynthesizedSuper : extendsClauseElement) { + const actualThis = createThis(); + setNodeEmitFlags(actualThis, NodeEmitFlags.NoSubstitution); const superCall = createFunctionApply( createIdentifier("_super"), - createThis(), + actualThis, createIdentifier("arguments"), ); - const superReturnValueOrThis = createLogicalOr(superCall, createThis()); + const superReturnValueOrThis = createLogicalOr(superCall, actualThis); statements.push( createVariableStatement( @@ -2504,6 +2515,9 @@ namespace ts { // because we contain a SpreadElementExpression. const { target, thisArg } = createCallBinding(node.expression, hoistVariableDeclaration); + if (node.expression.kind === SyntaxKind.SuperKeyword) { + setNodeEmitFlags(thisArg, NodeEmitFlags.NoSubstitution); + } let resultingCall: CallExpression | BinaryExpression; if (node.transformFlags & TransformFlags.ContainsSpreadElementExpression) { // [source] @@ -2546,11 +2560,13 @@ namespace ts { } if (node.expression.kind === SyntaxKind.SuperKeyword) { + const actualThis = createThis(); + setNodeEmitFlags(actualThis, NodeEmitFlags.NoSubstitution); return createAssignment( createIdentifier("_this"), createLogicalOr( resultingCall, - createThis() + actualThis ) ); } From c21cc24c44689875f1a0104a366ac65ff5975361 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 2 Sep 2016 00:12:03 -0700 Subject: [PATCH 04/39] Accepted baselines for all tests apart from one with source map changes. --- tests/baselines/reference/abstractProperty.js | 4 +- .../reference/abstractPropertyNegative.js | 6 +- .../accessOverriddenBaseClassMember1.js | 2 +- ...aliasUsageInTypeArgumentOfExtendsClause.js | 2 +- tests/baselines/reference/autolift4.js | 2 +- tests/baselines/reference/baseCheck.js | 12 +- tests/baselines/reference/bases.js | 2 +- .../reference/bestCommonTypeOfTuple2.js | 2 +- .../checkSuperCallBeforeThisAccessing1.js | 6 +- .../checkSuperCallBeforeThisAccessing2.js | 6 +- .../checkSuperCallBeforeThisAccessing3.js | 4 +- .../checkSuperCallBeforeThisAccessing4.js | 4 +- .../checkSuperCallBeforeThisAccessing5.js | 2 +- .../checkSuperCallBeforeThisAccessing8.js | 2 +- .../classConstructorAccessibility2.js | 6 +- ...classConstructorParametersAccessibility.js | 2 +- ...lassConstructorParametersAccessibility2.js | 2 +- ...lassConstructorParametersAccessibility3.js | 4 +- tests/baselines/reference/classExpression3.js | 4 +- .../reference/classExtendingClassLikeType.js | 12 +- .../reference/classSideInheritance3.js | 2 +- tests/baselines/reference/classUpdateTests.js | 12 +- ...ollisionSuperAndLocalFunctionInProperty.js | 2 +- .../collisionSuperAndLocalVarInProperty.js | 4 +- .../reference/collisionSuperAndParameter.js | 2 +- ...perAndPropertyNameAsConstuctorParameter.js | 4 +- .../reference/computedPropertyNames30_ES5.js | 2 +- tests/baselines/reference/constructorArgs.js | 2 +- .../reference/declFileGenericType2.js | 2 +- ...derivedClassConstructorWithoutSuperCall.js | 2 +- .../derivedClassParameterProperties.js | 34 +- ...dClassSuperCallsInNonConstructorMembers.js | 2 +- .../derivedClassSuperCallsWithThisArg.js | 10 +- .../derivedClassWithoutExplicitConstructor.js | 8 +- ...derivedClassWithoutExplicitConstructor2.js | 8 +- ...derivedClassWithoutExplicitConstructor3.js | 16 +- ...BeforeEmitParameterPropertyDeclaration1.js | 2 +- ...SuperCallBeforeEmitPropertyDeclaration1.js | 2 +- ...arationAndParameterPropertyDeclaration1.js | 4 +- tests/baselines/reference/errorSuperCalls.js | 4 +- tests/baselines/reference/es6ClassTest.js | 12 +- ...ericRecursiveImplicitConstructorErrors3.js | 2 +- .../illegalSuperCallsInConstructor.js | 4 +- .../interfaceExtendsClassWithPrivate2.js | 6 +- ...objectCreationOfElementAccessExpression.js | 16 +- tests/baselines/reference/optionalMethods.js | 2 +- .../reference/optionalParameterProperty.js | 2 +- .../overloadOnConstConstraintChecks4.js | 2 +- tests/baselines/reference/parserAstSpans1.js | 4 +- .../baselines/reference/parserRealSource10.js | 24 +- .../baselines/reference/parserRealSource11.js | 308 +++++++++--------- tests/baselines/reference/parserharness.js | 8 +- .../privateInstanceMemberAccessibility.js | 4 +- .../privateStaticMemberAccessibility.js | 2 +- .../readonlyConstructorAssignment.js | 10 +- tests/baselines/reference/scopeTests.js | 4 +- .../baselines/reference/staticInheritance.js | 4 +- tests/baselines/reference/staticPropSuper.js | 6 +- .../reference/strictModeInConstructor.js | 6 +- tests/baselines/reference/superAccess2.js | 4 +- .../reference/superCallArgsMustMatch.js | 2 +- .../superCallBeforeThisAccessing1.js | 2 +- .../superCallBeforeThisAccessing3.js | 2 +- .../superCallBeforeThisAccessing4.js | 4 +- .../superCallBeforeThisAccessing5.js | 2 +- .../superCallBeforeThisAccessing6.js | 2 +- .../superCallBeforeThisAccessing7.js | 2 +- .../superCallBeforeThisAccessing8.js | 2 +- .../reference/superCallInNonStaticMethod.js | 6 +- .../reference/superCallOutsideConstructor.js | 4 +- .../superCallParameterContextualTyping3.js | 2 +- tests/baselines/reference/superCalls.js | 2 +- tests/baselines/reference/superErrors.js | 2 +- .../reference/superInConstructorParam1.js | 2 +- tests/baselines/reference/superInLambdas.js | 10 +- .../reference/superPropertyAccess1.js | 2 +- .../reference/superPropertyAccess2.js | 2 +- .../reference/superPropertyAccessNoError.js | 2 +- .../reference/superPropertyAccess_ES5.js | 2 +- .../reference/superWithTypeArgument.js | 2 +- .../reference/superWithTypeArgument2.js | 2 +- .../reference/superWithTypeArgument3.js | 2 +- .../reference/thisInInvalidContexts.js | 6 +- .../thisInInvalidContextsExternalModule.js | 6 +- tests/baselines/reference/thisInSuperCall.js | 10 +- tests/baselines/reference/thisInSuperCall1.js | 4 +- tests/baselines/reference/thisInSuperCall2.js | 6 +- tests/baselines/reference/thisInSuperCall3.js | 4 +- .../baselines/reference/tsxDynamicTagName5.js | 2 +- .../baselines/reference/tsxDynamicTagName7.js | 2 +- .../baselines/reference/tsxDynamicTagName8.js | 2 +- .../baselines/reference/tsxDynamicTagName9.js | 2 +- .../reference/typeGuardOfFormThisMember.js | 2 +- .../typeGuardOfFormThisMemberErrors.js | 2 +- .../baselines/reference/typeRelationships.js | 8 +- .../reference/unspecializedConstraints.js | 18 +- .../reference/varArgsOnConstructorTypes.js | 4 +- 97 files changed, 389 insertions(+), 389 deletions(-) diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index 803df9f1d56cb..d9bfd5eb05f6f 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -37,8 +37,8 @@ var C = (function (_super) { function C() { var _this; _this = _super.apply(this, arguments) || this; - this.raw = "edge"; - this.ro = "readonly please"; + _this.raw = "edge"; + _this.ro = "readonly please"; } Object.defineProperty(C.prototype, "prop", { get: function () { return "foo"; }, diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index d6e1ce1813fe9..e94d9492fdb81 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -59,7 +59,7 @@ var C = (function (_super) { function C() { var _this; _this = _super.apply(this, arguments) || this; - this.ro = "readonly please"; + _this.ro = "readonly please"; } Object.defineProperty(C.prototype, "concreteWithNoBody", { get: function () { }, @@ -80,7 +80,7 @@ var WrongTypePropertyImpl = (function (_super) { function WrongTypePropertyImpl() { var _this; _this = _super.apply(this, arguments) || this; - this.num = "nope, wrong"; + _this.num = "nope, wrong"; } return WrongTypePropertyImpl; }(WrongTypeProperty)); @@ -107,7 +107,7 @@ var WrongTypeAccessorImpl2 = (function (_super) { function WrongTypeAccessorImpl2() { var _this; _this = _super.apply(this, arguments) || this; - this.num = "nope, wrong"; + _this.num = "nope, wrong"; } return WrongTypeAccessorImpl2; }(WrongTypeAccessor)); diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index d60f260a163db..b4c269b1e3bae 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -36,7 +36,7 @@ var ColoredPoint = (function (_super) { function ColoredPoint(x, y, color) { var _this; _this = _super.call(this, x, y) || this; - this.color = color; + _this.color = color; } ColoredPoint.prototype.toString = function () { return _super.prototype.toString.call(this) + " color=" + this.color; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 1893f6586ee03..462390d28f7fb 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -67,7 +67,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.apply(this, arguments) || this; - this.x = moduleA; + _this.x = moduleA; } return D; }(C)); diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index 85dd3725639a3..b6afd28d429aa 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -45,7 +45,7 @@ var Point3D = (function (_super) { function Point3D(x, y, z, m) { var _this; _this = _super.call(this, x, y) || this; - this.z = z; + _this.z = z; } Point3D.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.m); diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 800742ff63b2b..c3a2731b45d92 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -63,8 +63,8 @@ var D = (function (_super) { __extends(D, _super); function D(z) { var _this; - _this = _super.call(this, this.z) || this; - this.z = z; + _this = _super.call(this, _this.z) || this; + _this.z = z; } return D; }(C)); // too few params @@ -72,8 +72,8 @@ var E = (function (_super) { __extends(E, _super); function E(z) { var _this; - _this = _super.call(this, 0, this.z) || this; - this.z = z; + _this = _super.call(this, 0, _this.z) || this; + _this.z = z; } return E; }(C)); @@ -81,8 +81,8 @@ var F = (function (_super) { __extends(F, _super); function F(z) { var _this; - _this = _super.call(this, "hello", this.z) || this; - this.z = z; + _this = _super.call(this, "hello", _this.z) || this; + _this.z = z; } return F; }(C)); // first param type diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index fcf1d7fe124ac..ff6a3262d4565 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -37,7 +37,7 @@ var C = (function (_super) { __extends(C, _super); function C() { var _this; - this.x; + _this.x; any; } return C; diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 36232ad04b1e8..34deb346cbd5c 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -62,7 +62,7 @@ var D1 = (function (_super) { function D1() { var _this; _this = _super.apply(this, arguments) || this; - this.i = "bar"; + _this.i = "bar"; } return D1; }(C1)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index dc70f3e8d0816..35e00c36621e6 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -26,9 +26,9 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.call(this) || this; - this; - this.x = 10; - var that = this; + _this; + _this.x = 10; + var that = _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index f1fcdb48daef8..b49c1aab7744a 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -25,10 +25,10 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { var _this; - this.x = 100; + _this.x = 100; _this = _super.call(this) || this; - this.x = 10; - var that = this; + _this.x = 10; + var that = _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index d2ede7d04b15f..70600bb03a953 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -37,8 +37,8 @@ var Derived = (function (_super) { return innver; }()); _this = _super.call(this) || this; - this.x = 10; - var that = this; + _this.x = 10; + var that = _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index c6eddf4ef4898..95e0062b0872d 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -45,8 +45,8 @@ var Derived = (function (_super) { })(); _this = _super.call(this) || this; _this = _super.call(this) || this; - this.x = 10; - var that = this; + _this.x = 10; + var that = _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index e58d55fd274f7..1c77b2e7c78e3 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -26,7 +26,7 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { var _this; - _this = _super.call(this, this.x) || this; + _this = _super.call(this, _this.x) || this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index cf0da205d7189..a280c0d6ca6f5 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -29,7 +29,7 @@ var Super = (function (_super) { __extends(Super, _super); function Super() { var _this; - var that = this; + var that = _this; _this = _super.call(this) || this; } return Super; diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index 95206681372ee..9d1ebdd9d9aef 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -79,7 +79,7 @@ var DerivedA = (function (_super) { function DerivedA(x) { var _this; _this = _super.call(this, x) || this; - this.x = x; + _this.x = x; } DerivedA.prototype.createInstance = function () { new DerivedA(5); }; DerivedA.prototype.createBaseInstance = function () { new BaseA(6); }; @@ -91,7 +91,7 @@ var DerivedB = (function (_super) { function DerivedB(x) { var _this; _this = _super.call(this, x) || this; - this.x = x; + _this.x = x; } DerivedB.prototype.createInstance = function () { new DerivedB(7); }; DerivedB.prototype.createBaseInstance = function () { new BaseB(8); }; // ok @@ -103,7 +103,7 @@ var DerivedC = (function (_super) { function DerivedC(x) { var _this; _this = _super.call(this, x) || this; - this.x = x; + _this.x = x; } DerivedC.prototype.createInstance = function () { new DerivedC(9); }; DerivedC.prototype.createBaseInstance = function () { new BaseC(10); }; // error diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index 1f282ba71322d..066c724b60f79 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -61,7 +61,7 @@ var Derived = (function (_super) { function Derived(p) { var _this; _this = _super.call(this, p) || this; - this.p; // OK + _this.p; // OK } return Derived; }(C3)); diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index 81ad696ddc86c..b80504351712d 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -61,7 +61,7 @@ var Derived = (function (_super) { function Derived(p) { var _this; _this = _super.call(this, p) || this; - this.p; // OK + _this.p; // OK } return Derived; }(C3)); diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index 95509867cc574..9e0c0264fd954 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -30,8 +30,8 @@ var Derived = (function (_super) { function Derived(p) { var _this; _this = _super.call(this, p) || this; - this.p = p; - this.p; // OK + _this.p = p; + _this.p; // OK } return Derived; }(Base)); diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index b91d541361129..e0ba9c349e74d 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -17,7 +17,7 @@ var C = (function (_super) { function class_1() { var _this; _this = _super.apply(this, arguments) || this; - this.c = 3; + _this.c = 3; } return class_1; }((function (_super) { @@ -25,7 +25,7 @@ var C = (function (_super) { function class_2() { var _this; _this = _super.apply(this, arguments) || this; - this.b = 2; + _this.b = 2; } return class_2; }((function () { diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index 031253a19ade2..2d91befc17240 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -78,8 +78,8 @@ var D1 = (function (_super) { function D1() { var _this; _this = _super.call(this, "abc", "def") || this; - this.x = "x"; - this.y = "y"; + _this.x = "x"; + _this.y = "y"; } return D1; }(getBase())); @@ -89,8 +89,8 @@ var D2 = (function (_super) { var _this; _this = _super.call(this, 10) || this; _this = _super.call(this, 10, 20) || this; - this.x = 1; - this.y = 2; + _this.x = 1; + _this.y = 2; } return D2; }(getBase())); @@ -99,8 +99,8 @@ var D3 = (function (_super) { function D3() { var _this; _this = _super.call(this, "abc", 42) || this; - this.x = "x"; - this.y = 2; + _this.x = "x"; + _this.y = 2; } return D3; }(getBase())); diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index d9e4c3f148208..4751e0e8d6e56 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -35,7 +35,7 @@ var B = (function (_super) { function B(x, data) { var _this; _this = _super.call(this, x) || this; - this.data = data; + _this.data = data; } return B; }(A)); diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 7b13fa1bf4c48..d334e1c7f66ef 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -159,7 +159,7 @@ var E = (function (_super) { function E() { var _this; _this = _super.apply(this, arguments) || this; - this.p1 = 0; + _this.p1 = 0; } return E; }(D)); @@ -175,7 +175,7 @@ var G = (function (_super) { function G() { var _this; _this = _super.call(this) || this; - this.p1 = 0; + _this.p1 = 0; } // NO ERROR return G; }(D)); @@ -198,7 +198,7 @@ var J = (function (_super) { function J(p1) { var _this; _this = _super.call(this) || this; // NO ERROR - this.p1 = p1; + _this.p1 = p1; } return J; }(G)); @@ -206,7 +206,7 @@ var K = (function (_super) { __extends(K, _super); function K(p1) { var _this; - this.p1 = p1; + _this.p1 = p1; var i = 0; _this = _super.call(this) || this; } @@ -217,7 +217,7 @@ var L = (function (_super) { function L(p1) { var _this; _this = _super.call(this) || this; // NO ERROR - this.p1 = p1; + _this.p1 = p1; } return L; }(G)); @@ -225,7 +225,7 @@ var M = (function (_super) { __extends(M, _super); function M(p1) { var _this; - this.p1 = p1; + _this.p1 = p1; var i = 0; _this = _super.call(this) || this; } diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index da4175fe5c711..e3d834dd1d415 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -42,7 +42,7 @@ var b = (function (_super) { function b() { var _this; _this = _super.apply(this, arguments) || this; - this.prop2 = { + _this.prop2 = { doStuff: function () { function _super() { } diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index 598bb5b6e8568..e7cb0e613cc4f 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -40,12 +40,12 @@ var b = (function (_super) { function b() { var _this; _this = _super.apply(this, arguments) || this; - this.prop2 = { + _this.prop2 = { doStuff: function () { var _super = 10; // Should be error } }; - this._super = 10; // No error + _this._super = 10; // No error } return b; }(Foo)); diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index 9909ca512ce90..a60889888d663 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -96,7 +96,7 @@ var Foo2 = (function (_super) { function Foo2(_super) { var _this; _this = _super.call(this) || this; - this.prop4 = { + _this.prop4 = { doStuff: function (_super) { } }; diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 6a8dd340a2066..696f439a4b129 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -54,7 +54,7 @@ var b2 = (function (_super) { function b2(_super) { var _this; _this = _super.call(this) || this; - this._super = _super; + _this._super = _super; } return b2; }(a)); @@ -71,7 +71,7 @@ var b4 = (function (_super) { function b4(_super) { var _this; _this = _super.call(this) || this; - this._super = _super; + _this._super = _super; } return b4; }(a)); diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index c31d873ffb942..9fbe5f380ca85 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -36,7 +36,7 @@ var C = (function (_super) { // Ideally, we would capture this. But the reference is // illegal, and not capturing this is consistent with //treatment of other similar violations. - _a[(_this = _super.call(_this) || _this, "prop")] = function () { }, + _a[(_this = _super.call(this) || this, "prop")] = function () { }, _a); var _a; }); diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 3345708ddaa9c..2c2838c97f96f 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -31,7 +31,7 @@ var Sub = (function (_super) { function Sub(options) { var _this; _this = _super.call(this, options.value) || this; - this.options = options; + _this.options = options; } return Sub; }(Super)); diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 4ccc090f4f240..50280b589b33d 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -81,7 +81,7 @@ var templa; function AbstractCompositeElementController() { var _this; _this = _super.call(this) || this; - this._controllers = []; + _this._controllers = []; } return AbstractCompositeElementController; }(templa.dom.mvc.AbstractElementController)); diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index 75901c708b35e..58903b2ba5745 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -60,7 +60,7 @@ var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { var _this; - var r2 = function () { return _this = _super.call(_this) || _this; }; // error for misplaced super call (nested function) + var r2 = function () { return _this = _super.call(this) || this; }; // error for misplaced super call (nested function) } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index f7afd6529c0a1..658e56fb09819 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -119,7 +119,7 @@ var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2(y) { var _this; - this.y = y; + _this.y = y; var a = 1; _this = _super.call(this) || this; // error } @@ -130,7 +130,7 @@ var Derived3 = (function (_super) { function Derived3(y) { var _this; _this = _super.call(this) || this; // ok - this.y = y; + _this.y = y; var a = 1; } return Derived3; @@ -139,7 +139,7 @@ var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4(y) { var _this; - this.a = 1; + _this.a = 1; var b = 2; _this = _super.call(this) || this; // error } @@ -150,7 +150,7 @@ var Derived5 = (function (_super) { function Derived5(y) { var _this; _this = _super.call(this) || this; // ok - this.a = 1; + _this.a = 1; var b = 2; } return Derived5; @@ -159,7 +159,7 @@ var Derived6 = (function (_super) { __extends(Derived6, _super); function Derived6(y) { var _this; - this.a = 1; + _this.a = 1; var b = 2; _this = _super.call(this) || this; // error: "super" has to be called before "this" accessing } @@ -169,9 +169,9 @@ var Derived7 = (function (_super) { __extends(Derived7, _super); function Derived7(y) { var _this; - this.a = 1; - this.a = 3; - this.b = 3; + _this.a = 1; + _this.a = 3; + _this.b = 3; _this = _super.call(this) || this; // error } return Derived7; @@ -181,9 +181,9 @@ var Derived8 = (function (_super) { function Derived8(y) { var _this; _this = _super.call(this) || this; // ok - this.a = 1; - this.a = 3; - this.b = 3; + _this.a = 1; + _this.a = 3; + _this.b = 3; } return Derived8; }(Base)); @@ -197,9 +197,9 @@ var Derived9 = (function (_super) { __extends(Derived9, _super); function Derived9(y) { var _this; - this.a = 1; - this.a = 3; - this.b = 3; + _this.a = 1; + _this.a = 3; + _this.b = 3; _this = _super.call(this) || this; // error } return Derived9; @@ -209,9 +209,9 @@ var Derived10 = (function (_super) { function Derived10(y) { var _this; _this = _super.call(this) || this; // ok - this.a = 1; - this.a = 3; - this.b = 3; + _this.a = 1; + _this.a = 3; + _this.b = 3; } return Derived10; }(Base2)); diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index ad2dc22debf54..6b06204b8e976 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -48,7 +48,7 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.apply(this, arguments) || this; - this.a = _this = _super.call(this) || this; + _this.a = _this = _super.call(this) || this; } Derived.prototype.b = function () { _this = _super.call(this) || this; diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index a464970fe509d..e73d004120653 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -43,7 +43,7 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { var _this; - _this = _super.call(this, this) || this; // ok + _this = _super.call(this, _this) || this; // ok } return Derived; }(Base)); @@ -51,8 +51,8 @@ var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2(a) { var _this; - _this = _super.call(this, this) || this; // error - this.a = a; + _this = _super.call(this, _this) || this; // error + _this.a = a; } return Derived2; }(Base)); @@ -61,7 +61,7 @@ var Derived3 = (function (_super) { function Derived3(a) { var _this; _this = _super.call(this, function () { return _this; }) || this; // error - this.a = a; + _this.a = a; } return Derived3; }(Base)); @@ -70,7 +70,7 @@ var Derived4 = (function (_super) { function Derived4(a) { var _this; _this = _super.call(this, function () { return this; }) || this; // ok - this.a = a; + _this.a = a; } return Derived4; }(Base)); diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index 84028f1d3f2e5..cc260f094997e 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -43,8 +43,8 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.apply(this, arguments) || this; - this.x = 1; - this.y = 'hello'; + _this.x = 1; + _this.y = 'hello'; } return Derived; }(Base)); @@ -61,8 +61,8 @@ var D = (function (_super) { function D() { var _this; _this = _super.apply(this, arguments) || this; - this.x = 2; - this.y = null; + _this.x = 2; + _this.y = null; } return D; }(Base2)); diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index 6c3ce90d6f0ae..d3711ec27c0db 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -51,8 +51,8 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.apply(this, arguments) || this; - this.x = 1; - this.y = 'hello'; + _this.x = 1; + _this.y = 'hello'; } return Derived; }(Base)); @@ -71,8 +71,8 @@ var D = (function (_super) { function D() { var _this; _this = _super.apply(this, arguments) || this; - this.x = 2; - this.y = null; + _this.x = 2; + _this.y = null; } return D; }(Base2)); diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index 295fbac60e192..14f9fdf88af29 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -65,8 +65,8 @@ var Derived = (function (_super) { function Derived(y, z) { var _this; _this = _super.call(this, 2) || this; - this.b = ''; - this.b = y; + _this.b = ''; + _this.b = y; } return Derived; }(Base)); @@ -75,8 +75,8 @@ var Derived2 = (function (_super) { function Derived2() { var _this; _this = _super.apply(this, arguments) || this; - this.x = 1; - this.y = 'hello'; + _this.x = 1; + _this.y = 'hello'; } return Derived2; }(Derived)); @@ -94,8 +94,8 @@ var D = (function (_super) { function D(y, z) { var _this; _this = _super.call(this, 2) || this; - this.b = null; - this.b = y; + _this.b = null; + _this.b = y; } return D; }(Base)); @@ -104,8 +104,8 @@ var D2 = (function (_super) { function D2() { var _this; _this = _super.apply(this, arguments) || this; - this.x = 2; - this.y = null; + _this.x = 2; + _this.y = null; } return D2; }(D)); diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index 4e07d5c8655b7..60fa8e32c1e2d 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -32,7 +32,7 @@ var B = (function (_super) { "use strict"; 'someStringForEgngInject'; _this = _super.call(this) || this; - this.x = x; + _this.x = x; } return B; }(A)); diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index b6eabb2a418a7..abef8394924e4 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -34,7 +34,7 @@ var B = (function (_super) { "use strict"; 'someStringForEgngInject'; _this = _super.call(this) || this; - this.blub = 12; + _this.blub = 12; } return B; }(A)); diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index 0e866e98f4670..0f36d9d9115f9 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -32,8 +32,8 @@ var B = (function (_super) { "use strict"; 'someStringForEgngInject'; _this = _super.call(this) || this; - this.x = x; - this.blah = 2; + _this.x = x; + _this.blah = 2; } return B; }(A)); diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 765fdf083b53c..4f54781deb993 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -133,7 +133,7 @@ var Derived = (function (_super) { //super call with type arguments function Derived() { var _this; - _super.prototype..call(this); + _super.prototype..call(_this); _this = _super.call(this) || this; } return Derived; @@ -149,7 +149,7 @@ var OtherDerived = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; //super call in class member initializer of derived type - this.t = _this = _super.call(this) || this; + _this.t = _this = _super.call(this) || this; } OtherDerived.prototype.fn = function () { //super call in class member function of derived type diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 0a6323630fb4b..4b2cb2c51b55d 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -105,12 +105,12 @@ var Foo = (function (_super) { var _this; if (z === void 0) { z = 0; } _this = _super.call(this, x) || this; - this.y = y; - this.z = z; - this.gar = 0; - this.zoo = "zoo"; - this.x = x; - this.gar = 5; + _this.y = y; + _this.z = z; + _this.gar = 0; + _this.zoo = "zoo"; + _this.x = x; + _this.gar = 5; } Foo.prototype.bar = function () { return 0; }; Foo.prototype.boo = function (x) { return x; }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index 226fede58b693..49109e1aa5af1 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -61,7 +61,7 @@ var TypeScript; function PullTypeSymbol() { var _this; _this = _super.apply(this, arguments) || this; - this._elementType = null; + _this._elementType = null; } PullTypeSymbol.prototype.toString = function (scopeSymbol, useConstraintInName) { var s = this.getScopedNameEx(scopeSymbol, useConstraintInName).toString(); diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index e27a9789cb149..77f0a0a2b6b3f 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -35,8 +35,8 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { var _this; - var r2 = function () { return _this = _super.call(_this) || _this; }; - var r3 = function () { _this = _super.call(_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; }; var r5 = { get foo() { diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index 6f35c3f0e40ab..3f205640f5981 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -41,8 +41,8 @@ var D = (function (_super) { function D() { var _this; _this = _super.apply(this, arguments) || this; - this.x = 2; - this.y = 3; + _this.x = 2; + _this.y = 3; } D.prototype.foo = function (x) { return x; }; D.prototype.other = function (x) { return x; }; @@ -54,7 +54,7 @@ var D2 = (function (_super) { function D2() { var _this; _this = _super.apply(this, arguments) || this; - this.x = ""; + _this.x = ""; } D2.prototype.foo = function (x) { return x; }; D2.prototype.other = function (x) { return x; }; diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index ddfbce8fc127f..9543082fbd16a 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -83,7 +83,7 @@ var MonsterFood = (function (_super) { function MonsterFood(name, flavor) { var _this; _this = _super.call(this, name) || this; - this.flavor = flavor; + _this.flavor = flavor; } return MonsterFood; }(Food)); @@ -92,7 +92,7 @@ var IceCream = (function (_super) { function IceCream(flavor) { var _this; _this = _super.call(this, "Ice Cream", flavor) || this; - this.flavor = flavor; + _this.flavor = flavor; } return IceCream; }(MonsterFood)); @@ -101,8 +101,8 @@ var Cookie = (function (_super) { function Cookie(flavor, isGlutenFree) { var _this; _this = _super.call(this, "Cookie", flavor) || this; - this.flavor = flavor; - this.isGlutenFree = isGlutenFree; + _this.flavor = flavor; + _this.isGlutenFree = isGlutenFree; } return Cookie; }(MonsterFood)); @@ -111,7 +111,7 @@ var PetFood = (function (_super) { function PetFood(name, whereToBuy) { var _this; _this = _super.call(this, name) || this; - this.whereToBuy = whereToBuy; + _this.whereToBuy = whereToBuy; } return PetFood; }(Food)); @@ -120,7 +120,7 @@ var ExpensiveOrganicDogFood = (function (_super) { function ExpensiveOrganicDogFood(whereToBuy) { var _this; _this = _super.call(this, "Origen", whereToBuy) || this; - this.whereToBuy = whereToBuy; + _this.whereToBuy = whereToBuy; } return ExpensiveOrganicDogFood; }(PetFood)); @@ -129,8 +129,8 @@ var ExpensiveOrganicCatFood = (function (_super) { function ExpensiveOrganicCatFood(whereToBuy, containsFish) { var _this; _this = _super.call(this, "Nature's Logic", whereToBuy) || this; - this.whereToBuy = whereToBuy; - this.containsFish = containsFish; + _this.whereToBuy = whereToBuy; + _this.containsFish = containsFish; } return ExpensiveOrganicCatFood; }(PetFood)); diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 408f73b653302..1885c419fef8b 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -111,7 +111,7 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.apply(this, arguments) || this; - this.a = 1; + _this.a = 1; } Derived.prototype.f = function () { return 1; }; return Derived; diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index b23da97c7902d..44eb2a7aa5628 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -27,7 +27,7 @@ var D = (function (_super) { function D(p) { var _this; _this = _super.call(this) || this; - this.p = p; + _this.p = p; } return D; }(C)); diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index 6a75061239549..22bacbdb0b4c2 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -29,7 +29,7 @@ var A = (function (_super) { function A() { var _this; _this = _super.apply(this, arguments) || this; - this.x = 1; + _this.x = 1; } return A; }(Z)); diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index 6e6a423fe906f..365e640c15099 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -320,7 +320,7 @@ var c3 = (function (_super) { function c3() { var _this; _this = _super.call(this, 10) || this; - this.p1 = _super.prototype.c2_p1; + _this.p1 = _super.prototype.c2_p1; } /** c3 f1*/ c3.prototype.f1 = function () { @@ -408,7 +408,7 @@ var c6 = (function (_super) { function c6() { var _this; _this = _super.call(this) || this; - this.d = _super.prototype.b; + _this.d = _super.prototype.b; } return c6; }(c5)); diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 429a388c894b2..c9f011704d035 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -828,8 +828,8 @@ var TypeScript; function NumberLiteralToken(value, hasEmptyFraction) { var _this; _this = _super.call(this, TokenID.NumberLiteral) || this; - this.value = value; - this.hasEmptyFraction = hasEmptyFraction; + _this.value = value; + _this.hasEmptyFraction = hasEmptyFraction; } NumberLiteralToken.prototype.getText = function () { return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); @@ -845,7 +845,7 @@ var TypeScript; function StringLiteralToken(value) { var _this; _this = _super.call(this, TokenID.StringLiteral) || this; - this.value = value; + _this.value = value; } StringLiteralToken.prototype.getText = function () { return this.value; @@ -861,8 +861,8 @@ var TypeScript; function IdentifierToken(value, hasEscapeSequence) { var _this; _this = _super.call(this, TokenID.Identifier) || this; - this.value = value; - this.hasEscapeSequence = hasEscapeSequence; + _this.value = value; + _this.hasEscapeSequence = hasEscapeSequence; } IdentifierToken.prototype.getText = function () { return this.value; @@ -878,7 +878,7 @@ var TypeScript; function WhitespaceToken(tokenId, value) { var _this; _this = _super.call(this, tokenId) || this; - this.value = value; + _this.value = value; } WhitespaceToken.prototype.getText = function () { return this.value; @@ -894,11 +894,11 @@ var TypeScript; function CommentToken(tokenID, value, isBlock, startPos, line, endsLine) { var _this; _this = _super.call(this, tokenID) || this; - this.value = value; - this.isBlock = isBlock; - this.startPos = startPos; - this.line = line; - this.endsLine = endsLine; + _this.value = value; + _this.isBlock = isBlock; + _this.startPos = startPos; + _this.line = line; + _this.endsLine = endsLine; } CommentToken.prototype.getText = function () { return this.value; @@ -914,7 +914,7 @@ var TypeScript; function RegularExpressionLiteralToken(regex) { var _this; _this = _super.call(this, TokenID.RegularExpressionLiteral) || this; - this.regex = regex; + _this.regex = regex; } RegularExpressionLiteralToken.prototype.getText = function () { return this.regex.toString(); diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 4be1ed2076762..054608e9d19ab 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2388,14 +2388,14 @@ var TypeScript; function AST(nodeType) { var _this; _this = _super.call(this) || this; - this.nodeType = nodeType; - this.type = null; - this.flags = ASTFlags.Writeable; + _this.nodeType = nodeType; + _this.type = null; + _this.flags = ASTFlags.Writeable; // REVIEW: for diagnostic purposes - this.passCreated = CompilerDiagnostics.analysisPass; - this.preComments = null; - this.postComments = null; - this.isParenthesized = false; + _this.passCreated = CompilerDiagnostics.analysisPass; + _this.preComments = null; + _this.postComments = null; + _this.isParenthesized = false; } AST.prototype.isExpression = function () { return false; }; AST.prototype.isStatementOrExpression = function () { return false; }; @@ -2545,8 +2545,8 @@ var TypeScript; function IncompleteAST(min, lim) { var _this; _this = _super.call(this, NodeType.Error) || this; - this.minChar = min; - this.limChar = lim; + _this.minChar = min; + _this.limChar = lim; } return IncompleteAST; }(AST)); @@ -2556,8 +2556,8 @@ var TypeScript; function ASTList() { var _this; _this = _super.call(this, NodeType.List) || this; - this.enclosingScope = null; - this.members = new AST[]; + _this.enclosingScope = null; + _this.members = new AST[]; } ASTList.prototype.addToControlFlow = function (context) { var len = this.members.length; @@ -2624,11 +2624,11 @@ var TypeScript; function Identifier(actualText, hasEscapeSequence) { var _this; _this = _super.call(this, NodeType.Name) || this; - this.actualText = actualText; - this.hasEscapeSequence = hasEscapeSequence; - this.sym = null; - this.cloId = -1; - this.setText(actualText, hasEscapeSequence); + _this.actualText = actualText; + _this.hasEscapeSequence = hasEscapeSequence; + _this.sym = null; + _this.cloId = -1; + _this.setText(actualText, hasEscapeSequence); } Identifier.prototype.setText = function (actualText, hasEscapeSequence) { this.actualText = actualText; @@ -2684,7 +2684,7 @@ var TypeScript; function Label(id) { var _this; _this = _super.call(this, NodeType.Label) || this; - this.id = id; + _this.id = id; } Label.prototype.printLabel = function () { return this.id.actualText + ":"; }; Label.prototype.typeCheck = function (typeFlow) { @@ -2720,9 +2720,9 @@ var TypeScript; function UnaryExpression(nodeType, operand) { var _this; _this = _super.call(this, nodeType) || this; - this.operand = operand; - this.targetType = null; // Target type for an object literal (null if no target type) - this.castTerm = null; + _this.operand = operand; + _this.targetType = null; // Target type for an object literal (null if no target type) + _this.castTerm = null; } UnaryExpression.prototype.addToControlFlow = function (context) { _super.prototype.addToControlFlow.call(this, context); @@ -2865,10 +2865,10 @@ var TypeScript; function CallExpression(nodeType, target, arguments) { var _this; _this = _super.call(this, nodeType) || this; - this.target = target; - this.arguments = arguments; - this.signature = null; - this.minChar = this.target.minChar; + _this.target = target; + _this.arguments = arguments; + _this.signature = null; + _this.minChar = _this.target.minChar; } CallExpression.prototype.typeCheck = function (typeFlow) { if (this.nodeType == NodeType.New) { @@ -2898,8 +2898,8 @@ var TypeScript; function BinaryExpression(nodeType, operand1, operand2) { var _this; _this = _super.call(this, nodeType) || this; - this.operand1 = operand1; - this.operand2 = operand2; + _this.operand1 = operand1; + _this.operand2 = operand2; } BinaryExpression.prototype.typeCheck = function (typeFlow) { switch (this.nodeType) { @@ -3051,9 +3051,9 @@ var TypeScript; function ConditionalExpression(operand1, operand2, operand3) { var _this; _this = _super.call(this, NodeType.ConditionalExpression) || this; - this.operand1 = operand1; - this.operand2 = operand2; - this.operand3 = operand3; + _this.operand1 = operand1; + _this.operand2 = operand2; + _this.operand3 = operand3; } ConditionalExpression.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckQMark(this); @@ -3077,9 +3077,9 @@ var TypeScript; function NumberLiteral(value, hasEmptyFraction) { var _this; _this = _super.call(this, NodeType.NumberLit) || this; - this.value = value; - this.hasEmptyFraction = hasEmptyFraction; - this.isNegativeZero = false; + _this.value = value; + _this.hasEmptyFraction = hasEmptyFraction; + _this.isNegativeZero = false; } NumberLiteral.prototype.typeCheck = function (typeFlow) { this.type = typeFlow.doubleType; @@ -3119,7 +3119,7 @@ var TypeScript; function RegexLiteral(regex) { var _this; _this = _super.call(this, NodeType.Regex) || this; - this.regex = regex; + _this.regex = regex; } RegexLiteral.prototype.typeCheck = function (typeFlow) { this.type = typeFlow.regexType; @@ -3140,7 +3140,7 @@ var TypeScript; function StringLiteral(text) { var _this; _this = _super.call(this, NodeType.QString) || this; - this.text = text; + _this.text = text; } StringLiteral.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -3176,10 +3176,10 @@ var TypeScript; function ImportDeclaration(id, alias) { var _this; _this = _super.call(this, NodeType.ImportDeclaration) || this; - this.id = id; - this.alias = alias; - this.varFlags = VarFlags.None; - this.isDynamicImport = false; + _this.id = id; + _this.alias = alias; + _this.varFlags = VarFlags.None; + _this.isDynamicImport = false; } ImportDeclaration.prototype.isStatementOrExpression = function () { return true; }; ImportDeclaration.prototype.emit = function (emitter, tokenId, startLine) { @@ -3236,12 +3236,12 @@ var TypeScript; function BoundDecl(id, nodeType, nestingLevel) { var _this; _this = _super.call(this, nodeType) || this; - this.id = id; - this.nestingLevel = nestingLevel; - this.init = null; - this.typeExpr = null; - this.varFlags = VarFlags.None; - this.sym = null; + _this.id = id; + _this.nestingLevel = nestingLevel; + _this.init = null; + _this.typeExpr = null; + _this.varFlags = VarFlags.None; + _this.sym = null; } BoundDecl.prototype.isStatementOrExpression = function () { return true; }; BoundDecl.prototype.isPrivate = function () { return hasFlag(this.varFlags, VarFlags.Private); }; @@ -3279,8 +3279,8 @@ var TypeScript; function ArgDecl(id) { var _this; _this = _super.call(this, id, NodeType.ArgDecl, 0) || this; - this.isOptional = false; - this.parameterPropertySym = null; + _this.isOptional = false; + _this.parameterPropertySym = null; } ArgDecl.prototype.isOptionalArg = function () { return this.isOptional || this.init; }; ArgDecl.prototype.treeViewLabel = function () { @@ -3302,35 +3302,35 @@ var TypeScript; function FuncDecl(name, bod, isConstructor, arguments, vars, scopes, statics, nodeType) { var _this; _this = _super.call(this, nodeType) || this; - this.name = name; - this.bod = bod; - this.isConstructor = isConstructor; - this.arguments = arguments; - this.vars = vars; - this.scopes = scopes; - this.statics = statics; - this.hint = null; - this.fncFlags = FncFlags.None; - this.returnTypeAnnotation = null; - this.variableArgList = false; - this.jumpRefs = null; - this.internalNameCache = null; - this.tmp1Declared = false; - this.enclosingFnc = null; - this.freeVariables = []; - this.unitIndex = -1; - this.classDecl = null; - this.boundToProperty = null; - this.isOverload = false; - this.innerStaticFuncs = []; - this.isTargetTypedAsMethod = false; - this.isInlineCallLiteral = false; - this.accessorSymbol = null; - this.leftCurlyCount = 0; - this.rightCurlyCount = 0; - this.returnStatementsWithExpressions = []; - this.scopeType = null; // Type of the FuncDecl, before target typing - this.endingToken = null; + _this.name = name; + _this.bod = bod; + _this.isConstructor = isConstructor; + _this.arguments = arguments; + _this.vars = vars; + _this.scopes = scopes; + _this.statics = statics; + _this.hint = null; + _this.fncFlags = FncFlags.None; + _this.returnTypeAnnotation = null; + _this.variableArgList = false; + _this.jumpRefs = null; + _this.internalNameCache = null; + _this.tmp1Declared = false; + _this.enclosingFnc = null; + _this.freeVariables = []; + _this.unitIndex = -1; + _this.classDecl = null; + _this.boundToProperty = null; + _this.isOverload = false; + _this.innerStaticFuncs = []; + _this.isTargetTypedAsMethod = false; + _this.isInlineCallLiteral = false; + _this.accessorSymbol = null; + _this.leftCurlyCount = 0; + _this.rightCurlyCount = 0; + _this.returnStatementsWithExpressions = []; + _this.scopeType = null; // Type of the FuncDecl, before target typing + _this.endingToken = null; } FuncDecl.prototype.internalName = function () { if (this.internalNameCache == null) { @@ -3443,21 +3443,21 @@ var TypeScript; function Script(vars, scopes) { var _this; _this = _super.call(this, new Identifier("script"), null, false, null, vars, scopes, null, NodeType.Script) || this; - this.locationInfo = null; - this.referencedFiles = []; - this.requiresGlobal = false; - this.requiresInherits = false; - this.isResident = false; - this.isDeclareFile = false; - this.hasBeenTypeChecked = false; - this.topLevelMod = null; - this.leftCurlyCount = 0; - this.rightCurlyCount = 0; + _this.locationInfo = null; + _this.referencedFiles = []; + _this.requiresGlobal = false; + _this.requiresInherits = false; + _this.isResident = false; + _this.isDeclareFile = false; + _this.hasBeenTypeChecked = false; + _this.topLevelMod = null; + _this.leftCurlyCount = 0; + _this.rightCurlyCount = 0; // Remember if the script contains Unicode chars, that is needed when generating code for this script object to decide the output file correct encoding. - this.containsUnicodeChar = false; - this.containsUnicodeCharInComment = false; - this.vars = vars; - this.scopes = scopes; + _this.containsUnicodeChar = false; + _this.containsUnicodeCharInComment = false; + _this.vars = vars; + _this.scopes = scopes; } Script.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckScript(this); @@ -3513,10 +3513,10 @@ var TypeScript; function NamedDeclaration(nodeType, name, members) { var _this; _this = _super.call(this, nodeType) || this; - this.name = name; - this.members = members; - this.leftCurlyCount = 0; - this.rightCurlyCount = 0; + _this.name = name; + _this.members = members; + _this.leftCurlyCount = 0; + _this.rightCurlyCount = 0; } return NamedDeclaration; }(ModuleElement)); @@ -3526,15 +3526,15 @@ var TypeScript; function ModuleDeclaration(name, members, vars, scopes, endingToken) { var _this; _this = _super.call(this, NodeType.ModuleDeclaration, name, members) || this; - this.endingToken = endingToken; - this.modFlags = ModuleFlags.ShouldEmitModuleDecl; - this.amdDependencies = []; + _this.endingToken = endingToken; + _this.modFlags = ModuleFlags.ShouldEmitModuleDecl; + _this.amdDependencies = []; // Remember if the module contains Unicode chars, that is needed for dynamic module as we will generate a file for each. - this.containsUnicodeChar = false; - this.containsUnicodeCharInComment = false; - this.vars = vars; - this.scopes = scopes; - this.prettyName = this.name.actualText; + _this.containsUnicodeChar = false; + _this.containsUnicodeCharInComment = false; + _this.vars = vars; + _this.scopes = scopes; + _this.prettyName = _this.name.actualText; } ModuleDeclaration.prototype.isExported = function () { return hasFlag(this.modFlags, ModuleFlags.Exported); }; ModuleDeclaration.prototype.isAmbient = function () { return hasFlag(this.modFlags, ModuleFlags.Ambient); }; @@ -3562,9 +3562,9 @@ var TypeScript; function TypeDeclaration(nodeType, name, extendsList, implementsList, members) { var _this; _this = _super.call(this, nodeType, name, members) || this; - this.extendsList = extendsList; - this.implementsList = implementsList; - this.varFlags = VarFlags.None; + _this.extendsList = extendsList; + _this.implementsList = implementsList; + _this.varFlags = VarFlags.None; } TypeDeclaration.prototype.isExported = function () { return hasFlag(this.varFlags, VarFlags.Exported); @@ -3580,10 +3580,10 @@ var TypeScript; function ClassDeclaration(name, members, extendsList, implementsList) { var _this; _this = _super.call(this, NodeType.ClassDeclaration, name, extendsList, implementsList, members) || this; - this.knownMemberNames = {}; - this.constructorDecl = null; - this.constructorNestingLevel = 0; - this.endingToken = null; + _this.knownMemberNames = {}; + _this.constructorDecl = null; + _this.constructorNestingLevel = 0; + _this.endingToken = null; } ClassDeclaration.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckClass(this); @@ -3613,7 +3613,7 @@ var TypeScript; function Statement(nodeType) { var _this; _this = _super.call(this, nodeType) || this; - this.flags |= ASTFlags.IsStatement; + _this.flags |= ASTFlags.IsStatement; } Statement.prototype.isLoop = function () { return false; }; Statement.prototype.isStatementOrExpression = function () { return true; }; @@ -3630,8 +3630,8 @@ var TypeScript; function LabeledStatement(labels, stmt) { var _this; _this = _super.call(this, NodeType.LabeledStatement) || this; - this.labels = labels; - this.stmt = stmt; + _this.labels = labels; + _this.stmt = stmt; } LabeledStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -3665,8 +3665,8 @@ var TypeScript; function Block(statements, isStatementBlock) { var _this; _this = _super.call(this, NodeType.Block) || this; - this.statements = statements; - this.isStatementBlock = isStatementBlock; + _this.statements = statements; + _this.isStatementBlock = isStatementBlock; } Block.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -3721,8 +3721,8 @@ var TypeScript; function Jump(nodeType) { var _this; _this = _super.call(this, nodeType) || this; - this.target = null; - this.resolvedTarget = null; + _this.target = null; + _this.resolvedTarget = null; } Jump.prototype.hasExplicitTarget = function () { return (this.target); }; Jump.prototype.setResolvedTarget = function (parser, stmt) { @@ -3773,8 +3773,8 @@ var TypeScript; function WhileStatement(cond) { var _this; _this = _super.call(this, NodeType.While) || this; - this.cond = cond; - this.body = null; + _this.cond = cond; + _this.body = null; } WhileStatement.prototype.isLoop = function () { return true; }; WhileStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -3826,9 +3826,9 @@ var TypeScript; function DoWhileStatement() { var _this; _this = _super.call(this, NodeType.DoWhile) || this; - this.body = null; - this.whileAST = null; - this.cond = null; + _this.body = null; + _this.whileAST = null; + _this.cond = null; } DoWhileStatement.prototype.isLoop = function () { return true; }; DoWhileStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -3883,9 +3883,9 @@ var TypeScript; function IfStatement(cond) { var _this; _this = _super.call(this, NodeType.If) || this; - this.cond = cond; - this.elseBod = null; - this.statement = new ASTSpan(); + _this.cond = cond; + _this.elseBod = null; + _this.statement = new ASTSpan(); } IfStatement.prototype.isCompoundStatement = function () { return true; }; IfStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -3962,7 +3962,7 @@ var TypeScript; function ReturnStatement() { var _this; _this = _super.call(this, NodeType.Return) || this; - this.returnExpression = null; + _this.returnExpression = null; } ReturnStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4003,11 +4003,11 @@ var TypeScript; function ForInStatement(lval, obj) { var _this; _this = _super.call(this, NodeType.ForIn) || this; - this.lval = lval; - this.obj = obj; - this.statement = new ASTSpan(); - if (this.lval && (this.lval.nodeType == NodeType.VarDecl)) { - this.lval.varFlags |= VarFlags.AutoInit; + _this.lval = lval; + _this.obj = obj; + _this.statement = new ASTSpan(); + if (_this.lval && (_this.lval.nodeType == NodeType.VarDecl)) { + _this.lval.varFlags |= VarFlags.AutoInit; } } ForInStatement.prototype.isLoop = function () { return true; }; @@ -4119,7 +4119,7 @@ var TypeScript; function ForStatement(init) { var _this; _this = _super.call(this, NodeType.For) || this; - this.init = init; + _this.init = init; } ForStatement.prototype.isLoop = function () { return true; }; ForStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -4211,8 +4211,8 @@ var TypeScript; function WithStatement(expr) { var _this; _this = _super.call(this, NodeType.With) || this; - this.expr = expr; - this.withSym = null; + _this.expr = expr; + _this.withSym = null; } WithStatement.prototype.isCompoundStatement = function () { return true; }; WithStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -4238,9 +4238,9 @@ var TypeScript; function SwitchStatement(val) { var _this; _this = _super.call(this, NodeType.Switch) || this; - this.val = val; - this.defaultCase = null; - this.statement = new ASTSpan(); + _this.val = val; + _this.defaultCase = null; + _this.statement = new ASTSpan(); } SwitchStatement.prototype.isCompoundStatement = function () { return true; }; SwitchStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -4311,7 +4311,7 @@ var TypeScript; function CaseStatement() { var _this; _this = _super.call(this, NodeType.Case) || this; - this.expr = null; + _this.expr = null; } CaseStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4365,8 +4365,8 @@ var TypeScript; function TypeReference(term, arrayCount) { var _this; _this = _super.call(this, NodeType.TypeRef) || this; - this.term = term; - this.arrayCount = arrayCount; + _this.term = term; + _this.arrayCount = arrayCount; } TypeReference.prototype.emit = function (emitter, tokenId, startLine) { throw new Error("should not emit a type ref"); @@ -4396,8 +4396,8 @@ var TypeScript; function TryFinally(tryNode, finallyNode) { var _this; _this = _super.call(this, NodeType.TryFinally) || this; - this.tryNode = tryNode; - this.finallyNode = finallyNode; + _this.tryNode = tryNode; + _this.finallyNode = finallyNode; } TryFinally.prototype.isCompoundStatement = function () { return true; }; TryFinally.prototype.emit = function (emitter, tokenId, startLine) { @@ -4442,8 +4442,8 @@ var TypeScript; function TryCatch(tryNode, catchNode) { var _this; _this = _super.call(this, NodeType.TryCatch) || this; - this.tryNode = tryNode; - this.catchNode = catchNode; + _this.tryNode = tryNode; + _this.catchNode = catchNode; } TryCatch.prototype.isCompoundStatement = function () { return true; }; TryCatch.prototype.emit = function (emitter, tokenId, startLine) { @@ -4493,7 +4493,7 @@ var TypeScript; function Try(body) { var _this; _this = _super.call(this, NodeType.Try) || this; - this.body = body; + _this.body = body; } Try.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4522,12 +4522,12 @@ var TypeScript; function Catch(param, body) { var _this; _this = _super.call(this, NodeType.Catch) || this; - this.param = param; - this.body = body; - this.statement = new ASTSpan(); - this.containedScope = null; - if (this.param) { - this.param.varFlags |= VarFlags.AutoInit; + _this.param = param; + _this.body = body; + _this.statement = new ASTSpan(); + _this.containedScope = null; + if (_this.param) { + _this.param.varFlags |= VarFlags.AutoInit; } } Catch.prototype.emit = function (emitter, tokenId, startLine) { @@ -4596,7 +4596,7 @@ var TypeScript; function Finally(body) { var _this; _this = _super.call(this, NodeType.Finally) || this; - this.body = body; + _this.body = body; } Finally.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4625,10 +4625,10 @@ var TypeScript; function Comment(content, isBlockComment, endsLine) { var _this; _this = _super.call(this, NodeType.Comment) || this; - this.content = content; - this.isBlockComment = isBlockComment; - this.endsLine = endsLine; - this.text = null; + _this.content = content; + _this.isBlockComment = isBlockComment; + _this.endsLine = endsLine; + _this.text = null; } Comment.prototype.getText = function () { if (this.text == null) { diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 3f7e05e7164c9..f0db6078832e5 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2382,8 +2382,8 @@ var Harness; function TestCase(description, block) { var _this; _this = _super.call(this, description, block) || this; - this.description = description; - this.block = block; + _this.description = description; + _this.block = block; } TestCase.prototype.addChild = function (child) { throw new Error("Testcases may not be nested inside other testcases"); @@ -2417,8 +2417,8 @@ var Harness; function Scenario(description, block) { var _this; _this = _super.call(this, description, block) || this; - this.description = description; - this.block = block; + _this.description = description; + _this.block = block; } /** Run the block, and if the block doesn't raise an error, run the children. */ Scenario.prototype.run = function (done) { diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index cfdc137aedff9..618c38b89d58f 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -29,8 +29,8 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.apply(this, arguments) || this; - this.x = _super.prototype.foo; // error - this.z = _super.prototype.foo; // error + _this.x = _super.prototype.foo; // error + _this.z = _super.prototype.foo; // error } Derived.prototype.y = function () { return _super.prototype.foo; // error diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index aad41d01b075f..e953198290b73 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -24,7 +24,7 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.apply(this, arguments) || this; - this.bing = function () { return Base.foo; }; // error + _this.bing = function () { return Base.foo; }; // error } return Derived; }(Base)); diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index 1c1e2a94ff171..f1b69ecc00b30 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -59,7 +59,7 @@ var B = (function (_super) { var _this; _this = _super.call(this, x) || this; // Fails, x is readonly - this.x = 1; + _this.x = 1; } return B; }(A)); @@ -70,8 +70,8 @@ var C = (function (_super) { function C(x) { var _this; _this = _super.call(this, x) || this; - this.x = x; - this.x = 1; + _this.x = x; + _this.x = 1; } return C; }(A)); @@ -88,8 +88,8 @@ var E = (function (_super) { function E(x) { var _this; _this = _super.call(this, x) || this; - this.x = x; - this.x = 1; + _this.x = x; + _this.x = 1; } return E; }(D)); diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index e9394a64c9b83..3fd9018e94575 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -27,8 +27,8 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; - this.v = 1; - this.p = 1; + _this.v = 1; + _this.p = 1; C.s = 1; } return D; diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index 8b4b8326cab07..462f2382f3cd3 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -29,8 +29,8 @@ var B = (function (_super) { function B() { var _this; _this = _super.apply(this, arguments) || this; - this.p1 = doThing(A); // OK - this.p2 = doThing(B); // OK + _this.p1 = doThing(A); // OK + _this.p2 = doThing(B); // OK } return B; }(A)); diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index b2eea36eece14..f5bac0135af14 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -60,7 +60,7 @@ var C = (function (_super) { __extends(C, _super); function C() { var _this; - this.p = 10; + _this.p = 10; var x = 1; // should error } return C; @@ -69,7 +69,7 @@ var D = (function (_super) { __extends(D, _super); function D() { var _this; - this.p = 11; + _this.p = 11; var x = 1; // should error } return D; @@ -78,7 +78,7 @@ var E = (function (_super) { __extends(E, _super); function E() { var _this; - this.p = 12; + _this.p = 12; var x = 1; // should error } return E; diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index e40e0c45a59a1..1af13b1ce7a3e 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -77,7 +77,7 @@ var B = (function (_super) { var _this; "use strict"; // No error _this = _super.call(this) || this; - this.s = 9; + _this.s = 9; } return B; }(A)); @@ -86,7 +86,7 @@ var C = (function (_super) { function C() { var _this; _this = _super.call(this) || this; // No error - this.s = 9; + _this.s = 9; "use strict"; } return C; @@ -95,7 +95,7 @@ var D = (function (_super) { __extends(D, _super); function D() { var _this; - this.s = 9; + _this.s = 9; var x = 1; // Error _this = _super.call(this) || this; "use strict"; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index ff711ca8d75ac..807347e1d1653 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -46,8 +46,8 @@ var Q = (function (_super) { if (zz === void 0) { zz = _super.; } if (zzz === void 0) { zzz = function () { return _super.; }; } _this = _super.call(this) || this; - this.z = z; - this.xx = _super.prototype.; + _this.z = z; + _this.xx = _super.prototype.; } Q.prototype.foo = function (zz) { if (zz === void 0) { zz = _super.prototype.; } diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index 3dec9369dd427..770cb0bf79f8b 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -44,7 +44,7 @@ var T6 = (function (_super) { // Should error; base constructor has type T for first arg, // which is instantiated with 'number' in the extends clause _this = _super.call(this, "hi") || this; - var x = this.foo; + var x = _this.foo; } return T6; }(T5)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index e70dde9fd8e13..6af4482f37196 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -33,7 +33,7 @@ var D = (function (_super) { var _this; _this = _super.call(this, i) || this; var s = { - t: this._t + t: _this._t }; var i = Factory.create(s); } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 1f4c81149133a..f77cb96417967 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -30,7 +30,7 @@ var D = (function (_super) { var _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 + _this._t; // error _this = _super.call(this, undefined) || this; } return D; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index 2645eaa9795dc..c147b0d84ccb7 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -25,7 +25,7 @@ var D = (function (_super) { __extends(D, _super); function D() { var _this; - this._t; + _this._t; _this = _super.call(this) || this; } return D; @@ -35,7 +35,7 @@ var E = (function (_super) { function E() { var _this; _this = _super.call(this) || this; - this._t; + _this._t; } return E; }(null)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index df345ec5c26b8..8fff8068ec00b 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -17,7 +17,7 @@ var D = (function (_super) { __extends(D, _super); function D() { var _this; - this._t; // No error + _this._t; // No error } return D; }(null)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index d4e8c97955262..843a1d3b2cf0c 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -25,7 +25,7 @@ var D = (function (_super) { __extends(D, _super); function D() { var _this; - _this = _super.call(this, this) || this; + _this = _super.call(this, _this) || this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index f6c41b144eba4..d6ad948a08cd9 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -29,7 +29,7 @@ var D = (function (_super) { function D() { var _this; var x = { - j: this._t + j: _this._t }; _this = _super.call(this, undefined) || this; } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index 7d09351621a64..cbf0236c4cc3d 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -30,7 +30,7 @@ var D = (function (_super) { var _this; var x = { k: _this = _super.call(this, undefined) || this, - j: this._t + j: _this._t }; } return D; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 6640a32be5a02..1dd120eeb5c3e 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -68,9 +68,9 @@ var Other = (function (_super) { function Other() { var _this; _this = _super.call(this) || this; - this.propertyInitializer = _super.prototype.instanceMethod.call(this); - this.functionProperty = function () { _super.prototype.instanceMethod.call(_this); }; - _super.prototype.instanceMethod.call(this); + _this.propertyInitializer = _super.prototype.instanceMethod.call(_this); + _this.functionProperty = function () { _super.prototype.instanceMethod.call(_this); }; + _super.prototype.instanceMethod.call(_this); } // in instance method Other.prototype.instanceMethod = function () { diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index fd91de4cc8e1d..774dde7234098 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -39,9 +39,9 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; - this.x = _this = _super.call(this) || this; + _this.x = _this = _super.call(this) || this; var y = function () { - _this = _super.call(_this) || _this; + _this = _super.call(this) || this; }; var y2 = function () { _this = _super.call(this) || this; diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index cfa3fd1c07431..d77df52ddd6cc 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -57,7 +57,7 @@ var C = (function (_super) { }) || this; // Should be okay. // 'p' should have type 'string'. - _super.prototype.foo.call(this, { + _super.prototype.foo.call(_this, { method: function (p) { p.length; } diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index 96b0061f47e90..33127da64375d 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -49,7 +49,7 @@ var Derived = (function (_super) { function Derived(q) { var _this; _this = _super.call(this, '') || this; - this.q = q; + _this.q = q; //type of super call expression is void var p = _this = _super.call(this, '') || this; var p = v(); diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index f962876a391c0..2e68370fc32a4 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -78,7 +78,7 @@ var RegisteredUser = (function (_super) { function RegisteredUser() { var _this; _this = _super.call(this) || this; - this.name = "Frank"; + _this.name = "Frank"; // super call in an inner function in a constructor function inner() { _super.sayHello.call(this); diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index ab1744929a995..56e40b65e1092 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) { var _this; - if (a === void 0) { a = _super.foo.call(this); } + if (a === void 0) { a = _super.foo.call(_this); } } return C; }(B)); diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index f2c84cb7e64ba..5a1f48f382645 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -87,9 +87,9 @@ var RegisteredUser = (function (_super) { function RegisteredUser() { var _this; _this = _super.call(this) || this; - this.name = "Frank"; + _this.name = "Frank"; // super call in a constructor - _super.prototype.sayHello.call(this); + _super.prototype.sayHello.call(_this); // super call in a lambda in a constructor var x = function () { return _super.prototype.sayHello.call(_this); }; } @@ -107,7 +107,7 @@ var RegisteredUser2 = (function (_super) { function RegisteredUser2() { var _this; _this = _super.call(this) || this; - this.name = "Joe"; + _this.name = "Joe"; // super call in a nested lambda in a constructor var x = function () { return function () { return function () { return _super.prototype.sayHello.call(_this); }; }; }; } @@ -123,7 +123,7 @@ var RegisteredUser3 = (function (_super) { function RegisteredUser3() { var _this; _this = _super.call(this) || this; - this.name = "Sam"; + _this.name = "Sam"; // super property in a nested lambda in a constructor var superName = function () { return function () { return function () { return _super.prototype.name; }; }; }; } @@ -139,7 +139,7 @@ var RegisteredUser4 = (function (_super) { function RegisteredUser4() { var _this; _this = _super.call(this) || this; - this.name = "Mark"; + _this.name = "Mark"; // super in a nested lambda in a constructor var x = function () { return function () { return _super.prototype.; }; }; } diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index 86f059a2fb22b..c986580657033 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -52,7 +52,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; - _super.prototype.bar.call(this); + _super.prototype.bar.call(_this); _super.prototype.x; // error } D.prototype.foo = function () { diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index be0c44b40818e..df6e08177cb3f 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -52,7 +52,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; - _super.prototype.bar.call(this); // error + _super.prototype.bar.call(_this); // error _super.prototype.x; // error } D.foo = function () { diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index f7663eab6e057..d8dda26288c0e 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -101,7 +101,7 @@ var SomeDerivedClass = (function (_super) { function SomeDerivedClass() { var _this; _this = _super.call(this) || this; - var x = _super.prototype.func.call(this); + var x = _super.prototype.func.call(_this); var x; } SomeDerivedClass.prototype.fn = function () { diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 14492c2788ab1..1d2ab4c2a3f1b 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -51,7 +51,7 @@ var MyDerived = (function (_super) { function MyDerived() { var _this; _this = _super.call(this) || this; - var f1 = _super.prototype.getValue.call(this); + var f1 = _super.prototype.getValue.call(_this); var f2 = _super.prototype.value; } return MyDerived; diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index a4acd321f503f..cc46fa968969a 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -24,7 +24,7 @@ var D = (function (_super) { __extends(D, _super); function D() { var _this; - _super.prototype..call(this); + _super.prototype..call(_this); } return D; }(C)); diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index ca399c4de78c0..4b5176bed9630 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -24,7 +24,7 @@ var D = (function (_super) { __extends(D, _super); function D(x) { var _this; - _super.prototype..call(this, x); + _super.prototype..call(_this, x); } return D; }(C)); diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 5a124586d0cfb..aa70803de4dfe 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -29,7 +29,7 @@ var D = (function (_super) { __extends(D, _super); function D() { var _this; - _super.prototype..call(this); + _super.prototype..call(_this); } D.prototype.bar = function () { _super.prototype.bar.call(this, null); diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 2a86b144ae51d..218ebfb168672 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -71,7 +71,7 @@ var ClassWithNoInitializer = (function (_super) { //'this' in optional super call function ClassWithNoInitializer() { var _this; - _this = _super.call(this, this) || this; // Error + _this = _super.call(this, _this) || this; // Error } return ClassWithNoInitializer; }(BaseErrClass)); @@ -80,8 +80,8 @@ var ClassWithInitializer = (function (_super) { //'this' in required super call function ClassWithInitializer() { var _this; - _this = _super.call(this, this) || this; // Error - this.t = 4; + _this = _super.call(this, _this) || this; // Error + _this.t = 4; } return ClassWithInitializer; }(BaseErrClass)); diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 3748ebaa42f6b..c14f71ac0b68d 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -72,7 +72,7 @@ var ClassWithNoInitializer = (function (_super) { //'this' in optional super call function ClassWithNoInitializer() { var _this; - _this = _super.call(this, this) || this; // error: "super" has to be called before "this" accessing + _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing } return ClassWithNoInitializer; }(BaseErrClass)); @@ -81,8 +81,8 @@ var ClassWithInitializer = (function (_super) { //'this' in required super call function ClassWithInitializer() { var _this; - _this = _super.call(this, this) || this; // Error - this.t = 4; + _this = _super.call(this, _this) || this; // Error + _this.t = 4; } return ClassWithInitializer; }(BaseErrClass)); diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index 91e71522e4df8..cf64eebced18e 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -37,7 +37,7 @@ var Foo = (function (_super) { __extends(Foo, _super); function Foo() { var _this; - _this = _super.call(this, this) || this; // error: "super" has to be called before "this" accessing + _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing } return Foo; }(Base)); @@ -45,8 +45,8 @@ var Foo2 = (function (_super) { __extends(Foo2, _super); function Foo2() { var _this; - _this = _super.call(this, this) || this; // error - this.p = 0; + _this = _super.call(this, _this) || this; // error + _this.p = 0; } return Foo2; }(Base)); @@ -54,8 +54,8 @@ var Foo3 = (function (_super) { __extends(Foo3, _super); function Foo3(p) { var _this; - _this = _super.call(this, this) || this; // error - this.p = p; + _this = _super.call(this, _this) || this; // error + _this.p = p; } return Foo3; }(Base)); diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index 8e68c47eb2717..eba933d98933a 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -25,8 +25,8 @@ var Foo = (function (_super) { __extends(Foo, _super); function Foo(x) { var _this; - _this = _super.call(this, this) || this; - this.x = x; + _this = _super.call(this, _this) || this; + _this.x = x; } return Foo; }(Base)); diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index 6771f15c99b5c..ed6baabb4086e 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -34,7 +34,7 @@ var Foo = (function (_super) { __extends(Foo, _super); function Foo() { var _this; - _this = _super.call(this, this) || this; // error: "super" has to be called before "this" accessing + _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing } return Foo; }(Base)); @@ -42,8 +42,8 @@ var Foo2 = (function (_super) { __extends(Foo2, _super); function Foo2() { var _this; - _this = _super.call(this, this) || this; // error - this.x = 0; + _this = _super.call(this, _this) || this; // error + _this.x = 0; } return Foo2; }(Base)); diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index 4b6c1747d17df..d705d5fa7e09c 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -27,8 +27,8 @@ var Foo = (function (_super) { __extends(Foo, _super); function Foo() { var _this; - _this = _super.call(this, this) || this; - this.x = 0; + _this = _super.call(this, _this) || this; + _this.x = 0; } return Foo; }(Base)); diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index 9a64ef6cee6c1..76b79dbc7dccc 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -32,7 +32,7 @@ var Text = (function (_super) { function Text() { var _this; _this = _super.apply(this, arguments) || this; - this._tagName = 'div'; + _this._tagName = 'div'; } Text.prototype.render = function () { return (); diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index 30500b37ce5c0..c55ceb100eab5 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -32,7 +32,7 @@ var Text = (function (_super) { function Text() { var _this; _this = _super.apply(this, arguments) || this; - this._tagName = 'div'; + _this._tagName = 'div'; } Text.prototype.render = function () { return ( // this should be an error diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index a6cf3bb45b888..57ce2becbad13 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -32,7 +32,7 @@ var Text = (function (_super) { function Text() { var _this; _this = _super.apply(this, arguments) || this; - this._tagName = 'div'; + _this._tagName = 'div'; } Text.prototype.render = function () { return ( Hello world ); diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index aa63e614d1547..1bc14eb32eec3 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -32,7 +32,7 @@ var Text = (function (_super) { function Text() { var _this; _this = _super.apply(this, arguments) || this; - this._tagName = 'div'; + _this._tagName = 'div'; } Text.prototype.render = function () { return ( Hello world ); diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 63c79ce4c9192..fefb1e7ff3832 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -120,7 +120,7 @@ var Test; function File(path, content) { var _this; _this = _super.call(this, path) || this; - this.content = content; + _this.content = content; } return File; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index 5c28921a6a7a3..ed53a308808c8 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -70,7 +70,7 @@ var Test; function File(path, content) { var _this; _this = _super.call(this, path) || this; - this.content = content; + _this.content = content; } return File; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 43c1f7ee14638..87f0f60c53f30 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -74,10 +74,10 @@ var D = (function (_super) { function D() { var _this; _this = _super.apply(this, arguments) || this; - this.self1 = this; - this.self2 = this.self; - this.self3 = this.foo(); - this.d = new D(); + _this.self1 = _this; + _this.self2 = _this.self; + _this.self3 = _this.foo(); + _this.d = new D(); } D.prototype.bar = function () { this.self = this.self1; diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index b2ea2cac9ebcf..06d2c4bd6a51b 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -236,9 +236,9 @@ var ts; function Property(name, type, flags) { var _this; _this = _super.call(this) || this; - this.name = name; - this.type = type; - this.flags = flags; + _this.name = name; + _this.type = type; + _this.flags = flags; } Property.prototype.equals = function (other) { return this.name === other.name && @@ -257,9 +257,9 @@ var ts; function Signature(typeParameters, parameters, returnType) { var _this; _this = _super.call(this) || this; - this.typeParameters = typeParameters; - this.parameters = parameters; - this.returnType = returnType; + _this.typeParameters = typeParameters; + _this.parameters = parameters; + _this.returnType = returnType; } Signature.prototype.equalsNoReturn = function (other) { return this.parameters.length === other.parameters.length && @@ -278,9 +278,9 @@ var ts; function Parameter(name, type, flags) { var _this; _this = _super.call(this) || this; - this.name = name; - this.type = type; - this.flags = flags; + _this.name = name; + _this.type = type; + _this.flags = flags; } Parameter.prototype.equals = function (other) { return this.name === other.name && diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index e892cc28a3c8f..04eaa58a1968e 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -43,8 +43,8 @@ define(["require", "exports"], function (require, exports) { function B(element, url) { var _this; _this = _super.call(this, element) || this; - this.p1 = element; - this.p2 = url; + _this.p1 = element; + _this.p2 = url; } return B; }(A)); From 9c6e148d6e4d4e5f5d33127209343e58ef701f61 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 2 Sep 2016 00:12:32 -0700 Subject: [PATCH 05/39] Accepted baselines for sourcemap test. --- ...sWithDefaultConstructorAndExtendsClause.js | 4 +- ...hDefaultConstructorAndExtendsClause.js.map | 2 +- ...tConstructorAndExtendsClause.sourcemap.txt | 50 +++++++++---------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index ea71fbc20c0d6..29da6d52a3837 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -23,8 +23,8 @@ var Greeter = (function (_super) { function Greeter() { var _this; _this = _super.apply(this, arguments) || this; - this.a = 10; - this.nameA = "Ten"; + _this.a = 10; + _this.nameA = "Ten"; } return Greeter; }(AbstractGreeter)); diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map index e36f2eaaf8ece..3a75f3d3b6696 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,UAGC;;QAFU,MAAC,GAAG,EAAE,CAAC;QACP,UAAK,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,UAGC;;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 3da1d42edcde7..7c05c1b4d849d 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -94,41 +94,41 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 2 >Emitted(14, 19) Source(7, 2) + SourceIndex(0) --- >>> _this = _super.apply(this, arguments) || this; ->>> this.a = 10; +>>> _this.a = 10; 1->^^^^^^^^ -2 > ^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^-> +2 > ^^^^^^^ +3 > ^^^ +4 > ^^ +5 > ^ +6 > ^^^^^^^^-> 1-> 2 > a -3 > = -4 > 10 -5 > ; +3 > = +4 > 10 +5 > ; 1->Emitted(16, 9) Source(5, 12) + SourceIndex(0) -2 >Emitted(16, 15) Source(5, 13) + SourceIndex(0) -3 >Emitted(16, 18) Source(5, 16) + SourceIndex(0) -4 >Emitted(16, 20) Source(5, 18) + SourceIndex(0) -5 >Emitted(16, 21) Source(5, 19) + SourceIndex(0) +2 >Emitted(16, 16) Source(5, 13) + SourceIndex(0) +3 >Emitted(16, 19) Source(5, 16) + SourceIndex(0) +4 >Emitted(16, 21) Source(5, 18) + SourceIndex(0) +5 >Emitted(16, 22) Source(5, 19) + SourceIndex(0) --- ->>> this.nameA = "Ten"; +>>> _this.nameA = "Ten"; 1->^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +2 > ^^^^^^^^^^^ +3 > ^^^ +4 > ^^^^^ +5 > ^ 1-> > public 2 > nameA -3 > = -4 > "Ten" -5 > ; +3 > = +4 > "Ten" +5 > ; 1->Emitted(17, 9) Source(6, 12) + SourceIndex(0) -2 >Emitted(17, 19) Source(6, 17) + SourceIndex(0) -3 >Emitted(17, 22) Source(6, 20) + SourceIndex(0) -4 >Emitted(17, 27) Source(6, 25) + SourceIndex(0) -5 >Emitted(17, 28) Source(6, 26) + SourceIndex(0) +2 >Emitted(17, 20) Source(6, 17) + SourceIndex(0) +3 >Emitted(17, 23) Source(6, 20) + SourceIndex(0) +4 >Emitted(17, 28) Source(6, 25) + SourceIndex(0) +5 >Emitted(17, 29) Source(6, 26) + SourceIndex(0) --- >>> } 1 >^^^^ From cd5e76b23c6ffcb7c57ba8cf31660eb4826a86a8 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 2 Sep 2016 00:30:15 -0700 Subject: [PATCH 06/39] Always tack on a return statement for '_this' in derived classes. --- src/compiler/transformers/es6.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 5dd2b154c01f5..886ee1b8e40d8 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -790,7 +790,7 @@ namespace ts { const body = saveStateAndInvoke(constructor, hasSynthesizedSuper ? transformConstructorBodyWithSynthesizedSuper : transformConstructorBodyWithoutSynthesizedSuper); addRange(statements, body); } - if (constructor ? hasSynthesizedSuper : extendsClauseElement) { + if (extendsClauseElement) { statements.push( createReturn( createIdentifier("_this") From 30ec599c13d99378d8f1a0c27d783e25ed10723d Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 2 Sep 2016 11:52:13 -0700 Subject: [PATCH 07/39] Accepted baselines. --- tests/baselines/reference/abstractProperty.js | 1 + .../reference/abstractPropertyNegative.js | 3 ++ .../accessOverriddenBaseClassMember1.js | 1 + ...aliasUsageInTypeArgumentOfExtendsClause.js | 1 + .../reference/arrowFunctionContexts.js | 2 + .../reference/assignmentLHSIsValue.js | 1 + tests/baselines/reference/autolift4.js | 1 + tests/baselines/reference/baseCheck.js | 5 ++ tests/baselines/reference/bases.js | 1 + .../reference/bestCommonTypeOfTuple2.js | 1 + tests/baselines/reference/callWithSpread.js | 1 + .../reference/captureThisInSuperCall.js | 1 + .../reference/checkForObjectTooStrict.js | 2 + .../checkSuperCallBeforeThisAccessing1.js | 1 + .../checkSuperCallBeforeThisAccessing2.js | 1 + .../checkSuperCallBeforeThisAccessing3.js | 1 + .../checkSuperCallBeforeThisAccessing4.js | 1 + .../checkSuperCallBeforeThisAccessing5.js | 1 + .../checkSuperCallBeforeThisAccessing6.js | 1 + .../checkSuperCallBeforeThisAccessing7.js | 1 + .../checkSuperCallBeforeThisAccessing8.js | 1 + .../classConstructorAccessibility2.js | 3 ++ ...classConstructorParametersAccessibility.js | 1 + ...lassConstructorParametersAccessibility2.js | 1 + ...lassConstructorParametersAccessibility3.js | 1 + tests/baselines/reference/classExpression3.js | 2 + .../reference/classExtendingClassLikeType.js | 3 ++ tests/baselines/reference/classExtendsNull.js | 2 + .../reference/classSideInheritance2.js | 1 + .../reference/classSideInheritance3.js | 2 + tests/baselines/reference/classUpdateTests.js | 8 ++++ ...isionSuperAndLocalFunctionInConstructor.js | 2 + ...ollisionSuperAndLocalFunctionInProperty.js | 1 + .../collisionSuperAndLocalVarInConstructor.js | 2 + .../collisionSuperAndLocalVarInProperty.js | 1 + .../reference/collisionSuperAndParameter.js | 2 + ...perAndPropertyNameAsConstuctorParameter.js | 4 ++ .../reference/commentsInheritance.js | 1 + .../reference/compoundAssignmentLHSIsValue.js | 1 + ...poundExponentiationAssignmentLHSIsValue.js | 1 + .../reference/computedPropertyNames28_ES5.js | 1 + .../reference/computedPropertyNames30_ES5.js | 1 + tests/baselines/reference/constructorArgs.js | 1 + ...ctorFunctionTypeIsAssignableToBaseType2.js | 2 + .../reference/constructorOverloads2.js | 1 + .../reference/constructorOverloads3.js | 1 + .../reference/declFileGenericType2.js | 2 + .../reference/decoratorOnClassConstructor2.js | 1 + .../reference/decoratorOnClassConstructor3.js | 1 + ...derivedClassConstructorWithoutSuperCall.js | 4 ++ .../derivedClassOverridesPrivateFunction1.js | 1 + .../derivedClassOverridesProtectedMembers.js | 1 + .../derivedClassOverridesProtectedMembers2.js | 1 + .../derivedClassOverridesProtectedMembers3.js | 10 ++++ .../derivedClassOverridesPublicMembers.js | 1 + .../derivedClassParameterProperties.js | 10 ++++ ...dClassSuperCallsInNonConstructorMembers.js | 1 + .../derivedClassSuperCallsWithThisArg.js | 4 ++ .../derivedClassWithoutExplicitConstructor.js | 2 + ...derivedClassWithoutExplicitConstructor2.js | 2 + ...derivedClassWithoutExplicitConstructor3.js | 4 ++ .../destructuringParameterDeclaration5.js | 2 + ...BeforeEmitParameterPropertyDeclaration1.js | 1 + ...SuperCallBeforeEmitPropertyDeclaration1.js | 1 + ...arationAndParameterPropertyDeclaration1.js | 1 + tests/baselines/reference/errorSuperCalls.js | 2 + .../reference/errorSuperPropertyAccess.js | 2 + .../reference/es6ClassSuperCodegenBug.js | 1 + tests/baselines/reference/es6ClassTest.js | 1 + tests/baselines/reference/es6ClassTest2.js | 1 + ...cClassPropertyInheritanceSpecialization.js | 1 + ...genericConstraintOnExtendedBuiltinTypes.js | 1 + ...enericConstraintOnExtendedBuiltinTypes2.js | 1 + ...ericRecursiveImplicitConstructorErrors3.js | 1 + .../reference/genericTypeConstraints.js | 1 + .../illegalSuperCallsInConstructor.js | 1 + .../interfaceExtendsClassWithPrivate2.js | 2 + tests/baselines/reference/lift.js | 1 + .../missingPropertiesOfClassExpression.js | 1 + ...objectCreationOfElementAccessExpression.js | 6 +++ tests/baselines/reference/optionalMethods.js | 1 + .../reference/optionalParamArgsTest.js | 1 + .../reference/optionalParameterProperty.js | 1 + .../overloadOnConstConstraintChecks4.js | 1 + tests/baselines/reference/parserAstSpans1.js | 2 + .../baselines/reference/parserRealSource10.js | 6 +++ .../baselines/reference/parserRealSource11.js | 48 +++++++++++++++++++ tests/baselines/reference/parserharness.js | 3 ++ .../privateInstanceMemberAccessibility.js | 1 + .../privateStaticMemberAccessibility.js | 1 + .../readonlyConstructorAssignment.js | 3 ++ .../reference/returnInConstructor1.js | 2 + tests/baselines/reference/scopeTests.js | 1 + ...sWithDefaultConstructorAndExtendsClause.js | 1 + ...hDefaultConstructorAndExtendsClause.js.map | 2 +- ...tConstructorAndExtendsClause.sourcemap.txt | 21 ++++---- .../baselines/reference/staticInheritance.js | 1 + tests/baselines/reference/staticPropSuper.js | 4 ++ .../reference/strictModeInConstructor.js | 6 +++ tests/baselines/reference/superAccess2.js | 1 + .../reference/superCallArgsMustMatch.js | 1 + .../reference/superCallAssignResult.js | 1 + .../superCallBeforeThisAccessing1.js | 1 + .../superCallBeforeThisAccessing2.js | 1 + .../superCallBeforeThisAccessing3.js | 1 + .../superCallBeforeThisAccessing4.js | 2 + .../superCallBeforeThisAccessing5.js | 1 + .../superCallBeforeThisAccessing6.js | 1 + .../superCallBeforeThisAccessing7.js | 1 + .../superCallBeforeThisAccessing8.js | 1 + ...allFromClassThatDerivesFromGenericType1.js | 1 + ...allFromClassThatDerivesFromGenericType2.js | 1 + ...eButWithIncorrectNumberOfTypeArguments1.js | 1 + ...sFromGenericTypeButWithNoTypeArguments1.js | 1 + ...ivesNonGenericTypeButWithTypeArguments1.js | 1 + .../reference/superCallInNonStaticMethod.js | 1 + .../superCallInsideClassDeclaration.js | 2 + .../superCallInsideClassExpression.js | 2 + .../superCallInsideObjectLiteralExpression.js | 1 + .../reference/superCallOutsideConstructor.js | 1 + .../superCallParameterContextualTyping1.js | 1 + .../superCallParameterContextualTyping2.js | 1 + .../superCallParameterContextualTyping3.js | 1 + tests/baselines/reference/superCalls.js | 2 + .../reference/superCallsInConstructor.js | 1 + tests/baselines/reference/superErrors.js | 1 + .../reference/superInConstructorParam1.js | 1 + tests/baselines/reference/superInLambdas.js | 4 ++ tests/baselines/reference/superNewCall1.js | 1 + .../reference/superPropertyAccess1.js | 1 + .../reference/superPropertyAccess2.js | 1 + .../reference/superPropertyAccessNoError.js | 1 + .../reference/superPropertyAccess_ES5.js | 1 + .../superWithGenericSpecialization.js | 1 + .../baselines/reference/superWithGenerics.js | 1 + .../reference/superWithTypeArgument.js | 1 + .../reference/superWithTypeArgument2.js | 1 + .../reference/superWithTypeArgument3.js | 1 + .../reference/targetTypeBaseCalls.js | 1 + .../reference/thisInInvalidContexts.js | 2 + .../thisInInvalidContextsExternalModule.js | 2 + tests/baselines/reference/thisInSuperCall.js | 3 ++ tests/baselines/reference/thisInSuperCall1.js | 1 + tests/baselines/reference/thisInSuperCall2.js | 2 + tests/baselines/reference/thisInSuperCall3.js | 1 + .../baselines/reference/tsxDynamicTagName5.js | 1 + .../baselines/reference/tsxDynamicTagName7.js | 1 + .../baselines/reference/tsxDynamicTagName8.js | 1 + .../baselines/reference/tsxDynamicTagName9.js | 1 + .../reference/typeGuardOfFormThisMember.js | 1 + .../typeGuardOfFormThisMemberErrors.js | 1 + tests/baselines/reference/typeOfSuperCall.js | 1 + .../baselines/reference/typeRelationships.js | 1 + tests/baselines/reference/unknownSymbols1.js | 1 + .../reference/unspecializedConstraints.js | 3 ++ .../reference/validUseOfThisInSuper.js | 1 + .../reference/varArgsOnConstructorTypes.js | 1 + 157 files changed, 315 insertions(+), 11 deletions(-) diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index d9bfd5eb05f6f..292213ead5398 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -39,6 +39,7 @@ var C = (function (_super) { _this = _super.apply(this, arguments) || this; _this.raw = "edge"; _this.ro = "readonly please"; + return _this; } Object.defineProperty(C.prototype, "prop", { get: function () { return "foo"; }, diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index e94d9492fdb81..28ada310ef426 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -60,6 +60,7 @@ var C = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.ro = "readonly please"; + return _this; } Object.defineProperty(C.prototype, "concreteWithNoBody", { get: function () { }, @@ -81,6 +82,7 @@ var WrongTypePropertyImpl = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.num = "nope, wrong"; + return _this; } return WrongTypePropertyImpl; }(WrongTypeProperty)); @@ -108,6 +110,7 @@ var WrongTypeAccessorImpl2 = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.num = "nope, wrong"; + return _this; } return WrongTypeAccessorImpl2; }(WrongTypeAccessor)); diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index b4c269b1e3bae..65431a2f77837 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -37,6 +37,7 @@ var ColoredPoint = (function (_super) { var _this; _this = _super.call(this, x, y) || this; _this.color = color; + return _this; } ColoredPoint.prototype.toString = function () { return _super.prototype.toString.call(this) + " color=" + this.color; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 462390d28f7fb..8af9c702654c4 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -68,6 +68,7 @@ var D = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.x = moduleA; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index bfd49be6bbf59..660208cb0c182 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -118,6 +118,7 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.call(this, function () { return _this; }) || this; + return _this; } return Derived; }(Base)); @@ -160,6 +161,7 @@ var M2; function Derived() { var _this; _this = _super.call(this, function () { return _this; }) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 070c151ee51fb..52d14cbe536c3 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -121,6 +121,7 @@ var Derived = (function (_super) { var _this; _this = _super.call(this) || this; _super.prototype. = value; + return _this; } Derived.prototype.foo = function () { _super.prototype. = value; }; Derived.sfoo = function () { _super. = value; }; diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index b6afd28d429aa..0638efab0b39e 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -46,6 +46,7 @@ var Point3D = (function (_super) { var _this; _this = _super.call(this, x, y) || this; _this.z = z; + return _this; } Point3D.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.m); diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index c3a2731b45d92..832830ae8645d 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -45,6 +45,7 @@ var ELoc = (function (_super) { function ELoc(x) { var _this; _this = _super.call(this, 0, x) || this; + return _this; } return ELoc; }(C)); @@ -53,6 +54,7 @@ var ELocVar = (function (_super) { function ELocVar(x) { var _this; _this = _super.call(this, 0, loc) || this; + return _this; } ELocVar.prototype.m = function () { var loc = 10; @@ -65,6 +67,7 @@ var D = (function (_super) { var _this; _this = _super.call(this, _this.z) || this; _this.z = z; + return _this; } return D; }(C)); // too few params @@ -74,6 +77,7 @@ var E = (function (_super) { var _this; _this = _super.call(this, 0, _this.z) || this; _this.z = z; + return _this; } return E; }(C)); @@ -83,6 +87,7 @@ var F = (function (_super) { var _this; _this = _super.call(this, "hello", _this.z) || this; _this.z = z; + return _this; } return F; }(C)); // first param type diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index ff6a3262d4565..6b73eb9556b2c 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -39,6 +39,7 @@ var C = (function (_super) { var _this; _this.x; any; + return _this; } return C; }(B)); diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 34deb346cbd5c..8213733b75317 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -63,6 +63,7 @@ var D1 = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.i = "bar"; + return _this; } return D1; }(C1)); diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 2149db744b06f..48af58edf6505 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -102,6 +102,7 @@ var D = (function (_super) { var _this; _this = _super.call(this, 1, 2) || this; _this = _super.apply(this, [1, 2].concat(a)) || this; + return _this; } D.prototype.foo = function () { _super.prototype.foo.call(this, 1, 2); diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 0c36877d9dcbc..2d39722548d63 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -24,6 +24,7 @@ var B = (function (_super) { function B() { var _this; _this = _super.call(this, { test: function () { return _this.someMethod(); } }) || this; + return _this; } B.prototype.someMethod = function () { }; return B; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index 48825a01a675f..8c0cfc104d29a 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -51,6 +51,7 @@ var Bar = (function (_super) { function Bar() { var _this; _this = _super.call(this) || this; + return _this; } return Bar; }(Foo.Object)); @@ -59,6 +60,7 @@ var Baz = (function (_super) { function Baz() { var _this; _this = _super.call(this) || this; + return _this; } return Baz; }(Object)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index 35e00c36621e6..a54f82ab9fa00 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -29,6 +29,7 @@ var Derived = (function (_super) { _this; _this.x = 10; var that = _this; + return _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index b49c1aab7744a..95b34f27b68c7 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -29,6 +29,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; _this.x = 10; var that = _this; + return _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 70600bb03a953..0e882f71fdb1d 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -39,6 +39,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; _this.x = 10; var that = _this; + return _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 95e0062b0872d..00f2ed22fbf7b 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -47,6 +47,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; _this.x = 10; var that = _this; + return _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index 1c77b2e7c78e3..e365678ee0cad 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -27,6 +27,7 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.call(this, _this.x) || this; + return _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 15fcbff4c89e9..cc8912230ab51 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -31,6 +31,7 @@ var Super = (function (_super) { var _this; (function () { return _this; }); // No Error _this = _super.call(this) || this; + return _this; } return Super; }(Base)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index 0cade04664dea..7ba43de005b23 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -25,6 +25,7 @@ var Super = (function (_super) { function Super() { var _this; _this = _super.call(this, (function () { return _this; })) || this; // No error + return _this; } return Super; }(Base)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index a280c0d6ca6f5..25a480b9b57e8 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -31,6 +31,7 @@ var Super = (function (_super) { var _this; var that = _this; _this = _super.call(this) || this; + return _this; } return Super; }(Base)); diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index 9d1ebdd9d9aef..8a81d469fb814 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -80,6 +80,7 @@ var DerivedA = (function (_super) { var _this; _this = _super.call(this, x) || this; _this.x = x; + return _this; } DerivedA.prototype.createInstance = function () { new DerivedA(5); }; DerivedA.prototype.createBaseInstance = function () { new BaseA(6); }; @@ -92,6 +93,7 @@ var DerivedB = (function (_super) { var _this; _this = _super.call(this, x) || this; _this.x = x; + return _this; } DerivedB.prototype.createInstance = function () { new DerivedB(7); }; DerivedB.prototype.createBaseInstance = function () { new BaseB(8); }; // ok @@ -104,6 +106,7 @@ var DerivedC = (function (_super) { var _this; _this = _super.call(this, x) || this; _this.x = x; + return _this; } DerivedC.prototype.createInstance = function () { new DerivedC(9); }; DerivedC.prototype.createBaseInstance = function () { new BaseC(10); }; // error diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index 066c724b60f79..214815f49768c 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -62,6 +62,7 @@ var Derived = (function (_super) { var _this; _this = _super.call(this, p) || this; _this.p; // OK + return _this; } return Derived; }(C3)); diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index b80504351712d..7c714aa4c03e0 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -62,6 +62,7 @@ var Derived = (function (_super) { var _this; _this = _super.call(this, p) || this; _this.p; // OK + return _this; } return Derived; }(C3)); diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index 9e0c0264fd954..275f3920538b5 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -32,6 +32,7 @@ var Derived = (function (_super) { _this = _super.call(this, p) || this; _this.p = p; _this.p; // OK + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index e0ba9c349e74d..3c53d72823353 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -18,6 +18,7 @@ var C = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.c = 3; + return _this; } return class_1; }((function (_super) { @@ -26,6 +27,7 @@ var C = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.b = 2; + return _this; } return class_2; }((function () { diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index 2d91befc17240..32d7fff0cbd11 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -80,6 +80,7 @@ var D1 = (function (_super) { _this = _super.call(this, "abc", "def") || this; _this.x = "x"; _this.y = "y"; + return _this; } return D1; }(getBase())); @@ -91,6 +92,7 @@ var D2 = (function (_super) { _this = _super.call(this, 10, 20) || this; _this.x = 1; _this.y = 2; + return _this; } return D2; }(getBase())); @@ -101,6 +103,7 @@ var D3 = (function (_super) { _this = _super.call(this, "abc", 42) || this; _this.x = "x"; _this.y = 2; + return _this; } return D3; }(getBase())); diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index 3ff1c92a56e4c..301dee7f705a7 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -24,6 +24,7 @@ var C = (function (_super) { var _this; _this = _super.call(this) || this; return Object.create(null); + return _this; } return C; }(null)); @@ -32,6 +33,7 @@ var D = (function (_super) { function D() { var _this; return Object.create(null); + return _this; } return D; }(null)); diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index c5c506d1af681..1af6b6f846c37 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -31,6 +31,7 @@ var SubText = (function (_super) { function SubText(text, span) { var _this; _this = _super.call(this) || this; + return _this; } return SubText; }(TextBase)); diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 4751e0e8d6e56..fda7b0b0848bd 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -36,6 +36,7 @@ var B = (function (_super) { var _this; _this = _super.call(this, x) || this; _this.data = data; + return _this; } return B; }(A)); @@ -44,6 +45,7 @@ var C = (function (_super) { function C(x) { var _this; _this = _super.call(this, x) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index d334e1c7f66ef..2d7ecc3c1908b 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -160,6 +160,7 @@ var E = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.p1 = 0; + return _this; } return E; }(D)); @@ -167,6 +168,7 @@ var F = (function (_super) { __extends(F, _super); function F() { var _this; + return _this; } // ERROR - super call required return F; }(E)); @@ -176,6 +178,7 @@ var G = (function (_super) { var _this; _this = _super.call(this) || this; _this.p1 = 0; + return _this; } // NO ERROR return G; }(D)); @@ -190,6 +193,7 @@ var I = (function (_super) { function I() { var _this; _this = _super.call(this) || this; + return _this; } // ERROR - no super call allowed return I; }(Object)); @@ -199,6 +203,7 @@ var J = (function (_super) { var _this; _this = _super.call(this) || this; // NO ERROR _this.p1 = p1; + return _this; } return J; }(G)); @@ -209,6 +214,7 @@ var K = (function (_super) { _this.p1 = p1; var i = 0; _this = _super.call(this) || this; + return _this; } return K; }(G)); @@ -218,6 +224,7 @@ var L = (function (_super) { var _this; _this = _super.call(this) || this; // NO ERROR _this.p1 = p1; + return _this; } return L; }(G)); @@ -228,6 +235,7 @@ var M = (function (_super) { _this.p1 = p1; var i = 0; _this = _super.call(this) || this; + return _this; } return M; }(G)); diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index b961b8fa4a5fa..5f2a5e89301d7 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -46,6 +46,7 @@ var b = (function (_super) { _this = _super.call(this) || this; function _super() { } + return _this; } return b; }(Foo)); @@ -58,6 +59,7 @@ var c = (function (_super) { function _super() { } }; + return _this; } return c; }(Foo)); diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index e3d834dd1d415..a6893c6a57a7c 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -48,6 +48,7 @@ var b = (function (_super) { } } }; + return _this; } return b; }(Foo)); diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index b3ef300076262..d799c78350369 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -39,6 +39,7 @@ var b = (function (_super) { var _this; _this = _super.call(this) || this; var _super = 10; // Should be error + return _this; } return b; }(Foo)); @@ -50,6 +51,7 @@ var c = (function (_super) { var x = function () { var _super = 10; // Should be error }; + return _this; } return c; }(Foo)); diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index e7cb0e613cc4f..4bb4f6a5a8b73 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -46,6 +46,7 @@ var b = (function (_super) { } }; _this._super = 10; // No error + return _this; } return b; }(Foo)); diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index a60889888d663..6ed47a1b3c167 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -100,6 +100,7 @@ var Foo2 = (function (_super) { doStuff: function (_super) { } }; + return _this; } Foo2.prototype.x = function () { var _this = this; @@ -126,6 +127,7 @@ var Foo4 = (function (_super) { function Foo4(_super) { var _this; _this = _super.call(this) || this; + return _this; } Foo4.prototype.y = function (_super) { var _this = this; diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 696f439a4b129..2d3709fa878a9 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -46,6 +46,7 @@ var b1 = (function (_super) { function b1(_super) { var _this; _this = _super.call(this) || this; + return _this; } return b1; }(a)); @@ -55,6 +56,7 @@ var b2 = (function (_super) { var _this; _this = _super.call(this) || this; _this._super = _super; + return _this; } return b2; }(a)); @@ -63,6 +65,7 @@ var b3 = (function (_super) { function b3(_super) { var _this; _this = _super.call(this) || this; + return _this; } return b3; }(a)); @@ -72,6 +75,7 @@ var b4 = (function (_super) { var _this; _this = _super.call(this) || this; _this._super = _super; + return _this; } return b4; }(a)); diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index 860c0b90e4839..370ee0d246ca3 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -229,6 +229,7 @@ var c3 = (function (_super) { function c3() { var _this; _this = _super.call(this, 10) || this; + return _this; } /** c3 f1*/ c3.prototype.f1 = function () { diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index 2057d63b38fac..dfbdf31c3d1c3 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -201,6 +201,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; _super.prototype. *= value; _super.prototype. += value; + return _this; } Derived.prototype.foo = function () { _super.prototype. *= value; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index ef29163eda65d..da670472b4759 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -143,6 +143,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; (_a = _super.prototype). = Math.pow(_a., value); var _a; + return _this; } Derived.prototype.foo = function () { (_a = _super.prototype). = Math.pow(_a., value); diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index aaac258504cdc..8152394cbf8c5 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -29,6 +29,7 @@ var C = (function (_super) { var obj = (_a = {}, _a[(_this = _super.call(this) || this, "prop")] = function () { }, _a); + return _this; var _a; } return C; diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index 9fbe5f380ca85..9f4a4ab51f9bc 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -40,6 +40,7 @@ var C = (function (_super) { _a); var _a; }); + return _this; } return C; }(Base)); diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 2c2838c97f96f..c7939472a9609 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -32,6 +32,7 @@ var Sub = (function (_super) { var _this; _this = _super.call(this, options.value) || this; _this.options = options; + return _this; } return Sub; }(Super)); diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index a235e2555f3b0..4f70c7d7f35d1 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -49,6 +49,7 @@ var Derived = (function (_super) { function Derived(x) { var _this; _this = _super.call(this, x) || this; + return _this; } return Derived; }(Base)); @@ -59,6 +60,7 @@ var Derived2 = (function (_super) { var _this; _this = _super.call(this, x) || this; return 1; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index a0ed6d890d4f8..0041acb489e03 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -42,6 +42,7 @@ var Foo = (function (_super) { function Foo(x, y) { var _this; _this = _super.call(this, x) || this; + return _this; } Foo.prototype.bar1 = function () { }; return Foo; diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index 7bc7989f7a316..c0ae9b452f98c 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -32,6 +32,7 @@ var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { var _this; + return _this; } Foo.prototype.bar1 = function () { }; return Foo; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 50280b589b33d..0e5351e69eadd 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -60,6 +60,7 @@ var templa; function AbstractElementController() { var _this; _this = _super.call(this) || this; + return _this; } return AbstractElementController; }(templa.mvc.AbstractController)); @@ -82,6 +83,7 @@ var templa; var _this; _this = _super.call(this) || this; _this._controllers = []; + return _this; } return AbstractCompositeElementController; }(templa.dom.mvc.AbstractElementController)); diff --git a/tests/baselines/reference/decoratorOnClassConstructor2.js b/tests/baselines/reference/decoratorOnClassConstructor2.js index d50912fbeac59..1f0b9b0d51722 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor2.js +++ b/tests/baselines/reference/decoratorOnClassConstructor2.js @@ -47,6 +47,7 @@ var C = (function (_super) { function C(prop) { var _this; _this = _super.call(this) || this; + return _this; } return C; }(_0_ts_1.base)); diff --git a/tests/baselines/reference/decoratorOnClassConstructor3.js b/tests/baselines/reference/decoratorOnClassConstructor3.js index 6f37ad9dea146..9182cce66f4ce 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor3.js +++ b/tests/baselines/reference/decoratorOnClassConstructor3.js @@ -50,6 +50,7 @@ var C = (function (_super) { function C(prop) { var _this; _this = _super.call(this) || this; + return _this; } return C; }(_0_1.base)); diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index 58903b2ba5745..e76f3445c8eb2 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -48,6 +48,7 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { var _this; + return _this; } return Derived; }(Base)); @@ -61,6 +62,7 @@ var Derived2 = (function (_super) { function Derived2() { var _this; var r2 = function () { return _this = _super.call(this) || this; }; // error for misplaced super call (nested function) + return _this; } return Derived2; }(Base2)); @@ -69,6 +71,7 @@ var Derived3 = (function (_super) { function Derived3() { var _this; var r = function () { _this = _super.call(this) || this; }; // error + return _this; } return Derived3; }(Base2)); @@ -77,6 +80,7 @@ var Derived4 = (function (_super) { function Derived4() { var _this; var r = _this = _super.call(this) || this; // ok + return _this; } return Derived4; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index 605ad6afa454d..fd601ff221162 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -34,6 +34,7 @@ var DerivedClass = (function (_super) { function DerivedClass() { var _this; _this = _super.call(this) || this; + return _this; } DerivedClass.prototype._init = function () { }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index d3e3fe5d4c9ab..12344c199158c 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -68,6 +68,7 @@ var Derived = (function (_super) { function Derived(a) { var _this; _this = _super.call(this, x) || this; + return _this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 1f43469596a7a..37be9e209ac57 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -96,6 +96,7 @@ var Derived = (function (_super) { function Derived(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index d678f5ce59f8a..0836c9d7f41dc 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -105,6 +105,7 @@ var Derived1 = (function (_super) { function Derived1(a) { var _this; _this = _super.call(this, a) || this; + return _this; } return Derived1; }(Base)); @@ -113,6 +114,7 @@ var Derived2 = (function (_super) { function Derived2(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Derived2.prototype.b = function (a) { }; return Derived2; @@ -122,6 +124,7 @@ var Derived3 = (function (_super) { function Derived3(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Object.defineProperty(Derived3.prototype, "c", { get: function () { return x; }, @@ -135,6 +138,7 @@ var Derived4 = (function (_super) { function Derived4(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Object.defineProperty(Derived4.prototype, "c", { set: function (v) { }, @@ -148,6 +152,7 @@ var Derived5 = (function (_super) { function Derived5(a) { var _this; _this = _super.call(this, a) || this; + return _this; } return Derived5; }(Base)); @@ -156,6 +161,7 @@ var Derived6 = (function (_super) { function Derived6(a) { var _this; _this = _super.call(this, a) || this; + return _this; } return Derived6; }(Base)); @@ -164,6 +170,7 @@ var Derived7 = (function (_super) { function Derived7(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Derived7.s = function (a) { }; return Derived7; @@ -173,6 +180,7 @@ var Derived8 = (function (_super) { function Derived8(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Object.defineProperty(Derived8, "t", { get: function () { return x; }, @@ -186,6 +194,7 @@ var Derived9 = (function (_super) { function Derived9(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Object.defineProperty(Derived9, "t", { set: function (v) { }, @@ -199,6 +208,7 @@ var Derived10 = (function (_super) { function Derived10(a) { var _this; _this = _super.call(this, a) || this; + return _this; } return Derived10; }(Base)); diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 7839398551dc9..8d0375ab13a26 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -94,6 +94,7 @@ var Derived = (function (_super) { function Derived(a) { var _this; _this = _super.call(this, x) || this; + return _this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index 658e56fb09819..f623653d6fa46 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -112,6 +112,7 @@ var Derived = (function (_super) { var _this; var a = 1; _this = _super.call(this) || this; // ok + return _this; } return Derived; }(Base)); @@ -122,6 +123,7 @@ var Derived2 = (function (_super) { _this.y = y; var a = 1; _this = _super.call(this) || this; // error + return _this; } return Derived2; }(Base)); @@ -132,6 +134,7 @@ var Derived3 = (function (_super) { _this = _super.call(this) || this; // ok _this.y = y; var a = 1; + return _this; } return Derived3; }(Base)); @@ -142,6 +145,7 @@ var Derived4 = (function (_super) { _this.a = 1; var b = 2; _this = _super.call(this) || this; // error + return _this; } return Derived4; }(Base)); @@ -152,6 +156,7 @@ var Derived5 = (function (_super) { _this = _super.call(this) || this; // ok _this.a = 1; var b = 2; + return _this; } return Derived5; }(Base)); @@ -162,6 +167,7 @@ var Derived6 = (function (_super) { _this.a = 1; var b = 2; _this = _super.call(this) || this; // error: "super" has to be called before "this" accessing + return _this; } return Derived6; }(Base)); @@ -173,6 +179,7 @@ var Derived7 = (function (_super) { _this.a = 3; _this.b = 3; _this = _super.call(this) || this; // error + return _this; } return Derived7; }(Base)); @@ -184,6 +191,7 @@ var Derived8 = (function (_super) { _this.a = 1; _this.a = 3; _this.b = 3; + return _this; } return Derived8; }(Base)); @@ -201,6 +209,7 @@ var Derived9 = (function (_super) { _this.a = 3; _this.b = 3; _this = _super.call(this) || this; // error + return _this; } return Derived9; }(Base2)); @@ -212,6 +221,7 @@ var Derived10 = (function (_super) { _this.a = 1; _this.a = 3; _this.b = 3; + return _this; } return Derived10; }(Base2)); diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index 6b06204b8e976..e3bbf2699c5a9 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -49,6 +49,7 @@ var Derived = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.a = _this = _super.call(this) || this; + return _this; } Derived.prototype.b = function () { _this = _super.call(this) || this; diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index e73d004120653..102944889bdf8 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -44,6 +44,7 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.call(this, _this) || this; // ok + return _this; } return Derived; }(Base)); @@ -53,6 +54,7 @@ var Derived2 = (function (_super) { var _this; _this = _super.call(this, _this) || this; // error _this.a = a; + return _this; } return Derived2; }(Base)); @@ -62,6 +64,7 @@ var Derived3 = (function (_super) { var _this; _this = _super.call(this, function () { return _this; }) || this; // error _this.a = a; + return _this; } return Derived3; }(Base)); @@ -71,6 +74,7 @@ var Derived4 = (function (_super) { var _this; _this = _super.call(this, function () { return this; }) || this; // ok _this.a = a; + return _this; } return Derived4; }(Base)); diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index cc260f094997e..f5eb3d22360ac 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -45,6 +45,7 @@ var Derived = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; + return _this; } return Derived; }(Base)); @@ -63,6 +64,7 @@ var D = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 2; _this.y = null; + return _this; } return D; }(Base2)); diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index d3711ec27c0db..5ad203892308c 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -53,6 +53,7 @@ var Derived = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; + return _this; } return Derived; }(Base)); @@ -73,6 +74,7 @@ var D = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 2; _this.y = null; + return _this; } return D; }(Base2)); diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index 14f9fdf88af29..d0e5f22d4f3d4 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -67,6 +67,7 @@ var Derived = (function (_super) { _this = _super.call(this, 2) || this; _this.b = ''; _this.b = y; + return _this; } return Derived; }(Base)); @@ -77,6 +78,7 @@ var Derived2 = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; + return _this; } return Derived2; }(Derived)); @@ -96,6 +98,7 @@ var D = (function (_super) { _this = _super.call(this, 2) || this; _this.b = null; _this.b = y; + return _this; } return D; }(Base)); @@ -106,6 +109,7 @@ var D2 = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 2; _this.y = null; + return _this; } return D2; }(D)); diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index a1f109ed49ea2..8c35b9044a19d 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -67,6 +67,7 @@ var SubClass = (function (_super) { function SubClass() { var _this; _this = _super.call(this) || this; + return _this; } return SubClass; }(Class)); @@ -80,6 +81,7 @@ var SubD = (function (_super) { function SubD() { var _this; _this = _super.call(this) || this; + return _this; } return SubD; }(D)); diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index 60fa8e32c1e2d..b95263464a75c 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -33,6 +33,7 @@ var B = (function (_super) { 'someStringForEgngInject'; _this = _super.call(this) || this; _this.x = x; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index abef8394924e4..f078c448b7549 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -35,6 +35,7 @@ var B = (function (_super) { 'someStringForEgngInject'; _this = _super.call(this) || this; _this.blub = 12; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index 0f36d9d9115f9..e64af9ef86240 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -34,6 +34,7 @@ var B = (function (_super) { _this = _super.call(this) || this; _this.x = x; _this.blah = 2; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 4f54781deb993..864bc19a34452 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -135,6 +135,7 @@ var Derived = (function (_super) { var _this; _super.prototype..call(_this); _this = _super.call(this) || this; + return _this; } return Derived; }(Base)); @@ -150,6 +151,7 @@ var OtherDerived = (function (_super) { _this = _super.apply(this, arguments) || this; //super call in class member initializer of derived type _this.t = _this = _super.call(this) || this; + return _this; } OtherDerived.prototype.fn = function () { //super call in class member function of derived type diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 18c98868e937e..1b7c9a418fc65 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -189,6 +189,7 @@ var SomeDerived1 = (function (_super) { var _this; _this = _super.call(this) || this; _super.prototype.publicMember = 1; + return _this; } SomeDerived1.prototype.fn = function () { var x = _super.prototype.publicMember; @@ -223,6 +224,7 @@ var SomeDerived2 = (function (_super) { var _this; _this = _super.call(this) || this; _super.prototype.privateMember = 1; + return _this; } SomeDerived2.prototype.fn = function () { var x = _super.prototype.privateMember; diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index 88000a12bbe53..2eec250211e98 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -35,6 +35,7 @@ var B = (function (_super) { else { _this = _super.call(this, 'a2', 'b2') || this; } + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 4b2cb2c51b55d..705915812be47 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -111,6 +111,7 @@ var Foo = (function (_super) { _this.zoo = "zoo"; _this.x = x; _this.gar = 5; + return _this; } Foo.prototype.bar = function () { return 0; }; Foo.prototype.boo = function (x) { return x; }; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index ebf779f7bba71..eec5d830e011c 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -269,6 +269,7 @@ var SuperChild = (function (_super) { function SuperChild() { var _this; _this = _super.call(this, 1) || this; + return _this; } SuperChild.prototype.b = function () { _super.prototype.b.call(this, 'str'); diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 0cc1f5867a24d..ccbac1d22b5ae 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -111,6 +111,7 @@ var PortalFx; function Validator(message) { var _this; _this = _super.call(this, message) || this; + return _this; } return Validator; }(Portal.Controls.Validators.Validator)); diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index 4581ecc31ecca..246b9b76e3c57 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -54,6 +54,7 @@ var EndGate; function NumberTween(from) { var _this; _this = _super.call(this, from) || this; + return _this; } return NumberTween; }(Tweening.Tween)); diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index 8f1e9c8365fea..e7744b28833ca 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -53,6 +53,7 @@ var EndGate; function NumberTween(from) { var _this; _this = _super.call(this, from) || this; + return _this; } return NumberTween; }(Tweening.Tween)); diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index 49109e1aa5af1..d22823b9f8152 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -62,6 +62,7 @@ var TypeScript; var _this; _this = _super.apply(this, arguments) || this; _this._elementType = null; + return _this; } PullTypeSymbol.prototype.toString = function (scopeSymbol, useConstraintInName) { var s = this.getScopedNameEx(scopeSymbol, useConstraintInName).toString(); diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index 761220ae11af5..48ff00e5ac25b 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -40,6 +40,7 @@ var BarExtended = (function (_super) { function BarExtended() { var _this; _this = _super.call(this) || this; + return _this; } return BarExtended; }(Bar)); diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 77f0a0a2b6b3f..868d53daad54b 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -47,6 +47,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; } }; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index 3f205640f5981..51c64f48f6c57 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -43,6 +43,7 @@ var D = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 2; _this.y = 3; + return _this; } D.prototype.foo = function (x) { return x; }; D.prototype.other = function (x) { return x; }; @@ -55,6 +56,7 @@ var D2 = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.x = ""; + return _this; } D2.prototype.foo = function (x) { return x; }; D2.prototype.other = function (x) { return x; }; diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index bfbf75b17310b..a71f1c9065ae2 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -36,6 +36,7 @@ var C = (function (_super) { _this = _super.call(this, y) || this; var x = 10 + w; var ll = x * w; + return _this; } C.prototype.liftxyz = function () { return x + z + this.y; }; C.prototype.liftxylocllz = function () { return x + z + this.y + this.ll; }; diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index c1f4480241c19..20252f37e6173 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -17,6 +17,7 @@ var George = (function (_super) { function George() { var _this; _this = _super.call(this) || this; + return _this; } return George; }((function () { diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index 9543082fbd16a..760454dd9a469 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -84,6 +84,7 @@ var MonsterFood = (function (_super) { var _this; _this = _super.call(this, name) || this; _this.flavor = flavor; + return _this; } return MonsterFood; }(Food)); @@ -93,6 +94,7 @@ var IceCream = (function (_super) { var _this; _this = _super.call(this, "Ice Cream", flavor) || this; _this.flavor = flavor; + return _this; } return IceCream; }(MonsterFood)); @@ -103,6 +105,7 @@ var Cookie = (function (_super) { _this = _super.call(this, "Cookie", flavor) || this; _this.flavor = flavor; _this.isGlutenFree = isGlutenFree; + return _this; } return Cookie; }(MonsterFood)); @@ -112,6 +115,7 @@ var PetFood = (function (_super) { var _this; _this = _super.call(this, name) || this; _this.whereToBuy = whereToBuy; + return _this; } return PetFood; }(Food)); @@ -121,6 +125,7 @@ var ExpensiveOrganicDogFood = (function (_super) { var _this; _this = _super.call(this, "Origen", whereToBuy) || this; _this.whereToBuy = whereToBuy; + return _this; } return ExpensiveOrganicDogFood; }(PetFood)); @@ -131,6 +136,7 @@ var ExpensiveOrganicCatFood = (function (_super) { _this = _super.call(this, "Nature's Logic", whereToBuy) || this; _this.whereToBuy = whereToBuy; _this.containsFish = containsFish; + return _this; } return ExpensiveOrganicCatFood; }(PetFood)); diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 1885c419fef8b..72df561227f58 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -112,6 +112,7 @@ var Derived = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.a = 1; + return _this; } Derived.prototype.f = function () { return 1; }; return Derived; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index f53f0c74a541b..258f05cbc8541 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -164,6 +164,7 @@ var C2 = (function (_super) { var _this; if (v2 === void 0) { v2 = 6; } _this = _super.call(this, v2) || this; + return _this; } return C2; }(C1)); diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index 44eb2a7aa5628..ca78ad7286e38 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -28,6 +28,7 @@ var D = (function (_super) { var _this; _this = _super.call(this) || this; _this.p = p; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index 22bacbdb0b4c2..360b38ce70cb9 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -30,6 +30,7 @@ var A = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.x = 1; + return _this; } return A; }(Z)); diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index 365e640c15099..799a17d47deb3 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -321,6 +321,7 @@ var c3 = (function (_super) { var _this; _this = _super.call(this, 10) || this; _this.p1 = _super.prototype.c2_p1; + return _this; } /** c3 f1*/ c3.prototype.f1 = function () { @@ -409,6 +410,7 @@ var c6 = (function (_super) { var _this; _this = _super.call(this) || this; _this.d = _super.prototype.b; + return _this; } return c6; }(c5)); diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index c9f011704d035..88516c9a692e9 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -830,6 +830,7 @@ var TypeScript; _this = _super.call(this, TokenID.NumberLiteral) || this; _this.value = value; _this.hasEmptyFraction = hasEmptyFraction; + return _this; } NumberLiteralToken.prototype.getText = function () { return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); @@ -846,6 +847,7 @@ var TypeScript; var _this; _this = _super.call(this, TokenID.StringLiteral) || this; _this.value = value; + return _this; } StringLiteralToken.prototype.getText = function () { return this.value; @@ -863,6 +865,7 @@ var TypeScript; _this = _super.call(this, TokenID.Identifier) || this; _this.value = value; _this.hasEscapeSequence = hasEscapeSequence; + return _this; } IdentifierToken.prototype.getText = function () { return this.value; @@ -879,6 +882,7 @@ var TypeScript; var _this; _this = _super.call(this, tokenId) || this; _this.value = value; + return _this; } WhitespaceToken.prototype.getText = function () { return this.value; @@ -899,6 +903,7 @@ var TypeScript; _this.startPos = startPos; _this.line = line; _this.endsLine = endsLine; + return _this; } CommentToken.prototype.getText = function () { return this.value; @@ -915,6 +920,7 @@ var TypeScript; var _this; _this = _super.call(this, TokenID.RegularExpressionLiteral) || this; _this.regex = regex; + return _this; } RegularExpressionLiteralToken.prototype.getText = function () { return this.regex.toString(); diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 054608e9d19ab..fa112e51dadb0 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2396,6 +2396,7 @@ var TypeScript; _this.preComments = null; _this.postComments = null; _this.isParenthesized = false; + return _this; } AST.prototype.isExpression = function () { return false; }; AST.prototype.isStatementOrExpression = function () { return false; }; @@ -2547,6 +2548,7 @@ var TypeScript; _this = _super.call(this, NodeType.Error) || this; _this.minChar = min; _this.limChar = lim; + return _this; } return IncompleteAST; }(AST)); @@ -2558,6 +2560,7 @@ var TypeScript; _this = _super.call(this, NodeType.List) || this; _this.enclosingScope = null; _this.members = new AST[]; + return _this; } ASTList.prototype.addToControlFlow = function (context) { var len = this.members.length; @@ -2629,6 +2632,7 @@ var TypeScript; _this.sym = null; _this.cloId = -1; _this.setText(actualText, hasEscapeSequence); + return _this; } Identifier.prototype.setText = function (actualText, hasEscapeSequence) { this.actualText = actualText; @@ -2669,6 +2673,7 @@ var TypeScript; function MissingIdentifier() { var _this; _this = _super.call(this, "__missing") || this; + return _this; } MissingIdentifier.prototype.isMissing = function () { return true; @@ -2685,6 +2690,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Label) || this; _this.id = id; + return _this; } Label.prototype.printLabel = function () { return this.id.actualText + ":"; }; Label.prototype.typeCheck = function (typeFlow) { @@ -2709,6 +2715,7 @@ var TypeScript; function Expression(nodeType) { var _this; _this = _super.call(this, nodeType) || this; + return _this; } Expression.prototype.isExpression = function () { return true; }; Expression.prototype.isStatementOrExpression = function () { return true; }; @@ -2723,6 +2730,7 @@ var TypeScript; _this.operand = operand; _this.targetType = null; // Target type for an object literal (null if no target type) _this.castTerm = null; + return _this; } UnaryExpression.prototype.addToControlFlow = function (context) { _super.prototype.addToControlFlow.call(this, context); @@ -2869,6 +2877,7 @@ var TypeScript; _this.arguments = arguments; _this.signature = null; _this.minChar = _this.target.minChar; + return _this; } CallExpression.prototype.typeCheck = function (typeFlow) { if (this.nodeType == NodeType.New) { @@ -2900,6 +2909,7 @@ var TypeScript; _this = _super.call(this, nodeType) || this; _this.operand1 = operand1; _this.operand2 = operand2; + return _this; } BinaryExpression.prototype.typeCheck = function (typeFlow) { switch (this.nodeType) { @@ -3054,6 +3064,7 @@ var TypeScript; _this.operand1 = operand1; _this.operand2 = operand2; _this.operand3 = operand3; + return _this; } ConditionalExpression.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckQMark(this); @@ -3080,6 +3091,7 @@ var TypeScript; _this.value = value; _this.hasEmptyFraction = hasEmptyFraction; _this.isNegativeZero = false; + return _this; } NumberLiteral.prototype.typeCheck = function (typeFlow) { this.type = typeFlow.doubleType; @@ -3120,6 +3132,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Regex) || this; _this.regex = regex; + return _this; } RegexLiteral.prototype.typeCheck = function (typeFlow) { this.type = typeFlow.regexType; @@ -3141,6 +3154,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.QString) || this; _this.text = text; + return _this; } StringLiteral.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -3167,6 +3181,7 @@ var TypeScript; function ModuleElement(nodeType) { var _this; _this = _super.call(this, nodeType) || this; + return _this; } return ModuleElement; }(AST)); @@ -3180,6 +3195,7 @@ var TypeScript; _this.alias = alias; _this.varFlags = VarFlags.None; _this.isDynamicImport = false; + return _this; } ImportDeclaration.prototype.isStatementOrExpression = function () { return true; }; ImportDeclaration.prototype.emit = function (emitter, tokenId, startLine) { @@ -3242,6 +3258,7 @@ var TypeScript; _this.typeExpr = null; _this.varFlags = VarFlags.None; _this.sym = null; + return _this; } BoundDecl.prototype.isStatementOrExpression = function () { return true; }; BoundDecl.prototype.isPrivate = function () { return hasFlag(this.varFlags, VarFlags.Private); }; @@ -3261,6 +3278,7 @@ var TypeScript; function VarDecl(id, nest) { var _this; _this = _super.call(this, id, NodeType.VarDecl, nest) || this; + return _this; } VarDecl.prototype.isAmbient = function () { return hasFlag(this.varFlags, VarFlags.Ambient); }; VarDecl.prototype.isExported = function () { return hasFlag(this.varFlags, VarFlags.Exported); }; @@ -3281,6 +3299,7 @@ var TypeScript; _this = _super.call(this, id, NodeType.ArgDecl, 0) || this; _this.isOptional = false; _this.parameterPropertySym = null; + return _this; } ArgDecl.prototype.isOptionalArg = function () { return this.isOptional || this.init; }; ArgDecl.prototype.treeViewLabel = function () { @@ -3331,6 +3350,7 @@ var TypeScript; _this.returnStatementsWithExpressions = []; _this.scopeType = null; // Type of the FuncDecl, before target typing _this.endingToken = null; + return _this; } FuncDecl.prototype.internalName = function () { if (this.internalNameCache == null) { @@ -3458,6 +3478,7 @@ var TypeScript; _this.containsUnicodeCharInComment = false; _this.vars = vars; _this.scopes = scopes; + return _this; } Script.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckScript(this); @@ -3517,6 +3538,7 @@ var TypeScript; _this.members = members; _this.leftCurlyCount = 0; _this.rightCurlyCount = 0; + return _this; } return NamedDeclaration; }(ModuleElement)); @@ -3535,6 +3557,7 @@ var TypeScript; _this.vars = vars; _this.scopes = scopes; _this.prettyName = _this.name.actualText; + return _this; } ModuleDeclaration.prototype.isExported = function () { return hasFlag(this.modFlags, ModuleFlags.Exported); }; ModuleDeclaration.prototype.isAmbient = function () { return hasFlag(this.modFlags, ModuleFlags.Ambient); }; @@ -3565,6 +3588,7 @@ var TypeScript; _this.extendsList = extendsList; _this.implementsList = implementsList; _this.varFlags = VarFlags.None; + return _this; } TypeDeclaration.prototype.isExported = function () { return hasFlag(this.varFlags, VarFlags.Exported); @@ -3584,6 +3608,7 @@ var TypeScript; _this.constructorDecl = null; _this.constructorNestingLevel = 0; _this.endingToken = null; + return _this; } ClassDeclaration.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckClass(this); @@ -3599,6 +3624,7 @@ var TypeScript; function InterfaceDeclaration(name, members, extendsList, implementsList) { var _this; _this = _super.call(this, NodeType.InterfaceDeclaration, name, extendsList, implementsList, members) || this; + return _this; } InterfaceDeclaration.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckInterface(this); @@ -3614,6 +3640,7 @@ var TypeScript; var _this; _this = _super.call(this, nodeType) || this; _this.flags |= ASTFlags.IsStatement; + return _this; } Statement.prototype.isLoop = function () { return false; }; Statement.prototype.isStatementOrExpression = function () { return true; }; @@ -3632,6 +3659,7 @@ var TypeScript; _this = _super.call(this, NodeType.LabeledStatement) || this; _this.labels = labels; _this.stmt = stmt; + return _this; } LabeledStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -3667,6 +3695,7 @@ var TypeScript; _this = _super.call(this, NodeType.Block) || this; _this.statements = statements; _this.isStatementBlock = isStatementBlock; + return _this; } Block.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -3723,6 +3752,7 @@ var TypeScript; _this = _super.call(this, nodeType) || this; _this.target = null; _this.resolvedTarget = null; + return _this; } Jump.prototype.hasExplicitTarget = function () { return (this.target); }; Jump.prototype.setResolvedTarget = function (parser, stmt) { @@ -3775,6 +3805,7 @@ var TypeScript; _this = _super.call(this, NodeType.While) || this; _this.cond = cond; _this.body = null; + return _this; } WhileStatement.prototype.isLoop = function () { return true; }; WhileStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -3829,6 +3860,7 @@ var TypeScript; _this.body = null; _this.whileAST = null; _this.cond = null; + return _this; } DoWhileStatement.prototype.isLoop = function () { return true; }; DoWhileStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -3886,6 +3918,7 @@ var TypeScript; _this.cond = cond; _this.elseBod = null; _this.statement = new ASTSpan(); + return _this; } IfStatement.prototype.isCompoundStatement = function () { return true; }; IfStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -3963,6 +3996,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Return) || this; _this.returnExpression = null; + return _this; } ReturnStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -3994,6 +4028,7 @@ var TypeScript; function EndCode() { var _this; _this = _super.call(this, NodeType.EndCode) || this; + return _this; } return EndCode; }(AST)); @@ -4009,6 +4044,7 @@ var TypeScript; if (_this.lval && (_this.lval.nodeType == NodeType.VarDecl)) { _this.lval.varFlags |= VarFlags.AutoInit; } + return _this; } ForInStatement.prototype.isLoop = function () { return true; }; ForInStatement.prototype.isFiltered = function () { @@ -4120,6 +4156,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.For) || this; _this.init = init; + return _this; } ForStatement.prototype.isLoop = function () { return true; }; ForStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -4213,6 +4250,7 @@ var TypeScript; _this = _super.call(this, NodeType.With) || this; _this.expr = expr; _this.withSym = null; + return _this; } WithStatement.prototype.isCompoundStatement = function () { return true; }; WithStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -4241,6 +4279,7 @@ var TypeScript; _this.val = val; _this.defaultCase = null; _this.statement = new ASTSpan(); + return _this; } SwitchStatement.prototype.isCompoundStatement = function () { return true; }; SwitchStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -4312,6 +4351,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Case) || this; _this.expr = null; + return _this; } CaseStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4367,6 +4407,7 @@ var TypeScript; _this = _super.call(this, NodeType.TypeRef) || this; _this.term = term; _this.arrayCount = arrayCount; + return _this; } TypeReference.prototype.emit = function (emitter, tokenId, startLine) { throw new Error("should not emit a type ref"); @@ -4398,6 +4439,7 @@ var TypeScript; _this = _super.call(this, NodeType.TryFinally) || this; _this.tryNode = tryNode; _this.finallyNode = finallyNode; + return _this; } TryFinally.prototype.isCompoundStatement = function () { return true; }; TryFinally.prototype.emit = function (emitter, tokenId, startLine) { @@ -4444,6 +4486,7 @@ var TypeScript; _this = _super.call(this, NodeType.TryCatch) || this; _this.tryNode = tryNode; _this.catchNode = catchNode; + return _this; } TryCatch.prototype.isCompoundStatement = function () { return true; }; TryCatch.prototype.emit = function (emitter, tokenId, startLine) { @@ -4494,6 +4537,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Try) || this; _this.body = body; + return _this; } Try.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4529,6 +4573,7 @@ var TypeScript; if (_this.param) { _this.param.varFlags |= VarFlags.AutoInit; } + return _this; } Catch.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4597,6 +4642,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Finally) || this; _this.body = body; + return _this; } Finally.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4629,6 +4675,7 @@ var TypeScript; _this.isBlockComment = isBlockComment; _this.endsLine = endsLine; _this.text = null; + return _this; } Comment.prototype.getText = function () { if (this.text == null) { @@ -4652,6 +4699,7 @@ var TypeScript; function DebuggerStatement() { var _this; _this = _super.call(this, NodeType.Debugger) || this; + return _this; } DebuggerStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index f0db6078832e5..2d219c63e6abe 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2384,6 +2384,7 @@ var Harness; _this = _super.call(this, description, block) || this; _this.description = description; _this.block = block; + return _this; } TestCase.prototype.addChild = function (child) { throw new Error("Testcases may not be nested inside other testcases"); @@ -2419,6 +2420,7 @@ var Harness; _this = _super.call(this, description, block) || this; _this.description = description; _this.block = block; + return _this; } /** Run the block, and if the block doesn't raise an error, run the children. */ Scenario.prototype.run = function (done) { @@ -2473,6 +2475,7 @@ var Harness; function Run() { var _this; _this = _super.call(this, 'Test Run', null) || this; + return _this; } Run.prototype.run = function () { emitLog('start'); diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index 618c38b89d58f..c07238dff5ef3 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -31,6 +31,7 @@ var Derived = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = _super.prototype.foo; // error _this.z = _super.prototype.foo; // error + return _this; } Derived.prototype.y = function () { return _super.prototype.foo; // error diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index e953198290b73..0d4cfefb63b08 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -25,6 +25,7 @@ var Derived = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.bing = function () { return Base.foo; }; // error + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index f1b69ecc00b30..581b110298a32 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -60,6 +60,7 @@ var B = (function (_super) { _this = _super.call(this, x) || this; // Fails, x is readonly _this.x = 1; + return _this; } return B; }(A)); @@ -72,6 +73,7 @@ var C = (function (_super) { _this = _super.call(this, x) || this; _this.x = x; _this.x = 1; + return _this; } return C; }(A)); @@ -90,6 +92,7 @@ var E = (function (_super) { _this = _super.call(this, x) || this; _this.x = x; _this.x = 1; + return _this; } return E; }(D)); diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index cd3a9f4c34682..0ee301758cf1f 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -126,6 +126,7 @@ var H = (function (_super) { var _this; _this = _super.call(this) || this; return new G(); //error + return _this; } return H; }(F)); @@ -135,6 +136,7 @@ var I = (function (_super) { var _this; _this = _super.call(this) || this; return new G(); + return _this; } return I; }(G)); diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 3fd9018e94575..9436043094eb3 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -30,6 +30,7 @@ var D = (function (_super) { _this.v = 1; _this.p = 1; C.s = 1; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index 29da6d52a3837..7fef0a420100e 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -25,6 +25,7 @@ var Greeter = (function (_super) { _this = _super.apply(this, arguments) || this; _this.a = 10; _this.nameA = "Ten"; + return _this; } return Greeter; }(AbstractGreeter)); diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map index 3a75f3d3b6696..14f7f65f05056 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,UAGC;;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,UAGC;;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 7c05c1b4d849d..e1adf2f7a297f 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -130,6 +130,7 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 4 >Emitted(17, 28) Source(6, 25) + SourceIndex(0) 5 >Emitted(17, 29) Source(6, 26) + SourceIndex(0) --- +>>> return _this; >>> } 1 >^^^^ 2 > ^ @@ -137,8 +138,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1 > > 2 > } -1 >Emitted(18, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(18, 6) Source(7, 2) + SourceIndex(0) +1 >Emitted(19, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(19, 6) Source(7, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ @@ -146,8 +147,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > ^^^-> 1-> 2 > } -1->Emitted(19, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(19, 19) Source(7, 2) + SourceIndex(0) +1->Emitted(20, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(20, 19) Source(7, 2) + SourceIndex(0) --- >>>}(AbstractGreeter)); 1-> @@ -166,11 +167,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(20, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(20, 2) Source(7, 2) + SourceIndex(0) -3 >Emitted(20, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(20, 3) Source(4, 23) + SourceIndex(0) -5 >Emitted(20, 18) Source(4, 38) + SourceIndex(0) -6 >Emitted(20, 21) Source(7, 2) + SourceIndex(0) +1->Emitted(21, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(21, 2) Source(7, 2) + SourceIndex(0) +3 >Emitted(21, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(21, 3) Source(4, 23) + SourceIndex(0) +5 >Emitted(21, 18) Source(4, 38) + SourceIndex(0) +6 >Emitted(21, 21) Source(7, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map \ No newline at end of file diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index 462f2382f3cd3..5e769cab563f8 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -31,6 +31,7 @@ var B = (function (_super) { _this = _super.apply(this, arguments) || this; _this.p1 = doThing(A); // OK _this.p2 = doThing(B); // OK + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index f5bac0135af14..6240f8c454f49 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -52,6 +52,7 @@ var B = (function (_super) { var _this; var x = 1; // should not error _this = _super.call(this) || this; + return _this; } return B; }(A)); @@ -62,6 +63,7 @@ var C = (function (_super) { var _this; _this.p = 10; var x = 1; // should error + return _this; } return C; }(A)); @@ -71,6 +73,7 @@ var D = (function (_super) { var _this; _this.p = 11; var x = 1; // should error + return _this; } return D; }(A)); @@ -80,6 +83,7 @@ var E = (function (_super) { var _this; _this.p = 12; var x = 1; // should error + return _this; } return E; }(A)); diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 1af13b1ce7a3e..4e1c483f1c192 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -78,6 +78,7 @@ var B = (function (_super) { "use strict"; // No error _this = _super.call(this) || this; _this.s = 9; + return _this; } return B; }(A)); @@ -88,6 +89,7 @@ var C = (function (_super) { _this = _super.call(this) || this; // No error _this.s = 9; "use strict"; + return _this; } return C; }(A)); @@ -99,6 +101,7 @@ var D = (function (_super) { var x = 1; // Error _this = _super.call(this) || this; "use strict"; + return _this; } return D; }(A)); @@ -108,6 +111,7 @@ var Bs = (function (_super) { var _this; "use strict"; // No error _this = _super.call(this) || this; + return _this; } return Bs; }(A)); @@ -118,6 +122,7 @@ var Cs = (function (_super) { var _this; _this = _super.call(this) || this; // No error "use strict"; + return _this; } return Cs; }(A)); @@ -129,6 +134,7 @@ var Ds = (function (_super) { var x = 1; // no Error _this = _super.call(this) || this; "use strict"; + return _this; } return Ds; }(A)); diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index 807347e1d1653..408f9051badcb 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -48,6 +48,7 @@ var Q = (function (_super) { _this = _super.call(this) || this; _this.z = z; _this.xx = _super.prototype.; + return _this; } Q.prototype.foo = function (zz) { if (zz === void 0) { zz = _super.prototype.; } diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index 770cb0bf79f8b..dc450147f889e 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -45,6 +45,7 @@ var T6 = (function (_super) { // which is instantiated with 'number' in the extends clause _this = _super.call(this, "hi") || this; var x = _this.foo; + return _this; } return T6; }(T5)); diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index 4eeabdfa2822c..6e30cc64052a8 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -27,6 +27,7 @@ var H = (function (_super) { var _this; var x = _this = _super.call(this, 5) || this; // Should be of type void, not E. x = 5; + return _this; } return H; }(E)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index 6af4482f37196..a5d6ec18ce34e 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -36,6 +36,7 @@ var D = (function (_super) { t: _this._t }; var i = Factory.create(s); + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index 8ab6c5f349c25..c7a206dbbbec3 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -26,6 +26,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this, function () { _this._t; }) || this; // no error. only check when this is directly accessing in constructor + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index f77cb96417967..185767fefb6ba 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -32,6 +32,7 @@ var D = (function (_super) { x(); // no error; we only check super is called before this when the container is a constructor _this._t; // error _this = _super.call(this, undefined) || this; + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index c147b0d84ccb7..311b7ca21831b 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -27,6 +27,7 @@ var D = (function (_super) { var _this; _this._t; _this = _super.call(this) || this; + return _this; } return D; }(null)); @@ -36,6 +37,7 @@ var E = (function (_super) { var _this; _this = _super.call(this) || this; _this._t; + return _this; } return E; }(null)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 8fff8068ec00b..57228538faf37 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -18,6 +18,7 @@ var D = (function (_super) { function D() { var _this; _this._t; // No error + return _this; } return D; }(null)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index 843a1d3b2cf0c..e630d539f1405 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -26,6 +26,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this, _this) || this; + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index d6ad948a08cd9..9cfe87367741d 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -32,6 +32,7 @@ var D = (function (_super) { j: _this._t }; _this = _super.call(this, undefined) || this; + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index cbf0236c4cc3d..fe459b5e03147 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -32,6 +32,7 @@ var D = (function (_super) { k: _this = _super.call(this, undefined) || this, j: _this._t }; + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index 6de41cb518831..2cfc0bfcbd45d 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -22,6 +22,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; + return _this; } return D; }(B)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index 5ae8f8b38748e..f9eeadc98e623 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -21,6 +21,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; + return _this; } return D; }(B)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index bc85d74c4c8c7..02bec67d7aaa2 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -27,6 +27,7 @@ var B = (function (_super) { function B() { var _this; _this = _super.call(this, function (value) { return String(value); }) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index a1736bb45f021..55c6ee6f4450a 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -27,6 +27,7 @@ var B = (function (_super) { function B() { var _this; _this = _super.call(this, function (value) { return String(value); }) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index c5beb5df5b5ba..977377e41d410 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -27,6 +27,7 @@ var B = (function (_super) { function B() { var _this; _this = _super.call(this, function (value) { return String(value); }) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 1dd120eeb5c3e..503aee2dcc643 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -71,6 +71,7 @@ var Other = (function (_super) { _this.propertyInitializer = _super.prototype.instanceMethod.call(_this); _this.functionProperty = function () { _super.prototype.instanceMethod.call(_this); }; _super.prototype.instanceMethod.call(_this); + return _this; } // in instance method Other.prototype.instanceMethod = function () { diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index f47b50d4915d4..326662abdaccf 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -41,9 +41,11 @@ var B = (function (_super) { function D() { var _this; _this = _super.call(this) || this; + return _this; } return D; }(C)); + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index b9e1f6c97866f..5797085726dff 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -41,9 +41,11 @@ var B = (function (_super) { function class_1() { var _this; _this = _super.call(this) || this; + return _this; } return class_1; }(C)); + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index 68a9c19e819cb..636b03c227f89 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -32,6 +32,7 @@ var B = (function (_super) { var x = { x: _this = _super.call(this) || this }; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 774dde7234098..65a8b435166b7 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -46,6 +46,7 @@ var D = (function (_super) { var y2 = function () { _this = _super.call(this) || this; }; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index a311ce95fc733..4e4ae47967a1b 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -30,6 +30,7 @@ var B = (function (_super) { function B() { var _this; _this = _super.call(this, function (value) { return String(value.toExponential()); }) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index 9439871f38c28..f3a246c6389a7 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -29,6 +29,7 @@ var C = (function (_super) { function C() { var _this; _this = _super.call(this, function (value) { return String(value()); }) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index d77df52ddd6cc..e7b8b355108d8 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -62,6 +62,7 @@ var C = (function (_super) { p.length; } }); + return _this; } return C; }(CBase)); diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index 33127da64375d..2fe7712ce68ce 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -53,6 +53,7 @@ var Derived = (function (_super) { //type of super call expression is void var p = _this = _super.call(this, '') || this; var p = v(); + return _this; } return Derived; }(Base)); @@ -67,6 +68,7 @@ var OtherDerived = (function (_super) { var _this; var p = ''; _this = _super.call(this) || this; + return _this; } return OtherDerived; }(OtherBase)); diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index be34657a0c1db..48b79acadf4dc 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -51,6 +51,7 @@ var Derived = (function (_super) { catch (e) { _this = _super.call(this) || this; } + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index 2e68370fc32a4..93676c5d8f3e9 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -93,6 +93,7 @@ var RegisteredUser = (function (_super) { var _this = this; return function () { return _super.; }; })(); + return _this; } RegisteredUser.prototype.sayHello = function () { // super call in a method diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 56e40b65e1092..7519a8253ecb9 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -29,6 +29,7 @@ var C = (function (_super) { function C(a) { var _this; if (a === void 0) { a = _super.foo.call(_this); } + return _this; } return C; }(B)); diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 5a1f48f382645..9b4d956dc5a24 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -92,6 +92,7 @@ var RegisteredUser = (function (_super) { _super.prototype.sayHello.call(_this); // super call in a lambda in a constructor var x = function () { return _super.prototype.sayHello.call(_this); }; + return _this; } RegisteredUser.prototype.sayHello = function () { var _this = this; @@ -110,6 +111,7 @@ var RegisteredUser2 = (function (_super) { _this.name = "Joe"; // super call in a nested lambda in a constructor var x = function () { return function () { return function () { return _super.prototype.sayHello.call(_this); }; }; }; + return _this; } RegisteredUser2.prototype.sayHello = function () { var _this = this; @@ -126,6 +128,7 @@ var RegisteredUser3 = (function (_super) { _this.name = "Sam"; // super property in a nested lambda in a constructor var superName = function () { return function () { return function () { return _super.prototype.name; }; }; }; + return _this; } RegisteredUser3.prototype.sayHello = function () { var _this = this; @@ -142,6 +145,7 @@ var RegisteredUser4 = (function (_super) { _this.name = "Mark"; // super in a nested lambda in a constructor var x = function () { return function () { return _super.prototype.; }; }; + return _this; } RegisteredUser4.prototype.sayHello = function () { var _this = this; diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index 32c4da4d4e4ed..30b07308bb25f 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -29,6 +29,7 @@ var B = (function (_super) { function B() { var _this; new _super.prototype(function (value) { return String(value); }); + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index c986580657033..b6559a63a983a 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -54,6 +54,7 @@ var D = (function (_super) { _this = _super.call(this) || this; _super.prototype.bar.call(_this); _super.prototype.x; // error + return _this; } D.prototype.foo = function () { _super.prototype.bar.call(this); diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index df6e08177cb3f..eded4e74a7f5f 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -54,6 +54,7 @@ var D = (function (_super) { _this = _super.call(this) || this; _super.prototype.bar.call(_this); // error _super.prototype.x; // error + return _this; } D.foo = function () { _super.bar.call(this); // OK diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index d8dda26288c0e..2ba460d18f730 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -103,6 +103,7 @@ var SomeDerivedClass = (function (_super) { _this = _super.call(this) || this; var x = _super.prototype.func.call(_this); var x; + return _this; } SomeDerivedClass.prototype.fn = function () { var _this = this; diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 1d2ab4c2a3f1b..011c5129e9f1c 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -53,6 +53,7 @@ var MyDerived = (function (_super) { _this = _super.call(this) || this; var f1 = _super.prototype.getValue.call(_this); var f2 = _super.prototype.value; + return _this; } return MyDerived; }(MyBase)); diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index 499c0a6de1fd0..1152399e6eba4 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -30,6 +30,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; // uses the type parameter type of the base class, ie string + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index 471c7cd36acfa..f2580d30c5f48 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -22,6 +22,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; + return _this; } return D; }(B)); diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index cc46fa968969a..a1c0497540442 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -25,6 +25,7 @@ var D = (function (_super) { function D() { var _this; _super.prototype..call(_this); + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index 4b5176bed9630..42a0e46d4c03e 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -25,6 +25,7 @@ var D = (function (_super) { function D(x) { var _this; _super.prototype..call(_this, x); + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index aa70803de4dfe..803e5c264c22a 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -30,6 +30,7 @@ var D = (function (_super) { function D() { var _this; _super.prototype..call(_this); + return _this; } D.prototype.bar = function () { _super.prototype.bar.call(this, null); diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index a9bbc34123fbe..a08380b173fb1 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -37,6 +37,7 @@ var Bar = (function (_super) { function Bar() { var _this; _this = _super.call(this, function (s) { s = 5; }) || this; + return _this; } return Bar; }(Foo)); // error, if types are applied correctly diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 218ebfb168672..10629d579bac2 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -72,6 +72,7 @@ var ClassWithNoInitializer = (function (_super) { function ClassWithNoInitializer() { var _this; _this = _super.call(this, _this) || this; // Error + return _this; } return ClassWithNoInitializer; }(BaseErrClass)); @@ -82,6 +83,7 @@ var ClassWithInitializer = (function (_super) { var _this; _this = _super.call(this, _this) || this; // Error _this.t = 4; + return _this; } return ClassWithInitializer; }(BaseErrClass)); diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index c14f71ac0b68d..444952fea3fb3 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -73,6 +73,7 @@ var ClassWithNoInitializer = (function (_super) { function ClassWithNoInitializer() { var _this; _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing + return _this; } return ClassWithNoInitializer; }(BaseErrClass)); @@ -83,6 +84,7 @@ var ClassWithInitializer = (function (_super) { var _this; _this = _super.call(this, _this) || this; // Error _this.t = 4; + return _this; } return ClassWithInitializer; }(BaseErrClass)); diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index cf64eebced18e..f9d9f8694c95f 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -38,6 +38,7 @@ var Foo = (function (_super) { function Foo() { var _this; _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing + return _this; } return Foo; }(Base)); @@ -47,6 +48,7 @@ var Foo2 = (function (_super) { var _this; _this = _super.call(this, _this) || this; // error _this.p = 0; + return _this; } return Foo2; }(Base)); @@ -56,6 +58,7 @@ var Foo3 = (function (_super) { var _this; _this = _super.call(this, _this) || this; // error _this.p = p; + return _this; } return Foo3; }(Base)); diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index eba933d98933a..3185e42dab692 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -27,6 +27,7 @@ var Foo = (function (_super) { var _this; _this = _super.call(this, _this) || this; _this.x = x; + return _this; } return Foo; }(Base)); diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index ed6baabb4086e..b9f7571868a88 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -35,6 +35,7 @@ var Foo = (function (_super) { function Foo() { var _this; _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing + return _this; } return Foo; }(Base)); @@ -44,6 +45,7 @@ var Foo2 = (function (_super) { var _this; _this = _super.call(this, _this) || this; // error _this.x = 0; + return _this; } return Foo2; }(Base)); diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index d705d5fa7e09c..309ebf934070a 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -29,6 +29,7 @@ var Foo = (function (_super) { var _this; _this = _super.call(this, _this) || this; _this.x = 0; + return _this; } return Foo; }(Base)); diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index 76b79dbc7dccc..307cd0fca93db 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -33,6 +33,7 @@ var Text = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this._tagName = 'div'; + return _this; } Text.prototype.render = function () { return (); diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index c55ceb100eab5..39e30b6ba387d 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -33,6 +33,7 @@ var Text = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this._tagName = 'div'; + return _this; } Text.prototype.render = function () { return ( // this should be an error diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 57ce2becbad13..77423709347da 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -33,6 +33,7 @@ var Text = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this._tagName = 'div'; + return _this; } Text.prototype.render = function () { return ( Hello world ); diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index 1bc14eb32eec3..6b5d130c0b403 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -33,6 +33,7 @@ var Text = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this._tagName = 'div'; + return _this; } Text.prototype.render = function () { return ( Hello world ); diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index fefb1e7ff3832..3995ffd447cd3 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -121,6 +121,7 @@ var Test; var _this; _this = _super.call(this, path) || this; _this.content = content; + return _this; } return File; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index ed53a308808c8..14807ddd88c31 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -71,6 +71,7 @@ var Test; var _this; _this = _super.call(this, path) || this; _this.content = content; + return _this; } return File; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index 70ace4becb416..179e981b8d1dc 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -24,6 +24,7 @@ var D = (function (_super) { function D() { var _this; var x = _this = _super.call(this) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 87f0f60c53f30..eee995686380d 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -78,6 +78,7 @@ var D = (function (_super) { _this.self2 = _this.self; _this.self3 = _this.foo(); _this.d = new D(); + return _this; } D.prototype.bar = function () { this.self = this.self1; diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 46ee4ed02d5cb..2c2b3ded1b562 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -65,6 +65,7 @@ var C4 = (function (_super) { function C4() { var _this; _this = _super.call(this, asdf) || this; + return _this; } return C4; }(C3)); diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index 06d2c4bd6a51b..02927bf558d04 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -239,6 +239,7 @@ var ts; _this.name = name; _this.type = type; _this.flags = flags; + return _this; } Property.prototype.equals = function (other) { return this.name === other.name && @@ -260,6 +261,7 @@ var ts; _this.typeParameters = typeParameters; _this.parameters = parameters; _this.returnType = returnType; + return _this; } Signature.prototype.equalsNoReturn = function (other) { return this.parameters.length === other.parameters.length && @@ -281,6 +283,7 @@ var ts; _this.name = name; _this.type = type; _this.flags = flags; + return _this; } Parameter.prototype.equals = function (other) { return this.name === other.name && diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index 96802932f12fa..3a05ff12ee8d0 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -26,6 +26,7 @@ var Super = (function (_super) { function Super() { var _this; _this = _super.call(this, (function () { return _this; })()) || this; // ok since this is not the case: The constructor declares parameter properties or the containing class declares instance member variables with initializers. + return _this; } return Super; }(Base)); diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 04eaa58a1968e..9c1c8f8c29d88 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -45,6 +45,7 @@ define(["require", "exports"], function (require, exports) { _this = _super.call(this, element) || this; _this.p1 = element; _this.p2 = url; + return _this; } return B; }(A)); From bab6d6fbb23f28831b4b990ad4c2cc9755240374 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 2 Sep 2016 13:03:46 -0700 Subject: [PATCH 08/39] Ensure prologue directives occur first. --- src/compiler/transformers/es6.ts | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 886ee1b8e40d8..8890ac60173ed 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -774,10 +774,22 @@ namespace ts { * @param hasSynthesizedSuper A value indicating whether the constructor starts with a * synthesized `super` call. */ - function transformConstructorBody(constructor: ConstructorDeclaration, node: ClassDeclaration | ClassExpression, extendsClauseElement: ExpressionWithTypeArguments, hasSynthesizedSuper: boolean) { + function transformConstructorBody(constructor: ConstructorDeclaration | undefined, node: ClassDeclaration | ClassExpression, extendsClauseElement: ExpressionWithTypeArguments, hasSynthesizedSuper: boolean) { const statements: Statement[] = []; startLexicalEnvironment(); + let statementOffset = -1; + if (hasSynthesizedSuper) { + // If a super call has already been synthesized, + // we're going to assume that we should just transform everything after that. + // The assumption is that no prior step in the pipeline has added any prologue directives. + statementOffset = 1; + } + else if (constructor) { + // Otherwise, try to emit all potential prologue directives first. + statementOffset = addPrologueDirectives(statements, constructor.body.statements, /*ensureUseStrict*/ false, visitor); + } + if (constructor) { declareOrCaptureThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement); addDefaultValueAssignmentsIfNeeded(statements, constructor); @@ -787,9 +799,11 @@ namespace ts { addDefaultSuperCallIfNeeded(statements, constructor, extendsClauseElement, hasSynthesizedSuper); if (constructor) { - const body = saveStateAndInvoke(constructor, hasSynthesizedSuper ? transformConstructorBodyWithSynthesizedSuper : transformConstructorBodyWithoutSynthesizedSuper); + Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!"); + const body = saveStateAndInvoke(constructor, makeTransformerForConstructorBodyAtOffset(statementOffset)); addRange(statements, body); } + if (extendsClauseElement) { statements.push( createReturn( @@ -815,12 +829,8 @@ namespace ts { return block; } - function transformConstructorBodyWithSynthesizedSuper(node: ConstructorDeclaration) { - return visitNodes(node.body.statements, visitor, isStatement, /*start*/ 1); - } - - function transformConstructorBodyWithoutSynthesizedSuper(node: ConstructorDeclaration) { - return visitNodes(node.body.statements, visitor, isStatement, /*start*/ 0); + function makeTransformerForConstructorBodyAtOffset(offset: number): (c: ConstructorDeclaration) => NodeArray { + return constructor => visitNodes(constructor.body.statements, visitor, isStatement, /*start*/ offset); } /** From ce953ceb4569f0c93cda7dc55c46fe4867233bdc Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 2 Sep 2016 13:04:14 -0700 Subject: [PATCH 09/39] Accepted baselines. --- .../emitSuperCallBeforeEmitParameterPropertyDeclaration1.js | 2 +- .../reference/emitSuperCallBeforeEmitPropertyDeclaration1.js | 2 +- ...EmitPropertyDeclarationAndParameterPropertyDeclaration1.js | 2 +- tests/baselines/reference/strictModeInConstructor.js | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index b95263464a75c..efed8e66a155c 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -28,9 +28,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B(x) { - var _this; "use strict"; 'someStringForEgngInject'; + var _this; _this = _super.call(this) || this; _this.x = x; return _this; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index f078c448b7549..6e3d3bfaa1b70 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -30,9 +30,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; "use strict"; 'someStringForEgngInject'; + var _this; _this = _super.call(this) || this; _this.blub = 12; return _this; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index e64af9ef86240..6559569fe79b4 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -28,9 +28,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B(x) { - var _this; "use strict"; 'someStringForEgngInject'; + var _this; _this = _super.call(this) || this; _this.x = x; _this.blah = 2; diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 4e1c483f1c192..1c33f16a3c67b 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -74,8 +74,8 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; "use strict"; // No error + var _this; _this = _super.call(this) || this; _this.s = 9; return _this; @@ -108,8 +108,8 @@ var D = (function (_super) { var Bs = (function (_super) { __extends(Bs, _super); function Bs() { - var _this; "use strict"; // No error + var _this; _this = _super.call(this) || this; return _this; } From d6e548b02e3546b70c656fb79e364b1e0cb77bdf Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 2 Sep 2016 20:04:43 -0700 Subject: [PATCH 10/39] Consolidate '_this' declaration and assignments for first statements in constructors. --- src/compiler/transformers/es6.ts | 68 +++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 10 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 8890ac60173ed..9b703e5ddc4c5 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -791,7 +791,8 @@ namespace ts { } if (constructor) { - declareOrCaptureThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement); + Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!"); + statementOffset = declareOrCaptureThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, statementOffset); addDefaultValueAssignmentsIfNeeded(statements, constructor); addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper); } @@ -799,7 +800,6 @@ namespace ts { addDefaultSuperCallIfNeeded(statements, constructor, extendsClauseElement, hasSynthesizedSuper); if (constructor) { - Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!"); const body = saveStateAndInvoke(constructor, makeTransformerForConstructorBodyAtOffset(statementOffset)); addRange(statements, body); } @@ -1118,13 +1118,49 @@ namespace ts { statements.push(forStatement); } - function declareOrCaptureThisForConstructorIfNeeded(statements: Statement[], ctor: ConstructorDeclaration, hasExtendsClause: boolean) { + /** + * Declares a `_this` variable for derived classes and for when arrow functions capture `this`. + * + * @returns The new statement offset into the `statements` array. + */ + function declareOrCaptureThisForConstructorIfNeeded(statements: Statement[], ctor: ConstructorDeclaration, hasExtendsClause: boolean, firstNonPrologue: number) { if (hasExtendsClause) { - captureThisForNode(statements, ctor, /*initializer*/ undefined); + // Most of the time, a 'super' call will be the first real statement in a constructor body. + // In these cases, we'd like to transform these into a *single* statement instead of a declaration + // followed by an assignment statement for '_this'. For instance, if we emitted without an initializer, + // we'd get: + // + // var _this; + // _this = super(); + // + // instead of + // + // var _this = super(); + // + let initializer: Expression = undefined; + let firstStatement: Statement; + if (firstNonPrologue < ctor.body.statements.length) { + firstStatement = ctor.body.statements[firstNonPrologue]; + + if (firstStatement.kind === SyntaxKind.ExpressionStatement && isSuperCallExpression((firstStatement as ExpressionStatement).expression)) { + initializer = setOriginalNode( + visitImmediateSuperCallInBody(((firstStatement as ExpressionStatement).expression as CallExpression)), + (firstStatement as ExpressionStatement).expression + ); + } + } + captureThisForNode(statements, ctor, /*initializer*/ initializer, firstStatement); + + // We're actually skipping an extra statement. Signal this to the caller. + if (initializer) { + return firstNonPrologue + 1; + } } else { addCaptureThisForNodeIfNeeded(statements, ctor); } + + return firstNonPrologue; } /** @@ -1139,7 +1175,9 @@ namespace ts { } } - function captureThisForNode(statements: Statement[], node: Node, initializer: Expression | undefined) { + function captureThisForNode(statements: Statement[], node: Node, initializer: Expression | undefined): void; + function captureThisForNode(statements: Statement[], node: Node, initializer: Expression | undefined, originalStatement: Statement): void; + function captureThisForNode(statements: Statement[], node: Node, initializer: Expression | undefined, originalStatement?: Statement): void { enableSubstitutionsForCapturedThis(); const captureThisStatement = createVariableStatement( /*modifiers*/ undefined, @@ -1149,7 +1187,8 @@ namespace ts { /*type*/ undefined, initializer ) - ]) + ]), + originalStatement ); setNodeEmitFlags(captureThisStatement, NodeEmitFlags.NoComments | NodeEmitFlags.CustomPrologue); @@ -2520,7 +2559,15 @@ namespace ts { * * @param node a CallExpression. */ - function visitCallExpression(node: CallExpression): CallExpression | BinaryExpression { + function visitCallExpression(node: CallExpression) { + return visitCallExpressionWithPotentialCapturedThisAssignment(node, /*assignToCapturedThis*/ true); + } + + function visitImmediateSuperCallInBody(node: CallExpression) { + return visitCallExpressionWithPotentialCapturedThisAssignment(node, /*assignToCapturedThis*/ false); + } + + function visitCallExpressionWithPotentialCapturedThisAssignment(node: CallExpression, assignToCapturedThis: boolean): CallExpression | BinaryExpression { // We are here either because SuperKeyword was used somewhere in the expression, or // because we contain a SpreadElementExpression. @@ -2572,13 +2619,14 @@ namespace ts { if (node.expression.kind === SyntaxKind.SuperKeyword) { const actualThis = createThis(); setNodeEmitFlags(actualThis, NodeEmitFlags.NoSubstitution); - return createAssignment( - createIdentifier("_this"), + const initializer = createLogicalOr( resultingCall, actualThis ) - ); + return assignToCapturedThis + ? createAssignment(createIdentifier("_this"), initializer) + : initializer } return resultingCall; } From 11bc6c470f5dd09dc83fbf8ac269f0c8bc023ad0 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 3 Sep 2016 00:16:43 -0700 Subject: [PATCH 11/39] Fixed issue where last function context & parent node wasn't being preserved. This came up when a `super()` call was nested in another constructor body. Current logic in the transform says that if the last containing non-arrow function body is non-static, and the current parent isn't a call expression, the call target of a `super` call will become `_super.prototype` instead of `super`. If the state is not saved, the containing arrow function and parent are not saved, and the information for this check won't be accurate. --- src/compiler/transformers/es6.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 9b703e5ddc4c5..85838112fc313 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -1143,9 +1143,10 @@ namespace ts { firstStatement = ctor.body.statements[firstNonPrologue]; if (firstStatement.kind === SyntaxKind.ExpressionStatement && isSuperCallExpression((firstStatement as ExpressionStatement).expression)) { + const superCall = (firstStatement as ExpressionStatement).expression as CallExpression; initializer = setOriginalNode( - visitImmediateSuperCallInBody(((firstStatement as ExpressionStatement).expression as CallExpression)), - (firstStatement as ExpressionStatement).expression + saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), + superCall ); } } From d8846dd495d03697ee598d6c887f55eac61789ef Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 3 Sep 2016 00:26:02 -0700 Subject: [PATCH 12/39] Accepted baselines. --- tests/baselines/reference/abstractProperty.js | 3 +- .../reference/abstractPropertyNegative.js | 9 +- .../accessOverriddenBaseClassMember1.js | 3 +- ...aliasUsageInTypeArgumentOfExtendsClause.js | 3 +- .../reference/arrowFunctionContexts.js | 6 +- .../reference/assignmentLHSIsValue.js | 3 +- tests/baselines/reference/autolift4.js | 3 +- tests/baselines/reference/baseCheck.js | 15 +- .../reference/bestCommonTypeOfTuple2.js | 3 +- tests/baselines/reference/callWithSpread.js | 3 +- .../reference/captureThisInSuperCall.js | 3 +- .../reference/checkForObjectTooStrict.js | 6 +- .../checkSuperCallBeforeThisAccessing1.js | 3 +- .../checkSuperCallBeforeThisAccessing5.js | 3 +- .../checkSuperCallBeforeThisAccessing7.js | 3 +- .../classConstructorAccessibility2.js | 9 +- ...classConstructorParametersAccessibility.js | 3 +- ...lassConstructorParametersAccessibility2.js | 3 +- ...lassConstructorParametersAccessibility3.js | 3 +- tests/baselines/reference/classExpression3.js | 6 +- .../reference/classExtendingClassLikeType.js | 9 +- tests/baselines/reference/classExtendsNull.js | 3 +- .../reference/classSideInheritance2.js | 3 +- .../reference/classSideInheritance3.js | 6 +- tests/baselines/reference/classUpdateTests.js | 15 +- ...isionSuperAndLocalFunctionInConstructor.js | 6 +- ...ollisionSuperAndLocalFunctionInProperty.js | 3 +- .../collisionSuperAndLocalVarInConstructor.js | 6 +- .../collisionSuperAndLocalVarInProperty.js | 3 +- .../reference/collisionSuperAndParameter.js | 6 +- ...perAndPropertyNameAsConstuctorParameter.js | 12 +- .../reference/commentsInheritance.js | 3 +- .../reference/compoundAssignmentLHSIsValue.js | 3 +- ...poundExponentiationAssignmentLHSIsValue.js | 3 +- .../reference/computedPropertyNames28_ES5.js | 3 +- .../reference/computedPropertyNames30_ES5.js | 3 +- tests/baselines/reference/constructorArgs.js | 3 +- ...ctorFunctionTypeIsAssignableToBaseType2.js | 6 +- .../reference/constructorOverloads2.js | 3 +- .../reference/declFileGenericType2.js | 6 +- .../reference/decoratorOnClassConstructor2.js | 3 +- .../reference/decoratorOnClassConstructor3.js | 3 +- .../derivedClassOverridesPrivateFunction1.js | 3 +- .../derivedClassOverridesProtectedMembers.js | 3 +- .../derivedClassOverridesProtectedMembers2.js | 3 +- .../derivedClassOverridesProtectedMembers3.js | 30 ++-- .../derivedClassOverridesPublicMembers.js | 3 +- .../derivedClassParameterProperties.js | 12 +- ...dClassSuperCallsInNonConstructorMembers.js | 3 +- .../derivedClassSuperCallsWithThisArg.js | 12 +- .../derivedClassWithoutExplicitConstructor.js | 6 +- ...derivedClassWithoutExplicitConstructor2.js | 6 +- ...derivedClassWithoutExplicitConstructor3.js | 12 +- .../destructuringParameterDeclaration5.js | 6 +- ...BeforeEmitParameterPropertyDeclaration1.js | 3 +- ...SuperCallBeforeEmitPropertyDeclaration1.js | 3 +- ...arationAndParameterPropertyDeclaration1.js | 3 +- tests/baselines/reference/errorSuperCalls.js | 3 +- .../reference/errorSuperPropertyAccess.js | 6 +- tests/baselines/reference/es6ClassTest.js | 3 +- tests/baselines/reference/es6ClassTest2.js | 3 +- ...cClassPropertyInheritanceSpecialization.js | 3 +- ...genericConstraintOnExtendedBuiltinTypes.js | 3 +- ...enericConstraintOnExtendedBuiltinTypes2.js | 3 +- ...ericRecursiveImplicitConstructorErrors3.js | 3 +- .../reference/genericTypeConstraints.js | 3 +- .../interfaceExtendsClassWithPrivate2.js | 6 +- tests/baselines/reference/lift.js | 3 +- .../missingPropertiesOfClassExpression.js | 3 +- ...objectCreationOfElementAccessExpression.js | 18 +-- tests/baselines/reference/optionalMethods.js | 3 +- .../reference/optionalParamArgsTest.js | 3 +- .../reference/optionalParameterProperty.js | 3 +- .../overloadOnConstConstraintChecks4.js | 3 +- tests/baselines/reference/parserAstSpans1.js | 6 +- .../baselines/reference/parserRealSource10.js | 18 +-- .../baselines/reference/parserRealSource11.js | 144 ++++++------------ tests/baselines/reference/parserharness.js | 9 +- .../privateInstanceMemberAccessibility.js | 3 +- .../privateStaticMemberAccessibility.js | 3 +- .../readonlyConstructorAssignment.js | 9 +- .../reference/returnInConstructor1.js | 6 +- tests/baselines/reference/scopeTests.js | 3 +- ...sWithDefaultConstructorAndExtendsClause.js | 3 +- ...hDefaultConstructorAndExtendsClause.js.map | 2 +- ...tConstructorAndExtendsClause.sourcemap.txt | 54 ++++--- .../baselines/reference/staticInheritance.js | 3 +- .../reference/strictModeInConstructor.js | 12 +- tests/baselines/reference/superAccess2.js | 3 +- .../reference/superCallArgsMustMatch.js | 4 +- .../superCallBeforeThisAccessing1.js | 3 +- .../superCallBeforeThisAccessing2.js | 3 +- .../superCallBeforeThisAccessing4.js | 3 +- .../superCallBeforeThisAccessing6.js | 3 +- ...allFromClassThatDerivesFromGenericType1.js | 3 +- ...allFromClassThatDerivesFromGenericType2.js | 3 +- ...eButWithIncorrectNumberOfTypeArguments1.js | 3 +- ...sFromGenericTypeButWithNoTypeArguments1.js | 3 +- ...ivesNonGenericTypeButWithTypeArguments1.js | 3 +- .../reference/superCallInNonStaticMethod.js | 3 +- .../superCallInsideClassDeclaration.js | 3 +- .../superCallInsideClassExpression.js | 3 +- .../reference/superCallOutsideConstructor.js | 3 +- .../superCallParameterContextualTyping1.js | 3 +- .../superCallParameterContextualTyping2.js | 3 +- .../superCallParameterContextualTyping3.js | 4 +- tests/baselines/reference/superCalls.js | 3 +- tests/baselines/reference/superErrors.js | 3 +- tests/baselines/reference/superInLambdas.js | 12 +- .../reference/superPropertyAccess1.js | 3 +- .../reference/superPropertyAccess2.js | 3 +- .../reference/superPropertyAccessNoError.js | 3 +- .../reference/superPropertyAccess_ES5.js | 3 +- .../superWithGenericSpecialization.js | 3 +- .../baselines/reference/superWithGenerics.js | 3 +- .../reference/targetTypeBaseCalls.js | 3 +- .../reference/thisInInvalidContexts.js | 6 +- .../thisInInvalidContextsExternalModule.js | 6 +- tests/baselines/reference/thisInSuperCall.js | 9 +- tests/baselines/reference/thisInSuperCall1.js | 3 +- tests/baselines/reference/thisInSuperCall2.js | 6 +- tests/baselines/reference/thisInSuperCall3.js | 3 +- .../baselines/reference/tsxDynamicTagName5.js | 3 +- .../baselines/reference/tsxDynamicTagName7.js | 3 +- .../baselines/reference/tsxDynamicTagName8.js | 3 +- .../baselines/reference/tsxDynamicTagName9.js | 3 +- .../reference/typeGuardOfFormThisMember.js | 3 +- .../typeGuardOfFormThisMemberErrors.js | 3 +- .../baselines/reference/typeRelationships.js | 3 +- tests/baselines/reference/unknownSymbols1.js | 3 +- .../reference/unspecializedConstraints.js | 9 +- .../reference/validUseOfThisInSuper.js | 3 +- .../reference/varArgsOnConstructorTypes.js | 3 +- 133 files changed, 285 insertions(+), 541 deletions(-) diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index 292213ead5398..fb7deaa09ddbc 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -35,8 +35,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _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 28ada310ef426..5a4c24fe2333f 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -57,8 +57,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.ro = "readonly please"; return _this; } @@ -79,8 +78,7 @@ var WrongTypeProperty = (function () { var WrongTypePropertyImpl = (function (_super) { __extends(WrongTypePropertyImpl, _super); function WrongTypePropertyImpl() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.num = "nope, wrong"; return _this; } @@ -107,8 +105,7 @@ var WrongTypeAccessorImpl = (function (_super) { var WrongTypeAccessorImpl2 = (function (_super) { __extends(WrongTypeAccessorImpl2, _super); function WrongTypeAccessorImpl2() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.num = "nope, wrong"; return _this; } diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index 65431a2f77837..02d092dfd393f 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -34,8 +34,7 @@ var Point = (function () { var ColoredPoint = (function (_super) { __extends(ColoredPoint, _super); function ColoredPoint(x, y, color) { - var _this; - _this = _super.call(this, x, y) || this; + var _this = _super.call(this, x, y) || this; _this.color = color; return _this; } diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 8af9c702654c4..91c6ca2c53f79 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -65,8 +65,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.x = moduleA; return _this; } diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index 660208cb0c182..1af0797b41fde 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -116,8 +116,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.call(this, function () { return _this; }) || this; + var _this = _super.call(this, function () { return _this; }) || this; return _this; } return Derived; @@ -159,8 +158,7 @@ var M2; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.call(this, function () { return _this; }) || this; + var _this = _super.call(this, function () { return _this; }) || this; return _this; } return Derived; diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 52d14cbe536c3..ab3f80eff2104 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -118,8 +118,7 @@ value; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _super.prototype. = value; return _this; } diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index 0638efab0b39e..1c29bfeeff7f3 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -43,8 +43,7 @@ Point.origin = new Point(0, 0); var Point3D = (function (_super) { __extends(Point3D, _super); function Point3D(x, y, z, m) { - var _this; - _this = _super.call(this, x, y) || this; + var _this = _super.call(this, x, y) || this; _this.z = z; return _this; } diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 832830ae8645d..623cd152b9a5d 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -43,8 +43,7 @@ var C = (function () { var ELoc = (function (_super) { __extends(ELoc, _super); function ELoc(x) { - var _this; - _this = _super.call(this, 0, x) || this; + var _this = _super.call(this, 0, x) || this; return _this; } return ELoc; @@ -52,8 +51,7 @@ var ELoc = (function (_super) { var ELocVar = (function (_super) { __extends(ELocVar, _super); function ELocVar(x) { - var _this; - _this = _super.call(this, 0, loc) || this; + var _this = _super.call(this, 0, loc) || this; return _this; } ELocVar.prototype.m = function () { @@ -64,8 +62,7 @@ var ELocVar = (function (_super) { var D = (function (_super) { __extends(D, _super); function D(z) { - var _this; - _this = _super.call(this, _this.z) || this; + var _this = _super.call(this, _this.z) || this; _this.z = z; return _this; } @@ -74,8 +71,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E(z) { - var _this; - _this = _super.call(this, 0, _this.z) || this; + var _this = _super.call(this, 0, _this.z) || this; _this.z = z; return _this; } @@ -84,8 +80,7 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F(z) { - var _this; - _this = _super.call(this, "hello", _this.z) || this; + var _this = _super.call(this, "hello", _this.z) || this; _this.z = z; return _this; } diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 8213733b75317..d71b6f17abfd2 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -60,8 +60,7 @@ var C1 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.i = "bar"; return _this; } diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 48af58edf6505..161eb36dbcf73 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -99,8 +99,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this, 1, 2) || this; + var _this = _super.call(this, 1, 2) || this; _this = _super.apply(this, [1, 2].concat(a)) || this; return _this; } diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 2d39722548d63..069871f598e88 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -22,8 +22,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; - _this = _super.call(this, { test: function () { return _this.someMethod(); } }) || this; + var _this = _super.call(this, { test: function () { return _this.someMethod(); } }) || this; return _this; } B.prototype.someMethod = function () { }; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index 8c0cfc104d29a..156608bd6b5d7 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -49,8 +49,7 @@ var Foo; var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return Bar; @@ -58,8 +57,7 @@ var Bar = (function (_super) { var Baz = (function (_super) { __extends(Baz, _super); function Baz() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return Baz; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index a54f82ab9fa00..8ced6fce50092 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -24,8 +24,7 @@ var Based = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this; _this.x = 10; var that = _this; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index e365678ee0cad..3174bebd11db4 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -25,8 +25,7 @@ var Based = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.call(this, _this.x) || this; + var _this = _super.call(this, _this.x) || this; return _this; } return Derived; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index 7ba43de005b23..364aed4d4b079 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -23,8 +23,7 @@ var Base = (function () { var Super = (function (_super) { __extends(Super, _super); function Super() { - var _this; - _this = _super.call(this, (function () { return _this; })) || this; // No error + var _this = _super.call(this, (function () { return _this; })) || this; return _this; } return Super; diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index 8a81d469fb814..ef637611e8de8 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -77,8 +77,7 @@ var BaseC = (function () { var DerivedA = (function (_super) { __extends(DerivedA, _super); function DerivedA(x) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; _this.x = x; return _this; } @@ -90,8 +89,7 @@ var DerivedA = (function (_super) { var DerivedB = (function (_super) { __extends(DerivedB, _super); function DerivedB(x) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; _this.x = x; return _this; } @@ -103,8 +101,7 @@ var DerivedB = (function (_super) { var DerivedC = (function (_super) { __extends(DerivedC, _super); function DerivedC(x) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; _this.x = x; return _this; } diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index 214815f49768c..e0e75bcfeeb53 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -59,8 +59,7 @@ c3.p; // protected, error var Derived = (function (_super) { __extends(Derived, _super); function Derived(p) { - var _this; - _this = _super.call(this, p) || this; + var _this = _super.call(this, p) || this; _this.p; // OK return _this; } diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index 7c714aa4c03e0..84da66c3e3c9c 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -59,8 +59,7 @@ c3.p; // protected, error var Derived = (function (_super) { __extends(Derived, _super); function Derived(p) { - var _this; - _this = _super.call(this, p) || this; + var _this = _super.call(this, p) || this; _this.p; // OK return _this; } diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index 275f3920538b5..db9f94cf0fbf7 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -28,8 +28,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(p) { - var _this; - _this = _super.call(this, p) || this; + var _this = _super.call(this, p) || this; _this.p = p; _this.p; // OK return _this; diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index 3c53d72823353..c0376c54c27af 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -15,8 +15,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(class_1, _super); function class_1() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.c = 3; return _this; } @@ -24,8 +23,7 @@ var C = (function (_super) { }((function (_super) { __extends(class_2, _super); function class_2() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.b = 2; return _this; } diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index 32d7fff0cbd11..fdda53a381f1b 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -76,8 +76,7 @@ var D0 = (function (_super) { var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this; - _this = _super.call(this, "abc", "def") || this; + var _this = _super.call(this, "abc", "def") || this; _this.x = "x"; _this.y = "y"; return _this; @@ -87,8 +86,7 @@ var D1 = (function (_super) { var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this; - _this = _super.call(this, 10) || this; + var _this = _super.call(this, 10) || this; _this = _super.call(this, 10, 20) || this; _this.x = 1; _this.y = 2; @@ -99,8 +97,7 @@ var D2 = (function (_super) { var D3 = (function (_super) { __extends(D3, _super); function D3() { - var _this; - _this = _super.call(this, "abc", 42) || this; + var _this = _super.call(this, "abc", 42) || this; _this.x = "x"; _this.y = 2; return _this; diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index 301dee7f705a7..a820b525aabb1 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -21,8 +21,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return Object.create(null); return _this; } diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index 1af6b6f846c37..475f9bd4ceb53 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -29,8 +29,7 @@ var __extends = (this && this.__extends) || function (d, b) { var SubText = (function (_super) { __extends(SubText, _super); function SubText(text, span) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return SubText; diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index fda7b0b0848bd..361378c3ff518 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -33,8 +33,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B(x, data) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; _this.data = data; return _this; } @@ -43,8 +42,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C(x) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; return _this; } return C; diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 2d7ecc3c1908b..9809966c4c26f 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -157,8 +157,7 @@ var D = (function () { var E = (function (_super) { __extends(E, _super); function E() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.p1 = 0; return _this; } @@ -175,8 +174,7 @@ var F = (function (_super) { var G = (function (_super) { __extends(G, _super); function G() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.p1 = 0; return _this; } // NO ERROR @@ -191,8 +189,7 @@ var H = (function () { var I = (function (_super) { __extends(I, _super); function I() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } // ERROR - no super call allowed return I; @@ -200,8 +197,7 @@ var I = (function (_super) { var J = (function (_super) { __extends(J, _super); function J(p1) { - var _this; - _this = _super.call(this) || this; // NO ERROR + var _this = _super.call(this) || this; _this.p1 = p1; return _this; } @@ -221,8 +217,7 @@ var K = (function (_super) { var L = (function (_super) { __extends(L, _super); function L(p1) { - var _this; - _this = _super.call(this) || this; // NO ERROR + var _this = _super.call(this) || this; _this.p1 = p1; return _this; } diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index 5f2a5e89301d7..d4a22b731f2cf 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -42,8 +42,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; function _super() { } return _this; @@ -53,8 +52,7 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; var x = function () { function _super() { } diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index a6893c6a57a7c..67b7f0e399197 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -40,8 +40,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.prop2 = { doStuff: function () { function _super() { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index d799c78350369..e3069352c0865 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -36,8 +36,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; var _super = 10; // Should be error return _this; } @@ -46,8 +45,7 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; var x = function () { var _super = 10; // Should be error }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index 4bb4f6a5a8b73..d793e022c6b74 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -38,8 +38,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.prop2 = { doStuff: function () { var _super = 10; // Should be error diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index 6ed47a1b3c167..750ae15ef0aef 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -94,8 +94,7 @@ var Foo = (function () { var Foo2 = (function (_super) { __extends(Foo2, _super); function Foo2(_super) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.prop4 = { doStuff: function (_super) { } @@ -125,8 +124,7 @@ var Foo2 = (function (_super) { var Foo4 = (function (_super) { __extends(Foo4, _super); function Foo4(_super) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } Foo4.prototype.y = function (_super) { diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 2d3709fa878a9..269881b3b90ce 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -44,8 +44,7 @@ var a = (function () { var b1 = (function (_super) { __extends(b1, _super); function b1(_super) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return b1; @@ -53,8 +52,7 @@ var b1 = (function (_super) { var b2 = (function (_super) { __extends(b2, _super); function b2(_super) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this._super = _super; return _this; } @@ -63,8 +61,7 @@ var b2 = (function (_super) { var b3 = (function (_super) { __extends(b3, _super); function b3(_super) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return b3; @@ -72,8 +69,7 @@ var b3 = (function (_super) { var b4 = (function (_super) { __extends(b4, _super); function b4(_super) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this._super = _super; return _this; } diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index 370ee0d246ca3..294f3a3369054 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -227,8 +227,7 @@ var c2 = (function () { var c3 = (function (_super) { __extends(c3, _super); function c3() { - var _this; - _this = _super.call(this, 10) || this; + var _this = _super.call(this, 10) || this; return _this; } /** c3 f1*/ diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index dfbdf31c3d1c3..bfea11911bf88 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -197,8 +197,7 @@ value; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _super.prototype. *= value; _super.prototype. += value; return _this; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index da670472b4759..c8fb8c6a22221 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -139,8 +139,7 @@ _a = Math.pow(['', ''], value), '' = _a[0], '' = _a[1]; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; (_a = _super.prototype). = Math.pow(_a., value); var _a; return _this; diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index 8152394cbf8c5..ab765c56dd75f 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -24,8 +24,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; var obj = (_a = {}, _a[(_this = _super.call(this) || this, "prop")] = function () { }, _a); diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index 9f4a4ab51f9bc..c2c7cddd97170 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -29,8 +29,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; (function () { var obj = (_a = {}, // Ideally, we would capture this. But the reference is diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index c7939472a9609..6bbea0fddf714 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -29,8 +29,7 @@ var Super = (function () { var Sub = (function (_super) { __extends(Sub, _super); function Sub(options) { - var _this; - _this = _super.call(this, options.value) || this; + var _this = _super.call(this, options.value) || this; _this.options = options; return _this; } diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index 4f70c7d7f35d1..1ae239430c700 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -47,8 +47,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(x) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; return _this; } return Derived; @@ -57,8 +56,7 @@ var Derived2 = (function (_super) { __extends(Derived2, _super); // ok, not enforcing assignability relation on this function Derived2(x) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; return 1; return _this; } diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index 0041acb489e03..c26d031656fa9 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -40,8 +40,7 @@ var FooBase = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; return _this; } Foo.prototype.bar1 = function () { }; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 0e5351e69eadd..328ab0cd9491b 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -58,8 +58,7 @@ var templa; var AbstractElementController = (function (_super) { __extends(AbstractElementController, _super); function AbstractElementController() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return AbstractElementController; @@ -80,8 +79,7 @@ var templa; var AbstractCompositeElementController = (function (_super) { __extends(AbstractCompositeElementController, _super); function AbstractCompositeElementController() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this._controllers = []; return _this; } diff --git a/tests/baselines/reference/decoratorOnClassConstructor2.js b/tests/baselines/reference/decoratorOnClassConstructor2.js index 1f0b9b0d51722..44bde0a171d90 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor2.js +++ b/tests/baselines/reference/decoratorOnClassConstructor2.js @@ -45,8 +45,7 @@ var _0_ts_2 = require("./0.ts"); var C = (function (_super) { __extends(C, _super); function C(prop) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return C; diff --git a/tests/baselines/reference/decoratorOnClassConstructor3.js b/tests/baselines/reference/decoratorOnClassConstructor3.js index 9182cce66f4ce..5130986b1f78e 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor3.js +++ b/tests/baselines/reference/decoratorOnClassConstructor3.js @@ -48,8 +48,7 @@ var _0_2 = require("./0"); var C = (function (_super) { __extends(C, _super); function C(prop) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return C; diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index fd601ff221162..a0b1559d43089 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -32,8 +32,7 @@ var BaseClass = (function () { var DerivedClass = (function (_super) { __extends(DerivedClass, _super); function DerivedClass() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } DerivedClass.prototype._init = function () { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index 12344c199158c..e86806d31d203 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -66,8 +66,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(a) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; return _this; } Derived.prototype.b = function (a) { }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 37be9e209ac57..3035b2cb56fcb 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -94,8 +94,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(a) { - var _this; - _this = _super.call(this, a) || this; + var _this = _super.call(this, a) || this; return _this; } Derived.prototype.b = function (a) { }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index 0836c9d7f41dc..0e0c1c1ff01e7 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -103,8 +103,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1(a) { - var _this; - _this = _super.call(this, a) || this; + var _this = _super.call(this, a) || this; return _this; } return Derived1; @@ -112,8 +111,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2(a) { - var _this; - _this = _super.call(this, a) || this; + var _this = _super.call(this, a) || this; return _this; } Derived2.prototype.b = function (a) { }; @@ -122,8 +120,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3(a) { - var _this; - _this = _super.call(this, a) || this; + var _this = _super.call(this, a) || this; return _this; } Object.defineProperty(Derived3.prototype, "c", { @@ -136,8 +133,7 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4(a) { - var _this; - _this = _super.call(this, a) || this; + var _this = _super.call(this, a) || this; return _this; } Object.defineProperty(Derived4.prototype, "c", { @@ -150,8 +146,7 @@ var Derived4 = (function (_super) { var Derived5 = (function (_super) { __extends(Derived5, _super); function Derived5(a) { - var _this; - _this = _super.call(this, a) || this; + var _this = _super.call(this, a) || this; return _this; } return Derived5; @@ -159,8 +154,7 @@ var Derived5 = (function (_super) { var Derived6 = (function (_super) { __extends(Derived6, _super); function Derived6(a) { - var _this; - _this = _super.call(this, a) || this; + var _this = _super.call(this, a) || this; return _this; } return Derived6; @@ -168,8 +162,7 @@ var Derived6 = (function (_super) { var Derived7 = (function (_super) { __extends(Derived7, _super); function Derived7(a) { - var _this; - _this = _super.call(this, a) || this; + var _this = _super.call(this, a) || this; return _this; } Derived7.s = function (a) { }; @@ -178,8 +171,7 @@ var Derived7 = (function (_super) { var Derived8 = (function (_super) { __extends(Derived8, _super); function Derived8(a) { - var _this; - _this = _super.call(this, a) || this; + var _this = _super.call(this, a) || this; return _this; } Object.defineProperty(Derived8, "t", { @@ -192,8 +184,7 @@ var Derived8 = (function (_super) { var Derived9 = (function (_super) { __extends(Derived9, _super); function Derived9(a) { - var _this; - _this = _super.call(this, a) || this; + var _this = _super.call(this, a) || this; return _this; } Object.defineProperty(Derived9, "t", { @@ -206,8 +197,7 @@ var Derived9 = (function (_super) { var Derived10 = (function (_super) { __extends(Derived10, _super); function Derived10(a) { - var _this; - _this = _super.call(this, a) || this; + var _this = _super.call(this, a) || this; return _this; } return Derived10; diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 8d0375ab13a26..703f1d4a833ea 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -92,8 +92,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(a) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; return _this; } Derived.prototype.b = function (a) { }; diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index f623653d6fa46..27dcc4b7d5dba 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -130,8 +130,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3(y) { - var _this; - _this = _super.call(this) || this; // ok + var _this = _super.call(this) || this; _this.y = y; var a = 1; return _this; @@ -152,8 +151,7 @@ var Derived4 = (function (_super) { var Derived5 = (function (_super) { __extends(Derived5, _super); function Derived5(y) { - var _this; - _this = _super.call(this) || this; // ok + var _this = _super.call(this) || this; _this.a = 1; var b = 2; return _this; @@ -186,8 +184,7 @@ var Derived7 = (function (_super) { var Derived8 = (function (_super) { __extends(Derived8, _super); function Derived8(y) { - var _this; - _this = _super.call(this) || this; // ok + var _this = _super.call(this) || this; _this.a = 1; _this.a = 3; _this.b = 3; @@ -216,8 +213,7 @@ var Derived9 = (function (_super) { var Derived10 = (function (_super) { __extends(Derived10, _super); function Derived10(y) { - var _this; - _this = _super.call(this) || this; // ok + var _this = _super.call(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 e3bbf2699c5a9..b778d7bbca281 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -46,8 +46,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.a = _this = _super.call(this) || this; return _this; } diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 102944889bdf8..039e25919f8c9 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -42,8 +42,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.call(this, _this) || this; // ok + var _this = _super.call(this, _this) || this; return _this; } return Derived; @@ -51,8 +50,7 @@ var Derived = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2(a) { - var _this; - _this = _super.call(this, _this) || this; // error + var _this = _super.call(this, _this) || this; _this.a = a; return _this; } @@ -61,8 +59,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3(a) { - var _this; - _this = _super.call(this, function () { return _this; }) || this; // error + var _this = _super.call(this, function () { return _this; }) || this; _this.a = a; return _this; } @@ -71,8 +68,7 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4(a) { - var _this; - _this = _super.call(this, function () { return this; }) || this; // ok + var _this = _super.call(this, function () { return this; }) || this; _this.a = a; return _this; } diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index f5eb3d22360ac..7a6a7ecbb638b 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -41,8 +41,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; return _this; @@ -60,8 +59,7 @@ var Base2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _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 5ad203892308c..62beb4bf28f65 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -49,8 +49,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; return _this; @@ -70,8 +69,7 @@ var Base2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _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 d0e5f22d4f3d4..c96d0c96723da 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -63,8 +63,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(y, z) { - var _this; - _this = _super.call(this, 2) || this; + var _this = _super.call(this, 2) || this; _this.b = ''; _this.b = y; return _this; @@ -74,8 +73,7 @@ var Derived = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; return _this; @@ -94,8 +92,7 @@ var Base2 = (function () { var D = (function (_super) { __extends(D, _super); function D(y, z) { - var _this; - _this = _super.call(this, 2) || this; + var _this = _super.call(this, 2) || this; _this.b = null; _this.b = y; return _this; @@ -105,8 +102,7 @@ var D = (function (_super) { var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.x = 2; _this.y = null; return _this; diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index 8c35b9044a19d..8781671853fcb 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -65,8 +65,7 @@ var Class = (function () { var SubClass = (function (_super) { __extends(SubClass, _super); function SubClass() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return SubClass; @@ -79,8 +78,7 @@ var D = (function () { var SubD = (function (_super) { __extends(SubD, _super); function SubD() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return SubD; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index efed8e66a155c..05b061116d3b4 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -30,8 +30,7 @@ var B = (function (_super) { function B(x) { "use strict"; 'someStringForEgngInject'; - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.x = x; return _this; } diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index 6e3d3bfaa1b70..2cf2cb02073d6 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -32,8 +32,7 @@ var B = (function (_super) { function B() { "use strict"; 'someStringForEgngInject'; - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.blub = 12; return _this; } diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index 6559569fe79b4..eaa52e392853b 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -30,8 +30,7 @@ var B = (function (_super) { function B(x) { "use strict"; 'someStringForEgngInject'; - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.x = x; _this.blah = 2; return _this; diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 864bc19a34452..720894e50c041 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -147,8 +147,7 @@ var OtherBase = (function () { var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _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 1b7c9a418fc65..0fef86493f1f6 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -186,8 +186,7 @@ SomeBase.publicStaticMember = 0; var SomeDerived1 = (function (_super) { __extends(SomeDerived1, _super); function SomeDerived1() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _super.prototype.publicMember = 1; return _this; } @@ -221,8 +220,7 @@ var SomeDerived1 = (function (_super) { var SomeDerived2 = (function (_super) { __extends(SomeDerived2, _super); function SomeDerived2() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _super.prototype.privateMember = 1; return _this; } diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 705915812be47..d0879152544d1 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -102,9 +102,8 @@ var Bar = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y, z) { - var _this; + var _this = _super.call(this, x) || this; if (z === void 0) { z = 0; } - _this = _super.call(this, x) || this; _this.y = y; _this.z = z; _this.gar = 0; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index eec5d830e011c..9217f89037731 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -267,8 +267,7 @@ var SuperParent = (function () { var SuperChild = (function (_super) { __extends(SuperChild, _super); function SuperChild() { - var _this; - _this = _super.call(this, 1) || this; + var _this = _super.call(this, 1) || this; return _this; } SuperChild.prototype.b = function () { diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index ccbac1d22b5ae..86410aaf10e71 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -109,8 +109,7 @@ var PortalFx; var Validator = (function (_super) { __extends(Validator, _super); function Validator(message) { - var _this; - _this = _super.call(this, message) || this; + var _this = _super.call(this, message) || this; return _this; } return Validator; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index 246b9b76e3c57..582937e7c0a1a 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -52,8 +52,7 @@ var EndGate; var NumberTween = (function (_super) { __extends(NumberTween, _super); function NumberTween(from) { - var _this; - _this = _super.call(this, from) || this; + var _this = _super.call(this, from) || this; return _this; } return NumberTween; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index e7744b28833ca..88173a4cbe361 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -51,8 +51,7 @@ var EndGate; var NumberTween = (function (_super) { __extends(NumberTween, _super); function NumberTween(from) { - var _this; - _this = _super.call(this, from) || this; + var _this = _super.call(this, from) || this; return _this; } return NumberTween; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index d22823b9f8152..5a02ceb0ff4b5 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -59,8 +59,7 @@ var TypeScript; var PullTypeSymbol = (function (_super) { __extends(PullTypeSymbol, _super); function PullTypeSymbol() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this._elementType = null; return _this; } diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index 48ff00e5ac25b..b82e261a14f1d 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -38,8 +38,7 @@ var Bar = (function () { var BarExtended = (function (_super) { __extends(BarExtended, _super); function BarExtended() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return BarExtended; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index 51c64f48f6c57..49b5efbd01268 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -39,8 +39,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.x = 2; _this.y = 3; return _this; @@ -53,8 +52,7 @@ var D = (function (_super) { var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.x = ""; return _this; } diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index a71f1c9065ae2..364d52d938567 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -32,8 +32,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C(y, z, w) { - var _this; - _this = _super.call(this, y) || this; + var _this = _super.call(this, y) || this; var x = 10 + w; var ll = x * w; return _this; diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index 20252f37e6173..34b60940aa976 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -15,8 +15,7 @@ var __extends = (this && this.__extends) || function (d, b) { var George = (function (_super) { __extends(George, _super); function George() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return George; diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index 760454dd9a469..a1739ce0d8e29 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -81,8 +81,7 @@ var Food = (function () { var MonsterFood = (function (_super) { __extends(MonsterFood, _super); function MonsterFood(name, flavor) { - var _this; - _this = _super.call(this, name) || this; + var _this = _super.call(this, name) || this; _this.flavor = flavor; return _this; } @@ -91,8 +90,7 @@ var MonsterFood = (function (_super) { var IceCream = (function (_super) { __extends(IceCream, _super); function IceCream(flavor) { - var _this; - _this = _super.call(this, "Ice Cream", flavor) || this; + var _this = _super.call(this, "Ice Cream", flavor) || this; _this.flavor = flavor; return _this; } @@ -101,8 +99,7 @@ var IceCream = (function (_super) { var Cookie = (function (_super) { __extends(Cookie, _super); function Cookie(flavor, isGlutenFree) { - var _this; - _this = _super.call(this, "Cookie", flavor) || this; + var _this = _super.call(this, "Cookie", flavor) || this; _this.flavor = flavor; _this.isGlutenFree = isGlutenFree; return _this; @@ -112,8 +109,7 @@ var Cookie = (function (_super) { var PetFood = (function (_super) { __extends(PetFood, _super); function PetFood(name, whereToBuy) { - var _this; - _this = _super.call(this, name) || this; + var _this = _super.call(this, name) || this; _this.whereToBuy = whereToBuy; return _this; } @@ -122,8 +118,7 @@ var PetFood = (function (_super) { var ExpensiveOrganicDogFood = (function (_super) { __extends(ExpensiveOrganicDogFood, _super); function ExpensiveOrganicDogFood(whereToBuy) { - var _this; - _this = _super.call(this, "Origen", whereToBuy) || this; + var _this = _super.call(this, "Origen", whereToBuy) || this; _this.whereToBuy = whereToBuy; return _this; } @@ -132,8 +127,7 @@ var ExpensiveOrganicDogFood = (function (_super) { var ExpensiveOrganicCatFood = (function (_super) { __extends(ExpensiveOrganicCatFood, _super); function ExpensiveOrganicCatFood(whereToBuy, containsFish) { - var _this; - _this = _super.call(this, "Nature's Logic", whereToBuy) || this; + var _this = _super.call(this, "Nature's Logic", whereToBuy) || this; _this.whereToBuy = whereToBuy; _this.containsFish = containsFish; return _this; diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 72df561227f58..8b999b45d71fe 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -109,8 +109,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.a = 1; return _this; } diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 258f05cbc8541..e93058d71d293 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -161,9 +161,8 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2(v2) { - var _this; + var _this = _super.call(this, v2) || this; if (v2 === void 0) { v2 = 6; } - _this = _super.call(this, v2) || this; return _this; } return C2; diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index ca78ad7286e38..f9b9ecaf99091 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -25,8 +25,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D(p) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.p = p; return _this; } diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index 360b38ce70cb9..49d96b97b74c2 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -27,8 +27,7 @@ var Z = (function () { var A = (function (_super) { __extends(A, _super); function A() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.x = 1; return _this; } diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index 799a17d47deb3..c7bdb90775e19 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -318,8 +318,7 @@ var c2 = (function () { var c3 = (function (_super) { __extends(c3, _super); function c3() { - var _this; - _this = _super.call(this, 10) || this; + var _this = _super.call(this, 10) || this; _this.p1 = _super.prototype.c2_p1; return _this; } @@ -407,8 +406,7 @@ var c5 = (function () { var c6 = (function (_super) { __extends(c6, _super); function c6() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.d = _super.prototype.b; return _this; } diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 88516c9a692e9..253f856a9900f 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -826,8 +826,7 @@ var TypeScript; var NumberLiteralToken = (function (_super) { __extends(NumberLiteralToken, _super); function NumberLiteralToken(value, hasEmptyFraction) { - var _this; - _this = _super.call(this, TokenID.NumberLiteral) || this; + var _this = _super.call(this, TokenID.NumberLiteral) || this; _this.value = value; _this.hasEmptyFraction = hasEmptyFraction; return _this; @@ -844,8 +843,7 @@ var TypeScript; var StringLiteralToken = (function (_super) { __extends(StringLiteralToken, _super); function StringLiteralToken(value) { - var _this; - _this = _super.call(this, TokenID.StringLiteral) || this; + var _this = _super.call(this, TokenID.StringLiteral) || this; _this.value = value; return _this; } @@ -861,8 +859,7 @@ var TypeScript; var IdentifierToken = (function (_super) { __extends(IdentifierToken, _super); function IdentifierToken(value, hasEscapeSequence) { - var _this; - _this = _super.call(this, TokenID.Identifier) || this; + var _this = _super.call(this, TokenID.Identifier) || this; _this.value = value; _this.hasEscapeSequence = hasEscapeSequence; return _this; @@ -879,8 +876,7 @@ var TypeScript; var WhitespaceToken = (function (_super) { __extends(WhitespaceToken, _super); function WhitespaceToken(tokenId, value) { - var _this; - _this = _super.call(this, tokenId) || this; + var _this = _super.call(this, tokenId) || this; _this.value = value; return _this; } @@ -896,8 +892,7 @@ var TypeScript; var CommentToken = (function (_super) { __extends(CommentToken, _super); function CommentToken(tokenID, value, isBlock, startPos, line, endsLine) { - var _this; - _this = _super.call(this, tokenID) || this; + var _this = _super.call(this, tokenID) || this; _this.value = value; _this.isBlock = isBlock; _this.startPos = startPos; @@ -917,8 +912,7 @@ var TypeScript; var RegularExpressionLiteralToken = (function (_super) { __extends(RegularExpressionLiteralToken, _super); function RegularExpressionLiteralToken(regex) { - var _this; - _this = _super.call(this, TokenID.RegularExpressionLiteral) || this; + var _this = _super.call(this, TokenID.RegularExpressionLiteral) || this; _this.regex = regex; return _this; } diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index fa112e51dadb0..fd2c017b637e4 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2386,8 +2386,7 @@ var TypeScript; var AST = (function (_super) { __extends(AST, _super); function AST(nodeType) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.nodeType = nodeType; _this.type = null; _this.flags = ASTFlags.Writeable; @@ -2544,8 +2543,7 @@ var TypeScript; var IncompleteAST = (function (_super) { __extends(IncompleteAST, _super); function IncompleteAST(min, lim) { - var _this; - _this = _super.call(this, NodeType.Error) || this; + var _this = _super.call(this, NodeType.Error) || this; _this.minChar = min; _this.limChar = lim; return _this; @@ -2556,8 +2554,7 @@ var TypeScript; var ASTList = (function (_super) { __extends(ASTList, _super); function ASTList() { - var _this; - _this = _super.call(this, NodeType.List) || this; + var _this = _super.call(this, NodeType.List) || this; _this.enclosingScope = null; _this.members = new AST[]; return _this; @@ -2625,8 +2622,7 @@ var TypeScript; // To change text, and to avoid running into a situation where 'actualText' does not // match 'text', always use setText. function Identifier(actualText, hasEscapeSequence) { - var _this; - _this = _super.call(this, NodeType.Name) || this; + var _this = _super.call(this, NodeType.Name) || this; _this.actualText = actualText; _this.hasEscapeSequence = hasEscapeSequence; _this.sym = null; @@ -2671,8 +2667,7 @@ var TypeScript; var MissingIdentifier = (function (_super) { __extends(MissingIdentifier, _super); function MissingIdentifier() { - var _this; - _this = _super.call(this, "__missing") || this; + var _this = _super.call(this, "__missing") || this; return _this; } MissingIdentifier.prototype.isMissing = function () { @@ -2687,8 +2682,7 @@ var TypeScript; var Label = (function (_super) { __extends(Label, _super); function Label(id) { - var _this; - _this = _super.call(this, NodeType.Label) || this; + var _this = _super.call(this, NodeType.Label) || this; _this.id = id; return _this; } @@ -2713,8 +2707,7 @@ var TypeScript; var Expression = (function (_super) { __extends(Expression, _super); function Expression(nodeType) { - var _this; - _this = _super.call(this, nodeType) || this; + var _this = _super.call(this, nodeType) || this; return _this; } Expression.prototype.isExpression = function () { return true; }; @@ -2725,8 +2718,7 @@ var TypeScript; var UnaryExpression = (function (_super) { __extends(UnaryExpression, _super); function UnaryExpression(nodeType, operand) { - var _this; - _this = _super.call(this, nodeType) || this; + var _this = _super.call(this, nodeType) || this; _this.operand = operand; _this.targetType = null; // Target type for an object literal (null if no target type) _this.castTerm = null; @@ -2871,8 +2863,7 @@ var TypeScript; var CallExpression = (function (_super) { __extends(CallExpression, _super); function CallExpression(nodeType, target, arguments) { - var _this; - _this = _super.call(this, nodeType) || this; + var _this = _super.call(this, nodeType) || this; _this.target = target; _this.arguments = arguments; _this.signature = null; @@ -2905,8 +2896,7 @@ var TypeScript; var BinaryExpression = (function (_super) { __extends(BinaryExpression, _super); function BinaryExpression(nodeType, operand1, operand2) { - var _this; - _this = _super.call(this, nodeType) || this; + var _this = _super.call(this, nodeType) || this; _this.operand1 = operand1; _this.operand2 = operand2; return _this; @@ -3059,8 +3049,7 @@ var TypeScript; var ConditionalExpression = (function (_super) { __extends(ConditionalExpression, _super); function ConditionalExpression(operand1, operand2, operand3) { - var _this; - _this = _super.call(this, NodeType.ConditionalExpression) || this; + var _this = _super.call(this, NodeType.ConditionalExpression) || this; _this.operand1 = operand1; _this.operand2 = operand2; _this.operand3 = operand3; @@ -3086,8 +3075,7 @@ var TypeScript; var NumberLiteral = (function (_super) { __extends(NumberLiteral, _super); function NumberLiteral(value, hasEmptyFraction) { - var _this; - _this = _super.call(this, NodeType.NumberLit) || this; + var _this = _super.call(this, NodeType.NumberLit) || this; _this.value = value; _this.hasEmptyFraction = hasEmptyFraction; _this.isNegativeZero = false; @@ -3129,8 +3117,7 @@ var TypeScript; var RegexLiteral = (function (_super) { __extends(RegexLiteral, _super); function RegexLiteral(regex) { - var _this; - _this = _super.call(this, NodeType.Regex) || this; + var _this = _super.call(this, NodeType.Regex) || this; _this.regex = regex; return _this; } @@ -3151,8 +3138,7 @@ var TypeScript; var StringLiteral = (function (_super) { __extends(StringLiteral, _super); function StringLiteral(text) { - var _this; - _this = _super.call(this, NodeType.QString) || this; + var _this = _super.call(this, NodeType.QString) || this; _this.text = text; return _this; } @@ -3179,8 +3165,7 @@ var TypeScript; var ModuleElement = (function (_super) { __extends(ModuleElement, _super); function ModuleElement(nodeType) { - var _this; - _this = _super.call(this, nodeType) || this; + var _this = _super.call(this, nodeType) || this; return _this; } return ModuleElement; @@ -3189,8 +3174,7 @@ var TypeScript; var ImportDeclaration = (function (_super) { __extends(ImportDeclaration, _super); function ImportDeclaration(id, alias) { - var _this; - _this = _super.call(this, NodeType.ImportDeclaration) || this; + var _this = _super.call(this, NodeType.ImportDeclaration) || this; _this.id = id; _this.alias = alias; _this.varFlags = VarFlags.None; @@ -3250,8 +3234,7 @@ var TypeScript; var BoundDecl = (function (_super) { __extends(BoundDecl, _super); function BoundDecl(id, nodeType, nestingLevel) { - var _this; - _this = _super.call(this, nodeType) || this; + var _this = _super.call(this, nodeType) || this; _this.id = id; _this.nestingLevel = nestingLevel; _this.init = null; @@ -3276,8 +3259,7 @@ var TypeScript; var VarDecl = (function (_super) { __extends(VarDecl, _super); function VarDecl(id, nest) { - var _this; - _this = _super.call(this, id, NodeType.VarDecl, nest) || this; + var _this = _super.call(this, id, NodeType.VarDecl, nest) || this; return _this; } VarDecl.prototype.isAmbient = function () { return hasFlag(this.varFlags, VarFlags.Ambient); }; @@ -3295,8 +3277,7 @@ var TypeScript; var ArgDecl = (function (_super) { __extends(ArgDecl, _super); function ArgDecl(id) { - var _this; - _this = _super.call(this, id, NodeType.ArgDecl, 0) || this; + var _this = _super.call(this, id, NodeType.ArgDecl, 0) || this; _this.isOptional = false; _this.parameterPropertySym = null; return _this; @@ -3319,8 +3300,7 @@ var TypeScript; var FuncDecl = (function (_super) { __extends(FuncDecl, _super); function FuncDecl(name, bod, isConstructor, arguments, vars, scopes, statics, nodeType) { - var _this; - _this = _super.call(this, nodeType) || this; + var _this = _super.call(this, nodeType) || this; _this.name = name; _this.bod = bod; _this.isConstructor = isConstructor; @@ -3461,8 +3441,7 @@ var TypeScript; var Script = (function (_super) { __extends(Script, _super); function Script(vars, scopes) { - var _this; - _this = _super.call(this, new Identifier("script"), null, false, null, vars, scopes, null, NodeType.Script) || this; + var _this = _super.call(this, new Identifier("script"), null, false, null, vars, scopes, null, NodeType.Script) || this; _this.locationInfo = null; _this.referencedFiles = []; _this.requiresGlobal = false; @@ -3532,8 +3511,7 @@ var TypeScript; var NamedDeclaration = (function (_super) { __extends(NamedDeclaration, _super); function NamedDeclaration(nodeType, name, members) { - var _this; - _this = _super.call(this, nodeType) || this; + var _this = _super.call(this, nodeType) || this; _this.name = name; _this.members = members; _this.leftCurlyCount = 0; @@ -3546,8 +3524,7 @@ var TypeScript; var ModuleDeclaration = (function (_super) { __extends(ModuleDeclaration, _super); function ModuleDeclaration(name, members, vars, scopes, endingToken) { - var _this; - _this = _super.call(this, NodeType.ModuleDeclaration, name, members) || this; + var _this = _super.call(this, NodeType.ModuleDeclaration, name, members) || this; _this.endingToken = endingToken; _this.modFlags = ModuleFlags.ShouldEmitModuleDecl; _this.amdDependencies = []; @@ -3583,8 +3560,7 @@ var TypeScript; var TypeDeclaration = (function (_super) { __extends(TypeDeclaration, _super); function TypeDeclaration(nodeType, name, extendsList, implementsList, members) { - var _this; - _this = _super.call(this, nodeType, name, members) || this; + var _this = _super.call(this, nodeType, name, members) || this; _this.extendsList = extendsList; _this.implementsList = implementsList; _this.varFlags = VarFlags.None; @@ -3602,8 +3578,7 @@ var TypeScript; var ClassDeclaration = (function (_super) { __extends(ClassDeclaration, _super); function ClassDeclaration(name, members, extendsList, implementsList) { - var _this; - _this = _super.call(this, NodeType.ClassDeclaration, name, extendsList, implementsList, members) || this; + var _this = _super.call(this, NodeType.ClassDeclaration, name, extendsList, implementsList, members) || this; _this.knownMemberNames = {}; _this.constructorDecl = null; _this.constructorNestingLevel = 0; @@ -3622,8 +3597,7 @@ var TypeScript; var InterfaceDeclaration = (function (_super) { __extends(InterfaceDeclaration, _super); function InterfaceDeclaration(name, members, extendsList, implementsList) { - var _this; - _this = _super.call(this, NodeType.InterfaceDeclaration, name, extendsList, implementsList, members) || this; + var _this = _super.call(this, NodeType.InterfaceDeclaration, name, extendsList, implementsList, members) || this; return _this; } InterfaceDeclaration.prototype.typeCheck = function (typeFlow) { @@ -3637,8 +3611,7 @@ var TypeScript; var Statement = (function (_super) { __extends(Statement, _super); function Statement(nodeType) { - var _this; - _this = _super.call(this, nodeType) || this; + var _this = _super.call(this, nodeType) || this; _this.flags |= ASTFlags.IsStatement; return _this; } @@ -3655,8 +3628,7 @@ var TypeScript; var LabeledStatement = (function (_super) { __extends(LabeledStatement, _super); function LabeledStatement(labels, stmt) { - var _this; - _this = _super.call(this, NodeType.LabeledStatement) || this; + var _this = _super.call(this, NodeType.LabeledStatement) || this; _this.labels = labels; _this.stmt = stmt; return _this; @@ -3691,8 +3663,7 @@ var TypeScript; var Block = (function (_super) { __extends(Block, _super); function Block(statements, isStatementBlock) { - var _this; - _this = _super.call(this, NodeType.Block) || this; + var _this = _super.call(this, NodeType.Block) || this; _this.statements = statements; _this.isStatementBlock = isStatementBlock; return _this; @@ -3748,8 +3719,7 @@ var TypeScript; var Jump = (function (_super) { __extends(Jump, _super); function Jump(nodeType) { - var _this; - _this = _super.call(this, nodeType) || this; + var _this = _super.call(this, nodeType) || this; _this.target = null; _this.resolvedTarget = null; return _this; @@ -3801,8 +3771,7 @@ var TypeScript; var WhileStatement = (function (_super) { __extends(WhileStatement, _super); function WhileStatement(cond) { - var _this; - _this = _super.call(this, NodeType.While) || this; + var _this = _super.call(this, NodeType.While) || this; _this.cond = cond; _this.body = null; return _this; @@ -3855,8 +3824,7 @@ var TypeScript; var DoWhileStatement = (function (_super) { __extends(DoWhileStatement, _super); function DoWhileStatement() { - var _this; - _this = _super.call(this, NodeType.DoWhile) || this; + var _this = _super.call(this, NodeType.DoWhile) || this; _this.body = null; _this.whileAST = null; _this.cond = null; @@ -3913,8 +3881,7 @@ var TypeScript; var IfStatement = (function (_super) { __extends(IfStatement, _super); function IfStatement(cond) { - var _this; - _this = _super.call(this, NodeType.If) || this; + var _this = _super.call(this, NodeType.If) || this; _this.cond = cond; _this.elseBod = null; _this.statement = new ASTSpan(); @@ -3993,8 +3960,7 @@ var TypeScript; var ReturnStatement = (function (_super) { __extends(ReturnStatement, _super); function ReturnStatement() { - var _this; - _this = _super.call(this, NodeType.Return) || this; + var _this = _super.call(this, NodeType.Return) || this; _this.returnExpression = null; return _this; } @@ -4026,8 +3992,7 @@ var TypeScript; var EndCode = (function (_super) { __extends(EndCode, _super); function EndCode() { - var _this; - _this = _super.call(this, NodeType.EndCode) || this; + var _this = _super.call(this, NodeType.EndCode) || this; return _this; } return EndCode; @@ -4036,8 +4001,7 @@ var TypeScript; var ForInStatement = (function (_super) { __extends(ForInStatement, _super); function ForInStatement(lval, obj) { - var _this; - _this = _super.call(this, NodeType.ForIn) || this; + var _this = _super.call(this, NodeType.ForIn) || this; _this.lval = lval; _this.obj = obj; _this.statement = new ASTSpan(); @@ -4153,8 +4117,7 @@ var TypeScript; var ForStatement = (function (_super) { __extends(ForStatement, _super); function ForStatement(init) { - var _this; - _this = _super.call(this, NodeType.For) || this; + var _this = _super.call(this, NodeType.For) || this; _this.init = init; return _this; } @@ -4246,8 +4209,7 @@ var TypeScript; var WithStatement = (function (_super) { __extends(WithStatement, _super); function WithStatement(expr) { - var _this; - _this = _super.call(this, NodeType.With) || this; + var _this = _super.call(this, NodeType.With) || this; _this.expr = expr; _this.withSym = null; return _this; @@ -4274,8 +4236,7 @@ var TypeScript; var SwitchStatement = (function (_super) { __extends(SwitchStatement, _super); function SwitchStatement(val) { - var _this; - _this = _super.call(this, NodeType.Switch) || this; + var _this = _super.call(this, NodeType.Switch) || this; _this.val = val; _this.defaultCase = null; _this.statement = new ASTSpan(); @@ -4348,8 +4309,7 @@ var TypeScript; var CaseStatement = (function (_super) { __extends(CaseStatement, _super); function CaseStatement() { - var _this; - _this = _super.call(this, NodeType.Case) || this; + var _this = _super.call(this, NodeType.Case) || this; _this.expr = null; return _this; } @@ -4403,8 +4363,7 @@ var TypeScript; var TypeReference = (function (_super) { __extends(TypeReference, _super); function TypeReference(term, arrayCount) { - var _this; - _this = _super.call(this, NodeType.TypeRef) || this; + var _this = _super.call(this, NodeType.TypeRef) || this; _this.term = term; _this.arrayCount = arrayCount; return _this; @@ -4435,8 +4394,7 @@ var TypeScript; var TryFinally = (function (_super) { __extends(TryFinally, _super); function TryFinally(tryNode, finallyNode) { - var _this; - _this = _super.call(this, NodeType.TryFinally) || this; + var _this = _super.call(this, NodeType.TryFinally) || this; _this.tryNode = tryNode; _this.finallyNode = finallyNode; return _this; @@ -4482,8 +4440,7 @@ var TypeScript; var TryCatch = (function (_super) { __extends(TryCatch, _super); function TryCatch(tryNode, catchNode) { - var _this; - _this = _super.call(this, NodeType.TryCatch) || this; + var _this = _super.call(this, NodeType.TryCatch) || this; _this.tryNode = tryNode; _this.catchNode = catchNode; return _this; @@ -4534,8 +4491,7 @@ var TypeScript; var Try = (function (_super) { __extends(Try, _super); function Try(body) { - var _this; - _this = _super.call(this, NodeType.Try) || this; + var _this = _super.call(this, NodeType.Try) || this; _this.body = body; return _this; } @@ -4564,8 +4520,7 @@ var TypeScript; var Catch = (function (_super) { __extends(Catch, _super); function Catch(param, body) { - var _this; - _this = _super.call(this, NodeType.Catch) || this; + var _this = _super.call(this, NodeType.Catch) || this; _this.param = param; _this.body = body; _this.statement = new ASTSpan(); @@ -4639,8 +4594,7 @@ var TypeScript; var Finally = (function (_super) { __extends(Finally, _super); function Finally(body) { - var _this; - _this = _super.call(this, NodeType.Finally) || this; + var _this = _super.call(this, NodeType.Finally) || this; _this.body = body; return _this; } @@ -4669,8 +4623,7 @@ var TypeScript; var Comment = (function (_super) { __extends(Comment, _super); function Comment(content, isBlockComment, endsLine) { - var _this; - _this = _super.call(this, NodeType.Comment) || this; + var _this = _super.call(this, NodeType.Comment) || this; _this.content = content; _this.isBlockComment = isBlockComment; _this.endsLine = endsLine; @@ -4697,8 +4650,7 @@ var TypeScript; var DebuggerStatement = (function (_super) { __extends(DebuggerStatement, _super); function DebuggerStatement() { - var _this; - _this = _super.call(this, NodeType.Debugger) || this; + var _this = _super.call(this, NodeType.Debugger) || this; return _this; } DebuggerStatement.prototype.emit = function (emitter, tokenId, startLine) { diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 2d219c63e6abe..059ac2efd8ed6 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2380,8 +2380,7 @@ var Harness; var TestCase = (function (_super) { __extends(TestCase, _super); function TestCase(description, block) { - var _this; - _this = _super.call(this, description, block) || this; + var _this = _super.call(this, description, block) || this; _this.description = description; _this.block = block; return _this; @@ -2416,8 +2415,7 @@ var Harness; var Scenario = (function (_super) { __extends(Scenario, _super); function Scenario(description, block) { - var _this; - _this = _super.call(this, description, block) || this; + var _this = _super.call(this, description, block) || this; _this.description = description; _this.block = block; return _this; @@ -2473,8 +2471,7 @@ var Harness; var Run = (function (_super) { __extends(Run, _super); function Run() { - var _this; - _this = _super.call(this, 'Test Run', null) || this; + var _this = _super.call(this, 'Test Run', null) || this; return _this; } Run.prototype.run = function () { diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index c07238dff5ef3..6fa05178f9128 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -27,8 +27,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _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/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index 0d4cfefb63b08..c1897e8503a92 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -22,8 +22,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.bing = function () { return Base.foo; }; // error return _this; } diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index 581b110298a32..872c00486c001 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -56,8 +56,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B(x) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; // Fails, x is readonly _this.x = 1; return _this; @@ -69,8 +68,7 @@ var C = (function (_super) { // This is the usual behavior of readonly properties: // if one is redeclared in a base class, then it can be assigned to. function C(x) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; _this.x = x; _this.x = 1; return _this; @@ -88,8 +86,7 @@ var D = (function () { var E = (function (_super) { __extends(E, _super); function E(x) { - var _this; - _this = _super.call(this, x) || this; + var _this = _super.call(this, x) || this; _this.x = x; _this.x = 1; return _this; diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index 0ee301758cf1f..6c678db235880 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -123,8 +123,7 @@ var G = (function () { var H = (function (_super) { __extends(H, _super); function H() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return new G(); //error return _this; } @@ -133,8 +132,7 @@ var H = (function (_super) { var I = (function (_super) { __extends(I, _super); function I() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return new G(); return _this; } diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 9436043094eb3..48863404a8ecb 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -25,8 +25,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.v = 1; _this.p = 1; C.s = 1; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index 7fef0a420100e..4bac0210c85ab 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -21,8 +21,7 @@ var AbstractGreeter = (function () { var Greeter = (function (_super) { __extends(Greeter, _super); function Greeter() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _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 14f7f65f05056..6b18a783dfa1c 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,UAGC;;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,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 diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index e1adf2f7a297f..91e284fd06385 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -77,40 +77,38 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts --- >>> function Greeter() { 1 >^^^^ -2 > ^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(13, 5) Source(4, 1) + SourceIndex(0) --- ->>> var _this; +>>> var _this = _super.apply(this, arguments) || this; 1->^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +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, 19) Source(7, 2) + SourceIndex(0) +2 >Emitted(14, 59) Source(7, 2) + SourceIndex(0) --- ->>> _this = _super.apply(this, arguments) || this; >>> _this.a = 10; -1->^^^^^^^^ +1 >^^^^^^^^ 2 > ^^^^^^^ 3 > ^^^ 4 > ^^ 5 > ^ 6 > ^^^^^^^^-> -1-> +1 > 2 > a 3 > = 4 > 10 5 > ; -1->Emitted(16, 9) Source(5, 12) + SourceIndex(0) -2 >Emitted(16, 16) Source(5, 13) + SourceIndex(0) -3 >Emitted(16, 19) Source(5, 16) + SourceIndex(0) -4 >Emitted(16, 21) Source(5, 18) + SourceIndex(0) -5 >Emitted(16, 22) Source(5, 19) + SourceIndex(0) +1 >Emitted(15, 9) Source(5, 12) + SourceIndex(0) +2 >Emitted(15, 16) Source(5, 13) + SourceIndex(0) +3 >Emitted(15, 19) Source(5, 16) + SourceIndex(0) +4 >Emitted(15, 21) Source(5, 18) + SourceIndex(0) +5 >Emitted(15, 22) Source(5, 19) + SourceIndex(0) --- >>> _this.nameA = "Ten"; 1->^^^^^^^^ @@ -124,11 +122,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > "Ten" 5 > ; -1->Emitted(17, 9) Source(6, 12) + SourceIndex(0) -2 >Emitted(17, 20) Source(6, 17) + SourceIndex(0) -3 >Emitted(17, 23) Source(6, 20) + SourceIndex(0) -4 >Emitted(17, 28) Source(6, 25) + SourceIndex(0) -5 >Emitted(17, 29) Source(6, 26) + SourceIndex(0) +1->Emitted(16, 9) Source(6, 12) + SourceIndex(0) +2 >Emitted(16, 20) Source(6, 17) + SourceIndex(0) +3 >Emitted(16, 23) Source(6, 20) + SourceIndex(0) +4 >Emitted(16, 28) Source(6, 25) + SourceIndex(0) +5 >Emitted(16, 29) Source(6, 26) + SourceIndex(0) --- >>> return _this; >>> } @@ -138,8 +136,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1 > > 2 > } -1 >Emitted(19, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(19, 6) Source(7, 2) + SourceIndex(0) +1 >Emitted(18, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(18, 6) Source(7, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ @@ -147,8 +145,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > ^^^-> 1-> 2 > } -1->Emitted(20, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(20, 19) Source(7, 2) + SourceIndex(0) +1->Emitted(19, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(19, 19) Source(7, 2) + SourceIndex(0) --- >>>}(AbstractGreeter)); 1-> @@ -167,11 +165,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(21, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(21, 2) Source(7, 2) + SourceIndex(0) -3 >Emitted(21, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(21, 3) Source(4, 23) + SourceIndex(0) -5 >Emitted(21, 18) Source(4, 38) + SourceIndex(0) -6 >Emitted(21, 21) Source(7, 2) + SourceIndex(0) +1->Emitted(20, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(20, 2) Source(7, 2) + SourceIndex(0) +3 >Emitted(20, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(20, 3) Source(4, 23) + SourceIndex(0) +5 >Emitted(20, 18) Source(4, 38) + SourceIndex(0) +6 >Emitted(20, 21) Source(7, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map \ No newline at end of file diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index 5e769cab563f8..d204c1aed47a8 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -27,8 +27,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.p1 = doThing(A); // OK _this.p2 = doThing(B); // OK return _this; diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 1c33f16a3c67b..ecd6bacd20a7d 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -75,8 +75,7 @@ var B = (function (_super) { __extends(B, _super); function B() { "use strict"; // No error - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.s = 9; return _this; } @@ -85,8 +84,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - var _this; - _this = _super.call(this) || this; // No error + var _this = _super.call(this) || this; _this.s = 9; "use strict"; return _this; @@ -109,8 +107,7 @@ var Bs = (function (_super) { __extends(Bs, _super); function Bs() { "use strict"; // No error - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return Bs; @@ -119,8 +116,7 @@ Bs.s = 9; var Cs = (function (_super) { __extends(Cs, _super); function Cs() { - var _this; - _this = _super.call(this) || this; // No error + var _this = _super.call(this) || this; "use strict"; return _this; } diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index 408f9051badcb..54c5997815153 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -41,11 +41,10 @@ var Q = (function (_super) { __extends(Q, _super); // Super is not allowed in constructor args function Q(z, zz, zzz) { - var _this; + var _this = _super.call(this) || this; if (z === void 0) { z = _super.; } if (zz === void 0) { zz = _super.; } if (zzz === void 0) { zzz = function () { return _super.; }; } - _this = _super.call(this) || this; _this.z = z; _this.xx = _super.prototype.; return _this; diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index dc450147f889e..106d7433bf5a9 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -40,10 +40,10 @@ var T5 = (function () { var T6 = (function (_super) { __extends(T6, _super); function T6() { - var _this; + var _this = // Should error; base constructor has type T for first arg, // which is instantiated with 'number' in the extends clause - _this = _super.call(this, "hi") || this; + _super.call(this, "hi") || this; var x = _this.foo; return _this; } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index a5d6ec18ce34e..e3aed9e40e9e2 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -30,8 +30,7 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this, i) || this; + var _this = _super.call(this, i) || this; var s = { t: _this._t }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index c7a206dbbbec3..91cc3d28dd6ec 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -24,8 +24,7 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this, function () { _this._t; }) || this; // no error. only check when this is directly accessing in constructor + var _this = _super.call(this, function () { _this._t; }) || this; return _this; } return D; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index 311b7ca21831b..91acb88ce224c 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -34,8 +34,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this._t; return _this; } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index e630d539f1405..4eb8e5266c2c5 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -24,8 +24,7 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this, _this) || this; + var _this = _super.call(this, _this) || this; return _this; } return D; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index 2cfc0bfcbd45d..27f3db5145359 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -20,8 +20,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return D; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index f9eeadc98e623..a8d5e8008acd9 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -19,8 +19,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return D; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index 02bec67d7aaa2..b12a3eef6d43c 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -25,8 +25,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; - _this = _super.call(this, function (value) { return String(value); }) || this; + var _this = _super.call(this, function (value) { return String(value); }) || this; return _this; } return B; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index 55c6ee6f4450a..c78e6693f165d 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -25,8 +25,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; - _this = _super.call(this, function (value) { return String(value); }) || this; + var _this = _super.call(this, function (value) { return String(value); }) || this; return _this; } return B; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index 977377e41d410..32d2065dd3f1c 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -25,8 +25,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this; - _this = _super.call(this, function (value) { return String(value); }) || this; + var _this = _super.call(this, function (value) { return String(value); }) || this; return _this; } return B; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 503aee2dcc643..cd84052ca3cae 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -66,8 +66,7 @@ var Doing = (function () { var Other = (function (_super) { __extends(Other, _super); function Other() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.propertyInitializer = _super.prototype.instanceMethod.call(_this); _this.functionProperty = function () { _super.prototype.instanceMethod.call(_this); }; _super.prototype.instanceMethod.call(_this); diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index 326662abdaccf..b696b4a302f40 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -39,8 +39,7 @@ var B = (function (_super) { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return D; diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index 5797085726dff..829311f237c34 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -39,8 +39,7 @@ var B = (function (_super) { var D = (function (_super) { __extends(class_1, _super); function class_1() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return class_1; diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 65a8b435166b7..e32bfc660502b 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -37,8 +37,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.x = _this = _super.call(this) || this; var y = function () { _this = _super.call(this) || this; diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index 4e4ae47967a1b..0fe27f493e811 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -28,8 +28,7 @@ var B = (function (_super) { __extends(B, _super); // Ensure 'value' is of type 'number (and not '{}') by using its 'toExponential()' method. function B() { - var _this; - _this = _super.call(this, function (value) { return String(value.toExponential()); }) || this; + var _this = _super.call(this, function (value) { return String(value.toExponential()); }) || this; return _this; } return B; diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index f3a246c6389a7..f970be44aff0c 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -27,8 +27,7 @@ var C = (function (_super) { __extends(C, _super); // Ensure 'value' is not of type 'any' by invoking it with type arguments. function C() { - var _this; - _this = _super.call(this, function (value) { return String(value()); }) || this; + var _this = _super.call(this, function (value) { return String(value()); }) || this; return _this; } return C; diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index e7b8b355108d8..6a43d58c47124 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -47,10 +47,10 @@ var CBase = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this; + var _this = // Should be okay. // 'p' should have type 'string'. - _this = _super.call(this, { + _super.call(this, { method: function (p) { p.length; } diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index 2fe7712ce68ce..99a3b78752c9e 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -47,8 +47,7 @@ var Derived = (function (_super) { __extends(Derived, _super); //super call in class constructor of derived type function Derived(q) { - var _this; - _this = _super.call(this, '') || this; + var _this = _super.call(this, '') || this; _this.q = q; //type of super call expression is void var p = _this = _super.call(this, '') || this; diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index 93676c5d8f3e9..19f0d74f6774a 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -76,8 +76,7 @@ var User = (function () { var RegisteredUser = (function (_super) { __extends(RegisteredUser, _super); function RegisteredUser() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.name = "Frank"; // super call in an inner function in a constructor function inner() { diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 9b4d956dc5a24..73ca53c3b5cb9 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -85,8 +85,7 @@ var User = (function () { var RegisteredUser = (function (_super) { __extends(RegisteredUser, _super); function RegisteredUser() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.name = "Frank"; // super call in a constructor _super.prototype.sayHello.call(_this); @@ -106,8 +105,7 @@ var RegisteredUser = (function (_super) { var RegisteredUser2 = (function (_super) { __extends(RegisteredUser2, _super); function RegisteredUser2() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.name = "Joe"; // super call in a nested lambda in a constructor var x = function () { return function () { return function () { return _super.prototype.sayHello.call(_this); }; }; }; @@ -123,8 +121,7 @@ var RegisteredUser2 = (function (_super) { var RegisteredUser3 = (function (_super) { __extends(RegisteredUser3, _super); function RegisteredUser3() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.name = "Sam"; // super property in a nested lambda in a constructor var superName = function () { return function () { return function () { return _super.prototype.name; }; }; }; @@ -140,8 +137,7 @@ var RegisteredUser3 = (function (_super) { var RegisteredUser4 = (function (_super) { __extends(RegisteredUser4, _super); function RegisteredUser4() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.name = "Mark"; // super in a nested lambda in a constructor var x = function () { return function () { return _super.prototype.; }; }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index b6559a63a983a..0b1e4fc280f40 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -50,8 +50,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _super.prototype.bar.call(_this); _super.prototype.x; // error return _this; diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index eded4e74a7f5f..7c72ad5d1bbc4 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -50,8 +50,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _super.prototype.bar.call(_this); // error _super.prototype.x; // error return _this; diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index 2ba460d18f730..88a5da8b8fb13 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -99,8 +99,7 @@ var SomeBaseClass = (function () { var SomeDerivedClass = (function (_super) { __extends(SomeDerivedClass, _super); function SomeDerivedClass() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; var x = _super.prototype.func.call(_this); var x; return _this; diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 011c5129e9f1c..4e817b7bbf1c5 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -49,8 +49,7 @@ var MyBase = (function () { var MyDerived = (function (_super) { __extends(MyDerived, _super); function MyDerived() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; var f1 = _super.prototype.getValue.call(_this); var f2 = _super.prototype.value; return _this; diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index 1152399e6eba4..96303dab4eda3 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -28,8 +28,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this) || this; // uses the type parameter type of the base class, ie string + var _this = _super.call(this) || this; return _this; } return D; diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index f2580d30c5f48..36b485548716b 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -20,8 +20,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; return _this; } return D; diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index a08380b173fb1..8581526c1b62f 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -35,8 +35,7 @@ new Foo(function (s) { s = 5; }); // error, if types are applied correctly var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this; - _this = _super.call(this, function (s) { s = 5; }) || this; + var _this = _super.call(this, function (s) { s = 5; }) || this; return _this; } return Bar; diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 10629d579bac2..7872aa121edf9 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -70,8 +70,7 @@ var ClassWithNoInitializer = (function (_super) { __extends(ClassWithNoInitializer, _super); //'this' in optional super call function ClassWithNoInitializer() { - var _this; - _this = _super.call(this, _this) || this; // Error + var _this = _super.call(this, _this) || this; return _this; } return ClassWithNoInitializer; @@ -80,8 +79,7 @@ var ClassWithInitializer = (function (_super) { __extends(ClassWithInitializer, _super); //'this' in required super call function ClassWithInitializer() { - var _this; - _this = _super.call(this, _this) || this; // Error + var _this = _super.call(this, _this) || this; _this.t = 4; return _this; } diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 444952fea3fb3..e656824ae668b 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -71,8 +71,7 @@ var ClassWithNoInitializer = (function (_super) { __extends(ClassWithNoInitializer, _super); //'this' in optional super call function ClassWithNoInitializer() { - var _this; - _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing + var _this = _super.call(this, _this) || this; return _this; } return ClassWithNoInitializer; @@ -81,8 +80,7 @@ var ClassWithInitializer = (function (_super) { __extends(ClassWithInitializer, _super); //'this' in required super call function ClassWithInitializer() { - var _this; - _this = _super.call(this, _this) || this; // Error + var _this = _super.call(this, _this) || this; _this.t = 4; return _this; } diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index f9d9f8694c95f..1c1f11ffbc88f 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -36,8 +36,7 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - var _this; - _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing + var _this = _super.call(this, _this) || this; return _this; } return Foo; @@ -45,8 +44,7 @@ var Foo = (function (_super) { var Foo2 = (function (_super) { __extends(Foo2, _super); function Foo2() { - var _this; - _this = _super.call(this, _this) || this; // error + var _this = _super.call(this, _this) || this; _this.p = 0; return _this; } @@ -55,8 +53,7 @@ var Foo2 = (function (_super) { var Foo3 = (function (_super) { __extends(Foo3, _super); function Foo3(p) { - var _this; - _this = _super.call(this, _this) || this; // error + var _this = _super.call(this, _this) || this; _this.p = p; return _this; } diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index 3185e42dab692..e3eea1fb91de2 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -24,8 +24,7 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo(x) { - var _this; - _this = _super.call(this, _this) || this; + var _this = _super.call(this, _this) || this; _this.x = x; return _this; } diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index b9f7571868a88..6288082ed64f0 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -33,8 +33,7 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - var _this; - _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing + var _this = _super.call(this, _this) || this; return _this; } return Foo; @@ -42,8 +41,7 @@ var Foo = (function (_super) { var Foo2 = (function (_super) { __extends(Foo2, _super); function Foo2() { - var _this; - _this = _super.call(this, _this) || this; // error + var _this = _super.call(this, _this) || this; _this.x = 0; return _this; } diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index 309ebf934070a..6a72f17248f4b 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -26,8 +26,7 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - var _this; - _this = _super.call(this, _this) || this; + var _this = _super.call(this, _this) || this; _this.x = 0; return _this; } diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index 307cd0fca93db..d3bb404ceea6c 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -30,8 +30,7 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _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 39e30b6ba387d..84debfd3e7194 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -30,8 +30,7 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _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 77423709347da..6166b99f4accb 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -30,8 +30,7 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _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 6b5d130c0b403..928649264c8b6 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -30,8 +30,7 @@ var React = require("react"); var Text = (function (_super) { __extends(Text, _super); function Text() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this._tagName = 'div'; return _this; } diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 3995ffd447cd3..541c03dd4b4c7 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -118,8 +118,7 @@ var Test; var File = (function (_super) { __extends(File, _super); function File(path, content) { - var _this; - _this = _super.call(this, path) || this; + var _this = _super.call(this, path) || this; _this.content = content; return _this; } diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index 14807ddd88c31..b61676b40c360 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -68,8 +68,7 @@ var Test; var File = (function (_super) { __extends(File, _super); function File(path, content) { - var _this; - _this = _super.call(this, path) || this; + var _this = _super.call(this, path) || this; _this.content = content; return _this; } diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index eee995686380d..2f97f4b0d1c07 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -72,8 +72,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this; - _this = _super.apply(this, arguments) || this; + var _this = _super.apply(this, arguments) || this; _this.self1 = _this; _this.self2 = _this.self; _this.self3 = _this.foo(); diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 2c2b3ded1b562..5e2bb509a2325 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -63,8 +63,7 @@ var C3 = (function () { var C4 = (function (_super) { __extends(C4, _super); function C4() { - var _this; - _this = _super.call(this, asdf) || this; + var _this = _super.call(this, asdf) || this; return _this; } return C4; diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index 02927bf558d04..7d5a4b9deedf2 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -234,8 +234,7 @@ var ts; var Property = (function (_super) { __extends(Property, _super); function Property(name, type, flags) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.name = name; _this.type = type; _this.flags = flags; @@ -256,8 +255,7 @@ var ts; var Signature = (function (_super) { __extends(Signature, _super); function Signature(typeParameters, parameters, returnType) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.typeParameters = typeParameters; _this.parameters = parameters; _this.returnType = returnType; @@ -278,8 +276,7 @@ var ts; var Parameter = (function (_super) { __extends(Parameter, _super); function Parameter(name, type, flags) { - var _this; - _this = _super.call(this) || this; + var _this = _super.call(this) || this; _this.name = name; _this.type = type; _this.flags = flags; diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index 3a05ff12ee8d0..bbd564db3663b 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -24,8 +24,7 @@ var Base = (function () { var Super = (function (_super) { __extends(Super, _super); function Super() { - var _this; - _this = _super.call(this, (function () { return _this; })()) || this; // ok since this is not the case: The constructor declares parameter properties or the containing class declares instance member variables with initializers. + var _this = _super.call(this, (function () { return _this; })()) || this; return _this; } return Super; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 9c1c8f8c29d88..0875f2ba1dd85 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -41,8 +41,7 @@ define(["require", "exports"], function (require, exports) { var B = (function (_super) { __extends(B, _super); function B(element, url) { - var _this; - _this = _super.call(this, element) || this; + var _this = _super.call(this, element) || this; _this.p1 = element; _this.p2 = url; return _this; From 86088d0e7e9b7d31b04f4e4fb4327bb121e42def Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 3 Sep 2016 00:30:40 -0700 Subject: [PATCH 13/39] Always perform `this` captures after default & rest parameters. --- src/compiler/transformers/es6.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 85838112fc313..44089326f7f1d 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -791,10 +791,10 @@ namespace ts { } if (constructor) { - Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!"); - statementOffset = declareOrCaptureThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, statementOffset); addDefaultValueAssignmentsIfNeeded(statements, constructor); addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper); + Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!"); + statementOffset = declareOrCaptureThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, statementOffset); } addDefaultSuperCallIfNeeded(statements, constructor, extendsClauseElement, hasSynthesizedSuper); From dd27139f39795fd0d83e8189c7a932364afe8044 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 3 Sep 2016 00:31:09 -0700 Subject: [PATCH 14/39] Accepted baselines. --- tests/baselines/reference/es6ClassTest.js | 2 +- tests/baselines/reference/optionalParamArgsTest.js | 2 +- tests/baselines/reference/superAccess2.js | 2 +- tests/baselines/reference/superInConstructorParam1.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index d0879152544d1..067e57c258186 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -102,8 +102,8 @@ var Bar = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y, z) { - var _this = _super.call(this, x) || this; if (z === void 0) { z = 0; } + var _this = _super.call(this, x) || this; _this.y = y; _this.z = z; _this.gar = 0; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index e93058d71d293..374b0956509fc 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -161,8 +161,8 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2(v2) { - var _this = _super.call(this, v2) || this; if (v2 === void 0) { v2 = 6; } + var _this = _super.call(this, v2) || this; return _this; } return C2; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index 54c5997815153..da19770584acf 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -41,10 +41,10 @@ var Q = (function (_super) { __extends(Q, _super); // Super is not allowed in constructor args function Q(z, zz, zzz) { - var _this = _super.call(this) || this; if (z === void 0) { z = _super.; } if (zz === void 0) { zz = _super.; } if (zzz === void 0) { zzz = function () { return _super.; }; } + var _this = _super.call(this) || this; _this.z = z; _this.xx = _super.prototype.; return _this; diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 7519a8253ecb9..8c99b64991733 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -27,8 +27,8 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C(a) { - var _this; if (a === void 0) { a = _super.foo.call(_this); } + var _this; return _this; } return C; From f3dcaae0f02d597a6f0918488fde203d08570686 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 3 Sep 2016 01:09:28 -0700 Subject: [PATCH 15/39] Added a test for branched returns at the end of a constructor. --- ...edClassConstructorWithExplicitReturns01.ts | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/cases/compiler/derivedClassConstructorWithExplicitReturns01.ts diff --git a/tests/cases/compiler/derivedClassConstructorWithExplicitReturns01.ts b/tests/cases/compiler/derivedClassConstructorWithExplicitReturns01.ts new file mode 100644 index 0000000000000..2475eac0bb2d3 --- /dev/null +++ b/tests/cases/compiler/derivedClassConstructorWithExplicitReturns01.ts @@ -0,0 +1,36 @@ +// @target: es5 +// @sourcemap: true + +class C { + cProp = 10; + + foo() { return "this never gets used."; } + + constructor(value: number) { + return { + cProp: value, + foo() { + return "well this looks kinda C-ish."; + } + } + } +} + +class D extends C { + dProp = () => this; + + constructor(a = 100) { + super(a); + + if (Math.random() < 0.5) { + "You win!" + return { + cProp: 1, + dProp: () => this, + foo() { return "You win!!!!!" } + }; + } + else + return null; + } +} \ No newline at end of file From 1be4cee0c6fd9e19869e332d57672d74bc5f2dbd Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 3 Sep 2016 01:10:07 -0700 Subject: [PATCH 16/39] Accepted baselines. --- ...edClassConstructorWithExplicitReturns01.js | 76 +++ ...assConstructorWithExplicitReturns01.js.map | 2 + ...tructorWithExplicitReturns01.sourcemap.txt | 583 ++++++++++++++++++ ...ssConstructorWithExplicitReturns01.symbols | 66 ++ ...lassConstructorWithExplicitReturns01.types | 85 +++ 5 files changed, 812 insertions(+) create mode 100644 tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js create mode 100644 tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js.map create mode 100644 tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.sourcemap.txt create mode 100644 tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.symbols create mode 100644 tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types diff --git a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js new file mode 100644 index 0000000000000..de1e409b55fc7 --- /dev/null +++ b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js @@ -0,0 +1,76 @@ +//// [derivedClassConstructorWithExplicitReturns01.ts] + +class C { + cProp = 10; + + foo() { return "this never gets used."; } + + constructor(value: number) { + return { + cProp: value, + foo() { + return "well this looks kinda C-ish."; + } + } + } +} + +class D extends C { + dProp = () => this; + + constructor(a = 100) { + super(a); + + if (Math.random() < 0.5) { + "You win!" + return { + cProp: 1, + dProp: () => this, + foo() { return "You win!!!!!" } + }; + } + else + return null; + } +} + +//// [derivedClassConstructorWithExplicitReturns01.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var C = (function () { + function C(value) { + this.cProp = 10; + return { + cProp: value, + foo: function () { + return "well this looks kinda C-ish."; + } + }; + } + C.prototype.foo = function () { return "this never gets used."; }; + return C; +}()); +var D = (function (_super) { + __extends(D, _super); + function D(a) { + if (a === void 0) { a = 100; } + var _this = _super.call(this, a) || this; + _this.dProp = function () { return _this; }; + if (Math.random() < 0.5) { + "You win!"; + return { + cProp: 1, + dProp: function () { return _this; }, + foo: function () { return "You win!!!!!"; } + }; + } + else + return null; + return _this; + } + return D; +}(C)); +//# sourceMappingURL=derivedClassConstructorWithExplicitReturns01.js.map \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js.map b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js.map new file mode 100644 index 0000000000000..dd7aedd1a9863 --- /dev/null +++ b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js.map @@ -0,0 +1,2 @@ +//// [derivedClassConstructorWithExplicitReturns01.js.map] +{"version":3,"file":"derivedClassConstructorWithExplicitReturns01.js","sourceRoot":"","sources":["derivedClassConstructorWithExplicitReturns01.ts"],"names":[],"mappings":";;;;;AACA;IAKI,WAAY,KAAa;QAJzB,UAAK,GAAG,EAAE,CAAC;QAKP,MAAM,CAAC;YACH,KAAK,EAAE,KAAK;YACZ,GAAG;gBACC,MAAM,CAAC,8BAA8B,CAAC;YAC1C,CAAC;SACJ,CAAA;IACL,CAAC;IATD,eAAG,GAAH,cAAQ,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAU7C,QAAC;AAAD,CAAC,AAbD,IAaC;AAED;IAAgB,qBAAC;IAGb,WAAY,CAAO;QAAP,kBAAA,EAAA,OAAO;QAAnB,YACI,kBAAM,CAAC,CAAC,SAYX;QAfD,WAAK,GAAG,cAAM,OAAA,KAAI,EAAJ,CAAI,CAAC;QAKf,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC;YACtB,UAAU,CAAA;YACV,MAAM,CAAC;gBACH,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,cAAM,OAAA,KAAI,EAAJ,CAAI;gBACjB,GAAG,gBAAK,MAAM,CAAC,cAAc,CAAA,CAAC,CAAC;aAClC,CAAC;QACN,CAAC;QACD,IAAI;YACA,MAAM,CAAC,IAAI,CAAC;;IACpB,CAAC;IACL,QAAC;AAAD,CAAC,AAjBD,CAAgB,CAAC,GAiBhB"} \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.sourcemap.txt b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.sourcemap.txt new file mode 100644 index 0000000000000..5f41ab5630055 --- /dev/null +++ b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.sourcemap.txt @@ -0,0 +1,583 @@ +=================================================================== +JsFile: derivedClassConstructorWithExplicitReturns01.js +mapUrl: derivedClassConstructorWithExplicitReturns01.js.map +sourceRoot: +sources: derivedClassConstructorWithExplicitReturns01.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/derivedClassConstructorWithExplicitReturns01.js +sourceFile:derivedClassConstructorWithExplicitReturns01.ts +------------------------------------------------------------------- +>>>var __extends = (this && this.__extends) || function (d, b) { +>>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>>}; +>>>var C = (function () { +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(6, 1) Source(2, 1) + SourceIndex(0) +--- +>>> function C(value) { +1->^^^^ +2 > ^^^^^^^^^^^ +3 > ^^^^^ +4 > ^^^^^-> +1->class C { + > cProp = 10; + > + > foo() { return "this never gets used."; } + > + > +2 > constructor( +3 > value: number +1->Emitted(7, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(7, 16) Source(7, 17) + SourceIndex(0) +3 >Emitted(7, 21) Source(7, 30) + SourceIndex(0) +--- +>>> this.cProp = 10; +1->^^^^^^^^ +2 > ^^^^^^^^^^ +3 > ^^^ +4 > ^^ +5 > ^ +1-> +2 > cProp +3 > = +4 > 10 +5 > ; +1->Emitted(8, 9) Source(3, 5) + SourceIndex(0) +2 >Emitted(8, 19) Source(3, 10) + SourceIndex(0) +3 >Emitted(8, 22) Source(3, 13) + SourceIndex(0) +4 >Emitted(8, 24) Source(3, 15) + SourceIndex(0) +5 >Emitted(8, 25) Source(3, 16) + SourceIndex(0) +--- +>>> return { +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^-> +1 > + > + > foo() { return "this never gets used."; } + > + > constructor(value: number) { + > +2 > return +3 > +1 >Emitted(9, 9) Source(8, 9) + SourceIndex(0) +2 >Emitted(9, 15) Source(8, 15) + SourceIndex(0) +3 >Emitted(9, 16) Source(8, 16) + SourceIndex(0) +--- +>>> cProp: value, +1->^^^^^^^^^^^^ +2 > ^^^^^ +3 > ^^ +4 > ^^^^^ +5 > ^^^^^^^-> +1->{ + > +2 > cProp +3 > : +4 > value +1->Emitted(10, 13) Source(9, 13) + SourceIndex(0) +2 >Emitted(10, 18) Source(9, 18) + SourceIndex(0) +3 >Emitted(10, 20) Source(9, 20) + SourceIndex(0) +4 >Emitted(10, 25) Source(9, 25) + SourceIndex(0) +--- +>>> foo: function () { +1->^^^^^^^^^^^^ +2 > ^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->, + > +2 > foo +1->Emitted(11, 13) Source(10, 13) + SourceIndex(0) +2 >Emitted(11, 16) Source(10, 16) + SourceIndex(0) +--- +>>> return "well this looks kinda C-ish."; +1->^^^^^^^^^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +1->() { + > +2 > return +3 > +4 > "well this looks kinda C-ish." +5 > ; +1->Emitted(12, 17) Source(11, 17) + SourceIndex(0) +2 >Emitted(12, 23) Source(11, 23) + SourceIndex(0) +3 >Emitted(12, 24) Source(11, 24) + SourceIndex(0) +4 >Emitted(12, 54) Source(11, 54) + SourceIndex(0) +5 >Emitted(12, 55) Source(11, 55) + SourceIndex(0) +--- +>>> } +1 >^^^^^^^^^^^^ +2 > ^ +1 > + > +2 > } +1 >Emitted(13, 13) Source(12, 13) + SourceIndex(0) +2 >Emitted(13, 14) Source(12, 14) + SourceIndex(0) +--- +>>> }; +1 >^^^^^^^^^ +2 > ^ +1 > + > } +2 > +1 >Emitted(14, 10) Source(13, 10) + SourceIndex(0) +2 >Emitted(14, 11) Source(13, 10) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 > } +1 >Emitted(15, 5) Source(14, 5) + SourceIndex(0) +2 >Emitted(15, 6) Source(14, 6) + SourceIndex(0) +--- +>>> C.prototype.foo = function () { return "this never gets used."; }; +1->^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^ +9 > ^ +10> ^ +1-> +2 > foo +3 > +4 > foo() { +5 > return +6 > +7 > "this never gets used." +8 > ; +9 > +10> } +1->Emitted(16, 5) Source(5, 5) + SourceIndex(0) +2 >Emitted(16, 20) Source(5, 8) + SourceIndex(0) +3 >Emitted(16, 23) Source(5, 5) + SourceIndex(0) +4 >Emitted(16, 37) Source(5, 13) + SourceIndex(0) +5 >Emitted(16, 43) Source(5, 19) + SourceIndex(0) +6 >Emitted(16, 44) Source(5, 20) + SourceIndex(0) +7 >Emitted(16, 67) Source(5, 43) + SourceIndex(0) +8 >Emitted(16, 68) Source(5, 44) + SourceIndex(0) +9 >Emitted(16, 69) Source(5, 45) + SourceIndex(0) +10>Emitted(16, 70) Source(5, 46) + SourceIndex(0) +--- +>>> return C; +1 >^^^^ +2 > ^^^^^^^^ +1 > + > + > constructor(value: number) { + > return { + > cProp: value, + > foo() { + > return "well this looks kinda C-ish."; + > } + > } + > } + > +2 > } +1 >Emitted(17, 5) Source(15, 1) + SourceIndex(0) +2 >Emitted(17, 13) Source(15, 2) + SourceIndex(0) +--- +>>>}()); +1 > +2 >^ +3 > +4 > ^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class C { + > cProp = 10; + > + > foo() { return "this never gets used."; } + > + > constructor(value: number) { + > return { + > cProp: value, + > foo() { + > return "well this looks kinda C-ish."; + > } + > } + > } + > } +1 >Emitted(18, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(18, 2) Source(15, 2) + SourceIndex(0) +3 >Emitted(18, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(18, 6) Source(15, 2) + SourceIndex(0) +--- +>>>var D = (function (_super) { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(19, 1) Source(17, 1) + SourceIndex(0) +--- +>>> __extends(D, _super); +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +1->class D extends +2 > C +1->Emitted(20, 5) Source(17, 17) + SourceIndex(0) +2 >Emitted(20, 26) Source(17, 18) + SourceIndex(0) +--- +>>> function D(a) { +1 >^^^^ +2 > ^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^-> +1 > { + > dProp = () => this; + > + > +2 > constructor( +3 > a = 100 +1 >Emitted(21, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(21, 16) Source(20, 17) + SourceIndex(0) +3 >Emitted(21, 17) Source(20, 24) + SourceIndex(0) +--- +>>> if (a === void 0) { a = 100; } +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^ +5 > ^^^^^^^^^^^^^^^-> +1-> +2 > +3 > +4 > a = 100 +1->Emitted(22, 9) Source(20, 17) + SourceIndex(0) +2 >Emitted(22, 27) Source(20, 17) + SourceIndex(0) +3 >Emitted(22, 29) Source(20, 17) + SourceIndex(0) +4 >Emitted(22, 36) Source(20, 24) + SourceIndex(0) +--- +>>> var _this = _super.call(this, a) || this; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^^^-> +1-> +2 > constructor(a = 100) { + > +3 > super( +4 > a +5 > ) +6 > ; + > + > if (Math.random() < 0.5) { + > "You win!" + > return { + > cProp: 1, + > dProp: () => this, + > foo() { return "You win!!!!!" } + > }; + > } + > else + > return null; + > } +1->Emitted(23, 9) Source(20, 5) + SourceIndex(0) +2 >Emitted(23, 21) Source(21, 9) + SourceIndex(0) +3 >Emitted(23, 39) Source(21, 15) + SourceIndex(0) +4 >Emitted(23, 40) Source(21, 16) + SourceIndex(0) +5 >Emitted(23, 41) Source(21, 17) + SourceIndex(0) +6 >Emitted(23, 50) Source(33, 6) + SourceIndex(0) +--- +>>> _this.dProp = function () { return _this; }; +1->^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^^^^^^ +6 > ^^^^^ +7 > ^^ +8 > ^ +9 > ^ +1-> +2 > dProp +3 > = +4 > () => +5 > +6 > this +7 > +8 > this +9 > ; +1->Emitted(24, 9) Source(18, 5) + SourceIndex(0) +2 >Emitted(24, 20) Source(18, 10) + SourceIndex(0) +3 >Emitted(24, 23) Source(18, 13) + SourceIndex(0) +4 >Emitted(24, 37) Source(18, 19) + SourceIndex(0) +5 >Emitted(24, 44) Source(18, 19) + SourceIndex(0) +6 >Emitted(24, 49) Source(18, 23) + SourceIndex(0) +7 >Emitted(24, 51) Source(18, 19) + SourceIndex(0) +8 >Emitted(24, 52) Source(18, 23) + SourceIndex(0) +9 >Emitted(24, 53) Source(18, 24) + SourceIndex(0) +--- +>>> if (Math.random() < 0.5) { +1 >^^^^^^^^ +2 > ^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^ +10> ^^^ +11> ^ +12> ^ +13> ^ +1 > + > + > constructor(a = 100) { + > super(a); + > + > +2 > if +3 > +4 > ( +5 > Math +6 > . +7 > random +8 > () +9 > < +10> 0.5 +11> ) +12> +13> { +1 >Emitted(25, 9) Source(23, 9) + SourceIndex(0) +2 >Emitted(25, 11) Source(23, 11) + SourceIndex(0) +3 >Emitted(25, 12) Source(23, 12) + SourceIndex(0) +4 >Emitted(25, 13) Source(23, 13) + SourceIndex(0) +5 >Emitted(25, 17) Source(23, 17) + SourceIndex(0) +6 >Emitted(25, 18) Source(23, 18) + SourceIndex(0) +7 >Emitted(25, 24) Source(23, 24) + SourceIndex(0) +8 >Emitted(25, 26) Source(23, 26) + SourceIndex(0) +9 >Emitted(25, 29) Source(23, 29) + SourceIndex(0) +10>Emitted(25, 32) Source(23, 32) + SourceIndex(0) +11>Emitted(25, 33) Source(23, 33) + SourceIndex(0) +12>Emitted(25, 34) Source(23, 34) + SourceIndex(0) +13>Emitted(25, 35) Source(23, 35) + SourceIndex(0) +--- +>>> "You win!"; +1 >^^^^^^^^^^^^ +2 > ^^^^^^^^^^ +3 > ^ +1 > + > +2 > "You win!" +3 > +1 >Emitted(26, 13) Source(24, 13) + SourceIndex(0) +2 >Emitted(26, 23) Source(24, 23) + SourceIndex(0) +3 >Emitted(26, 24) Source(24, 23) + SourceIndex(0) +--- +>>> return { +1 >^^^^^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^-> +1 > + > +2 > return +3 > +1 >Emitted(27, 13) Source(25, 13) + SourceIndex(0) +2 >Emitted(27, 19) Source(25, 19) + SourceIndex(0) +3 >Emitted(27, 20) Source(25, 20) + SourceIndex(0) +--- +>>> cProp: 1, +1->^^^^^^^^^^^^^^^^ +2 > ^^^^^ +3 > ^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->{ + > +2 > cProp +3 > : +4 > 1 +1->Emitted(28, 17) Source(26, 17) + SourceIndex(0) +2 >Emitted(28, 22) Source(26, 22) + SourceIndex(0) +3 >Emitted(28, 24) Source(26, 24) + SourceIndex(0) +4 >Emitted(28, 25) Source(26, 25) + SourceIndex(0) +--- +>>> dProp: function () { return _this; }, +1->^^^^^^^^^^^^^^^^ +2 > ^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^^^^^^ +6 > ^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^-> +1->, + > +2 > dProp +3 > : +4 > () => +5 > +6 > this +7 > +8 > this +1->Emitted(29, 17) Source(27, 17) + SourceIndex(0) +2 >Emitted(29, 22) Source(27, 22) + SourceIndex(0) +3 >Emitted(29, 24) Source(27, 24) + SourceIndex(0) +4 >Emitted(29, 38) Source(27, 30) + SourceIndex(0) +5 >Emitted(29, 45) Source(27, 30) + SourceIndex(0) +6 >Emitted(29, 50) Source(27, 34) + SourceIndex(0) +7 >Emitted(29, 52) Source(27, 30) + SourceIndex(0) +8 >Emitted(29, 53) Source(27, 34) + SourceIndex(0) +--- +>>> foo: function () { return "You win!!!!!"; } +1->^^^^^^^^^^^^^^^^ +2 > ^^^ +3 > ^^^^^^^^^^^^^^^^ +4 > ^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +9 > ^ +1->, + > +2 > foo +3 > () { +4 > return +5 > +6 > "You win!!!!!" +7 > +8 > +9 > } +1->Emitted(30, 17) Source(28, 17) + SourceIndex(0) +2 >Emitted(30, 20) Source(28, 20) + SourceIndex(0) +3 >Emitted(30, 36) Source(28, 25) + SourceIndex(0) +4 >Emitted(30, 42) Source(28, 31) + SourceIndex(0) +5 >Emitted(30, 43) Source(28, 32) + SourceIndex(0) +6 >Emitted(30, 57) Source(28, 46) + SourceIndex(0) +7 >Emitted(30, 58) Source(28, 46) + SourceIndex(0) +8 >Emitted(30, 59) Source(28, 47) + SourceIndex(0) +9 >Emitted(30, 60) Source(28, 48) + SourceIndex(0) +--- +>>> }; +1 >^^^^^^^^^^^^^ +2 > ^ +1 > + > } +2 > ; +1 >Emitted(31, 14) Source(29, 14) + SourceIndex(0) +2 >Emitted(31, 15) Source(29, 15) + SourceIndex(0) +--- +>>> } +1 >^^^^^^^^ +2 > ^ +3 > ^^^^-> +1 > + > +2 > } +1 >Emitted(32, 9) Source(30, 9) + SourceIndex(0) +2 >Emitted(32, 10) Source(30, 10) + SourceIndex(0) +--- +>>> else +1->^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^-> +1-> + > +2 > else +1->Emitted(33, 9) Source(31, 9) + SourceIndex(0) +2 >Emitted(33, 13) Source(31, 13) + SourceIndex(0) +--- +>>> return null; +1->^^^^^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +1-> + > +2 > return +3 > +4 > null +5 > ; +1->Emitted(34, 13) Source(32, 13) + SourceIndex(0) +2 >Emitted(34, 19) Source(32, 19) + SourceIndex(0) +3 >Emitted(34, 20) Source(32, 20) + SourceIndex(0) +4 >Emitted(34, 24) Source(32, 24) + SourceIndex(0) +5 >Emitted(34, 25) Source(32, 25) + SourceIndex(0) +--- +>>> return _this; +>>> } +1 >^^^^ +2 > ^ +3 > ^^^^^^^^^-> +1 > + > +2 > } +1 >Emitted(36, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(36, 6) Source(33, 6) + SourceIndex(0) +--- +>>> return D; +1->^^^^ +2 > ^^^^^^^^ +1-> + > +2 > } +1->Emitted(37, 5) Source(34, 1) + SourceIndex(0) +2 >Emitted(37, 13) Source(34, 2) + SourceIndex(0) +--- +>>>}(C)); +1 > +2 >^ +3 > +4 > ^ +5 > ^ +6 > ^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class D extends +5 > C +6 > { + > dProp = () => this; + > + > constructor(a = 100) { + > super(a); + > + > if (Math.random() < 0.5) { + > "You win!" + > return { + > cProp: 1, + > dProp: () => this, + > foo() { return "You win!!!!!" } + > }; + > } + > else + > return null; + > } + > } +1 >Emitted(38, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(34, 2) + SourceIndex(0) +3 >Emitted(38, 2) Source(17, 1) + SourceIndex(0) +4 >Emitted(38, 3) Source(17, 17) + SourceIndex(0) +5 >Emitted(38, 4) Source(17, 18) + SourceIndex(0) +6 >Emitted(38, 7) Source(34, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=derivedClassConstructorWithExplicitReturns01.js.map \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.symbols b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.symbols new file mode 100644 index 0000000000000..ee043fcfe712d --- /dev/null +++ b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.symbols @@ -0,0 +1,66 @@ +=== tests/cases/compiler/derivedClassConstructorWithExplicitReturns01.ts === + +class C { +>C : Symbol(C, Decl(derivedClassConstructorWithExplicitReturns01.ts, 0, 0)) + + cProp = 10; +>cProp : Symbol(C.cProp, Decl(derivedClassConstructorWithExplicitReturns01.ts, 1, 9)) + + foo() { return "this never gets used."; } +>foo : Symbol(C.foo, Decl(derivedClassConstructorWithExplicitReturns01.ts, 2, 15)) + + constructor(value: number) { +>value : Symbol(value, Decl(derivedClassConstructorWithExplicitReturns01.ts, 6, 16)) + + return { + cProp: value, +>cProp : Symbol(cProp, Decl(derivedClassConstructorWithExplicitReturns01.ts, 7, 16)) +>value : Symbol(value, Decl(derivedClassConstructorWithExplicitReturns01.ts, 6, 16)) + + foo() { +>foo : Symbol(foo, Decl(derivedClassConstructorWithExplicitReturns01.ts, 8, 25)) + + return "well this looks kinda C-ish."; + } + } + } +} + +class D extends C { +>D : Symbol(D, Decl(derivedClassConstructorWithExplicitReturns01.ts, 14, 1)) +>C : Symbol(C, Decl(derivedClassConstructorWithExplicitReturns01.ts, 0, 0)) + + dProp = () => this; +>dProp : Symbol(D.dProp, Decl(derivedClassConstructorWithExplicitReturns01.ts, 16, 19)) +>this : Symbol(D, Decl(derivedClassConstructorWithExplicitReturns01.ts, 14, 1)) + + constructor(a = 100) { +>a : Symbol(a, Decl(derivedClassConstructorWithExplicitReturns01.ts, 19, 16)) + + super(a); +>super : Symbol(C, Decl(derivedClassConstructorWithExplicitReturns01.ts, 0, 0)) +>a : Symbol(a, Decl(derivedClassConstructorWithExplicitReturns01.ts, 19, 16)) + + if (Math.random() < 0.5) { +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) + + "You win!" + return { + cProp: 1, +>cProp : Symbol(cProp, Decl(derivedClassConstructorWithExplicitReturns01.ts, 24, 20)) + + dProp: () => this, +>dProp : Symbol(dProp, Decl(derivedClassConstructorWithExplicitReturns01.ts, 25, 25)) +>this : Symbol(D, Decl(derivedClassConstructorWithExplicitReturns01.ts, 14, 1)) + + foo() { return "You win!!!!!" } +>foo : Symbol(foo, Decl(derivedClassConstructorWithExplicitReturns01.ts, 26, 34)) + + }; + } + else + return null; + } +} diff --git a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types new file mode 100644 index 0000000000000..aa3b1ec7fbf47 --- /dev/null +++ b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types @@ -0,0 +1,85 @@ +=== tests/cases/compiler/derivedClassConstructorWithExplicitReturns01.ts === + +class C { +>C : C + + cProp = 10; +>cProp : number +>10 : number + + foo() { return "this never gets used."; } +>foo : () => string +>"this never gets used." : string + + constructor(value: number) { +>value : number + + return { +>{ cProp: value, foo() { return "well this looks kinda C-ish."; } } : { cProp: number; foo(): string; } + + cProp: value, +>cProp : number +>value : number + + foo() { +>foo : () => string + + return "well this looks kinda C-ish."; +>"well this looks kinda C-ish." : string + } + } + } +} + +class D extends C { +>D : D +>C : C + + dProp = () => this; +>dProp : () => this +>() => this : () => this +>this : this + + constructor(a = 100) { +>a : number +>100 : number + + super(a); +>super(a) : void +>super : typeof C +>a : number + + if (Math.random() < 0.5) { +>Math.random() < 0.5 : boolean +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number +>0.5 : number + + "You win!" +>"You win!" : string + + return { +>{ cProp: 1, dProp: () => this, foo() { return "You win!!!!!" } } : { cProp: number; dProp: () => this; foo(): string; } + + cProp: 1, +>cProp : number +>1 : number + + dProp: () => this, +>dProp : () => this +>() => this : () => this +>this : this + + foo() { return "You win!!!!!" } +>foo : () => string +>"You win!!!!!" : string + + }; + } + else + return null; +>null : null + } +} From c87a773a462daba914c05fcb28617d632847a02c Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 3 Sep 2016 01:10:38 -0700 Subject: [PATCH 17/39] Don't emit a return statement at the end in most useful cases. --- src/compiler/transformers/es6.ts | 34 +++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 44089326f7f1d..aa62af361dba8 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -804,7 +804,9 @@ namespace ts { addRange(statements, body); } - if (extendsClauseElement) { + // 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 && !(constructor && isSufficientlyCoveredByReturnStatements(constructor.body))) { statements.push( createReturn( createIdentifier("_this") @@ -833,6 +835,36 @@ namespace ts { return constructor => visitNodes(constructor.body.statements, visitor, isStatement, /*start*/ offset); } + /** + * We want to try to avoid emitting a return statement in certain cases if a user already returned something. + * It would be pointless and generate dead code, so we'll try to make things a little bit prettier + * by doing a minimal check on whether some common patterns always explicitly return. + */ + function isSufficientlyCoveredByReturnStatements(statement: Statement): boolean { + // A return statement is considered covered. + if (statement.kind === SyntaxKind.ReturnStatement) { + return true; + } + + // An if-statement with two covered branches is covered. + else if (statement.kind === SyntaxKind.IfStatement) { + const ifStatement = statement as IfStatement; + if (ifStatement.elseStatement) { + return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && + isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); + } + } + // A block is covered if it has a last statement which is covered. + else if (statement.kind === SyntaxKind.Block) { + const lastStatement = lastOrUndefined((statement as Block).statements); + if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { + return true; + } + } + + return false; + } + /** * Adds a synthesized call to `_super` if it is needed. * From d144665b4f6637b8184725c74a7b60e894b81617 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 3 Sep 2016 01:13:58 -0700 Subject: [PATCH 18/39] Accepted baselines. --- tests/baselines/reference/classExtendsNull.js | 2 -- ...ctorFunctionTypeIsAssignableToBaseType2.js | 1 - ...edClassConstructorWithExplicitReturns01.js | 1 - ...assConstructorWithExplicitReturns01.js.map | 2 +- ...tructorWithExplicitReturns01.sourcemap.txt | 21 +++++++++---------- .../reference/returnInConstructor1.js | 2 -- 6 files changed, 11 insertions(+), 18 deletions(-) diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index a820b525aabb1..1eeb5172caddb 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -23,7 +23,6 @@ var C = (function (_super) { function C() { var _this = _super.call(this) || this; return Object.create(null); - return _this; } return C; }(null)); @@ -32,7 +31,6 @@ var D = (function (_super) { function D() { var _this; return Object.create(null); - return _this; } return D; }(null)); diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index 1ae239430c700..a60eb4de05662 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -58,7 +58,6 @@ var Derived2 = (function (_super) { function Derived2(x) { var _this = _super.call(this, x) || this; return 1; - return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js index de1e409b55fc7..4ab447d8e3231 100644 --- a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js +++ b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js @@ -69,7 +69,6 @@ var D = (function (_super) { } else return null; - return _this; } return D; }(C)); diff --git a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js.map b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js.map index dd7aedd1a9863..8b9037e40c95f 100644 --- a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js.map +++ b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.js.map @@ -1,2 +1,2 @@ //// [derivedClassConstructorWithExplicitReturns01.js.map] -{"version":3,"file":"derivedClassConstructorWithExplicitReturns01.js","sourceRoot":"","sources":["derivedClassConstructorWithExplicitReturns01.ts"],"names":[],"mappings":";;;;;AACA;IAKI,WAAY,KAAa;QAJzB,UAAK,GAAG,EAAE,CAAC;QAKP,MAAM,CAAC;YACH,KAAK,EAAE,KAAK;YACZ,GAAG;gBACC,MAAM,CAAC,8BAA8B,CAAC;YAC1C,CAAC;SACJ,CAAA;IACL,CAAC;IATD,eAAG,GAAH,cAAQ,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAU7C,QAAC;AAAD,CAAC,AAbD,IAaC;AAED;IAAgB,qBAAC;IAGb,WAAY,CAAO;QAAP,kBAAA,EAAA,OAAO;QAAnB,YACI,kBAAM,CAAC,CAAC,SAYX;QAfD,WAAK,GAAG,cAAM,OAAA,KAAI,EAAJ,CAAI,CAAC;QAKf,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC;YACtB,UAAU,CAAA;YACV,MAAM,CAAC;gBACH,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,cAAM,OAAA,KAAI,EAAJ,CAAI;gBACjB,GAAG,gBAAK,MAAM,CAAC,cAAc,CAAA,CAAC,CAAC;aAClC,CAAC;QACN,CAAC;QACD,IAAI;YACA,MAAM,CAAC,IAAI,CAAC;;IACpB,CAAC;IACL,QAAC;AAAD,CAAC,AAjBD,CAAgB,CAAC,GAiBhB"} \ No newline at end of file +{"version":3,"file":"derivedClassConstructorWithExplicitReturns01.js","sourceRoot":"","sources":["derivedClassConstructorWithExplicitReturns01.ts"],"names":[],"mappings":";;;;;AACA;IAKI,WAAY,KAAa;QAJzB,UAAK,GAAG,EAAE,CAAC;QAKP,MAAM,CAAC;YACH,KAAK,EAAE,KAAK;YACZ,GAAG;gBACC,MAAM,CAAC,8BAA8B,CAAC;YAC1C,CAAC;SACJ,CAAA;IACL,CAAC;IATD,eAAG,GAAH,cAAQ,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAU7C,QAAC;AAAD,CAAC,AAbD,IAaC;AAED;IAAgB,qBAAC;IAGb,WAAY,CAAO;QAAP,kBAAA,EAAA,OAAO;QAAnB,YACI,kBAAM,CAAC,CAAC,SAYX;QAfD,WAAK,GAAG,cAAM,OAAA,KAAI,EAAJ,CAAI,CAAC;QAKf,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC;YACtB,UAAU,CAAA;YACV,MAAM,CAAC;gBACH,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,cAAM,OAAA,KAAI,EAAJ,CAAI;gBACjB,GAAG,gBAAK,MAAM,CAAC,cAAc,CAAA,CAAC,CAAC;aAClC,CAAC;QACN,CAAC;QACD,IAAI;YACA,MAAM,CAAC,IAAI,CAAC;IACpB,CAAC;IACL,QAAC;AAAD,CAAC,AAjBD,CAAgB,CAAC,GAiBhB"} \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.sourcemap.txt b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.sourcemap.txt index 5f41ab5630055..d452115ceb70e 100644 --- a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.sourcemap.txt +++ b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.sourcemap.txt @@ -522,7 +522,6 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 4 >Emitted(34, 24) Source(32, 24) + SourceIndex(0) 5 >Emitted(34, 25) Source(32, 25) + SourceIndex(0) --- ->>> return _this; >>> } 1 >^^^^ 2 > ^ @@ -530,8 +529,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(36, 5) Source(33, 5) + SourceIndex(0) -2 >Emitted(36, 6) Source(33, 6) + SourceIndex(0) +1 >Emitted(35, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(35, 6) Source(33, 6) + SourceIndex(0) --- >>> return D; 1->^^^^ @@ -539,8 +538,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > 2 > } -1->Emitted(37, 5) Source(34, 1) + SourceIndex(0) -2 >Emitted(37, 13) Source(34, 2) + SourceIndex(0) +1->Emitted(36, 5) Source(34, 1) + SourceIndex(0) +2 >Emitted(36, 13) Source(34, 2) + SourceIndex(0) --- >>>}(C)); 1 > @@ -573,11 +572,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > return null; > } > } -1 >Emitted(38, 1) Source(34, 1) + SourceIndex(0) -2 >Emitted(38, 2) Source(34, 2) + SourceIndex(0) -3 >Emitted(38, 2) Source(17, 1) + SourceIndex(0) -4 >Emitted(38, 3) Source(17, 17) + SourceIndex(0) -5 >Emitted(38, 4) Source(17, 18) + SourceIndex(0) -6 >Emitted(38, 7) Source(34, 2) + SourceIndex(0) +1 >Emitted(37, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(37, 2) Source(34, 2) + SourceIndex(0) +3 >Emitted(37, 2) Source(17, 1) + SourceIndex(0) +4 >Emitted(37, 3) Source(17, 17) + SourceIndex(0) +5 >Emitted(37, 4) Source(17, 18) + SourceIndex(0) +6 >Emitted(37, 7) Source(34, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=derivedClassConstructorWithExplicitReturns01.js.map \ No newline at end of file diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index 6c678db235880..a47fa7ed51357 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -125,7 +125,6 @@ var H = (function (_super) { function H() { var _this = _super.call(this) || this; return new G(); //error - return _this; } return H; }(F)); @@ -134,7 +133,6 @@ var I = (function (_super) { function I() { var _this = _super.call(this) || this; return new G(); - return _this; } return I; }(G)); From b476815f76eac2cbc3704fa91be5e22ef76fff8b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 6 Sep 2016 11:31:20 -0700 Subject: [PATCH 19/39] Added test for '_this'. --- .../underscoreThisInDerivedClass01.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/cases/compiler/underscoreThisInDerivedClass01.ts diff --git a/tests/cases/compiler/underscoreThisInDerivedClass01.ts b/tests/cases/compiler/underscoreThisInDerivedClass01.ts new file mode 100644 index 0000000000000..0d3f5849cb157 --- /dev/null +++ b/tests/cases/compiler/underscoreThisInDerivedClass01.ts @@ -0,0 +1,23 @@ +// @target es5 + +// Original test intent: +// When arrow functions capture 'this', the lexical 'this' owner +// currently captures 'this' using a variable named '_this'. +// That means that '_this' becomes a reserved identifier in certain places. +// +// Constructors have adopted the same identifier name ('_this') +// for capturing any potential return values from super calls, +// so we expect the same behavior. + +class C { + constructor() { + return {}; + } +} + +class D extends C { + constructor() { + var _this = "uh-oh?"; + super(); + } +} \ No newline at end of file From 230737fb95db3af9d3c686328cbf5130f7529992 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 6 Sep 2016 11:33:40 -0700 Subject: [PATCH 20/39] Accepted baselines. --- .../underscoreThisInDerivedClass01.js | 56 +++++++++++++++++++ .../underscoreThisInDerivedClass01.symbols | 32 +++++++++++ .../underscoreThisInDerivedClass01.types | 35 ++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 tests/baselines/reference/underscoreThisInDerivedClass01.js create mode 100644 tests/baselines/reference/underscoreThisInDerivedClass01.symbols create mode 100644 tests/baselines/reference/underscoreThisInDerivedClass01.types diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.js b/tests/baselines/reference/underscoreThisInDerivedClass01.js new file mode 100644 index 0000000000000..000176c213f48 --- /dev/null +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.js @@ -0,0 +1,56 @@ +//// [underscoreThisInDerivedClass01.ts] +// @target es5 + +// Original test intent: +// When arrow functions capture 'this', the lexical 'this' owner +// currently captures 'this' using a variable named '_this'. +// That means that '_this' becomes a reserved identifier in certain places. +// +// Constructors have adopted the same identifier name ('_this') +// for capturing any potential return values from super calls, +// so we expect the same behavior. + +class C { + constructor() { + return {}; + } +} + +class D extends C { + constructor() { + var _this = "uh-oh?"; + super(); + } +} + +//// [underscoreThisInDerivedClass01.js] +// @target es5 +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +// Original test intent: +// When arrow functions capture 'this', the lexical 'this' owner +// currently captures 'this' using a variable named '_this'. +// That means that '_this' becomes a reserved identifier in certain places. +// +// Constructors have adopted the same identifier name ('_this') +// for capturing any potential return values from super calls, +// so we expect the same behavior. +var C = (function () { + function C() { + return {}; + } + return C; +}()); +var D = (function (_super) { + __extends(D, _super); + function D() { + var _this; + var _this = "uh-oh?"; + _this = _super.call(this) || this; + return _this; + } + return D; +}(C)); diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.symbols b/tests/baselines/reference/underscoreThisInDerivedClass01.symbols new file mode 100644 index 0000000000000..c05cd4f6fc327 --- /dev/null +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.symbols @@ -0,0 +1,32 @@ +=== tests/cases/compiler/underscoreThisInDerivedClass01.ts === +// @target es5 + +// Original test intent: +// When arrow functions capture 'this', the lexical 'this' owner +// currently captures 'this' using a variable named '_this'. +// That means that '_this' becomes a reserved identifier in certain places. +// +// Constructors have adopted the same identifier name ('_this') +// for capturing any potential return values from super calls, +// so we expect the same behavior. + +class C { +>C : Symbol(C, Decl(underscoreThisInDerivedClass01.ts, 0, 0)) + + constructor() { + return {}; + } +} + +class D extends C { +>D : Symbol(D, Decl(underscoreThisInDerivedClass01.ts, 15, 1)) +>C : Symbol(C, Decl(underscoreThisInDerivedClass01.ts, 0, 0)) + + constructor() { + var _this = "uh-oh?"; +>_this : Symbol(_this, Decl(underscoreThisInDerivedClass01.ts, 19, 11)) + + super(); +>super : Symbol(C, Decl(underscoreThisInDerivedClass01.ts, 0, 0)) + } +} diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.types b/tests/baselines/reference/underscoreThisInDerivedClass01.types new file mode 100644 index 0000000000000..b07f3e0efbf8a --- /dev/null +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.types @@ -0,0 +1,35 @@ +=== tests/cases/compiler/underscoreThisInDerivedClass01.ts === +// @target es5 + +// Original test intent: +// When arrow functions capture 'this', the lexical 'this' owner +// currently captures 'this' using a variable named '_this'. +// That means that '_this' becomes a reserved identifier in certain places. +// +// Constructors have adopted the same identifier name ('_this') +// for capturing any potential return values from super calls, +// so we expect the same behavior. + +class C { +>C : C + + constructor() { + return {}; +>{} : {} + } +} + +class D extends C { +>D : D +>C : C + + constructor() { + var _this = "uh-oh?"; +>_this : string +>"uh-oh?" : string + + super(); +>super() : void +>super : typeof C + } +} From b11db57c3209f75feca0f98473ec24296b039e29 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 7 Sep 2016 12:23:06 -0700 Subject: [PATCH 21/39] Mark constructors as this-capturing if they are defined in a derived class. --- src/compiler/checker.ts | 6 +++++- src/compiler/utilities.ts | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 81f22e2f1921d..9cb18f7c48842 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9215,14 +9215,18 @@ namespace ts { let container = getSuperContainer(node, /*stopOnFunctions*/ true); let needToCaptureLexicalThis = false; + // adjust the container reference in case if super is used inside arrow functions with arbitrarily deep nesting if (!isCallExpression) { - // adjust the container reference in case if super is used inside arrow functions with arbitrary deep nesting while (container && container.kind === SyntaxKind.ArrowFunction) { container = getSuperContainer(container, /*stopOnFunctions*/ true); needToCaptureLexicalThis = languageVersion < ScriptTarget.ES6; } } + if (languageVersion < ScriptTarget.ES6 && container && container.kind === SyntaxKind.Constructor) { + needToCaptureLexicalThis = needToCaptureLexicalThis || !!getClassExtendsHeritageClauseElement(getContainingClass(container)); + } + const canUseSuperExpression = isLegalUsageOfSuperExpression(container); let nodeCheckFlag: NodeCheckFlags = 0; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 030a3a33871ad..5d10c3c4c6773 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1032,11 +1032,11 @@ namespace ts { } /** - * Given an super call\property node returns a closest node where either - * - super call\property is legal in the node and not legal in the parent node the node. + * Given an super call/property node, returns the closest node where + * - a super call/property access is legal in the node and not legal in the parent node the node. * i.e. super call is legal in constructor but not legal in the class body. - * - node is arrow function (so caller might need to call getSuperContainer in case it needs to climb higher) - * - super call\property is definitely illegal in the node (but might be legal in some subnode) + * - the container is an arrow function (so caller might need to call getSuperContainer again in case it needs to climb higher) + * - a super call/property is definitely illegal in the container (but might be legal in some subnode) * i.e. super property access is illegal in function declaration but can be legal in the statement list */ export function getSuperContainer(node: Node, stopOnFunctions: boolean): Node { From 3a5fb0cec6e7db434a12043909bc12bc5866a5ec Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 7 Sep 2016 17:10:49 -0700 Subject: [PATCH 22/39] Accepted baselines. --- .../noImplicitAnyMissingGetAccessor.js | 3 +- .../noImplicitAnyMissingSetAccessor.js | 3 +- .../underscoreThisInDerivedClass01.errors.txt | 29 +++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/underscoreThisInDerivedClass01.errors.txt diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index 69d98d4b0c6f8..d0e87aba25bf6 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -26,7 +26,8 @@ var Parent = (function () { var Child = (function (_super) { __extends(Child, _super); function Child() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(Child.prototype, "message", { set: function (str) { diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index 7ad703fd3b72d..1b4119227bc5c 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -25,7 +25,8 @@ var Parent = (function () { var Child = (function (_super) { __extends(Child, _super); function Child() { - _super.apply(this, arguments); + var _this = _super.apply(this, arguments) || this; + return _this; } Object.defineProperty(Child.prototype, "message", { get: function () { diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.errors.txt b/tests/baselines/reference/underscoreThisInDerivedClass01.errors.txt new file mode 100644 index 0000000000000..3828825cb6b82 --- /dev/null +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/underscoreThisInDerivedClass01.ts(20,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + +==== tests/cases/compiler/underscoreThisInDerivedClass01.ts (1 errors) ==== + // @target es5 + + // Original test intent: + // When arrow functions capture 'this', the lexical 'this' owner + // currently captures 'this' using a variable named '_this'. + // That means that '_this' becomes a reserved identifier in certain places. + // + // Constructors have adopted the same identifier name ('_this') + // for capturing any potential return values from super calls, + // so we expect the same behavior. + + class C { + constructor() { + return {}; + } + } + + class D extends C { + constructor() { + var _this = "uh-oh?"; + ~~~~~ +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + super(); + } + } \ No newline at end of file From f11c64648adb5f51decca90c2882d80ffbf93cf2 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 7 Sep 2016 17:30:51 -0700 Subject: [PATCH 23/39] Added missing semicolons. --- src/compiler/transformers/es6.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index aa62af361dba8..a419170769bff 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -2656,10 +2656,10 @@ namespace ts { createLogicalOr( resultingCall, actualThis - ) + ); return assignToCapturedThis ? createAssignment(createIdentifier("_this"), initializer) - : initializer + : initializer; } return resultingCall; } From 138e18c3c905c85b13a16e85f7f69e5c3a4d9e3e Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 19 Sep 2016 18:30:35 +0300 Subject: [PATCH 24/39] Accepted baselines. --- ...edClassConstructorWithExplicitReturns01.types | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types index aa3b1ec7fbf47..d361e783ef0fc 100644 --- a/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types +++ b/tests/baselines/reference/derivedClassConstructorWithExplicitReturns01.types @@ -5,11 +5,11 @@ class C { cProp = 10; >cProp : number ->10 : number +>10 : 10 foo() { return "this never gets used."; } >foo : () => string ->"this never gets used." : string +>"this never gets used." : "this never gets used." constructor(value: number) { >value : number @@ -25,7 +25,7 @@ class C { >foo : () => string return "well this looks kinda C-ish."; ->"well this looks kinda C-ish." : string +>"well this looks kinda C-ish." : "well this looks kinda C-ish." } } } @@ -42,7 +42,7 @@ class D extends C { constructor(a = 100) { >a : number ->100 : number +>100 : 100 super(a); >super(a) : void @@ -55,17 +55,17 @@ class D extends C { >Math.random : () => number >Math : Math >random : () => number ->0.5 : number +>0.5 : 0.5 "You win!" ->"You win!" : string +>"You win!" : "You win!" return { >{ cProp: 1, dProp: () => this, foo() { return "You win!!!!!" } } : { cProp: number; dProp: () => this; foo(): string; } cProp: 1, >cProp : number ->1 : number +>1 : 1 dProp: () => this, >dProp : () => this @@ -74,7 +74,7 @@ class D extends C { foo() { return "You win!!!!!" } >foo : () => string ->"You win!!!!!" : string +>"You win!!!!!" : "You win!!!!!" }; } From da298132048f58942a809561325a4bdd1d965aa1 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 19 Sep 2016 18:01:32 +0300 Subject: [PATCH 25/39] Added test and comment. --- src/compiler/checker.ts | 1 + .../compiler/underscoreThisInDerivedClass02.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/cases/compiler/underscoreThisInDerivedClass02.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7d007950c93e5..20fb56870dac0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9322,6 +9322,7 @@ namespace ts { } } + // Even if 'super' isn't ever actually called, we may need to capture 'this' for a derived class. if (languageVersion < ScriptTarget.ES6 && container && container.kind === SyntaxKind.Constructor) { needToCaptureLexicalThis = needToCaptureLexicalThis || !!getClassExtendsHeritageClauseElement(getContainingClass(container)); } diff --git a/tests/cases/compiler/underscoreThisInDerivedClass02.ts b/tests/cases/compiler/underscoreThisInDerivedClass02.ts new file mode 100644 index 0000000000000..da197258a7348 --- /dev/null +++ b/tests/cases/compiler/underscoreThisInDerivedClass02.ts @@ -0,0 +1,17 @@ +// @target es5 + +// Original test intent: +// Errors on '_this' should be reported in derived constructors, +// even if 'super()' is not called. + +class C { + constructor() { + return {}; + } +} + +class D extends C { + constructor() { + var _this = "uh-oh?"; + } +} \ No newline at end of file From 60bcd7e0d009090170a7fa48580359cfb14e80c7 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 19 Sep 2016 18:05:34 +0300 Subject: [PATCH 26/39] Accepted baselines. --- .../underscoreThisInDerivedClass02.errors.txt | 25 +++++++++++ .../underscoreThisInDerivedClass02.js | 44 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt create mode 100644 tests/baselines/reference/underscoreThisInDerivedClass02.js diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt b/tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt new file mode 100644 index 0000000000000..f7e0494c884f6 --- /dev/null +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt @@ -0,0 +1,25 @@ +tests/cases/compiler/underscoreThisInDerivedClass02.ts(14,5): error TS2377: Constructors for derived classes must contain a 'super' call. + + +==== tests/cases/compiler/underscoreThisInDerivedClass02.ts (1 errors) ==== + // @target es5 + + // Original test intent: + // Errors on '_this' should be reported in derived constructors, + // even if 'super()' is not called. + + class C { + constructor() { + return {}; + } + } + + class D extends C { + constructor() { + ~~~~~~~~~~~~~~~ + var _this = "uh-oh?"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~ +!!! error TS2377: Constructors for derived classes must contain a 'super' call. + } \ No newline at end of file diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.js b/tests/baselines/reference/underscoreThisInDerivedClass02.js new file mode 100644 index 0000000000000..c1e9494376b53 --- /dev/null +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.js @@ -0,0 +1,44 @@ +//// [underscoreThisInDerivedClass02.ts] +// @target es5 + +// Original test intent: +// Errors on '_this' should be reported in derived constructors, +// even if 'super()' is not called. + +class C { + constructor() { + return {}; + } +} + +class D extends C { + constructor() { + var _this = "uh-oh?"; + } +} + +//// [underscoreThisInDerivedClass02.js] +// @target es5 +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +// Original test intent: +// Errors on '_this' should be reported in derived constructors, +// even if 'super()' is not called. +var C = (function () { + function C() { + return {}; + } + return C; +}()); +var D = (function (_super) { + __extends(D, _super); + function D() { + var _this; + var _this = "uh-oh?"; + return _this; + } + return D; +}(C)); From 5b3a93db2fca4f8197dee1b979a3e22b282da697 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 19 Sep 2016 18:29:15 +0300 Subject: [PATCH 27/39] Always mark derived constructors as 'this'-capturing. --- src/compiler/checker.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 20fb56870dac0..29270628fb073 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9322,11 +9322,6 @@ namespace ts { } } - // Even if 'super' isn't ever actually called, we may need to capture 'this' for a derived class. - if (languageVersion < ScriptTarget.ES6 && container && container.kind === SyntaxKind.Constructor) { - needToCaptureLexicalThis = needToCaptureLexicalThis || !!getClassExtendsHeritageClauseElement(getContainingClass(container)); - } - const canUseSuperExpression = isLegalUsageOfSuperExpression(container); let nodeCheckFlag: NodeCheckFlags = 0; @@ -14312,6 +14307,7 @@ namespace ts { // constructors of derived classes must contain at least one super call somewhere in their function body. const containingClassDecl = node.parent; if (getClassExtendsHeritageClauseElement(containingClassDecl)) { + captureLexicalThis(node.parent, containingClassDecl); const classExtendsNull = classDeclarationExtendsNull(containingClassDecl); const superCall = getSuperCallInConstructor(node); if (superCall) { From bc4cf6d3c06a7dbb6d5bffa728de163788c3d83f Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 19 Sep 2016 18:30:15 +0300 Subject: [PATCH 28/39] Accepted baselines. --- .../reference/underscoreThisInDerivedClass02.errors.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt b/tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt index f7e0494c884f6..5569ebf1af6fb 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.errors.txt @@ -1,7 +1,8 @@ tests/cases/compiler/underscoreThisInDerivedClass02.ts(14,5): error TS2377: Constructors for derived classes must contain a 'super' call. +tests/cases/compiler/underscoreThisInDerivedClass02.ts(15,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. -==== tests/cases/compiler/underscoreThisInDerivedClass02.ts (1 errors) ==== +==== tests/cases/compiler/underscoreThisInDerivedClass02.ts (2 errors) ==== // @target es5 // Original test intent: @@ -19,6 +20,8 @@ tests/cases/compiler/underscoreThisInDerivedClass02.ts(14,5): error TS2377: Cons ~~~~~~~~~~~~~~~ var _this = "uh-oh?"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. } ~~~~~ !!! error TS2377: Constructors for derived classes must contain a 'super' call. From dc58fb5558a29794cea65b0c5e6e684f2354a75e Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 20 Sep 2016 12:29:13 -0400 Subject: [PATCH 29/39] Immediately return the result of super calls when they are the first & last statement in a constructor. --- src/compiler/transformers/es6.ts | 119 +++++++++++++++++++++---------- 1 file changed, 83 insertions(+), 36 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 535e9162a3aba..5748739cb236f 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -139,6 +139,30 @@ namespace ts { loopOutParameters?: LoopOutParameter[]; } + const enum SuperCaptureResult { + /** + * A capture may have been added for calls to 'super', but + * the caller should emit subsequent statements normally. + */ + NoReplacement, + /** + * A call to 'super()' got replaced with a capturing statement like: + * + * var _this = _super.call(...) || this; + * + * Callers should skip the current statement. + */ + ReplaceSuperCapture, + /** + * A call to 'super()' got replaced with a capturing statement like: + * + * return _super.call(...) || this; + * + * Callers should skip the current statement and avoid any returns of '_this'. + */ + ReplaceWithReturn, +} + export function transformES6(context: TransformationContext) { const { startLexicalEnvironment, @@ -814,6 +838,7 @@ namespace ts { startLexicalEnvironment(); let statementOffset = -1; + let thisCaptureStatus: SuperCaptureResult | undefined; if (hasSynthesizedSuper) { // If a super call has already been synthesized, // we're going to assume that we should just transform everything after that. @@ -829,7 +854,11 @@ namespace ts { addDefaultValueAssignmentsIfNeeded(statements, constructor); addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper); Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!"); - statementOffset = declareOrCaptureThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, statementOffset); + + thisCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, statementOffset); + if (thisCaptureStatus === SuperCaptureResult.ReplaceSuperCapture || thisCaptureStatus === SuperCaptureResult.ReplaceWithReturn) { + statementOffset++; + } } addDefaultSuperCallIfNeeded(statements, constructor, extendsClauseElement, hasSynthesizedSuper); @@ -841,7 +870,9 @@ 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 && !(constructor && isSufficientlyCoveredByReturnStatements(constructor.body))) { + if (extendsClauseElement + && thisCaptureStatus !== SuperCaptureResult.ReplaceWithReturn + && !(constructor && isSufficientlyCoveredByReturnStatements(constructor.body))) { statements.push( createReturn( createIdentifier("_this") @@ -1190,45 +1221,61 @@ namespace ts { * * @returns The new statement offset into the `statements` array. */ - function declareOrCaptureThisForConstructorIfNeeded(statements: Statement[], ctor: ConstructorDeclaration, hasExtendsClause: boolean, firstNonPrologue: number) { - if (hasExtendsClause) { - // Most of the time, a 'super' call will be the first real statement in a constructor body. - // In these cases, we'd like to transform these into a *single* statement instead of a declaration - // followed by an assignment statement for '_this'. For instance, if we emitted without an initializer, - // we'd get: - // - // var _this; - // _this = super(); - // - // instead of - // - // var _this = super(); - // - let initializer: Expression = undefined; - let firstStatement: Statement; - if (firstNonPrologue < ctor.body.statements.length) { - firstStatement = ctor.body.statements[firstNonPrologue]; - - if (firstStatement.kind === SyntaxKind.ExpressionStatement && isSuperCallExpression((firstStatement as ExpressionStatement).expression)) { - const superCall = (firstStatement as ExpressionStatement).expression as CallExpression; - initializer = setOriginalNode( - saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), - superCall - ); - } - } - captureThisForNode(statements, ctor, /*initializer*/ initializer, firstStatement); + function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements: Statement[], ctor: ConstructorDeclaration, hasExtendsClause: boolean, statementOffset: number) { + // If this isn't a derived class, just capture 'this' for arrow functions if necessary. + if (!hasExtendsClause) { + addCaptureThisForNodeIfNeeded(statements, ctor); + return SuperCaptureResult.NoReplacement; + } - // We're actually skipping an extra statement. Signal this to the caller. - if (initializer) { - return firstNonPrologue + 1; + // Most of the time, a 'super' call will be the first real statement in a constructor body. + // In these cases, we'd like to transform these into a *single* statement instead of a declaration + // followed by an assignment statement for '_this'. For instance, if we emitted without an initializer, + // we'd get: + // + // var _this; + // _this = _super.call(...) || this; + // + // instead of + // + // var _this = _super.call(...) || this; + // + // Additionally, if the 'super()' call is the last statement, we should just avoid capturing + // entirely and immediately return the result like so: + // + // return _super.call(...) || this; + // + let firstStatement: Statement; + let superCallExpression: Expression; + + const ctorStatements = ctor.body.statements; + if (statementOffset < ctorStatements.length) { + firstStatement = ctorStatements[statementOffset]; + + if (firstStatement.kind === SyntaxKind.ExpressionStatement && isSuperCallExpression((firstStatement as ExpressionStatement).expression)) { + const superCall = (firstStatement as ExpressionStatement).expression as CallExpression; + superCallExpression = setOriginalNode( + saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), + superCall + ); } } - else { - addCaptureThisForNodeIfNeeded(statements, ctor); + + // Return the result if we have an immediate super() call on the last statement. + if (superCallExpression && statementOffset === ctorStatements.length - 1) { + statements.push(createReturn(superCallExpression)); + return SuperCaptureResult.ReplaceWithReturn; + } + + // Perform the capture. + captureThisForNode(statements, ctor, superCallExpression, firstStatement); + + // If we're actually replacing the original statement, we need to signal this to the caller. + if (superCallExpression) { + return SuperCaptureResult.ReplaceSuperCapture; } - return firstNonPrologue; + return SuperCaptureResult.NoReplacement; } /** From cd787cc1c2effa78d5877dd7d642e03a9d2484c3 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 20 Sep 2016 12:29:32 -0400 Subject: [PATCH 30/39] Accepted baselines. --- .../reference/arrowFunctionContexts.js | 6 ++-- tests/baselines/reference/baseCheck.js | 6 ++-- .../reference/captureThisInSuperCall.js | 3 +- .../reference/checkForObjectTooStrict.js | 6 ++-- .../checkSuperCallBeforeThisAccessing5.js | 3 +- .../checkSuperCallBeforeThisAccessing7.js | 3 +- .../reference/classSideInheritance2.js | 3 +- .../reference/classSideInheritance3.js | 3 +- tests/baselines/reference/classUpdateTests.js | 3 +- .../reference/collisionSuperAndParameter.js | 3 +- ...perAndPropertyNameAsConstuctorParameter.js | 6 ++-- .../reference/commentsInheritance.js | 3 +- ...ctorFunctionTypeIsAssignableToBaseType2.js | 3 +- .../reference/constructorOverloads2.js | 3 +- .../reference/declFileGenericType2.js | 3 +- .../reference/decoratorOnClassConstructor2.js | 3 +- .../reference/decoratorOnClassConstructor3.js | 3 +- .../derivedClassOverridesPrivateFunction1.js | 3 +- .../derivedClassOverridesProtectedMembers.js | 3 +- .../derivedClassOverridesProtectedMembers2.js | 3 +- .../derivedClassOverridesProtectedMembers3.js | 30 +++++++------------ .../derivedClassOverridesPublicMembers.js | 3 +- .../derivedClassSuperCallsWithThisArg.js | 3 +- .../destructuringParameterDeclaration5.js | 6 ++-- tests/baselines/reference/es6ClassTest2.js | 3 +- ...cClassPropertyInheritanceSpecialization.js | 3 +- ...genericConstraintOnExtendedBuiltinTypes.js | 3 +- ...enericConstraintOnExtendedBuiltinTypes2.js | 3 +- .../reference/genericTypeConstraints.js | 3 +- .../missingPropertiesOfClassExpression.js | 3 +- .../reference/optionalParamArgsTest.js | 3 +- .../baselines/reference/parserRealSource11.js | 21 +++++-------- tests/baselines/reference/parserharness.js | 3 +- .../reference/strictModeInConstructor.js | 3 +- .../superCallBeforeThisAccessing2.js | 3 +- .../superCallBeforeThisAccessing6.js | 3 +- ...allFromClassThatDerivesFromGenericType1.js | 3 +- ...allFromClassThatDerivesFromGenericType2.js | 3 +- ...eButWithIncorrectNumberOfTypeArguments1.js | 3 +- ...sFromGenericTypeButWithNoTypeArguments1.js | 3 +- ...ivesNonGenericTypeButWithTypeArguments1.js | 3 +- .../superCallInsideClassDeclaration.js | 3 +- .../superCallInsideClassExpression.js | 3 +- .../superCallParameterContextualTyping1.js | 3 +- .../superCallParameterContextualTyping2.js | 3 +- .../superWithGenericSpecialization.js | 3 +- .../baselines/reference/superWithGenerics.js | 3 +- .../reference/targetTypeBaseCalls.js | 3 +- .../reference/thisInInvalidContexts.js | 3 +- .../thisInInvalidContextsExternalModule.js | 3 +- tests/baselines/reference/thisInSuperCall.js | 3 +- tests/baselines/reference/thisInSuperCall2.js | 3 +- tests/baselines/reference/unknownSymbols1.js | 3 +- .../reference/validUseOfThisInSuper.js | 3 +- 54 files changed, 74 insertions(+), 148 deletions(-) diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index 1af0797b41fde..64727398f7259 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -116,8 +116,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.call(this, function () { return _this; }) || this; - return _this; + return _super.call(this, function () { return _this; }) || this; } return Derived; }(Base)); @@ -158,8 +157,7 @@ var M2; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.call(this, function () { return _this; }) || this; - return _this; + return _super.call(this, function () { return _this; }) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 623cd152b9a5d..870f811c09fa6 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -43,16 +43,14 @@ var C = (function () { var ELoc = (function (_super) { __extends(ELoc, _super); function ELoc(x) { - var _this = _super.call(this, 0, x) || this; - return _this; + return _super.call(this, 0, x) || this; } return ELoc; }(C)); var ELocVar = (function (_super) { __extends(ELocVar, _super); function ELocVar(x) { - var _this = _super.call(this, 0, loc) || this; - return _this; + return _super.call(this, 0, loc) || this; } ELocVar.prototype.m = function () { var loc = 10; diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 069871f598e88..2c4df5db96151 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -22,8 +22,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.call(this, { test: function () { return _this.someMethod(); } }) || this; - return _this; + return _super.call(this, { test: function () { return _this.someMethod(); } }) || this; } B.prototype.someMethod = function () { }; return B; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index 156608bd6b5d7..ade99e9319b39 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -49,16 +49,14 @@ var Foo; var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return Bar; }(Foo.Object)); var Baz = (function (_super) { __extends(Baz, _super); function Baz() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return Baz; }(Object)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index 3174bebd11db4..8c7f18b77f617 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -25,8 +25,7 @@ var Based = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.call(this, _this.x) || this; - return _this; + return _super.call(this, this.x) || this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index 364aed4d4b079..ca12c16e047ad 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -23,8 +23,7 @@ var Base = (function () { var Super = (function (_super) { __extends(Super, _super); function Super() { - var _this = _super.call(this, (function () { return _this; })) || this; - return _this; + return _super.call(this, (function () { return _this; })) || this; } return Super; }(Base)); diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index 475f9bd4ceb53..67ee666749b75 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -29,8 +29,7 @@ var __extends = (this && this.__extends) || function (d, b) { var SubText = (function (_super) { __extends(SubText, _super); function SubText(text, span) { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return SubText; }(TextBase)); diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 361378c3ff518..589dd81c5c693 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -42,8 +42,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C(x) { - var _this = _super.call(this, x) || this; - return _this; + return _super.call(this, x) || this; } return C; }(A)); diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 9809966c4c26f..53ef71d0e4be7 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -189,8 +189,7 @@ var H = (function () { var I = (function (_super) { __extends(I, _super); function I() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } // ERROR - no super call allowed return I; }(Object)); diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index 750ae15ef0aef..f5765043c5502 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -124,8 +124,7 @@ var Foo2 = (function (_super) { var Foo4 = (function (_super) { __extends(Foo4, _super); function Foo4(_super) { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } Foo4.prototype.y = function (_super) { var _this = this; diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 269881b3b90ce..5fa7fe290914e 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -44,8 +44,7 @@ var a = (function () { var b1 = (function (_super) { __extends(b1, _super); function b1(_super) { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return b1; }(a)); @@ -61,8 +60,7 @@ var b2 = (function (_super) { var b3 = (function (_super) { __extends(b3, _super); function b3(_super) { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return b3; }(a)); diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index 294f3a3369054..a8a8d5fa8899b 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -227,8 +227,7 @@ var c2 = (function () { var c3 = (function (_super) { __extends(c3, _super); function c3() { - var _this = _super.call(this, 10) || this; - return _this; + return _super.call(this, 10) || this; } /** c3 f1*/ c3.prototype.f1 = function () { diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index a60eb4de05662..c5e27748f5236 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -47,8 +47,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(x) { - var _this = _super.call(this, x) || this; - return _this; + return _super.call(this, x) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index c26d031656fa9..2d26194f2e764 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -40,8 +40,7 @@ var FooBase = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { - var _this = _super.call(this, x) || this; - return _this; + return _super.call(this, x) || this; } Foo.prototype.bar1 = function () { }; return Foo; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 328ab0cd9491b..a51254122ed06 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -58,8 +58,7 @@ var templa; var AbstractElementController = (function (_super) { __extends(AbstractElementController, _super); function AbstractElementController() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return AbstractElementController; }(templa.mvc.AbstractController)); diff --git a/tests/baselines/reference/decoratorOnClassConstructor2.js b/tests/baselines/reference/decoratorOnClassConstructor2.js index 44bde0a171d90..ce323e8ed1e71 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor2.js +++ b/tests/baselines/reference/decoratorOnClassConstructor2.js @@ -45,8 +45,7 @@ var _0_ts_2 = require("./0.ts"); var C = (function (_super) { __extends(C, _super); function C(prop) { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return C; }(_0_ts_1.base)); diff --git a/tests/baselines/reference/decoratorOnClassConstructor3.js b/tests/baselines/reference/decoratorOnClassConstructor3.js index 5130986b1f78e..f06bf80b21ddd 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor3.js +++ b/tests/baselines/reference/decoratorOnClassConstructor3.js @@ -48,8 +48,7 @@ var _0_2 = require("./0"); var C = (function (_super) { __extends(C, _super); function C(prop) { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return C; }(_0_1.base)); diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index a0b1559d43089..981c072d47c68 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -32,8 +32,7 @@ var BaseClass = (function () { var DerivedClass = (function (_super) { __extends(DerivedClass, _super); function DerivedClass() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } DerivedClass.prototype._init = function () { }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index e86806d31d203..b8997769eb74c 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -66,8 +66,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(a) { - var _this = _super.call(this, x) || this; - return _this; + return _super.call(this, x) || this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 3035b2cb56fcb..ac9b401a45c4b 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -94,8 +94,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(a) { - var _this = _super.call(this, a) || this; - return _this; + return _super.call(this, a) || this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index 0e0c1c1ff01e7..d0d9d8fa0f58a 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -103,16 +103,14 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1(a) { - var _this = _super.call(this, a) || this; - return _this; + return _super.call(this, a) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2(a) { - var _this = _super.call(this, a) || this; - return _this; + return _super.call(this, a) || this; } Derived2.prototype.b = function (a) { }; return Derived2; @@ -120,8 +118,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3(a) { - var _this = _super.call(this, a) || this; - return _this; + return _super.call(this, a) || this; } Object.defineProperty(Derived3.prototype, "c", { get: function () { return x; }, @@ -133,8 +130,7 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4(a) { - var _this = _super.call(this, a) || this; - return _this; + return _super.call(this, a) || this; } Object.defineProperty(Derived4.prototype, "c", { set: function (v) { }, @@ -146,24 +142,21 @@ var Derived4 = (function (_super) { var Derived5 = (function (_super) { __extends(Derived5, _super); function Derived5(a) { - var _this = _super.call(this, a) || this; - return _this; + return _super.call(this, a) || this; } return Derived5; }(Base)); var Derived6 = (function (_super) { __extends(Derived6, _super); function Derived6(a) { - var _this = _super.call(this, a) || this; - return _this; + return _super.call(this, a) || this; } return Derived6; }(Base)); var Derived7 = (function (_super) { __extends(Derived7, _super); function Derived7(a) { - var _this = _super.call(this, a) || this; - return _this; + return _super.call(this, a) || this; } Derived7.s = function (a) { }; return Derived7; @@ -171,8 +164,7 @@ var Derived7 = (function (_super) { var Derived8 = (function (_super) { __extends(Derived8, _super); function Derived8(a) { - var _this = _super.call(this, a) || this; - return _this; + return _super.call(this, a) || this; } Object.defineProperty(Derived8, "t", { get: function () { return x; }, @@ -184,8 +176,7 @@ var Derived8 = (function (_super) { var Derived9 = (function (_super) { __extends(Derived9, _super); function Derived9(a) { - var _this = _super.call(this, a) || this; - return _this; + return _super.call(this, a) || this; } Object.defineProperty(Derived9, "t", { set: function (v) { }, @@ -197,8 +188,7 @@ var Derived9 = (function (_super) { var Derived10 = (function (_super) { __extends(Derived10, _super); function Derived10(a) { - var _this = _super.call(this, a) || this; - return _this; + return _super.call(this, a) || this; } return Derived10; }(Base)); diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 703f1d4a833ea..92fbc07e77405 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -92,8 +92,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived(a) { - var _this = _super.call(this, x) || this; - return _this; + return _super.call(this, x) || this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 039e25919f8c9..504d414a6088c 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -42,8 +42,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.call(this, _this) || this; - return _this; + return _super.call(this, _this) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index 8781671853fcb..7ba178823df6f 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -65,8 +65,7 @@ var Class = (function () { var SubClass = (function (_super) { __extends(SubClass, _super); function SubClass() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return SubClass; }(Class)); @@ -78,8 +77,7 @@ var D = (function () { var SubD = (function (_super) { __extends(SubD, _super); function SubD() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return SubD; }(D)); diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 9217f89037731..b3787405ff74e 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -267,8 +267,7 @@ var SuperParent = (function () { var SuperChild = (function (_super) { __extends(SuperChild, _super); function SuperChild() { - var _this = _super.call(this, 1) || this; - return _this; + return _super.call(this, 1) || this; } SuperChild.prototype.b = function () { _super.prototype.b.call(this, 'str'); diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 86410aaf10e71..28eaf46496807 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -109,8 +109,7 @@ var PortalFx; var Validator = (function (_super) { __extends(Validator, _super); function Validator(message) { - var _this = _super.call(this, message) || this; - return _this; + return _super.call(this, message) || this; } return Validator; }(Portal.Controls.Validators.Validator)); diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index 582937e7c0a1a..b0974c26edefc 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -52,8 +52,7 @@ var EndGate; var NumberTween = (function (_super) { __extends(NumberTween, _super); function NumberTween(from) { - var _this = _super.call(this, from) || this; - return _this; + return _super.call(this, from) || this; } return NumberTween; }(Tweening.Tween)); diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index 88173a4cbe361..a403c0de0b3a5 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -51,8 +51,7 @@ var EndGate; var NumberTween = (function (_super) { __extends(NumberTween, _super); function NumberTween(from) { - var _this = _super.call(this, from) || this; - return _this; + return _super.call(this, from) || this; } return NumberTween; }(Tweening.Tween)); diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index b82e261a14f1d..67303166aa327 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -38,8 +38,7 @@ var Bar = (function () { var BarExtended = (function (_super) { __extends(BarExtended, _super); function BarExtended() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return BarExtended; }(Bar)); diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index 34b60940aa976..c7b30882b145e 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -15,8 +15,7 @@ var __extends = (this && this.__extends) || function (d, b) { var George = (function (_super) { __extends(George, _super); function George() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return George; }((function () { diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 374b0956509fc..1b603898aa698 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -162,8 +162,7 @@ var C2 = (function (_super) { __extends(C2, _super); function C2(v2) { if (v2 === void 0) { v2 = 6; } - var _this = _super.call(this, v2) || this; - return _this; + return _super.call(this, v2) || this; } return C2; }(C1)); diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index fd2c017b637e4..eb05d13f4ed43 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2667,8 +2667,7 @@ var TypeScript; var MissingIdentifier = (function (_super) { __extends(MissingIdentifier, _super); function MissingIdentifier() { - var _this = _super.call(this, "__missing") || this; - return _this; + return _super.call(this, "__missing") || this; } MissingIdentifier.prototype.isMissing = function () { return true; @@ -2707,8 +2706,7 @@ var TypeScript; var Expression = (function (_super) { __extends(Expression, _super); function Expression(nodeType) { - var _this = _super.call(this, nodeType) || this; - return _this; + return _super.call(this, nodeType) || this; } Expression.prototype.isExpression = function () { return true; }; Expression.prototype.isStatementOrExpression = function () { return true; }; @@ -3165,8 +3163,7 @@ var TypeScript; var ModuleElement = (function (_super) { __extends(ModuleElement, _super); function ModuleElement(nodeType) { - var _this = _super.call(this, nodeType) || this; - return _this; + return _super.call(this, nodeType) || this; } return ModuleElement; }(AST)); @@ -3259,8 +3256,7 @@ var TypeScript; var VarDecl = (function (_super) { __extends(VarDecl, _super); function VarDecl(id, nest) { - var _this = _super.call(this, id, NodeType.VarDecl, nest) || this; - return _this; + return _super.call(this, id, NodeType.VarDecl, nest) || this; } VarDecl.prototype.isAmbient = function () { return hasFlag(this.varFlags, VarFlags.Ambient); }; VarDecl.prototype.isExported = function () { return hasFlag(this.varFlags, VarFlags.Exported); }; @@ -3597,8 +3593,7 @@ var TypeScript; var InterfaceDeclaration = (function (_super) { __extends(InterfaceDeclaration, _super); function InterfaceDeclaration(name, members, extendsList, implementsList) { - var _this = _super.call(this, NodeType.InterfaceDeclaration, name, extendsList, implementsList, members) || this; - return _this; + return _super.call(this, NodeType.InterfaceDeclaration, name, extendsList, implementsList, members) || this; } InterfaceDeclaration.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckInterface(this); @@ -3992,8 +3987,7 @@ var TypeScript; var EndCode = (function (_super) { __extends(EndCode, _super); function EndCode() { - var _this = _super.call(this, NodeType.EndCode) || this; - return _this; + return _super.call(this, NodeType.EndCode) || this; } return EndCode; }(AST)); @@ -4650,8 +4644,7 @@ var TypeScript; var DebuggerStatement = (function (_super) { __extends(DebuggerStatement, _super); function DebuggerStatement() { - var _this = _super.call(this, NodeType.Debugger) || this; - return _this; + return _super.call(this, NodeType.Debugger) || this; } DebuggerStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 059ac2efd8ed6..14ce433817695 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2471,8 +2471,7 @@ var Harness; var Run = (function (_super) { __extends(Run, _super); function Run() { - var _this = _super.call(this, 'Test Run', null) || this; - return _this; + return _super.call(this, 'Test Run', null) || this; } Run.prototype.run = function () { emitLog('start'); diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index ecd6bacd20a7d..da45bda5c6efb 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -107,8 +107,7 @@ var Bs = (function (_super) { __extends(Bs, _super); function Bs() { "use strict"; // No error - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return Bs; }(A)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index 91cc3d28dd6ec..7331718a9edcf 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -24,8 +24,7 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.call(this, function () { _this._t; }) || this; - return _this; + return _super.call(this, function () { _this._t; }) || this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index 4eb8e5266c2c5..e4dfb3f714ad8 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -24,8 +24,7 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.call(this, _this) || this; - return _this; + return _super.call(this, this) || this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index 27f3db5145359..bc196299bf9c2 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -20,8 +20,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return D; }(B)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index a8d5e8008acd9..8a0ef085590dd 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -19,8 +19,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return D; }(B)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index b12a3eef6d43c..0529d5e3dc222 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -25,8 +25,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.call(this, function (value) { return String(value); }) || this; - return _this; + return _super.call(this, function (value) { return String(value); }) || this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index c78e6693f165d..fb08ec289028f 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -25,8 +25,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.call(this, function (value) { return String(value); }) || this; - return _this; + return _super.call(this, function (value) { return String(value); }) || this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index 32d2065dd3f1c..50153391f62a5 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -25,8 +25,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.call(this, function (value) { return String(value); }) || this; - return _this; + return _super.call(this, function (value) { return String(value); }) || this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index b696b4a302f40..05e44119608aa 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -39,8 +39,7 @@ var B = (function (_super) { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return D; }(C)); diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index 829311f237c34..3d55fe11cff49 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -39,8 +39,7 @@ var B = (function (_super) { var D = (function (_super) { __extends(class_1, _super); function class_1() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return class_1; }(C)); diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index 0fe27f493e811..d8491b4ee830a 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -28,8 +28,7 @@ var B = (function (_super) { __extends(B, _super); // Ensure 'value' is of type 'number (and not '{}') by using its 'toExponential()' method. function B() { - var _this = _super.call(this, function (value) { return String(value.toExponential()); }) || this; - return _this; + return _super.call(this, function (value) { return String(value.toExponential()); }) || this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index f970be44aff0c..9868a7db1240b 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -27,8 +27,7 @@ var C = (function (_super) { __extends(C, _super); // Ensure 'value' is not of type 'any' by invoking it with type arguments. function C() { - var _this = _super.call(this, function (value) { return String(value()); }) || this; - return _this; + return _super.call(this, function (value) { return String(value()); }) || this; } return C; }(A)); diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index 96303dab4eda3..a0381d0b944d8 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -28,8 +28,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return D; }(C)); diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index 36b485548716b..803f229bd4bd4 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -20,8 +20,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.call(this) || this; - return _this; + return _super.call(this) || this; } return D; }(B)); diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index 8581526c1b62f..cac93023a00e0 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -35,8 +35,7 @@ new Foo(function (s) { s = 5; }); // error, if types are applied correctly var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.call(this, function (s) { s = 5; }) || this; - return _this; + return _super.call(this, function (s) { s = 5; }) || this; } return Bar; }(Foo)); // error, if types are applied correctly diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 7872aa121edf9..7fcfaf9d3174d 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -70,8 +70,7 @@ var ClassWithNoInitializer = (function (_super) { __extends(ClassWithNoInitializer, _super); //'this' in optional super call function ClassWithNoInitializer() { - var _this = _super.call(this, _this) || this; - return _this; + return _super.call(this, _this) || this; } return ClassWithNoInitializer; }(BaseErrClass)); diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index e656824ae668b..546863b52165a 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -71,8 +71,7 @@ var ClassWithNoInitializer = (function (_super) { __extends(ClassWithNoInitializer, _super); //'this' in optional super call function ClassWithNoInitializer() { - var _this = _super.call(this, _this) || this; - return _this; + return _super.call(this, _this) || this; } return ClassWithNoInitializer; }(BaseErrClass)); diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index 1c1f11ffbc88f..2a4d15973ab2b 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -36,8 +36,7 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - var _this = _super.call(this, _this) || this; - return _this; + return _super.call(this, _this) || this; } return Foo; }(Base)); diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index 6288082ed64f0..eabfa9d562c61 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -33,8 +33,7 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - var _this = _super.call(this, _this) || this; - return _this; + return _super.call(this, _this) || this; } return Foo; }(Base)); diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 5e2bb509a2325..832868c4b8ff8 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -63,8 +63,7 @@ var C3 = (function () { var C4 = (function (_super) { __extends(C4, _super); function C4() { - var _this = _super.call(this, asdf) || this; - return _this; + return _super.call(this, asdf) || this; } return C4; }(C3)); diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index bbd564db3663b..483e905b48ab6 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -24,8 +24,7 @@ var Base = (function () { var Super = (function (_super) { __extends(Super, _super); function Super() { - var _this = _super.call(this, (function () { return _this; })()) || this; - return _this; + return _super.call(this, (function () { return _this; })()) || this; } return Super; }(Base)); From 6580262c950626b9e14f4a1de90a8c420d6c5069 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 20 Sep 2016 12:30:33 -0400 Subject: [PATCH 31/39] Initialize instead of letting the value be potentially undefined. --- src/compiler/transformers/es6.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 5748739cb236f..a69dcdfbe6a2c 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -838,7 +838,7 @@ namespace ts { startLexicalEnvironment(); let statementOffset = -1; - let thisCaptureStatus: SuperCaptureResult | undefined; + let thisCaptureStatus = SuperCaptureResult.NoReplacement; if (hasSynthesizedSuper) { // If a super call has already been synthesized, // we're going to assume that we should just transform everything after that. From 4a5830dd0c3e4d2d2e7cb350233d198ad7acd741 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 27 Sep 2016 11:44:11 -0700 Subject: [PATCH 32/39] Remove usage of 'useCapturedThis'. --- src/compiler/transformers/es6.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 995b04c74da4b..2f529a09f9baa 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -783,8 +783,6 @@ namespace ts { function addConstructor(statements: Statement[], node: ClassExpression | ClassDeclaration, extendsClauseElement: ExpressionWithTypeArguments): void { const constructor = getFirstConstructorWithBody(node); const hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined); - const savedUseCapturedThis = useCapturedThis; - useCapturedThis = true; const constructorFunction = createFunctionDeclaration( @@ -802,7 +800,6 @@ namespace ts { if (extendsClauseElement) { setNodeEmitFlags(constructorFunction, NodeEmitFlags.CapturesThis); } - useCapturedThis = savedUseCapturedThis; statements.push(constructorFunction); } From c668644e0b77e5843cdaed982a9d2d8340e1a5d8 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 27 Sep 2016 14:09:26 -0700 Subject: [PATCH 33/39] Collapse 'super()' capture/returns into a single return statement for generated 'super()' calls. --- src/compiler/transformers/es6.ts | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 2f529a09f9baa..ed5659e8a3f56 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -837,7 +837,7 @@ namespace ts { startLexicalEnvironment(); let statementOffset = -1; - let thisCaptureStatus = SuperCaptureResult.NoReplacement; + let superCaptureStatus = SuperCaptureResult.NoReplacement; if (hasSynthesizedSuper) { // If a super call has already been synthesized, // we're going to assume that we should just transform everything after that. @@ -854,13 +854,17 @@ namespace ts { addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper); Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!"); - thisCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, statementOffset); - if (thisCaptureStatus === SuperCaptureResult.ReplaceSuperCapture || thisCaptureStatus === SuperCaptureResult.ReplaceWithReturn) { - statementOffset++; - } + superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, statementOffset); } - addDefaultSuperCallIfNeeded(statements, constructor, extendsClauseElement, hasSynthesizedSuper); + if (superCaptureStatus === SuperCaptureResult.NoReplacement) { + superCaptureStatus = addDefaultSuperCallIfNeeded(statements, constructor, extendsClauseElement, hasSynthesizedSuper); + } + + // The last statement expression was replaced. Skip it. + if (superCaptureStatus === SuperCaptureResult.ReplaceSuperCapture || superCaptureStatus === SuperCaptureResult.ReplaceWithReturn) { + statementOffset++; + } if (constructor) { const body = saveStateAndInvoke(constructor, makeTransformerForConstructorBodyAtOffset(statementOffset)); @@ -870,7 +874,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 - && thisCaptureStatus !== SuperCaptureResult.ReplaceWithReturn + && superCaptureStatus !== SuperCaptureResult.ReplaceWithReturn && !(constructor && isSufficientlyCoveredByReturnStatements(constructor.body))) { statements.push( createReturn( @@ -955,6 +959,16 @@ namespace ts { ); const superReturnValueOrThis = createLogicalOr(superCall, actualThis); + if (!constructor) { + // We must be here because the user didn't write a constructor + // but we needed to call 'super()' anyway - but if that's the case, + // we can just immediately return the result of a 'super()' call. + statements.push(createReturn(superReturnValueOrThis)); + return SuperCaptureResult.ReplaceWithReturn; + } + + // The constructor was generated for some reason. + // Create a captured '_this' variable. statements.push( createVariableStatement( /*modifiers*/ undefined, @@ -969,7 +983,11 @@ namespace ts { ); enableSubstitutionsForCapturedThis(); + + return SuperCaptureResult.ReplaceSuperCapture; } + + return SuperCaptureResult.NoReplacement; } /** From 1fbdb862027ed63828adb1c71bfc08a604bc1201 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 27 Sep 2016 14:43:55 -0700 Subject: [PATCH 34/39] Accepted baselines. --- ...sClassHeritageListMemberTypeAnnotations.js | 3 +- ...accessibleTypeInTypeParameterConstraint.js | 3 +- .../reference/abstractClassInLocalScope.js | 3 +- .../abstractClassInLocalScopeIsAbstract.js | 3 +- .../reference/abstractPropertyNegative.js | 3 +- .../accessors_spec_section-4.5_inference.js | 3 +- .../reference/aliasUsageInAccessorsOfClass.js | 3 +- .../baselines/reference/aliasUsageInArray.js | 3 +- .../aliasUsageInFunctionExpression.js | 3 +- .../reference/aliasUsageInGenericFunction.js | 3 +- .../reference/aliasUsageInIndexerOfClass.js | 3 +- .../reference/aliasUsageInObjectLiteral.js | 3 +- .../reference/aliasUsageInOrExpression.js | 3 +- ...aliasUsageInTypeArgumentOfExtendsClause.js | 3 +- .../reference/aliasUsageInVarAssignment.js | 3 +- .../reference/ambiguousOverloadResolution.js | 3 +- .../reference/apparentTypeSubtyping.js | 6 +- .../reference/apparentTypeSupertype.js | 3 +- .../reference/arrayAssignmentTest1.js | 3 +- .../reference/arrayAssignmentTest2.js | 3 +- .../reference/arrayBestCommonTypes.js | 6 +- .../reference/arrayLiteralTypeInference.js | 6 +- tests/baselines/reference/arrayLiterals.js | 6 +- .../arrayLiteralsWithRecursiveGenerics.js | 3 +- ...rayOfSubtypeIsAssignableToReadonlyArray.js | 6 +- .../assignmentCompatWithCallSignatures3.js | 9 +- .../assignmentCompatWithCallSignatures4.js | 9 +- .../assignmentCompatWithCallSignatures5.js | 9 +- .../assignmentCompatWithCallSignatures6.js | 9 +- ...ssignmentCompatWithConstructSignatures3.js | 9 +- ...ssignmentCompatWithConstructSignatures4.js | 9 +- ...ssignmentCompatWithConstructSignatures5.js | 9 +- ...ssignmentCompatWithConstructSignatures6.js | 9 +- .../assignmentCompatWithNumericIndexer.js | 3 +- .../assignmentCompatWithNumericIndexer3.js | 3 +- .../assignmentCompatWithObjectMembers4.js | 12 +- ...nmentCompatWithObjectMembersOptionality.js | 6 +- ...mentCompatWithObjectMembersOptionality2.js | 6 +- .../assignmentCompatWithStringIndexer.js | 6 +- .../reference/asyncImportedPromise_es5.js | 3 +- .../reference/asyncMethodWithSuper_es5.js | 3 +- .../reference/asyncQualifiedReturnType_es5.js | 3 +- .../reference/awaitClassExpression_es5.js | 3 +- .../reference/baseIndexSignatureResolution.js | 3 +- .../reference/baseTypeOrderChecking.js | 6 +- .../baseTypeWrappingInstantiationChain.js | 6 +- .../bestCommonTypeOfConditionalExpressions.js | 6 +- ...bestCommonTypeOfConditionalExpressions2.js | 6 +- .../reference/bestCommonTypeOfTuple2.js | 3 +- ...allSignatureAssignabilityInInheritance2.js | 9 +- ...allSignatureAssignabilityInInheritance3.js | 9 +- ...allSignatureAssignabilityInInheritance4.js | 9 +- ...allSignatureAssignabilityInInheritance5.js | 9 +- ...allSignatureAssignabilityInInheritance6.js | 9 +- tests/baselines/reference/castingTuple.js | 6 +- .../baselines/reference/chainedAssignment3.js | 3 +- ...arameterConstrainedToOtherTypeParameter.js | 6 +- .../reference/circularImportAlias.js | 3 +- .../circularTypeofWithFunctionModule.js | 3 +- .../classAbstractConstructorAssignability.js | 6 +- .../reference/classAbstractCrashedOnce.js | 3 +- .../reference/classAbstractExtends.js | 12 +- .../reference/classAbstractFactoryFunction.js | 3 +- .../reference/classAbstractGeneric.js | 18 +-- .../reference/classAbstractInAModule.js | 3 +- .../reference/classAbstractInheritance.js | 24 +-- .../reference/classAbstractInstantiations1.js | 6 +- .../reference/classAbstractInstantiations2.js | 12 +- .../classAbstractOverrideWithAbstract.js | 12 +- .../reference/classAbstractSuperCalls.js | 9 +- .../classAbstractUsingAbstractMethod1.js | 6 +- .../classAbstractUsingAbstractMethods2.js | 21 +-- .../classConstructorAccessibility4.js | 6 +- .../classConstructorAccessibility5.js | 3 +- ...clarationMergedInModuleWithContinuation.js | 3 +- .../classDoesNotDependOnBaseTypes.js | 3 +- tests/baselines/reference/classExpression2.js | 3 +- .../classExpressionExtendingAbstractClass.js | 3 +- .../reference/classExtendingBuiltinType.js | 30 ++-- .../reference/classExtendingClass.js | 6 +- .../reference/classExtendingClassLikeType.js | 9 +- .../reference/classExtendingNonConstructor.js | 21 +-- .../baselines/reference/classExtendingNull.js | 6 +- .../reference/classExtendingPrimitive.js | 27 ++-- .../reference/classExtendingPrimitive2.js | 3 +- .../reference/classExtendingQualifiedName.js | 3 +- .../reference/classExtendingQualifiedName2.js | 3 +- .../reference/classExtendsAcrossFiles.js | 6 +- ...sMergedWithModuleNotReferingConstructor.js | 3 +- ...tendsClauseClassNotReferringConstructor.js | 3 +- .../reference/classExtendsEveryObjectType.js | 18 +-- .../reference/classExtendsEveryObjectType2.js | 6 +- .../reference/classExtendsInterface.js | 6 +- .../classExtendsInterfaceInExpression.js | 3 +- .../classExtendsInterfaceInModule.js | 9 +- .../baselines/reference/classExtendsItself.js | 9 +- .../reference/classExtendsItselfIndirectly.js | 18 +-- .../classExtendsItselfIndirectly2.js | 18 +-- .../classExtendsItselfIndirectly3.js | 18 +-- .../classExtendsMultipleBaseClasses.js | 3 +- ...classExtendsShadowedConstructorFunction.js | 3 +- .../classExtendsValidConstructorFunction.js | 3 +- .../classHeritageWithTrailingSeparator.js | 3 +- .../reference/classImplementsClass2.js | 3 +- .../reference/classImplementsClass3.js | 3 +- .../reference/classImplementsClass4.js | 3 +- .../reference/classImplementsClass5.js | 3 +- .../reference/classImplementsClass6.js | 3 +- tests/baselines/reference/classIndexer3.js | 3 +- tests/baselines/reference/classInheritence.js | 6 +- .../reference/classIsSubtypeOfBaseType.js | 6 +- tests/baselines/reference/classOrder2.js | 3 +- tests/baselines/reference/classOrderBug.js | 3 +- .../reference/classSideInheritance1.js | 3 +- .../classWithBaseClassButNoConstructor.js | 12 +- .../reference/classWithConstructors.js | 6 +- .../reference/classWithProtectedProperty.js | 3 +- .../reference/classWithStaticMembers.js | 3 +- tests/baselines/reference/classdecl.js | 9 +- .../reference/clodulesDerivedClasses.js | 3 +- ...llisionSuperAndLocalFunctionInAccessors.js | 6 +- .../collisionSuperAndLocalFunctionInMethod.js | 6 +- .../collisionSuperAndLocalVarInAccessors.js | 6 +- .../collisionSuperAndLocalVarInMethod.js | 6 +- .../collisionSuperAndNameResolution.js | 3 +- .../reference/collisionSuperAndParameter1.js | 3 +- ...xpressionAndLocalVarWithSuperExperssion.js | 6 +- .../reference/commentsInheritance.js | 3 +- .../comparisonOperatorWithIdenticalObjects.js | 6 +- ...ithNoRelationshipObjectsOnCallSignature.js | 3 +- ...lationshipObjectsOnConstructorSignature.js | 3 +- ...thNoRelationshipObjectsOnIndexSignature.js | 3 +- ...nshipObjectsOnInstantiatedCallSignature.js | 3 +- ...jectsOnInstantiatedConstructorSignature.js | 3 +- ...peratorWithSubtypeObjectOnCallSignature.js | 3 +- ...WithSubtypeObjectOnConstructorSignature.js | 3 +- ...eratorWithSubtypeObjectOnIndexSignature.js | 3 +- ...ubtypeObjectOnInstantiatedCallSignature.js | 3 +- ...bjectOnInstantiatedConstructorSignature.js | 3 +- ...isonOperatorWithSubtypeObjectOnProperty.js | 6 +- .../reference/complexClassRelationships.js | 3 +- ...catedGenericRecursiveBaseClassReference.js | 3 +- .../reference/computedPropertyNames24_ES5.js | 3 +- .../reference/computedPropertyNames25_ES5.js | 3 +- .../reference/computedPropertyNames26_ES5.js | 3 +- .../reference/computedPropertyNames27_ES5.js | 3 +- .../reference/computedPropertyNames31_ES5.js | 3 +- .../reference/computedPropertyNames43_ES5.js | 3 +- .../reference/computedPropertyNames44_ES5.js | 3 +- .../reference/computedPropertyNames45_ES5.js | 3 +- .../conditionalOperatorWithIdenticalBCT.js | 6 +- .../conditionalOperatorWithoutIdenticalBCT.js | 6 +- .../reference/constantOverloadFunction.js | 9 +- .../constantOverloadFunctionNoSubtypeError.js | 9 +- ...nstraintCheckInGenericBaseTypeReference.js | 3 +- ...uctSignatureAssignabilityInInheritance2.js | 9 +- ...uctSignatureAssignabilityInInheritance3.js | 9 +- ...uctSignatureAssignabilityInInheritance4.js | 9 +- ...uctSignatureAssignabilityInInheritance5.js | 9 +- ...uctSignatureAssignabilityInInheritance6.js | 9 +- ...uctorFunctionTypeIsAssignableToBaseType.js | 6 +- .../constructorHasPrototypeProperty.js | 6 +- ...constructorWithIncompleteTypeAnnotation.js | 3 +- .../contextualTypingArrayOfLambdas.js | 6 +- ...contextualTypingOfConditionalExpression.js | 6 +- ...ontextualTypingOfConditionalExpression2.js | 6 +- ...urcePropertyIsRelatableToTargetProperty.js | 3 +- .../reference/declFileClassExtendsNull.js | 3 +- .../declFileForFunctionTypeAsTypeParameter.js | 3 +- ...ileGenericClassWithGenericExtendedClass.js | 3 +- .../reference/declFileGenericType.js | 3 +- ...lictingWithClassReferredByExtendsClause.js | 6 +- ...dsClauseThatHasItsContainerNameConflict.js | 3 +- .../declarationEmitExpressionInExtends.js | 3 +- .../declarationEmitExpressionInExtends2.js | 3 +- .../declarationEmitExpressionInExtends3.js | 12 +- .../declarationEmitExpressionInExtends4.js | 9 +- .../declarationEmitNameConflicts3.js | 3 +- .../declarationEmitProtectedMembers.js | 6 +- .../declarationEmitThisPredicates01.js | 3 +- ...tionEmitThisPredicatesWithPrivateName01.js | 3 +- .../reference/declareDottedExtend.js | 6 +- .../reference/decoratorOnClassMethod12.js | 3 +- ...ClassFunctionOverridesBaseClassAccessor.js | 3 +- .../derivedClassIncludesInheritedMembers.js | 6 +- ...idesIndexersWithAssignmentCompatibility.js | 6 +- .../derivedClassOverridesPrivates.js | 6 +- .../derivedClassOverridesProtectedMembers2.js | 3 +- .../derivedClassOverridesProtectedMembers4.js | 6 +- .../derivedClassOverridesPublicMembers.js | 3 +- .../derivedClassOverridesWithoutSubtype.js | 6 +- .../reference/derivedClassTransitivity.js | 6 +- .../reference/derivedClassTransitivity2.js | 6 +- .../reference/derivedClassTransitivity3.js | 6 +- .../reference/derivedClassTransitivity4.js | 6 +- .../reference/derivedClassWithAny.js | 6 +- ...ivateInstanceShadowingProtectedInstance.js | 3 +- ...hPrivateInstanceShadowingPublicInstance.js | 3 +- ...thPrivateStaticShadowingProtectedStatic.js | 3 +- ...sWithPrivateStaticShadowingPublicStatic.js | 3 +- tests/baselines/reference/derivedClasses.js | 6 +- .../reference/derivedGenericClassWithAny.js | 6 +- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 3 +- .../derivedTypeDoesNotRequireExtendsClause.js | 3 +- .../reference/emitThisInSuperMethodCall.js | 3 +- tests/baselines/reference/emptyModuleName.js | 3 +- ...rorForwardReferenceForwadingConstructor.js | 3 +- .../reference/errorSuperPropertyAccess.js | 3 +- .../reference/errorsInGenericTypeReference.js | 3 +- tests/baselines/reference/es6ClassTest2.js | 3 +- tests/baselines/reference/es6ClassTest7.js | 3 +- .../exportAssignmentOfGenericType1.js | 3 +- .../exportDeclarationInInternalModule.js | 3 +- tests/baselines/reference/extBaseClass1.js | 9 +- tests/baselines/reference/extBaseClass2.js | 6 +- .../extendAndImplementTheSameBaseType.js | 3 +- .../extendAndImplementTheSameBaseType2.js | 3 +- .../extendBaseClassBeforeItsDeclared.js | 3 +- .../extendClassExpressionFromModule.js | 3 +- .../extendConstructSignatureInInterface.js | 3 +- .../reference/extendNonClassSymbol1.js | 3 +- .../reference/extendNonClassSymbol2.js | 3 +- ...xtendingClassFromAliasAndUsageInIndexer.js | 6 +- .../reference/extendsClauseAlreadySeen.js | 3 +- .../reference/extendsClauseAlreadySeen2.js | 3 +- tests/baselines/reference/fluentClasses.js | 6 +- tests/baselines/reference/for-inStatements.js | 3 +- .../reference/for-inStatementsInvalid.js | 3 +- .../forStatementsMultipleInvalidDecl.js | 3 +- .../reference/functionImplementationErrors.js | 6 +- .../reference/functionImplementations.js | 6 +- .../reference/functionSubtypingOfVarArgs.js | 3 +- .../reference/functionSubtypingOfVarArgs2.js | 3 +- .../reference/generatedContextualTyping.js | 6 +- .../genericBaseClassLiteralProperty.js | 3 +- .../genericBaseClassLiteralProperty2.js | 3 +- ...allWithConstraintsTypeArgumentInference.js | 6 +- .../genericCallWithObjectTypeArgs2.js | 6 +- ...icCallWithObjectTypeArgsAndConstraints2.js | 3 +- ...icCallWithObjectTypeArgsAndConstraints3.js | 6 +- .../genericCallbacksAndClassHierarchy.js | 3 +- .../genericClassExpressionInFunction.js | 18 +-- ...sInheritsConstructorFromNonGenericClass.js | 6 +- .../reference/genericClassStaticMethod.js | 3 +- tests/baselines/reference/genericClasses3.js | 3 +- .../genericDerivedTypeWithSpecializedBase.js | 3 +- .../genericDerivedTypeWithSpecializedBase2.js | 3 +- .../genericInheritedDefaultConstructors.js | 3 +- .../reference/genericPrototypeProperty2.js | 6 +- .../reference/genericPrototypeProperty3.js | 6 +- ...ericRecursiveImplicitConstructorErrors2.js | 3 +- .../reference/genericTypeAssertions2.js | 3 +- .../reference/genericTypeAssertions4.js | 6 +- .../reference/genericTypeAssertions6.js | 3 +- ...genericTypeReferenceWithoutTypeArgument.js | 6 +- ...enericTypeReferenceWithoutTypeArgument2.js | 6 +- .../genericWithIndexerOfTypeParameterType2.js | 6 +- .../reference/heterogeneousArrayLiterals.js | 6 +- .../reference/ifDoWhileStatements.js | 3 +- .../implementClausePrecedingExtends.js | 3 +- ...gAnInterfaceExtendingClassWithPrivates2.js | 33 ++-- ...AnInterfaceExtendingClassWithProtecteds.js | 12 +- .../baselines/reference/importAsBaseClass.js | 3 +- tests/baselines/reference/importHelpers.js | 6 +- tests/baselines/reference/importHelpersAmd.js | 3 +- .../importHelpersInIsolatedModules.js | 6 +- .../reference/importHelpersNoHelpers.js | 6 +- .../reference/importHelpersNoModule.js | 6 +- .../reference/importHelpersOutFile.js | 6 +- .../reference/importHelpersSystem.js | 3 +- .../reference/importShadowsGlobalName.js | 3 +- .../reference/importUsedInExtendsList1.js | 3 +- .../reference/indexerConstraints2.js | 12 +- .../reference/indirectSelfReference.js | 6 +- .../reference/indirectSelfReferenceGeneric.js | 6 +- .../infinitelyExpandingTypesNonGenericBase.js | 3 +- .../inheritFromGenericTypeParameter.js | 3 +- ...SameNamePrivatePropertiesFromSameOrigin.js | 6 +- tests/baselines/reference/inheritance.js | 12 +- tests/baselines/reference/inheritance1.js | 12 +- ...itanceGrandParentPrivateMemberCollision.js | 6 +- ...tPrivateMemberCollisionWithPublicMember.js | 6 +- ...tPublicMemberCollisionWithPrivateMember.js | 6 +- ...ritanceMemberAccessorOverridingAccessor.js | 3 +- ...heritanceMemberAccessorOverridingMethod.js | 3 +- ...ritanceMemberAccessorOverridingProperty.js | 3 +- ...inheritanceMemberFuncOverridingAccessor.js | 3 +- .../inheritanceMemberFuncOverridingMethod.js | 3 +- ...inheritanceMemberFuncOverridingProperty.js | 3 +- ...ritanceMemberPropertyOverridingAccessor.js | 3 +- ...heritanceMemberPropertyOverridingMethod.js | 3 +- ...ritanceMemberPropertyOverridingProperty.js | 3 +- .../inheritanceOfGenericConstructorMethod1.js | 3 +- .../inheritanceOfGenericConstructorMethod2.js | 6 +- ...ritanceStaticAccessorOverridingAccessor.js | 3 +- ...heritanceStaticAccessorOverridingMethod.js | 3 +- ...ritanceStaticAccessorOverridingProperty.js | 3 +- ...inheritanceStaticFuncOverridingAccessor.js | 3 +- ...eStaticFuncOverridingAccessorOfFuncType.js | 3 +- .../inheritanceStaticFuncOverridingMethod.js | 3 +- ...inheritanceStaticFuncOverridingProperty.js | 3 +- ...eStaticFuncOverridingPropertyOfFuncType.js | 3 +- ...taticFunctionOverridingInstanceProperty.js | 3 +- .../inheritanceStaticMembersCompatible.js | 3 +- .../inheritanceStaticMembersIncompatible.js | 3 +- ...ritanceStaticPropertyOverridingAccessor.js | 3 +- ...heritanceStaticPropertyOverridingMethod.js | 3 +- ...ritanceStaticPropertyOverridingProperty.js | 3 +- .../inheritedConstructorWithRestParams.js | 3 +- .../inheritedConstructorWithRestParams2.js | 6 +- .../inheritedModuleMembersForClodule.js | 6 +- .../reference/instanceOfAssignability.js | 6 +- ...nstancePropertiesInheritedIntoClassType.js | 6 +- .../reference/instanceSubtypeCheck2.js | 3 +- ...nstanceofWithStructurallyIdenticalTypes.js | 6 +- .../instantiatedReturnTypeContravariance.js | 3 +- .../reference/interfaceClassMerging.js | 3 +- .../reference/interfaceClassMerging2.js | 3 +- .../reference/interfaceExtendsClass1.js | 9 +- .../interfaceExtendsClassWithPrivate1.js | 3 +- .../reference/interfaceImplementation8.js | 12 +- .../invalidModuleWithStatementsOfEveryKind.js | 18 +-- .../invalidMultipleVariableDeclarations.js | 3 +- .../reference/invalidReturnStatements.js | 3 +- .../isolatedModulesImportExportElision.js | 3 +- tests/baselines/reference/jsxViaImport.js | 3 +- tests/baselines/reference/lambdaArgCrash.js | 3 +- tests/baselines/reference/localTypes1.js | 6 +- tests/baselines/reference/m7Bugs.js | 3 +- .../reference/mergedDeclarations5.js | 3 +- .../reference/mergedDeclarations6.js | 3 +- .../mergedInheritedClassInterface.js | 6 +- .../mergedInterfacesWithInheritedPrivates2.js | 6 +- .../mergedInterfacesWithInheritedPrivates3.js | 3 +- tests/baselines/reference/moduleAsBaseType.js | 3 +- .../moduleImportedForTypeArgumentPosition.js | 3 +- .../moduleWithStatementsOfEveryKind.js | 12 +- .../reference/multipleInheritance.js | 18 +-- .../mutuallyRecursiveGenericBaseTypes2.js | 3 +- tests/baselines/reference/noEmitHelpers.js | 3 +- .../noImplicitAnyMissingGetAccessor.js | 3 +- .../noImplicitAnyMissingSetAccessor.js | 3 +- ...enericClassExtendingGenericClassWithAny.js | 3 +- ...cIndexerConstrainsPropertyDeclarations2.js | 3 +- .../reference/numericIndexerConstraint3.js | 3 +- .../reference/numericIndexerConstraint4.js | 3 +- .../reference/numericIndexerTyping2.js | 3 +- ...objectTypeHidingMembersOfExtendedObject.js | 3 +- ...objectTypesIdentityWithNumericIndexers1.js | 6 +- ...objectTypesIdentityWithNumericIndexers2.js | 9 +- ...objectTypesIdentityWithNumericIndexers3.js | 6 +- .../objectTypesIdentityWithPrivates.js | 6 +- .../objectTypesIdentityWithPrivates2.js | 3 +- .../objectTypesIdentityWithPrivates3.js | 6 +- .../objectTypesIdentityWithStringIndexers.js | 6 +- .../objectTypesIdentityWithStringIndexers2.js | 9 +- .../optionalConstructorArgInSuper.js | 3 +- .../reference/optionalParamInOverride.js | 3 +- .../baselines/reference/outModuleConcatAmd.js | 3 +- .../reference/outModuleConcatAmd.js.map | 2 +- .../outModuleConcatAmd.sourcemap.txt | 40 ++--- .../reference/outModuleConcatSystem.js | 3 +- .../reference/outModuleConcatSystem.js.map | 2 +- .../outModuleConcatSystem.sourcemap.txt | 40 ++--- .../reference/outModuleTripleSlashRefs.js | 3 +- .../reference/outModuleTripleSlashRefs.js.map | 2 +- .../outModuleTripleSlashRefs.sourcemap.txt | 40 ++--- tests/baselines/reference/overload1.js | 6 +- .../overloadOnConstConstraintChecks1.js | 9 +- .../overloadOnConstConstraintChecks2.js | 6 +- .../overloadOnConstConstraintChecks3.js | 6 +- .../overloadOnConstConstraintChecks4.js | 6 +- .../overloadOnConstantsInvalidOverload1.js | 9 +- .../baselines/reference/overloadResolution.js | 9 +- .../overloadResolutionClassConstructors.js | 9 +- .../overloadResolutionConstructors.js | 9 +- .../reference/overloadingOnConstants1.js | 9 +- .../reference/overloadingOnConstants2.js | 3 +- .../overridingPrivateStaticMembers.js | 3 +- .../reference/parseErrorInHeritageClause1.js | 3 +- tests/baselines/reference/parser509630.js | 3 +- tests/baselines/reference/parserAstSpans1.js | 3 +- .../reference/parserClassDeclaration1.js | 3 +- .../reference/parserClassDeclaration3.js | 3 +- .../reference/parserClassDeclaration4.js | 3 +- .../reference/parserClassDeclaration5.js | 3 +- .../reference/parserClassDeclaration6.js | 3 +- ...rrorRecovery_ExtendsOrImplementsClause2.js | 3 +- ...rrorRecovery_ExtendsOrImplementsClause4.js | 3 +- ...rrorRecovery_ExtendsOrImplementsClause5.js | 3 +- .../parserGenericsInTypeContexts1.js | 3 +- .../parserGenericsInTypeContexts2.js | 3 +- tests/baselines/reference/primitiveMembers.js | 3 +- tests/baselines/reference/privacyClass.js | 72 +++------ .../privacyClassExtendsClauseDeclFile.js | 69 +++------ tests/baselines/reference/privacyGloClass.js | 30 ++-- .../reference/privateAccessInSubclass1.js | 3 +- ...tedMembersAreNotAccessibleDestructuring.js | 3 +- .../privateStaticNotAccessibleInClodule2.js | 3 +- .../amd/testGlo.js | 12 +- .../node/testGlo.js | 12 +- .../reference/project/prologueEmit/amd/out.js | 3 +- .../project/prologueEmit/node/out.js | 3 +- .../amd/m'ain.js | 3 +- .../node/m'ain.js | 3 +- .../reference/propertiesAndIndexers.js | 3 +- tests/baselines/reference/propertyAccess.js | 3 +- ...tyAccessOnTypeParameterWithConstraints2.js | 3 +- ...tyAccessOnTypeParameterWithConstraints3.js | 3 +- ...tyAccessOnTypeParameterWithConstraints5.js | 3 +- ...sPropertyAccessibleWithinNestedSubclass.js | 6 +- ...PropertyAccessibleWithinNestedSubclass1.js | 12 +- ...edClassPropertyAccessibleWithinSubclass.js | 3 +- ...dClassPropertyAccessibleWithinSubclass2.js | 12 +- ...dClassPropertyAccessibleWithinSubclass3.js | 3 +- .../protectedInstanceMemberAccessibility.js | 6 +- tests/baselines/reference/protectedMembers.js | 21 +-- ...icClassPropertyAccessibleWithinSubclass.js | 9 +- ...cClassPropertyAccessibleWithinSubclass2.js | 6 +- ...solution-does-not-affect-class-heritage.js | 3 +- .../reference/recursiveBaseCheck3.js | 6 +- .../reference/recursiveBaseCheck4.js | 3 +- .../reference/recursiveBaseCheck6.js | 3 +- .../recursiveBaseConstructorCreation1.js | 3 +- ...ssInstantiationsWithDefaultConstructors.js | 3 +- .../reference/recursiveClassReferenceTest.js | 3 +- .../recursiveClassReferenceTest.js.map | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 144 +++++++++--------- .../reference/recursiveComplicatedClasses.js | 9 +- ...sivelySpecializedConstructorDeclaration.js | 3 +- .../reference/reexportClassDefinition.js | 3 +- ...lassDeclarationWhenInBaseTypeResolution.js | 141 ++++++----------- tests/baselines/reference/returnStatements.js | 3 +- ...peCheckExtendedClassInsidePublicMethod2.js | 3 +- ...peCheckExtendedClassInsideStaticMethod1.js | 3 +- .../reference/shadowPrivateMembers.js | 3 +- .../specializedInheritedConstructors1.js | 3 +- .../specializedOverloadWithRestParameters.js | 3 +- tests/baselines/reference/staticFactory1.js | 3 +- .../staticMemberAccessOffDerivedType1.js | 3 +- .../reference/strictModeReservedWord.js | 3 +- ...trictModeReservedWordInClassDeclaration.js | 6 +- ...gIndexerConstrainsPropertyDeclarations2.js | 3 +- .../reference/subtypesOfTypeParameter.js | 3 +- .../subtypesOfTypeParameterWithConstraints.js | 87 ++++------- ...subtypesOfTypeParameterWithConstraints4.js | 27 ++-- ...OfTypeParameterWithRecursiveConstraints.js | 54 +++---- .../reference/subtypingTransitivity.js | 6 +- .../reference/subtypingWithCallSignatures2.js | 9 +- .../reference/subtypingWithCallSignatures3.js | 9 +- .../reference/subtypingWithCallSignatures4.js | 9 +- .../subtypingWithConstructSignatures2.js | 9 +- .../subtypingWithConstructSignatures3.js | 9 +- .../subtypingWithConstructSignatures4.js | 9 +- .../subtypingWithConstructSignatures5.js | 9 +- .../subtypingWithConstructSignatures6.js | 9 +- .../reference/subtypingWithNumericIndexer.js | 18 +-- .../reference/subtypingWithNumericIndexer3.js | 21 +-- .../reference/subtypingWithNumericIndexer4.js | 9 +- .../reference/subtypingWithObjectMembers.js | 24 +-- .../reference/subtypingWithObjectMembers4.js | 12 +- ...subtypingWithObjectMembersAccessibility.js | 12 +- ...ubtypingWithObjectMembersAccessibility2.js | 21 +-- .../reference/subtypingWithStringIndexer.js | 18 +-- .../reference/subtypingWithStringIndexer3.js | 21 +-- .../reference/subtypingWithStringIndexer4.js | 9 +- tests/baselines/reference/super.js | 6 +- tests/baselines/reference/super1.js | 15 +- tests/baselines/reference/super2.js | 12 +- tests/baselines/reference/superAccess.js | 3 +- .../reference/superAccessInFatArrow1.js | 3 +- .../reference/superCallInStaticMethod.js | 3 +- .../superCallWithMissingBaseClass.js | 3 +- .../baselines/reference/superInCatchBlock1.js | 3 +- .../reference/superInObjectLiterals_ES5.js | 3 +- .../reference/superPropertyAccess.js | 3 +- ...essInComputedPropertiesOfNestedType_ES5.js | 3 +- .../reference/superPropertyAccess_ES5.js | 3 +- .../reference/superSymbolIndexedAccess5.js | 3 +- .../reference/superSymbolIndexedAccess6.js | 3 +- ...side-object-literal-getters-and-setters.js | 3 +- tests/baselines/reference/switchStatements.js | 3 +- .../reference/systemModuleWithSuperClass.js | 3 +- .../reference/thisInInvalidContexts.js | 3 +- .../thisInInvalidContextsExternalModule.js | 3 +- .../reference/thisTypeInFunctions.js | 9 +- .../reference/thisTypeInFunctionsNegative.js | 6 +- .../reference/tsxExternalModuleEmit1.js | 6 +- .../tsxStatelessFunctionComponents2.js | 3 +- .../reference/tsxUnionTypeComponent1.js | 6 +- tests/baselines/reference/typeAssertions.js | 3 +- .../baselines/reference/typeGuardFunction.js | 3 +- .../reference/typeGuardFunctionErrors.js | 3 +- .../reference/typeGuardFunctionGenerics.js | 3 +- .../reference/typeGuardFunctionOfFormThis.js | 18 +-- .../typeGuardFunctionOfFormThisErrors.js | 6 +- .../reference/typeGuardOfFormInstanceOf.js | 3 +- .../reference/typeGuardOfFormIsType.js | 3 +- .../reference/typeGuardOfFormThisMember.js | 3 +- .../typeGuardOfFormThisMemberErrors.js | 3 +- tests/baselines/reference/typeMatch2.js | 3 +- .../reference/typeParameterAsBaseClass.js | 3 +- .../reference/typeParameterAsBaseType.js | 6 +- .../reference/typeParameterExtendingUnion1.js | 6 +- .../reference/typeParameterExtendingUnion2.js | 6 +- .../baselines/reference/typeValueConflict1.js | 3 +- .../baselines/reference/typeValueConflict2.js | 6 +- tests/baselines/reference/typeofClass2.js | 3 +- .../typesWithSpecializedCallSignatures.js | 6 +- ...typesWithSpecializedConstructSignatures.js | 6 +- tests/baselines/reference/undeclaredBase.js | 3 +- .../undefinedIsSubtypeOfEverything.js | 66 +++----- .../baselines/reference/underscoreMapFirst.js | 3 +- .../reference/unionTypeEquivalence.js | 3 +- .../reference/unionTypeFromArrayLiteral.js | 6 +- .../reference/unionTypesAssignability.js | 6 +- .../reference/unspecializedConstraints.js | 3 +- ...untypedFunctionCallsWithTypeParameters1.js | 3 +- .../reference/unusedClassesinNamespace4.js | 3 +- .../unusedIdentifiersConsolidated1.js | 3 +- 520 files changed, 1217 insertions(+), 2346 deletions(-) diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index de8e08843a2d6..ec0ed5494a4f1 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -38,8 +38,7 @@ var A; var Point3d = (function (_super) { __extends(Point3d, _super); function Point3d() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Point3d; }(Point)); diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index 58c7bd4c3c1f6..bae9593fb98b1 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -41,8 +41,7 @@ var A; var Point3d = (function (_super) { __extends(Point3d, _super); function Point3d() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Point3d; }(Point)); diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index 04407cfc08c2e..db5144be39981 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -22,8 +22,7 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index 09109c40675df..1b3e11cfa32d9 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -22,8 +22,7 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index 5a4c24fe2333f..bebf9026a0e56 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -92,8 +92,7 @@ var WrongTypeAccessor = (function () { var WrongTypeAccessorImpl = (function (_super) { __extends(WrongTypeAccessorImpl, _super); function WrongTypeAccessorImpl() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Object.defineProperty(WrongTypeAccessorImpl.prototype, "num", { get: function () { return "nope, wrong"; }, 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 860d74f5204fb..dbaeec1f688ef 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -38,8 +38,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index d717da94d382c..8b60ed8e76ddd 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -46,8 +46,7 @@ var Backbone = require("./aliasUsage1_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index f08363776cc2e..bf573aa9abb20 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -40,8 +40,7 @@ var Backbone = require("./aliasUsageInArray_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 06e3e266ee956..49bdd493aacee 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -39,8 +39,7 @@ var Backbone = require("./aliasUsageInFunctionExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 96121364837be..dc3a8a88bab8d 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -43,8 +43,7 @@ var Backbone = require("./aliasUsageInGenericFunction_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index bbfe295259478..cb7ad3027cad4 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -45,8 +45,7 @@ var Backbone = require("./aliasUsageInIndexerOfClass_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 3b036f52a9d74..81e3e621e850b 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -40,8 +40,7 @@ var Backbone = require("./aliasUsageInObjectLiteral_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 4167294e5f23d..4faa41dd034f8 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -43,8 +43,7 @@ var Backbone = require("./aliasUsageInOrExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 91c6ca2c53f79..2cf4aefab6c32 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -43,8 +43,7 @@ var Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 0ba5cbbc8d080..80bb2dca20eea 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -39,8 +39,7 @@ var Backbone = require("./aliasUsageInVarAssignment_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 27e6dd714baec..01002792921c2 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -22,8 +22,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index 914679c7de26a..6ca9d343a721f 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -38,8 +38,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -52,8 +51,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index 01fdb92a24ef5..c6d3378872e60 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -28,8 +28,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index 911df30a423d5..a887203cd5e05 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -101,8 +101,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 aff812247a27c..d82dedff29d60 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -75,8 +75,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 7df398365421e..b7ddaa5d6dae4 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -128,8 +128,7 @@ var EmptyTypes; var derived = (function (_super) { __extends(derived, _super); function derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return derived; }(base)); @@ -188,8 +187,7 @@ var NonEmptyTypes; var derived = (function (_super) { __extends(derived, _super); function derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return derived; }(base)); diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index 81155544cab8e..919d3a5e9227c 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -65,16 +65,14 @@ var Action = (function () { var ActionA = (function (_super) { __extends(ActionA, _super); function ActionA() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ActionA; }(Action)); var ActionB = (function (_super) { __extends(ActionB, _super); function ActionB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ActionB; }(Action)); diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 53066c7039179..530cdedec73f3 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -70,8 +70,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived1; }(Base)); @@ -79,8 +78,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index 3c5f436505371..c0f320ac1e53a 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -39,8 +39,7 @@ var List = (function () { var DerivedList = (function (_super) { __extends(DerivedList, _super); function DerivedList() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return DerivedList; }(List)); diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index aba7a7cbc8cc1..d1d75e8041c2a 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -33,16 +33,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(Array)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index 80a9aa9cf148a..c5a1f41543760 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -114,24 +114,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 5932aec049a67..58faf663ea893 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -115,24 +115,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 7ea579d87edaf..87506cad08fd3 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -80,24 +80,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index 0fb5867836cf1..2c05d5960b291 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -57,24 +57,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index b933425ffb083..76ad53e4e05e0 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -114,24 +114,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index e407c3acdb00b..f516df153c6b3 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -115,24 +115,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index 59c816dcc5c2b..ef7de7f011bfb 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -80,24 +80,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index b3b349ebc06fc..3d58ae707a514 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -57,24 +57,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 6e14fb66ecdc0..3716050668362 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -72,8 +72,7 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index 3b32f327b073d..2e6ecd72741db 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -59,8 +59,7 @@ b = a; // ok var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A)); diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index ce80efc3c7a74..2cc2510c8da7b 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -108,16 +108,14 @@ var OnlyDerived; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); @@ -169,16 +167,14 @@ var WithBase; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index d95eb43f0e570..3b12701b3d996 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -103,16 +103,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index f4c401979cf8c..f965d18e2cee2 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -105,16 +105,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index 54839da4b5a75..8d081c907940e 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -82,8 +82,7 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -94,8 +93,7 @@ var Generics; var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 396f380db3ee1..76ffbc833aa6f 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -19,8 +19,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Task = (function (_super) { __extends(Task, _super); function Task() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 1bada582b03d9..9ceff6bab4e4a 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es5.js +++ b/tests/baselines/reference/asyncMethodWithSuper_es5.js @@ -61,8 +61,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 0081a30d93005..dd54f6ee8336d 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es5.js +++ b/tests/baselines/reference/asyncQualifiedReturnType_es5.js @@ -13,8 +13,7 @@ var X; var MyPromise = (function (_super) { __extends(MyPromise, _super); function MyPromise() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 f81b580092901..b207ba08f8d6a 100644 --- a/tests/baselines/reference/awaitClassExpression_es5.js +++ b/tests/baselines/reference/awaitClassExpression_es5.js @@ -17,8 +17,7 @@ function func() { _a = function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }; diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index 6629ef35dda61..7e922cf83b239 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -38,8 +38,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index 187a354553df8..ec96b80a9999f 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -51,8 +51,7 @@ var Class1 = (function () { var Class2 = (function (_super) { __extends(Class2, _super); function Class2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Class2; }(Class1)); @@ -64,8 +63,7 @@ var Class3 = (function () { var Class4 = (function (_super) { __extends(Class4, _super); function Class4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Class4; }(Class3)); diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index bbf57046a975c..5f8dcbd0e10fd 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -41,8 +41,7 @@ var CBaseBase = (function () { var CBase = (function (_super) { __extends(CBase, _super); function CBase() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return CBase; }(CBaseBase)); @@ -60,8 +59,7 @@ var Wrapper = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } C.prototype.works = function () { new CBaseBase(this); diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index a9e38f0520c8f..6d0f19dd37def 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -44,16 +44,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 9af685812c298..2e2d0bcb1e2a4 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -40,16 +40,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index d71b6f17abfd2..928909f4c3852 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -46,8 +46,7 @@ var E = (function () { var F = (function (_super) { __extends(F, _super); function F() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return F; }(C)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 4fd0dc2cefc27..0ae7648c7f903 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -84,24 +84,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index 710725f145be3..7a7791280ad87 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -131,24 +131,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index 154aee0693b06..19d66ce8d461d 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -64,24 +64,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index 7359d330cd6fb..1c53de5d26e7e 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -64,24 +64,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index 594d2dcafb774..c42e36389ca59 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -67,24 +67,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index 426889df7de6b..f0178dcbbf0b2 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -59,8 +59,7 @@ var D = (function () { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E; }(A)); @@ -68,8 +67,7 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return F; }(A)); diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index 71b345a311ca2..3857867043c90 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -36,8 +36,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index 7c428751b2844..26d341e1f6a7e 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -42,16 +42,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 9d0e7648dcb82..6fe5e604e57d3 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -32,8 +32,7 @@ var B; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 811e86b21cafc..78e9d3f34e7f4 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -32,8 +32,7 @@ var maker; var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar; }(Foo)); diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index 8738b43bb3fb3..35d9e75884fe0 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -28,16 +28,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index 02d31377de87f..fe23e60c94faa 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -24,8 +24,7 @@ var foo = (function () { var bar = (function (_super) { __extends(bar, _super); function bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 8ac2cc9de3de7..e899cb82d6d73 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -31,32 +31,28 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B)); var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(B)); var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 4f612e3d9c692..50e232a9fcac7 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -31,8 +31,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index b76117fddfc01..96df8f5f19edd 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -39,32 +39,28 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); // error -- inherits abstract methods var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(A)); // error -- inherits abstract methods var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } E.prototype.foo = function () { return this.t; }; return E; @@ -72,8 +68,7 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } F.prototype.bar = function (t) { }; return F; @@ -81,8 +76,7 @@ var F = (function (_super) { var G = (function (_super) { __extends(G, _super); function G() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 aa66ba540a80b..c6a9e206bcc72 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -24,8 +24,7 @@ var M; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index 0bd5dab31a997..297a80dd99c3d 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -35,16 +35,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); @@ -56,48 +54,42 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return BB; }(AA)); var CC = (function (_super) { __extends(CC, _super); function CC() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return CC; }(AA)); var DD = (function (_super) { __extends(DD, _super); function DD() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return DD; }(BB)); var EE = (function (_super) { __extends(EE, _super); function EE() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return EE; }(BB)); var FF = (function (_super) { __extends(FF, _super); function FF() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return FF; }(CC)); var GG = (function (_super) { __extends(GG, _super); function GG() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return GG; }(CC)); diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index aef8f58fab256..5abbb9c1baa6f 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -41,16 +41,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index 2e6cd648dc08a..dea4c744ae0a4 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -82,24 +82,21 @@ new x; // okay -- undefined behavior at runtime var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B)); // error -- not declared abstract var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(B)); // okay var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } E.prototype.bar = function () { return 1; }; return E; @@ -107,8 +104,7 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 5cb07934658d1..4ecebdf7b32f0 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -38,8 +38,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -52,8 +51,7 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } BB.prototype.bar = function () { }; return BB; @@ -61,16 +59,14 @@ var BB = (function (_super) { var CC = (function (_super) { __extends(CC, _super); function CC() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return CC; }(BB)); // error var DD = (function (_super) { __extends(DD, _super); function DD() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 44b15710c732e..0197f48a429d2 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -42,8 +42,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } B.prototype.bar = function () { _super.prototype.foo.call(this); }; B.prototype.baz = function () { return this.foo; }; @@ -52,8 +51,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 @@ -70,8 +68,7 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return BB; }(AA)); diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index ae6b08e4bcac5..74b5d62aaf532 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -31,8 +31,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } B.prototype.foo = function () { return 1; }; return B; @@ -40,8 +39,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index 9f43ee1a6b3cb..25cf1a307c7a3 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -41,24 +41,21 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } D.prototype.foo = function () { }; return D; @@ -66,8 +63,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } E.prototype.foo = function () { }; return E; @@ -80,24 +76,21 @@ var AA = (function () { var BB = (function (_super) { __extends(BB, _super); function BB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return BB; }(AA)); var CC = (function (_super) { __extends(CC, _super); function CC() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return CC; }(AA)); var DD = (function (_super) { __extends(DD, _super); function DD() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 dfbc70de115b0..4772ac68d119f 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -51,8 +51,7 @@ var A = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); @@ -74,8 +73,7 @@ var D = (function () { var F = (function (_super) { __extends(F, _super); function F() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return F; }(D)); diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index b73ecb4a92b39..d658349c2a59c 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -25,8 +25,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 83152355a137b..c1ecad3a7925d 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -35,8 +35,7 @@ var M; var O = (function (_super) { __extends(O, _super); function O() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return O; }(M.N)); diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index ef584afd6e9e4..076412e164dba 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -31,8 +31,7 @@ var StringTreeCollectionBase = (function () { var StringTreeCollection = (function (_super) { __extends(StringTreeCollection, _super); function StringTreeCollection() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return StringTreeCollection; }(StringTreeCollectionBase)); diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index f7405cfd38ac3..59b62c60cfe29 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -16,8 +16,7 @@ var D = (function () { var v = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(D)); diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index 8673e48d65f8f..7312ab6567dcb 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -22,8 +22,7 @@ var A = (function () { var C = (function (_super) { __extends(class_1, _super); function class_1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return class_1; }(A)); diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index 2a01c1aa8b3d2..4c95e3008eaf9 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -20,80 +20,70 @@ var __extends = (this && this.__extends) || function (d, b) { var C1 = (function (_super) { __extends(C1, _super); function C1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C1; }(Object)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(Function)); var C3 = (function (_super) { __extends(C3, _super); function C3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C3; }(String)); var C4 = (function (_super) { __extends(C4, _super); function C4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C4; }(Boolean)); var C5 = (function (_super) { __extends(C5, _super); function C5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C5; }(Number)); var C6 = (function (_super) { __extends(C6, _super); function C6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C6; }(Date)); var C7 = (function (_super) { __extends(C7, _super); function C7() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C7; }(RegExp)); var C8 = (function (_super) { __extends(C8, _super); function C8() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C8; }(Error)); var C9 = (function (_super) { __extends(C9, _super); function C9() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C9; }(Array)); var C10 = (function (_super) { __extends(C10, _super); function C10() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C10; }(Array)); diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index 4218bfbea98f4..91e3752980cd9 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -47,8 +47,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); @@ -67,8 +66,7 @@ var C2 = (function () { var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(C2)); diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index fdda53a381f1b..bfc10c2356394 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -68,8 +68,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D0 = (function (_super) { __extends(D0, _super); function D0() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D0; }(Base)); @@ -108,8 +107,7 @@ var D3 = (function (_super) { var D4 = (function (_super) { __extends(D4, _super); function D4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D4; }(getBase())); @@ -117,8 +115,7 @@ var D4 = (function (_super) { var D5 = (function (_super) { __extends(D5, _super); function D5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D5; }(getBadBase())); diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index d33e6b4edefd7..574d50044860e 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -27,56 +27,49 @@ function foo() { var C1 = (function (_super) { __extends(C1, _super); function C1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C1; }(undefined)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(true)); var C3 = (function (_super) { __extends(C3, _super); function C3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C3; }(false)); var C4 = (function (_super) { __extends(C4, _super); function C4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C4; }(42)); var C5 = (function (_super) { __extends(C5, _super); function C5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C5; }("hello")); var C6 = (function (_super) { __extends(C6, _super); function C6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C6; }(x)); var C7 = (function (_super) { __extends(C7, _super); function C7() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C7; }(foo)); diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index d6188aaf988c6..8d5d73329aa3e 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -12,16 +12,14 @@ var __extends = (this && this.__extends) || function (d, b) { var C1 = (function (_super) { __extends(C1, _super); function C1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C1; }(null)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }((null))); diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index c23683470d037..53cb45c208187 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -24,32 +24,28 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(number)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(string)); var C3 = (function (_super) { __extends(C3, _super); function C3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C3; }(boolean)); var C4 = (function (_super) { __extends(C4, _super); function C4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C4; }(Void)); @@ -62,32 +58,28 @@ void {}; var C5 = (function (_super) { __extends(C5, _super); function C5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C5; }(Null)); var C5a = (function (_super) { __extends(C5a, _super); function C5a() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C5a; }(null)); var C6 = (function (_super) { __extends(C6, _super); function C6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C6; }(undefined)); var C7 = (function (_super) { __extends(C7, _super); function C7() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C7; }(Undefined)); @@ -98,8 +90,7 @@ var E; var C8 = (function (_super) { __extends(C8, _super); function C8() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C8; }(E)); diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index 072dc8138c78b..b32dc31a5b400 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -20,8 +20,7 @@ void {}; var C5a = (function (_super) { __extends(C5a, _super); function C5a() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C5a; }(null)); diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index b5cf4ae13820e..fced8c2a37322 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -23,8 +23,7 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(M.C)); diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index d1ee8b48b3a23..c133ceb87dc54 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -24,8 +24,7 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(M.C)); diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index 0dcf4103f49da..5be0ab8f9c0a3 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -37,8 +37,7 @@ exports.b = { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -63,8 +62,7 @@ exports.a = { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index f1a695c0b2ac4..cc4870e837b43 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -33,8 +33,7 @@ var Foo; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index f754e140d37df..6c3dc7894452d 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -23,8 +23,7 @@ var Foo; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index 584b31b7e8e8e..a19f5d5cdd682 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -25,16 +25,14 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(I)); // error var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }({ foo: string })); // error @@ -42,8 +40,7 @@ var x; var C3 = (function (_super) { __extends(C3, _super); function C3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C3; }(x)); // error @@ -54,8 +51,7 @@ var M; var C4 = (function (_super) { __extends(C4, _super); function C4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C4; }(M)); // error @@ -63,16 +59,14 @@ function foo() { } var C5 = (function (_super) { __extends(C5, _super); function C5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C5; }(foo)); // error var C6 = (function (_super) { __extends(C6, _super); function C6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C6; }([])); // error diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index e01e90d512d68..fbc364ca5dad2 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -12,16 +12,14 @@ var __extends = (this && this.__extends) || function (d, b) { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }({ foo: string })); // error var C6 = (function (_super) { __extends(C6, _super); function C6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C6; }([])); // error diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index 7047eaad658c2..b59462243172c 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -17,8 +17,7 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return A; }(Comparable)); @@ -30,8 +29,7 @@ var B = (function () { var A2 = (function (_super) { __extends(A2, _super); function A2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return A2; }(Comparable2)); diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index 64d519d6952b7..9dcd8dd727988 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -20,8 +20,7 @@ function factory(a) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(factory(A))); diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index ced164bca102f..9da8831a1389f 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -24,24 +24,21 @@ var __extends = (this && this.__extends) || function (d, b) { var C1 = (function (_super) { __extends(C1, _super); function C1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C1; }(M.I1)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(M.I2)); var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 654cd35c400e7..36f2263d671ee 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -14,24 +14,21 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(C)); // error var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(D)); // error var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E; }(E)); // error diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index ae5852d91f9a1..0f3f48d2f2c18 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -20,48 +20,42 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(E)); // error var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E; }(D)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(E2)); // error var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(C2)); var E2 = (function (_super) { __extends(E2, _super); function E2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E2; }(D2)); diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index 63eeb5bc17840..e215a07c3571e 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -31,8 +31,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(N.E)); // error @@ -41,8 +40,7 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); @@ -53,8 +51,7 @@ var N; var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E; }(M.D)); @@ -65,8 +62,7 @@ var O; var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(Q.E2)); // error @@ -75,8 +71,7 @@ var O; var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(C2)); @@ -87,8 +82,7 @@ var O; var E2 = (function (_super) { __extends(E2, _super); function E2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E2; }(P.D2)); diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index 4e67909f2d3be..f8366d77e1349 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -27,8 +27,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(E)); // error @@ -41,8 +40,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); @@ -55,8 +53,7 @@ var __extends = (this && this.__extends) || function (d, b) { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E; }(D)); @@ -69,8 +66,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(E2)); // error @@ -83,8 +79,7 @@ var __extends = (this && this.__extends) || function (d, b) { var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(C2)); @@ -97,8 +92,7 @@ var __extends = (this && this.__extends) || function (d, b) { var E2 = (function (_super) { __extends(E2, _super); function E2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E2; }(D2)); diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index a185f6cf40a51..cd9c28ad28319 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -22,8 +22,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js index a7f4a4bb9d951..ddaadc2dc628a 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -25,8 +25,7 @@ var M; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index 519074358cc7b..31bff6e430c4d 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -16,8 +16,7 @@ var x = new foo(); // can be used as a constructor function var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 d3134a97ccd4f..12265f569bd56 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -17,8 +17,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index d525fb8a6ad07..5e3eae465438c 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -33,8 +33,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 3257e51b5b883..5fd003e93b908 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -37,8 +37,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(A)); diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index f0b8698c64d3d..477288972df22 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -40,8 +40,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(A)); diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index bf5d0141a1973..0ec258ab77bf3 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -42,8 +42,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(A)); diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index f1929cdc798d0..0771c56415cc9 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -47,8 +47,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(A)); diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index ab825abcd3185..2e55c89464526 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -24,8 +24,7 @@ var C123 = (function () { var D123 = (function (_super) { __extends(D123, _super); function D123() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D123; }(C123)); diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index 11b0c5e3ae2dc..f68d76fad47f1 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -11,16 +11,14 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var A = (function (_super) { __extends(A, _super); function A() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return A; }(A)); diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index 6caa97781dd98..52300987d8ebd 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -29,16 +29,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index 49b2a428e069a..63490fa29b174 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -28,8 +28,7 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 1381df2797d04..e21a5ed64cff7 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -35,8 +35,7 @@ var baz = (function () { var foo = (function (_super) { __extends(foo, _super); function foo() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return foo; }(baz)); diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index 7898ae8a2b2e8..9443509032cb1 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -33,8 +33,7 @@ var A = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(A)); diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index 6ff5ae2ac5b2c..c25687d3c74cd 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -54,8 +54,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(Base)); @@ -70,8 +69,7 @@ var Base2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(Base2)); @@ -82,8 +80,7 @@ var d2 = new D(1); // ok var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(Base2)); @@ -93,8 +90,7 @@ var d4 = new D(1); // ok var D3 = (function (_super) { __extends(D3, _super); function D3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D3; }(Base2)); diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index 6bb9387f67388..f445d22d18f88 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -75,8 +75,7 @@ var NonGeneric; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C2)); @@ -104,8 +103,7 @@ var Generics; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C2)); diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index fb07eb3d0b232..2cb8a4e0a50ad 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -48,8 +48,7 @@ C.g = function () { return ''; }; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 cd23c22023172..9e79780d5cc6a 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -45,8 +45,7 @@ var r3 = r.foo; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index d4f6bb11ca9ba..a3059757d2fba 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -136,8 +136,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return b; }(a)); @@ -162,8 +161,7 @@ var m2; var c = (function (_super) { __extends(c, _super); function c() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return c; }(b)); @@ -179,8 +177,7 @@ var m2; var c = (function (_super) { __extends(c, _super); function c() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return c; }(m1.b)); diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index dbbbe340ba7b5..f65295627f13f 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -44,8 +44,7 @@ var Shape; var Path = (function (_super) { __extends(Path, _super); function Path() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Path; }(Shape)); diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index eaf031c2571c6..85c0e398fbd0f 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -68,8 +68,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Object.defineProperty(b.prototype, "prop2", { get: function () { @@ -89,8 +88,7 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 14965b53abdfe..81c069da169d9 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -50,8 +50,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } b.prototype.foo = function () { function _super() { @@ -64,8 +63,7 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } c.prototype.foo = function () { var x = function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index 55db3a5e62536..26f782c0d17aa 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -58,8 +58,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Object.defineProperty(b.prototype, "prop2", { get: function () { @@ -77,8 +76,7 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 c5bb6ebcd0163..0524d993ba1b0 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -36,8 +36,7 @@ var Foo = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } b.prototype.foo = function () { var _super = 10; // Should be error @@ -47,8 +46,7 @@ var b = (function (_super) { var c = (function (_super) { __extends(c, _super); function c() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } c.prototype.foo = function () { var x = function () { diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index 5501b3e2df439..cb5636ec904b2 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -27,8 +27,7 @@ var base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 105fe8497671a..ed19500f9d4d8 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -23,8 +23,7 @@ var Foo = (function () { var Foo2 = (function (_super) { __extends(Foo2, _super); function Foo2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 59b64e4a9bac4..9e8132c68838f 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -34,8 +34,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } b.prototype.foo = function () { var _this = this; @@ -47,8 +46,7 @@ var b = (function (_super) { var b2 = (function (_super) { __extends(b2, _super); function b2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 a8a8d5fa8899b..3527f5d23bb6f 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -258,8 +258,7 @@ c2_i = c3_i; var c4 = (function (_super) { __extends(c4, _super); function c4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return c4; }(c2)); diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index fb7a811cba3e0..a263a30e38285 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -227,16 +227,14 @@ var Base = (function () { var A2 = (function (_super) { __extends(A2, _super); function A2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return A2; }(Base)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index 675235ae3241c..b8584522b7baf 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -182,8 +182,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index ceb386b3e141e..93e1e876a7fd4 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -182,8 +182,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index 03494b4f88d1f..a8973bf2c1098 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -125,8 +125,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index ee8185802d4c7..4539538782d77 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -163,8 +163,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index 5a36f91c7ca23..5e8412bc3610a 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -163,8 +163,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index f23588dcbc5d7..d30c3586b12c3 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -273,8 +273,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index cc6fe9ce64068..4235c1352d480 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -235,8 +235,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index d401defc2ed60..9a6fecd668d21 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -121,8 +121,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index b4b531b8084cf..5721a4524864c 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -178,8 +178,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index 69f46e2ccd207..b6bf8a16e614e 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -178,8 +178,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index 171f21e77fcfa..690214fc00fa6 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -92,8 +92,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -115,8 +114,7 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A2)); diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index 523002e5b571e..4f48e5fc2c5d2 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -57,8 +57,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 1201dcf3d3de7..326c0830c4fe8 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -14,8 +14,7 @@ var __extends = (this && this.__extends) || function (d, b) { var S18 = (function (_super) { __extends(S18, _super); function S18() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 00186f40a2817..ff9112755bd53 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -25,8 +25,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 afc0e20eca9e1..dad9c5c291aeb 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -30,8 +30,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 6b75da57e9af1..5db7768270a6f 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -27,8 +27,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 3c89ecd50c068..381805659e271 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -19,8 +19,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 7b803e9c98793..00cc765f4cc61 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -32,8 +32,7 @@ var Base = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 293d017734ec3..b1bb0fec72c22 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -36,8 +36,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 c990298c4ac76..bf940f15014a4 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -40,8 +40,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 f5a31fffabbf8..5b5d64f9bf024 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -41,8 +41,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 a6d00d847f32a..408571af42aab 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -63,8 +63,7 @@ var X = (function () { var A = (function (_super) { __extends(A, _super); function A() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return A; }(X)); @@ -72,8 +71,7 @@ var A = (function (_super) { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(X)); diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 58b050c5ebeef..0ac935a582ad0 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -39,8 +39,7 @@ var X = (function () { var A = (function (_super) { __extends(A, _super); function A() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return A; }(X)); @@ -48,8 +47,7 @@ var A = (function (_super) { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(X)); diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 934c7eceb0e5b..160191c5ca03d 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -28,8 +28,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -37,8 +36,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -46,8 +44,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 217cf23f9cb62..509f9ba70e6c5 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -29,8 +29,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -38,8 +37,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -47,8 +45,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 511c293d41736..7908d36a56a44 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -40,8 +40,7 @@ var GenericBase = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(GenericBase)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index 0e14e958b284c..6b308d88896b5 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -84,24 +84,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index cb2cadb76987d..09abd6e0868e9 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -129,24 +129,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index 25c6983911784..4e9a8c59bf994 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -74,24 +74,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index dcd972d3a971b..91ec3b313bb0c 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -64,24 +64,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index 69fdebe8f5cf4..edafb00991681 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -67,24 +67,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index b16721d0accf3..45ed976e191c4 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -33,16 +33,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index 956e8cd2e0d2e..a16694cdbf54d 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -47,8 +47,7 @@ var NonGeneric; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); @@ -67,8 +66,7 @@ var Generic; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index 1b91e8a131a90..2e3190c15c825 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -525,8 +525,7 @@ method2(); var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 365e17afc9b5e..caf7ed445e566 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -28,16 +28,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index 7be8079cfd9f2..a6ce98f61e291 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -29,16 +29,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index 102562a841ae5..e3bd1643cfb8e 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -26,16 +26,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index 5fafe95c1a8f6..89979da4812a4 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -25,8 +25,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index 58bff801774b1..30ddc3f08bf39 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -12,8 +12,7 @@ var __extends = (this && this.__extends) || function (d, b) { var ExtendsNull = (function (_super) { __extends(ExtendsNull, _super); function ExtendsNull() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ExtendsNull; }(null)); diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index d58dcd1f536f4..442007d9b9a50 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -23,8 +23,7 @@ var X = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(X)); diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index 2f68300a4bf8c..47593dc9d6868 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -26,8 +26,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index 2ed404342d733..b2e99a73ad762 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -91,8 +91,7 @@ exports.g = C.F5(); var h = (function (_super) { __extends(h, _super); function h() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return h; }(C.A)); diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index c9c569f86762c..cd10a9e94560d 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -35,8 +35,7 @@ var X; var W = (function (_super) { __extends(W, _super); function W() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return W; }(A.B.Base.W)); @@ -55,8 +54,7 @@ var X; var W = (function (_super) { __extends(W, _super); function W() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 3681f9fa859ee..f3b93efc9eb84 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -45,8 +45,7 @@ var A; var ContextMenu = (function (_super) { __extends(ContextMenu, _super); function ContextMenu() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ContextMenu; }(B.EventManager)); diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js index 8973fbb145558..726c7b22446c5 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js @@ -29,8 +29,7 @@ var Q = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(x)); diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js index ff75df8bababf..4081de6d3ed56 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js @@ -29,8 +29,7 @@ function getClass(c) { var MyClass = (function (_super) { __extends(MyClass, _super); function MyClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MyClass; }(getClass(2))); diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index fc73eb5dbd008..f36a7e250a29e 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -70,8 +70,7 @@ function getExportedClass(c) { var MyClass = (function (_super) { __extends(MyClass, _super); function MyClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MyClass; }(getLocalClass(undefined))); @@ -79,8 +78,7 @@ exports.MyClass = MyClass; var MyClass2 = (function (_super) { __extends(MyClass2, _super); function MyClass2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MyClass2; }(getExportedClass(undefined))); @@ -88,8 +86,7 @@ exports.MyClass2 = MyClass2; var MyClass3 = (function (_super) { __extends(MyClass3, _super); function MyClass3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MyClass3; }(getExportedClass(undefined))); @@ -97,8 +94,7 @@ exports.MyClass3 = MyClass3; var MyClass4 = (function (_super) { __extends(MyClass4, _super); function MyClass4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MyClass4; }(getExportedClass(undefined))); diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends4.js b/tests/baselines/reference/declarationEmitExpressionInExtends4.js index ed34544256b6d..b90c1275197bd 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends4.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends4.js @@ -33,24 +33,21 @@ function getSomething() { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(getSomething())); var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(SomeUndefinedFunction())); var C3 = (function (_super) { __extends(C3, _super); function C3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C3; }(SomeUndefinedFunction)); diff --git a/tests/baselines/reference/declarationEmitNameConflicts3.js b/tests/baselines/reference/declarationEmitNameConflicts3.js index c17f624087dc2..09dcea089a849 100644 --- a/tests/baselines/reference/declarationEmitNameConflicts3.js +++ b/tests/baselines/reference/declarationEmitNameConflicts3.js @@ -64,8 +64,7 @@ var M; var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E; }(C)); diff --git a/tests/baselines/reference/declarationEmitProtectedMembers.js b/tests/baselines/reference/declarationEmitProtectedMembers.js index cc4e27895f14d..9ae8e8a2437d3 100644 --- a/tests/baselines/reference/declarationEmitProtectedMembers.js +++ b/tests/baselines/reference/declarationEmitProtectedMembers.js @@ -88,8 +88,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } C2.prototype.f = function () { return _super.prototype.f.call(this) + this.x; @@ -103,8 +102,7 @@ var C2 = (function (_super) { var C3 = (function (_super) { __extends(C3, _super); function C3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 0b364e90e45b7..ad9b7a7037330 100644 --- a/tests/baselines/reference/declarationEmitThisPredicates01.js +++ b/tests/baselines/reference/declarationEmitThisPredicates01.js @@ -28,8 +28,7 @@ exports.C = C; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js index aea36311add1d..fe7995462ef2c 100644 --- a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js +++ b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js @@ -28,8 +28,7 @@ exports.C = C; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/declareDottedExtend.js b/tests/baselines/reference/declareDottedExtend.js index f167928087d05..3c7588d2b6cc9 100644 --- a/tests/baselines/reference/declareDottedExtend.js +++ b/tests/baselines/reference/declareDottedExtend.js @@ -21,16 +21,14 @@ var ab = A.B; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(ab.C)); var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E; }(A.B.C)); diff --git a/tests/baselines/reference/decoratorOnClassMethod12.js b/tests/baselines/reference/decoratorOnClassMethod12.js index 6d95c696176ed..7dd5f69818259 100644 --- a/tests/baselines/reference/decoratorOnClassMethod12.js +++ b/tests/baselines/reference/decoratorOnClassMethod12.js @@ -32,8 +32,7 @@ var M; var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } C.prototype.method = function () { }; return C; diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index 6dcf8f3fd8358..7f6b83593ca75 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -38,8 +38,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 2fe5906e74629..8224473cb548c 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -68,8 +68,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -90,8 +89,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index dc63ccb21d8ab..4753e39539073 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -32,8 +32,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -46,8 +45,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index 7ab70d93ff281..1a58c038feac6 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -29,8 +29,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -42,8 +41,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index ac9b401a45c4b..6797eef0e7726 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -131,8 +131,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index eeaf80061af82..06f809976008b 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -30,16 +30,14 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived1)); diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 92fbc07e77405..7943d904deafb 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -129,8 +129,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index f2d8f72edfb7d..e42ff9c9e1d07 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -37,8 +37,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -50,8 +49,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index 0e88d3664c660..a76ac8101a098 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -36,8 +36,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } D.prototype.foo = function () { }; // ok to drop parameters return D; @@ -45,8 +44,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 5a3f8f3cf57dd..a3894863696b4 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -36,8 +36,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } D.prototype.foo = function (x) { }; // ok to drop parameters return D; @@ -45,8 +44,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 f6aa6963795a7..71dfecb346f01 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -36,8 +36,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } D.prototype.foo = function (x) { }; // ok to drop parameters return D; @@ -45,8 +44,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 8d18e311d8879..0030ce702d82a 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -36,8 +36,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } D.prototype.foo = function () { }; // ok to drop parameters return D; @@ -45,8 +44,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 70885570373e5..2a199e5586152 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -91,8 +91,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Object.defineProperty(D.prototype, "X", { get: function () { @@ -120,8 +119,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 24d43468dcf81..0542815c4e4b7 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -46,8 +46,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 a6b7710ec6dce..41869cad416fd 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -56,8 +56,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 3da7720b77e79..10ae3cb35c855 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -45,8 +45,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived.fn = function () { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index 57f474affe759..3f2c2a3b811a4 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -58,8 +58,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived.fn = function () { return ''; diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index 27947b4f05f19..3e097a9b139c3 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -39,8 +39,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Red = (function (_super) { __extends(Red, _super); function Red() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Red.prototype.shade = function () { var _this = this; @@ -59,8 +58,7 @@ var Color = (function () { var Blue = (function (_super) { __extends(Blue, _super); function Blue() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 e31b18e11e71f..1822f3fcc47dd 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -64,8 +64,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Object.defineProperty(D.prototype, "X", { get: function () { @@ -93,8 +92,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 4430ad5a31b82..c17922e05eee0 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -34,8 +34,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 f6415d8496553..6fe690fd692db 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -39,8 +39,7 @@ var Derived = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index 4bb83a7c172a2..1f7ed8bfa9443 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -43,8 +43,7 @@ var User = (function () { var RegisteredUser = (function (_super) { __extends(RegisteredUser, _super); function RegisteredUser() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 2292f0a494ae9..3ed21cf217a64 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -14,8 +14,7 @@ var A = require(""); var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index 7b05688b8c8de..ed2e1aa7f06e7 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -30,8 +30,7 @@ var base = (function () { var derived = (function (_super) { __extends(derived, _super); function derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return derived; }(base)); diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 0fef86493f1f6..e12a758b0537c 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -247,8 +247,7 @@ var SomeDerived2 = (function (_super) { var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 d3d275ff25b35..6dd9f62edcbc0 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -135,8 +135,7 @@ var testClass6 = (function () { var testClass7 = (function (_super) { __extends(testClass7, _super); function testClass7() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return testClass7; }(Foo)); // error: could not find symbol V diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index b3787405ff74e..de5657b087e72 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -314,8 +314,7 @@ var BaseClassWithConstructor = (function () { var ChildClassWithoutConstructor = (function (_super) { __extends(ChildClassWithoutConstructor, _super); function ChildClassWithoutConstructor() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ChildClassWithoutConstructor; }(BaseClassWithConstructor)); diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index 6e30a1d7879e9..f786fce446187 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -17,8 +17,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar; }(M.Foo)); diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 439f74a9c9d0a..7c1831ecac487 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -34,8 +34,7 @@ define(["require", "exports", "exportAssignmentOfGenericType1_0"], function (req var M = (function (_super) { __extends(M, _super); function M() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return M; }(q)); diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index b6eec928a071b..518c66369476d 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -32,8 +32,7 @@ var Bbb = (function () { var Aaa = (function (_super) { __extends(Aaa, _super); function Aaa() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Aaa; }(Bbb)); diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index 508eea66500a7..b20a463338cdc 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -37,8 +37,7 @@ var M; var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B)); @@ -49,8 +48,7 @@ var M; var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(M.B)); @@ -61,8 +59,7 @@ var N; var C3 = (function (_super) { __extends(C3, _super); function C3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C3; }(M.B)); diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index 14f3d69ef3eb5..3ab217eb01979 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -21,8 +21,7 @@ var N; var C4 = (function (_super) { __extends(C4, _super); function C4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C4; }(M.B)); @@ -33,8 +32,7 @@ var M; var C5 = (function (_super) { __extends(C5, _super); function C5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C5; }(B)); diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 03bf54db78dba..74bbf3a27ac93 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -28,8 +28,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 50db54a05e9ba..fa7963487d579 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -33,8 +33,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 6cab3a8c7f609..596ab319b2ce8 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -12,8 +12,7 @@ var __extends = (this && this.__extends) || function (d, b) { var derived = (function (_super) { __extends(derived, _super); function derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return derived; }(base)); diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index c0cb5d4902327..895cdedfaff65 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -31,8 +31,7 @@ var x = foo1; var y = (function (_super) { __extends(y, _super); function y() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return y; }(x)); diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index 6985657ced311..4bf92dd0315d9 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -20,8 +20,7 @@ var CStatic; var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E; }(CStatic)); diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index 829b1ae1a3234..b23b601bc2902 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -19,8 +19,7 @@ var x = A; var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 9a2d4fb2adf5d..78dfaa918277e 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -18,8 +18,7 @@ var x = new Foo(); // legal, considered a constructor function var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(Foo)); // error, could not find symbol Foo diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index db2fcdbbf3660..da081154d8a2e 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -51,8 +51,7 @@ var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); @@ -68,8 +67,7 @@ var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return VisualizationModel; }(Backbone.Model)); diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index db11c06d78261..267cd86eed09f 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -20,8 +20,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 f61317c2d5061..76fbc3365af2f 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -20,8 +20,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 68a2960b03f33..ac44416e13392 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -35,8 +35,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } B.prototype.bar = function () { return this; @@ -46,8 +45,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 7176a27ebc999..4f52b5e1456f6 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -126,8 +126,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 cca8e94dcab99..d1181760a367d 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -107,8 +107,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 82910ff043543..3666ad930a6cc 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -68,8 +68,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(C)); diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 465ea54b73f5c..433418af41d22 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -134,16 +134,14 @@ var AnotherClass = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index e26e49c1b7a24..86636b84a87b8 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -236,8 +236,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -288,8 +287,7 @@ function f6() { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index c604461f32d1a..55917962184ef 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -32,8 +32,7 @@ var EventBase = (function () { var StringEvent = (function (_super) { __extends(StringEvent, _super); function StringEvent() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 38a98a3f11496..a676316459f93 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -32,8 +32,7 @@ var EventBase = (function () { var StringEvent = (function (_super) { __extends(StringEvent, _super); function StringEvent() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 5c512883a1064..2a6911d9cf539 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -369,16 +369,14 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index 25dfb7ae72250..a075eff955014 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -26,8 +26,7 @@ var BaseClass = (function () { var SubClass = (function (_super) { __extends(SubClass, _super); function SubClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 e39353b6a7f38..2b562742bf71c 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -35,8 +35,7 @@ var BaseCollection2 = (function () { var DataView2 = (function (_super) { __extends(DataView2, _super); function DataView2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 53c02a85113f0..afef6224ba15b 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -122,16 +122,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index 3835a4dd78728..7b621b3ffd902 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -46,16 +46,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index a16f8bcac685e..892cda0ee2d64 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -54,8 +54,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index 410675804af89..addfbc756a8ed 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -52,16 +52,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index 3fbb7c8a90117..c2ad2ba29a395 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -46,8 +46,7 @@ var M; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(C1)); diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index d14b70b631291..dc574dedb0097 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -47,8 +47,7 @@ function B1() { return (function (_super) { __extends(class_1, _super); function class_1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return class_1; }(A)); @@ -58,8 +57,7 @@ var B2 = (function () { this.anon = (function (_super) { __extends(class_2, _super); function class_2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return class_2; }(A)); @@ -70,8 +68,7 @@ function B3() { return (function (_super) { __extends(Inner, _super); function Inner() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Inner; }(A)); @@ -80,16 +77,14 @@ function B3() { var K = (function (_super) { __extends(K, _super); function K() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return K; }(B1())); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }((new B2().anon))); @@ -97,8 +92,7 @@ var b3Number = B3(); var S = (function (_super) { __extends(S, _super); function S() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return S; }(b3Number)); diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index a6c14b9ba0f65..1f3a6e17f1410 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -14,16 +14,14 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return A; }(B)); var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(C)); diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 2124f41417265..4609e3bc9db45 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -26,8 +26,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Bar.getFoo = function () { }; diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index 6f10b979c4a14..5371e2479aad0 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -31,8 +31,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index 454bc77ae5b42..1b455073196dd 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -26,8 +26,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index 26749718d4366..0abd655e1daaa 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -26,8 +26,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index e7c32cbe73ff7..059a3213b7aa0 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -24,8 +24,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index ccaf6fa88076d..eac025cce9ba9 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -29,8 +29,7 @@ var BaseEvent = (function () { var MyEvent = (function (_super) { __extends(MyEvent, _super); function MyEvent() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MyEvent; }(BaseEvent)); @@ -42,8 +41,7 @@ var BaseEventWrapper = (function () { var MyEventWrapper = (function (_super) { __extends(MyEventWrapper, _super); function MyEventWrapper() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MyEventWrapper; }(BaseEventWrapper)); diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index 8565859370503..9e3ede0019d03 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -28,8 +28,7 @@ var BaseEvent = (function () { var MyEvent = (function (_super) { __extends(MyEvent, _super); function MyEvent() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MyEvent; }(BaseEvent)); @@ -41,8 +40,7 @@ var BaseEventWrapper = (function () { var MyEventWrapper = (function (_super) { __extends(MyEventWrapper, _super); function MyEventWrapper() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MyEventWrapper; }(BaseEventWrapper)); diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index e567e2a8042be..6d65ee5531b6d 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -57,8 +57,7 @@ var TypeScript2; var PullTypeSymbol = (function (_super) { __extends(PullTypeSymbol, _super); function PullTypeSymbol() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PullTypeSymbol; }(PullSymbol)); diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 31d2b3976db6d..687d593f01e12 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -28,8 +28,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 41a187edb6a12..50dbe5debbd9a 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -40,8 +40,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } B.prototype.bar = function () { return 1; }; return B; @@ -49,8 +48,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 b776668f2e2e7..7bbd7351f1dd4 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -44,8 +44,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 39468204a5af1..cf19feede3436 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -60,8 +60,7 @@ var g = function f(x) { var y; return y; }; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); @@ -77,8 +76,7 @@ var M; var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(M.E)); diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index a41d459b445c4..973ee23176282 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -55,16 +55,14 @@ var g = function f(x) { var y; return y; }; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(I)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(M.C)); diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index c0498b351e13b..d6fb98b67cae0 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -31,8 +31,7 @@ define(["require", "exports"], function (require, exports) { var List = (function (_super) { __extends(List, _super); function List() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } List.prototype.Bar = function () { }; return List; @@ -47,8 +46,7 @@ define(["require", "exports"], function (require, exports) { var ListItem = (function (_super) { __extends(ListItem, _super); function ListItem() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ListItem; }(CollectionItem)); diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index e3c50cfa8f7e8..60a8976722d7f 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -160,16 +160,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index af1e3be18ff26..483370bee5c5c 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -177,8 +177,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(C)); diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index 0dfc867a2f77d..df725cde43a08 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -16,8 +16,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index 033d615019407..a5a5e02c15675 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -99,24 +99,21 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar; }(Foo)); var Bar2 = (function (_super) { __extends(Bar2, _super); function Bar2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar2; }(Foo)); var Bar3 = (function (_super) { __extends(Bar3, _super); function Bar3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar3; }(Foo)); @@ -131,32 +128,28 @@ var M; var Baz = (function (_super) { __extends(Baz, _super); function Baz() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Baz; }(Foo)); var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar; }(Foo)); var Bar2 = (function (_super) { __extends(Bar2, _super); function Bar2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar2; }(Foo)); var Bar3 = (function (_super) { __extends(Bar3, _super); function Bar3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar3; }(Foo)); @@ -172,16 +165,14 @@ var M2; var Baz = (function (_super) { __extends(Baz, _super); function Baz() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Baz; }(Foo)); var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar; }(Foo)); @@ -192,16 +183,14 @@ var M2; var Bar2 = (function (_super) { __extends(Bar2, _super); function Bar2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar2; }(Foo)); var Bar3 = (function (_super) { __extends(Bar3, _super); function Bar3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar3; }(Foo)); diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index 78cfb6b51b94e..d0f7484714164 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -75,32 +75,28 @@ var Bar4 = (function () { var Bar5 = (function (_super) { __extends(Bar5, _super); function Bar5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar5; }(Foo)); var Bar6 = (function (_super) { __extends(Bar6, _super); function Bar6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar6; }(Foo)); var Bar7 = (function (_super) { __extends(Bar7, _super); function Bar7() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar7; }(Foo)); var Bar8 = (function (_super) { __extends(Bar8, _super); function Bar8() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar8; }(Foo)); diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index d9f40f83051d6..b4f45cac8067a 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -30,8 +30,7 @@ var Greeter = require("./importAsBaseClass_0"); var Hello = (function (_super) { __extends(Hello, _super); function Hello() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Hello; }(Greeter)); diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index 6641ef9d212f2..ae4d312701024 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -45,8 +45,7 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -94,8 +93,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersAmd.js b/tests/baselines/reference/importHelpersAmd.js index 89fab70bdba62..fea93840fa92c 100644 --- a/tests/baselines/reference/importHelpersAmd.js +++ b/tests/baselines/reference/importHelpersAmd.js @@ -32,8 +32,7 @@ define(["require", "exports", "tslib", "./a"], function (require, exports, tslib var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 2a97d3d2d872e..28c00f975544c 100644 --- a/tests/baselines/reference/importHelpersInIsolatedModules.js +++ b/tests/baselines/reference/importHelpersInIsolatedModules.js @@ -45,8 +45,7 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -79,8 +78,7 @@ var A = (function () { var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index d5f8db60f9766..e22d1f4353d71 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -39,8 +39,7 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -88,8 +87,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 5891922f9f296..41df9710f3325 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -37,8 +37,7 @@ exports.A = A; var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -86,8 +85,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/importHelpersOutFile.js b/tests/baselines/reference/importHelpersOutFile.js index b4c2040aa7137..a45f6285782cd 100644 --- a/tests/baselines/reference/importHelpersOutFile.js +++ b/tests/baselines/reference/importHelpersOutFile.js @@ -35,8 +35,7 @@ define("b", ["require", "exports", "tslib", "a"], function (require, exports, ts var B = (function (_super) { tslib_1.__extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(a_1.A)); @@ -47,8 +46,7 @@ define("c", ["require", "exports", "tslib", "a"], function (require, exports, ts var C = (function (_super) { tslib_2.__extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 552bd0ed4046b..20f2d299c5254 100644 --- a/tests/baselines/reference/importHelpersSystem.js +++ b/tests/baselines/reference/importHelpersSystem.js @@ -51,8 +51,7 @@ System.register(["tslib", "./a"], function (exports_1, context_1) { B = (function (_super) { tslib_1.__extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 b4950b039f3e3..34cc0604e7ae9 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -31,8 +31,7 @@ define(["require", "exports", "Foo"], function (require, exports, Error) { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar; }(Error)); diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index 956e20a104520..a40c3a51a782b 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -31,8 +31,7 @@ var foo = require("./importUsedInExtendsList1_require"); var Sub = (function (_super) { __extends(Sub, _super); function Sub() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Sub; }(foo.Super)); diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index c8b910abb2dcd..d7357f021d0ed 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -42,8 +42,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -56,8 +55,7 @@ var F = (function () { var G = (function (_super) { __extends(G, _super); function G() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return G; }(F)); @@ -70,8 +68,7 @@ var H = (function () { var I = (function (_super) { __extends(I, _super); function I() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return I; }(H)); @@ -84,8 +81,7 @@ var J = (function () { var K = (function (_super) { __extends(K, _super); function K() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return K; }(J)); diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index c1c77ec5fc97e..2f4f37b9b53a5 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -11,16 +11,14 @@ var __extends = (this && this.__extends) || function (d, b) { var a = (function (_super) { __extends(a, _super); function a() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return a; }(b)); var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index 366ad1f0af54d..9171bb0eeb6ee 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -11,16 +11,14 @@ var __extends = (this && this.__extends) || function (d, b) { var a = (function (_super) { __extends(a, _super); function a() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return a; }(b)); var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index 9b145b55d0401..ad1a063bfb0fd 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -43,8 +43,7 @@ var Base = (function () { var A = (function (_super) { __extends(A, _super); function A() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return A; }(Base)); diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index 5db269f7c58e2..40e6abd3e5366 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(T)); diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index 7f3e872245bb3..a0874eb1c723f 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -24,16 +24,14 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(B)); diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index c4acea2226021..cbfef2d3382a4 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -53,16 +53,14 @@ var B2 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1; }(B1)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(B2)); @@ -74,8 +72,7 @@ var N = (function () { var ND = (function (_super) { __extends(ND, _super); function ND() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ND; }(N)); @@ -89,8 +86,7 @@ var Good = (function () { var Baad = (function (_super) { __extends(Baad, _super); function Baad() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 f555d5bf69464..86de0b7635066 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -75,8 +75,7 @@ var Control = (function () { var Button = (function (_super) { __extends(Button, _super); function Button() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Button.prototype.select = function () { }; return Button; @@ -84,8 +83,7 @@ var Button = (function (_super) { var TextBox = (function (_super) { __extends(TextBox, _super); function TextBox() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } TextBox.prototype.select = function () { }; return TextBox; @@ -93,16 +91,14 @@ var TextBox = (function (_super) { var ImageBase = (function (_super) { __extends(ImageBase, _super); function ImageBase() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ImageBase; }(Control)); var Image1 = (function (_super) { __extends(Image1, _super); function Image1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Image1; }(Control)); diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 2ed366d7b8ac6..57a9c89758357 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -25,16 +25,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 369c6b20a14d8..83c5aa3e4cdfc 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -25,16 +25,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 d884364d95c74..b11b6e318a7cb 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -25,16 +25,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 c1289f99a78e6..09ea08899d9dd 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -40,8 +40,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 665b547154dbc..59d2abdaab2b5 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -31,8 +31,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 a9a92003542f3..98a95747a8e8b 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -26,8 +26,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 17541ee163da1..0d54e5d42fab9 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -37,8 +37,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 a154d0426a974..9af25c6fdb807 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -28,8 +28,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 be10895642e7d..5c77ce081010d 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -23,8 +23,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 6895077abda36..82c7a94d17c77 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -37,8 +37,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index 00c1093053bdc..e6929218e6396 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -26,8 +26,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index 6cbb7ae7e8ca4..85764cddc5230 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -21,8 +21,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index 370e27514c183..28fe814450996 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -21,8 +21,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index a61b6bafabd24..0cc71e168f4a8 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -40,8 +40,7 @@ var N; var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1; }(M.C1)); @@ -49,8 +48,7 @@ var N; var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(M.C2)); diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index 9f71208e5dbcd..bb91ee5f9ead4 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -40,8 +40,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 2e0c3dc90d0c1..363852a84bf49 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -31,8 +31,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 95bf94572b15f..ba8df7a5f0bca 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -26,8 +26,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 25d75bea5afd2..e464029fba5d9 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -37,8 +37,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 5c39c10e73854..cc825cfa9b5e8 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -32,8 +32,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 c37caf8d53c93..466c65fa7d5b1 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -28,8 +28,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 eb185d56d0bc3..dfc0ce2c13fcd 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -23,8 +23,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 0779cc10d3759..da7850f2071fd 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -23,8 +23,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 4934947233f05..d5916a9d452c1 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -23,8 +23,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 27a65d513fd80..b4cae99b64be9 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -21,8 +21,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index 7cfafdf1f9d65..38c637dd8d1b0 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -21,8 +21,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 1840a7829e8d6..49dc86fc50036 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -36,8 +36,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index 8e498273b86cb..bcd63537540d8 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -26,8 +26,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index c003eaa60b4e8..c1bdd9b66a234 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -21,8 +21,7 @@ var a = (function () { var b = (function (_super) { __extends(b, _super); function b() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return b; }(a)); diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index ca6a379816fc2..c9db175667637 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -32,8 +32,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index b323aefbd4839..9a1b13a84348c 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -53,16 +53,14 @@ var BaseBase2 = (function () { var Base = (function (_super) { __extends(Base, _super); function Base() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Base; }(BaseBase)); var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index 1de6f5f638aee..7ba382e8c470b 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -38,8 +38,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); @@ -54,8 +53,7 @@ var D; var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 f78378f0885a2..b8f39c5b0e21a 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -115,16 +115,14 @@ var Animal = (function () { var Mammal = (function (_super) { __extends(Mammal, _super); function Mammal() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Mammal; }(Animal)); var Giraffe = (function (_super) { __extends(Giraffe, _super); function Giraffe() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Giraffe; }(Mammal)); diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index cf056e768d837..8dc5227685f76 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -69,8 +69,7 @@ var NonGeneric; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); @@ -102,8 +101,7 @@ var Generic; var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index e70dc7b64811f..914f37960012e 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -21,8 +21,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(C1)); diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index de2789caa68a8..54a574238e562 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -128,8 +128,7 @@ var A = (function () { var A1 = (function (_super) { __extends(A1, _super); function A1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return A1; }(A)); @@ -141,8 +140,7 @@ var A2 = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index 83ad38e64f034..bc496a63632d3 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -47,8 +47,7 @@ var c = (function () { var d = (function (_super) { __extends(d, _super); function d() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 6111e7f8cee77..6542376a19bde 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -57,8 +57,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 499bd21990543..70a62da4131ed 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -53,8 +53,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 70ceaa8acd3bf..8324a001f9146 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -32,8 +32,7 @@ var Control = (function () { var Button = (function (_super) { __extends(Button, _super); function Button() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Button.prototype.select = function () { }; return Button; @@ -41,8 +40,7 @@ var Button = (function (_super) { var TextBox = (function (_super) { __extends(TextBox, _super); function TextBox() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } TextBox.prototype.select = function () { }; return TextBox; @@ -50,8 +48,7 @@ var TextBox = (function (_super) { var Image = (function (_super) { __extends(Image, _super); function Image() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Image; }(Control)); diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index 5e6695dd20088..1179ff101df0b 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -43,8 +43,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index f3bfa4db6a586..afb5a795264cc 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -64,24 +64,21 @@ var C3 = (function () { var C4 = (function (_super) { __extends(C4, _super); function C4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C4; }(C1)); var C5 = (function (_super) { __extends(C5, _super); function C5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C5; }(C2)); var C6 = (function (_super) { __extends(C6, _super); function C6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C6; }(C3)); @@ -93,8 +90,7 @@ var C7 = (function () { var C8 = (function (_super) { __extends(C8, _super); function C8() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C8; }(C7)); diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index 75bf3f9188442..6e9b09c906f8e 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -95,8 +95,7 @@ var Y; var BB = (function (_super) { __extends(BB, _super); function BB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return BB; }(A)); @@ -111,8 +110,7 @@ var Y2; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(AA)); @@ -146,8 +144,7 @@ var YY; var BB = (function (_super) { __extends(BB, _super); function BB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return BB; }(A)); @@ -162,8 +159,7 @@ var YY2; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(AA)); @@ -197,8 +193,7 @@ var YYY; var BB = (function (_super) { __extends(BB, _super); function BB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return BB; }(A)); @@ -213,8 +208,7 @@ var YYY2; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(AA)); diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index b4fbd6f369899..340429cc3982c 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -67,8 +67,7 @@ var C = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(C)); diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index 1409b1c59a8b2..a6b07b7d7bd3a 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -41,8 +41,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index baf2d1de129cb..6f1d38dcbb5bf 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -26,8 +26,7 @@ var ns = require("module"); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(module_2.c2.C)); diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index c149d4e3c3d72..604787af744e6 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -35,8 +35,7 @@ var BaseComponent = require("BaseComponent"); var TestComponent = (function (_super) { __extends(TestComponent, _super); function TestComponent() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } TestComponent.prototype.render = function () { return ; diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index 16653cfb4f3a2..47db7f3ce64c1 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -56,8 +56,7 @@ var Event = (function () { var ItemSetEvent = (function (_super) { __extends(ItemSetEvent, _super); function ItemSetEvent() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 96c9337817d4d..100452b7a96c0 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -300,8 +300,7 @@ function f6() { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -309,8 +308,7 @@ function f6() { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index 19cd9ee463030..e5a4d11f00cd8 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -42,8 +42,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(C1)); diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index 53a8c983399f6..b24e86eca5815 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -27,8 +27,7 @@ var __extends = (this && this.__extends) || function (d, b) { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 50108773a7071..d610e4ab46f3d 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -47,8 +47,7 @@ define(["require", "exports", "./a"], function (require, exports, a_1) { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } B.prototype.setProtected = function () { }; diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index fd0bea5494c80..0f598f2cf7858 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -61,8 +61,7 @@ var BaseClass = (function () { var Child = (function (_super) { __extends(Child, _super); function Child() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Child.prototype.method = function () { }; return Child; @@ -76,8 +75,7 @@ var ChildNoBaseClass = (function () { var Grandchild = (function (_super) { __extends(Grandchild, _super); function Grandchild() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Grandchild; }(ChildNoBaseClass)); diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index a3baa1920e3fe..6dccf1dfdd9e9 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -50,16 +50,14 @@ var C2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E; }(C2)); diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index e21ca151c8707..a3ca796575c66 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -57,8 +57,7 @@ var C2 = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index 598ddaef2de0d..fc0533a2470e3 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -13,8 +13,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(M)); diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index 2f4ac430cc127..51d9eb89b1d2c 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -31,8 +31,7 @@ define(["require", "exports"], function (require, exports) { var Test1 = (function (_super) { __extends(Test1, _super); function Test1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Test1; }(C1)); diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 11053d76d2dfe..1558ef742ab14 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -79,16 +79,14 @@ var A; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(AA)); var BB = (function (_super) { __extends(BB, _super); function BB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return BB; }(A)); @@ -132,8 +130,7 @@ var Y; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(AA)); @@ -141,8 +138,7 @@ var Y; var BB = (function (_super) { __extends(BB, _super); function BB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return BB; }(A)); diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index 80e9a469398af..9c0e865cdb774 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -57,32 +57,28 @@ var B2 = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B1)); var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1; }(B1)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(B2)); var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E; }(D1)); @@ -94,8 +90,7 @@ var N = (function () { var ND = (function (_super) { __extends(ND, _super); function ND() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ND; }(N)); @@ -109,8 +104,7 @@ var Good = (function () { var Baad = (function (_super) { __extends(Baad, _super); function Baad() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 7c5ec66c6be58..8b59564d46595 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -25,8 +25,7 @@ var foo = (function () { var foo2 = (function (_super) { __extends(foo2, _super); function foo2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return foo2; }(foo)); diff --git a/tests/baselines/reference/noEmitHelpers.js b/tests/baselines/reference/noEmitHelpers.js index c3d27cac8a968..fdb7cbab7d4ed 100644 --- a/tests/baselines/reference/noEmitHelpers.js +++ b/tests/baselines/reference/noEmitHelpers.js @@ -13,8 +13,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index d0e87aba25bf6..cc4c942237329 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -26,8 +26,7 @@ var Parent = (function () { var Child = (function (_super) { __extends(Child, _super); function Child() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 1b4119227bc5c..1323955c05e7f 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -25,8 +25,7 @@ var Parent = (function () { var Child = (function (_super) { __extends(Child, _super); function Child() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 bbab8e9ccdd6e..b0a3365193d25 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -19,8 +19,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Bar; }(Foo)); // Valid diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index 1901e16944749..92c8b380e00af 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -61,8 +61,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 97c3e56d42379..29cb75b423469 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -26,8 +26,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 732f7e2672ce5..135e169c4a9f8 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -26,8 +26,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index 1d38f844384f1..5b9e797bdecde 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -26,8 +26,7 @@ var I = (function () { var I2 = (function (_super) { __extends(I2, _super); function I2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return I2; }(I)); diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 76c1890094511..17045d65af0a9 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -68,8 +68,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index 3df18cb27cb09..e82cef9bdd6f2 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -147,16 +147,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index e7d2f603d5c31..abcea11367078 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -140,8 +140,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -163,16 +162,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index e0b75f54208f9..f5aeb177472f7 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -147,16 +147,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index 681af407bd402..3946027063f4d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -145,16 +145,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 2011b741df2f9..9cae6960a2ea0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -53,8 +53,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index 80bdd4c87e1e2..68754a583aa15 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -39,8 +39,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(C1)); @@ -54,8 +53,7 @@ var C3 = (function () { var C4 = (function (_super) { __extends(C4, _super); function C4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C4; }(C3)); diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index 3eac80c60fcb4..b0211bbbba741 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -147,16 +147,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index d55ef5eb28c5a..00d7d1e81d84d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -140,8 +140,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -163,16 +162,14 @@ var C = (function () { var PA = (function (_super) { __extends(PA, _super); function PA() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PA; }(A)); var PB = (function (_super) { __extends(PB, _super); function PB() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return PB; }(B)); diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 04056fa9c14d8..e460ab3fb15b3 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -25,8 +25,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index a8bd88ed3a8b1..1312a89502ad1 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -22,8 +22,7 @@ var Z = (function () { var Y = (function (_super) { __extends(Y, _super); function Y() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 5643875efd362..5054c2a3c335e 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -28,8 +28,7 @@ define("b", ["require", "exports", "ref/a"], function (require, exports, a_1) { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/outModuleConcatAmd.js.map b/tests/baselines/reference/outModuleConcatAmd.js.map index 25873d9cd0763..e987d5deb8a10 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js.map +++ b/tests/baselines/reference/outModuleConcatAmd.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAlB,cAAkB;;;;ICAlB;QAAuB,qBAAC;QAAxB;YAAuB,kDAAC;;QAAG,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAlB,cAAkB;;;;ICAlB;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index 2fa35a323a081..1bfda04977630 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -92,35 +92,27 @@ sourceFile:tests/cases/compiler/b.ts --- >>> function B() { 1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(19, 9) Source(2, 1) + SourceIndex(1) --- ->>> var _this = _super.apply(this, arguments) || this; -1->^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1->export class B extends -2 > A -1->Emitted(20, 13) Source(2, 24) + SourceIndex(1) -2 >Emitted(20, 63) Source(2, 25) + SourceIndex(1) ---- ->>> return _this; +>>> return _super.apply(this, arguments) || this; >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->export class B extends A { 2 > } -1 >Emitted(22, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(22, 10) Source(2, 29) + SourceIndex(1) +1->Emitted(21, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(21, 10) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(23, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(23, 17) Source(2, 29) + SourceIndex(1) +1->Emitted(22, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(22, 17) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^ @@ -136,20 +128,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(24, 5) Source(2, 28) + SourceIndex(1) -2 >Emitted(24, 6) Source(2, 29) + SourceIndex(1) -3 >Emitted(24, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(24, 7) Source(2, 24) + SourceIndex(1) -5 >Emitted(24, 12) Source(2, 25) + SourceIndex(1) -6 >Emitted(24, 15) Source(2, 29) + SourceIndex(1) +1 >Emitted(23, 5) Source(2, 28) + SourceIndex(1) +2 >Emitted(23, 6) Source(2, 29) + SourceIndex(1) +3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(23, 7) Source(2, 24) + SourceIndex(1) +5 >Emitted(23, 12) Source(2, 25) + SourceIndex(1) +6 >Emitted(23, 15) Source(2, 29) + SourceIndex(1) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > export class B extends A { } -1->Emitted(25, 5) Source(2, 1) + SourceIndex(1) -2 >Emitted(25, 19) Source(2, 29) + SourceIndex(1) +1->Emitted(24, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(24, 19) Source(2, 29) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index eecb410195812..a615090f33a50 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -44,8 +44,7 @@ System.register("b", ["ref/a"], function (exports_2, context_2) { B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/outModuleConcatSystem.js.map b/tests/baselines/reference/outModuleConcatSystem.js.map index f77bed44ffcf6..ac8fb23d87c13 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js.map +++ b/tests/baselines/reference/outModuleConcatSystem.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;oBAAuB,kDAAC;;gBAAG,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;;gBAA2B,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index 5287a760ac8eb..732214237fa32 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -109,35 +109,27 @@ sourceFile:tests/cases/compiler/b.ts --- >>> function B() { 1 >^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(35, 17) Source(2, 1) + SourceIndex(1) --- ->>> var _this = _super.apply(this, arguments) || this; -1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1->export class B extends -2 > A -1->Emitted(36, 21) Source(2, 24) + SourceIndex(1) -2 >Emitted(36, 71) Source(2, 25) + SourceIndex(1) ---- ->>> return _this; +>>> return _super.apply(this, arguments) || this; >>> } -1 >^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->export class B extends A { 2 > } -1 >Emitted(38, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(38, 18) Source(2, 29) + SourceIndex(1) +1->Emitted(37, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(37, 18) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(39, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(39, 25) Source(2, 29) + SourceIndex(1) +1->Emitted(38, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(38, 25) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^^^^^^^^^ @@ -153,12 +145,12 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(40, 13) Source(2, 28) + SourceIndex(1) -2 >Emitted(40, 14) Source(2, 29) + SourceIndex(1) -3 >Emitted(40, 14) Source(2, 1) + SourceIndex(1) -4 >Emitted(40, 15) Source(2, 24) + SourceIndex(1) -5 >Emitted(40, 20) Source(2, 25) + SourceIndex(1) -6 >Emitted(40, 23) Source(2, 29) + SourceIndex(1) +1 >Emitted(39, 13) Source(2, 28) + SourceIndex(1) +2 >Emitted(39, 14) Source(2, 29) + SourceIndex(1) +3 >Emitted(39, 14) Source(2, 1) + SourceIndex(1) +4 >Emitted(39, 15) Source(2, 24) + SourceIndex(1) +5 >Emitted(39, 20) Source(2, 25) + SourceIndex(1) +6 >Emitted(39, 23) Source(2, 29) + SourceIndex(1) --- >>> exports_2("B", B); >>> } @@ -166,8 +158,8 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^ 1-> 2 > -1->Emitted(42, 9) Source(2, 29) + SourceIndex(1) -2 >Emitted(42, 10) Source(2, 30) + SourceIndex(1) +1->Emitted(41, 9) Source(2, 29) + SourceIndex(1) +2 >Emitted(41, 10) Source(2, 30) + SourceIndex(1) --- >>> }; >>>}); diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index ac2f2510b642c..b9ff7c15b61a2 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -57,8 +57,7 @@ define("b", ["require", "exports", "ref/a"], function (require, exports, a_1) { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(a_1.A)); diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js.map b/tests/baselines/reference/outModuleTripleSlashRefs.js.map index 1cdbef49afac2..45d5799045001 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js.map +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFD,cAEC;;;;ICHD;QAAuB,qBAAC;QAAxB;YAAuB,kDAAC;;QAAG,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFD,cAEC;;;;ICHD;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index e940429a74bb3..482c898e0cb03 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -168,35 +168,27 @@ sourceFile:tests/cases/compiler/b.ts --- >>> function B() { 1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(26, 9) Source(2, 1) + SourceIndex(2) --- ->>> var _this = _super.apply(this, arguments) || this; -1->^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1->export class B extends -2 > A -1->Emitted(27, 13) Source(2, 24) + SourceIndex(2) -2 >Emitted(27, 63) Source(2, 25) + SourceIndex(2) ---- ->>> return _this; +>>> return _super.apply(this, arguments) || this; >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->export class B extends A { 2 > } -1 >Emitted(29, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(29, 10) Source(2, 29) + SourceIndex(2) +1->Emitted(28, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(28, 10) Source(2, 29) + SourceIndex(2) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(30, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(30, 17) Source(2, 29) + SourceIndex(2) +1->Emitted(29, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(29, 17) Source(2, 29) + SourceIndex(2) --- >>> }(a_1.A)); 1 >^^^^ @@ -212,20 +204,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(31, 5) Source(2, 28) + SourceIndex(2) -2 >Emitted(31, 6) Source(2, 29) + SourceIndex(2) -3 >Emitted(31, 6) Source(2, 1) + SourceIndex(2) -4 >Emitted(31, 7) Source(2, 24) + SourceIndex(2) -5 >Emitted(31, 12) Source(2, 25) + SourceIndex(2) -6 >Emitted(31, 15) Source(2, 29) + SourceIndex(2) +1 >Emitted(30, 5) Source(2, 28) + SourceIndex(2) +2 >Emitted(30, 6) Source(2, 29) + SourceIndex(2) +3 >Emitted(30, 6) Source(2, 1) + SourceIndex(2) +4 >Emitted(30, 7) Source(2, 24) + SourceIndex(2) +5 >Emitted(30, 12) Source(2, 25) + SourceIndex(2) +6 >Emitted(30, 15) Source(2, 29) + SourceIndex(2) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > export class B extends A { } -1->Emitted(32, 5) Source(2, 1) + SourceIndex(2) -2 >Emitted(32, 19) Source(2, 29) + SourceIndex(2) +1->Emitted(31, 5) Source(2, 1) + SourceIndex(2) +2 >Emitted(31, 19) Source(2, 29) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index d83c8aea7add5..41aafdfb29c2d 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -56,8 +56,7 @@ var O; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -65,8 +64,7 @@ var O; var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index ad49f8e9d7af3..f9d1c81b06b99 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -37,8 +37,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -46,8 +45,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -55,8 +53,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 2b521b4baf5cb..a680a62ddfef6 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -25,16 +25,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 df5e0065adb90..025e449fd6f69 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -27,16 +27,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 49d96b97b74c2..0f436a5f0b2c9 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -36,16 +36,14 @@ var A = (function (_super) { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 5d0546d0edc56..e3f58c0f7d0d2 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -26,8 +26,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -35,8 +34,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -44,8 +42,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 c34d037b350ca..e5cc35c39c4cb 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -108,24 +108,21 @@ var SomeBase = (function () { var SomeDerived1 = (function (_super) { __extends(SomeDerived1, _super); function SomeDerived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return SomeDerived1; }(SomeBase)); var SomeDerived2 = (function (_super) { __extends(SomeDerived2, _super); function SomeDerived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return SomeDerived2; }(SomeBase)); var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return SomeDerived3; }(SomeBase)); diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 0a899584c182e..7c8b2e2ccb6ed 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -115,24 +115,21 @@ var SomeBase = (function () { var SomeDerived1 = (function (_super) { __extends(SomeDerived1, _super); function SomeDerived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return SomeDerived1; }(SomeBase)); var SomeDerived2 = (function (_super) { __extends(SomeDerived2, _super); function SomeDerived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return SomeDerived2; }(SomeBase)); var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return SomeDerived3; }(SomeBase)); diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 42dceff061e6b..44bbfbcec2b51 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -116,24 +116,21 @@ var SomeBase = (function () { var SomeDerived1 = (function (_super) { __extends(SomeDerived1, _super); function SomeDerived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return SomeDerived1; }(SomeBase)); var SomeDerived2 = (function (_super) { __extends(SomeDerived2, _super); function SomeDerived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return SomeDerived2; }(SomeBase)); var SomeDerived3 = (function (_super) { __extends(SomeDerived3, _super); function SomeDerived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return SomeDerived3; }(SomeBase)); diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index 52d8a1b7abe3a..96f4f7baf2442 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -40,8 +40,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived1.prototype.bar = function () { }; return Derived1; @@ -49,8 +48,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived2.prototype.baz = function () { }; return Derived2; @@ -58,8 +56,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 85976ae7fcdf0..0c34d0f4b7694 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -42,8 +42,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index b7ad5b665546a..ca5616450baea 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -21,8 +21,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index 0a29bdf2da0a4..a9ca0a6db7342 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index cdef63aa80f46..d3648dc5b6457 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -21,8 +21,7 @@ var Type = (function () { var Any = (function (_super) { __extends(Any, _super); function Any() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Any; }(Type)); diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index c7bdb90775e19..6b86353b959d4 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -363,8 +363,7 @@ c2_i.nc_f1(); var c4 = (function (_super) { __extends(c4, _super); function c4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return c4; }(c2)); diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index f91efad621e1f..a61b492b7a935 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index 9d51b0ed25e18..f58f0ab00cb96 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(B)); diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index 7c91281d05cac..912aa8c658198 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index aeb7ce0919054..054aaf0eb7a49 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index b14257310c4ec..1423edfe037ad 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 c4a2fd297114b..aa0679bb8f5af 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 ae9d5068e294d..1308c7c194bff 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 8992706cd169b..b1471628fbd9b 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index 0ec560c130625..641d296dc4359 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -26,8 +26,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index d4c754fb0b154..b0f14a090ae5f 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -26,8 +26,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 5425696b13344..7b94b555eb16a 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -63,8 +63,7 @@ var baz = (function () { var foo = (function (_super) { __extends(foo, _super); function foo() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 8181d0612a846..7e56edf2cf1b4 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -152,24 +152,21 @@ var m1; var m1_C1_private = (function (_super) { __extends(m1_C1_private, _super); function m1_C1_private() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m1_C3_public; }(m1_c_public)); @@ -177,8 +174,7 @@ var m1; var m1_C4_public = (function (_super) { __extends(m1_C4_public, _super); function m1_C4_public() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m1_C4_public; }(m1_c_private)); @@ -208,24 +204,21 @@ var m1; var m1_C9_private = (function (_super) { __extends(m1_C9_private, _super); function m1_C9_private() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m1_C11_public; }(m1_c_public)); @@ -233,8 +226,7 @@ var m1; var m1_C12_public = (function (_super) { __extends(m1_C12_public, _super); function m1_C12_public() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m1_C12_public; }(m1_c_private)); @@ -258,24 +250,21 @@ var m2; var m2_C1_private = (function (_super) { __extends(m2_C1_private, _super); function m2_C1_private() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m2_C3_public; }(m2_c_public)); @@ -283,8 +272,7 @@ var m2; var m2_C4_public = (function (_super) { __extends(m2_C4_public, _super); function m2_C4_public() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m2_C4_public; }(m2_c_private)); @@ -314,24 +302,21 @@ var m2; var m2_C9_private = (function (_super) { __extends(m2_C9_private, _super); function m2_C9_private() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m2_C11_public; }(m2_c_public)); @@ -339,8 +324,7 @@ var m2; var m2_C12_public = (function (_super) { __extends(m2_C12_public, _super); function m2_C12_public() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m2_C12_public; }(m2_c_private)); @@ -362,24 +346,21 @@ var glo_c_private = (function () { var glo_C1_private = (function (_super) { __extends(glo_C1_private, _super); function glo_C1_private() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return glo_C3_public; }(glo_c_public)); @@ -387,8 +368,7 @@ exports.glo_C3_public = glo_C3_public; var glo_C4_public = (function (_super) { __extends(glo_C4_public, _super); function glo_C4_public() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return glo_C4_public; }(glo_c_private)); @@ -418,24 +398,21 @@ exports.glo_C8_public = glo_C8_public; var glo_C9_private = (function (_super) { __extends(glo_C9_private, _super); function glo_C9_private() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return glo_C11_public; }(glo_c_public)); @@ -443,8 +420,7 @@ exports.glo_C11_public = glo_C11_public; var glo_C12_public = (function (_super) { __extends(glo_C12_public, _super); function glo_C12_public() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 fe3ae6ba6d0f3..e0828809416bd 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -122,24 +122,21 @@ var publicModule; var privateClassExtendingPublicClassInModule = (function (_super) { __extends(privateClassExtendingPublicClassInModule, _super); function privateClassExtendingPublicClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return privateClassExtendingPublicClassInModule; }(publicClassInPublicModule)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return privateClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); var publicClassExtendingPublicClassInModule = (function (_super) { __extends(publicClassExtendingPublicClassInModule, _super); function publicClassExtendingPublicClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingPublicClassInModule; }(publicClassInPublicModule)); @@ -147,8 +144,7 @@ var publicModule; var publicClassExtendingPrivateClassInModule = (function (_super) { __extends(publicClassExtendingPrivateClassInModule, _super); function publicClassExtendingPrivateClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); @@ -156,16 +152,14 @@ var publicModule; var privateClassExtendingFromPrivateModuleClass = (function (_super) { __extends(privateClassExtendingFromPrivateModuleClass, _super); function privateClassExtendingFromPrivateModuleClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return privateClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); var publicClassExtendingFromPrivateModuleClass = (function (_super) { __extends(publicClassExtendingFromPrivateModuleClass, _super); function publicClassExtendingFromPrivateModuleClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); @@ -189,24 +183,21 @@ var privateModule; var privateClassExtendingPublicClassInModule = (function (_super) { __extends(privateClassExtendingPublicClassInModule, _super); function privateClassExtendingPublicClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return privateClassExtendingPublicClassInModule; }(publicClassInPrivateModule)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return privateClassExtendingPrivateClassInModule; }(privateClassInPrivateModule)); var publicClassExtendingPublicClassInModule = (function (_super) { __extends(publicClassExtendingPublicClassInModule, _super); function publicClassExtendingPublicClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingPublicClassInModule; }(publicClassInPrivateModule)); @@ -214,8 +205,7 @@ var privateModule; var publicClassExtendingPrivateClassInModule = (function (_super) { __extends(publicClassExtendingPrivateClassInModule, _super); function publicClassExtendingPrivateClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingPrivateClassInModule; }(privateClassInPrivateModule)); @@ -223,16 +213,14 @@ var privateModule; var privateClassExtendingFromPrivateModuleClass = (function (_super) { __extends(privateClassExtendingFromPrivateModuleClass, _super); function privateClassExtendingFromPrivateModuleClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return privateClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); var publicClassExtendingFromPrivateModuleClass = (function (_super) { __extends(publicClassExtendingFromPrivateModuleClass, _super); function publicClassExtendingFromPrivateModuleClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); @@ -254,24 +242,21 @@ var privateClass = (function () { var privateClassExtendingPublicClass = (function (_super) { __extends(privateClassExtendingPublicClass, _super); function privateClassExtendingPublicClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return privateClassExtendingPublicClass; }(publicClass)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return privateClassExtendingPrivateClassInModule; }(privateClass)); var publicClassExtendingPublicClass = (function (_super) { __extends(publicClassExtendingPublicClass, _super); function publicClassExtendingPublicClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingPublicClass; }(publicClass)); @@ -279,8 +264,7 @@ exports.publicClassExtendingPublicClass = publicClassExtendingPublicClass; var publicClassExtendingPrivateClass = (function (_super) { __extends(publicClassExtendingPrivateClass, _super); function publicClassExtendingPrivateClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingPrivateClass; }(privateClass)); @@ -288,16 +272,14 @@ exports.publicClassExtendingPrivateClass = publicClassExtendingPrivateClass; var privateClassExtendingFromPrivateModuleClass = (function (_super) { __extends(privateClassExtendingFromPrivateModuleClass, _super); function privateClassExtendingFromPrivateModuleClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return privateClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); var publicClassExtendingFromPrivateModuleClass = (function (_super) { __extends(publicClassExtendingFromPrivateModuleClass, _super); function publicClassExtendingFromPrivateModuleClass() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingFromPrivateModuleClass; }(privateModule.publicClassInPrivateModule)); @@ -326,24 +308,21 @@ var publicModuleInGlobal; var privateClassExtendingPublicClassInModule = (function (_super) { __extends(privateClassExtendingPublicClassInModule, _super); function privateClassExtendingPublicClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return privateClassExtendingPublicClassInModule; }(publicClassInPublicModule)); var privateClassExtendingPrivateClassInModule = (function (_super) { __extends(privateClassExtendingPrivateClassInModule, _super); function privateClassExtendingPrivateClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return privateClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); var publicClassExtendingPublicClassInModule = (function (_super) { __extends(publicClassExtendingPublicClassInModule, _super); function publicClassExtendingPublicClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingPublicClassInModule; }(publicClassInPublicModule)); @@ -351,8 +330,7 @@ var publicModuleInGlobal; var publicClassExtendingPrivateClassInModule = (function (_super) { __extends(publicClassExtendingPrivateClassInModule, _super); function publicClassExtendingPrivateClassInModule() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingPrivateClassInModule; }(privateClassInPublicModule)); @@ -366,8 +344,7 @@ var publicClassInGlobal = (function () { var publicClassExtendingPublicClassInGlobal = (function (_super) { __extends(publicClassExtendingPublicClassInGlobal, _super); function publicClassExtendingPublicClassInGlobal() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return publicClassExtendingPublicClassInGlobal; }(publicClassInGlobal)); diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index 481a39219212f..fa769a606ae89 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -84,24 +84,21 @@ var m1; var m1_C1_private = (function (_super) { __extends(m1_C1_private, _super); function m1_C1_private() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m1_C3_public; }(m1_c_public)); @@ -109,8 +106,7 @@ var m1; var m1_C4_public = (function (_super) { __extends(m1_C4_public, _super); function m1_C4_public() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m1_C4_public; }(m1_c_private)); @@ -140,24 +136,21 @@ var m1; var m1_C9_private = (function (_super) { __extends(m1_C9_private, _super); function m1_C9_private() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m1_C11_public; }(m1_c_public)); @@ -165,8 +158,7 @@ var m1; var m1_C12_public = (function (_super) { __extends(m1_C12_public, _super); function m1_C12_public() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return m1_C12_public; }(m1_c_private)); @@ -182,8 +174,7 @@ var glo_c_public = (function () { var glo_C3_public = (function (_super) { __extends(glo_C3_public, _super); function glo_C3_public() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return glo_C3_public; }(glo_c_public)); @@ -195,8 +186,7 @@ var glo_C7_public = (function () { var glo_C11_public = (function (_super) { __extends(glo_C11_public, _super); function glo_C11_public() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 ca432ee7ab76b..21ff4793fb35e 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -23,8 +23,7 @@ var Base = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } D.prototype.myMethod = function () { this.options; diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index 8b516a5a19c79..b732661edfc3e 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -40,8 +40,7 @@ var K = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } C.prototype.m2 = function () { var a = this.priv; // error diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index 44adec751bf08..11959f2f17468 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -29,8 +29,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 ed9768b06c292..99a4842f63641 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -14,8 +14,7 @@ var m2; var class1 = (function (_super) { __extends(class1, _super); function class1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return class1; }(m2.mExported.me.class1)); @@ -28,8 +27,7 @@ var m2; var class2 = (function (_super) { __extends(class2, _super); function class2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return class2; }(m2.mExported.me.class1)); @@ -42,8 +40,7 @@ var m2; var class3 = (function (_super) { __extends(class3, _super); function class3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return class3; }(mNonExported.mne.class1)); @@ -56,8 +53,7 @@ var m2; var class4 = (function (_super) { __extends(class4, _super); function class4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 ed9768b06c292..99a4842f63641 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -14,8 +14,7 @@ var m2; var class1 = (function (_super) { __extends(class1, _super); function class1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return class1; }(m2.mExported.me.class1)); @@ -28,8 +27,7 @@ var m2; var class2 = (function (_super) { __extends(class2, _super); function class2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return class2; }(m2.mExported.me.class1)); @@ -42,8 +40,7 @@ var m2; var class3 = (function (_super) { __extends(class3, _super); function class3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return class3; }(mNonExported.mne.class1)); @@ -56,8 +53,7 @@ var m2; var class4 = (function (_super) { __extends(class4, _super); function class4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 deb734487949b..7ee160b82efac 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -18,8 +18,7 @@ var m; var child = (function (_super) { __extends(child, _super); function child() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 deb734487949b..7ee160b82efac 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -18,8 +18,7 @@ var m; var child = (function (_super) { __extends(child, _super); function child() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 b5147a28919d4..b793b07534c46 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -7,8 +7,7 @@ var __extends = (this && this.__extends) || function (d, b) { var ClassC = (function (_super) { __extends(ClassC, _super); function ClassC() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 b5147a28919d4..b793b07534c46 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -7,8 +7,7 @@ var __extends = (this && this.__extends) || function (d, b) { var ClassC = (function (_super) { __extends(ClassC, _super); function ClassC() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ClassC; }(test.ClassA)); diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index a22f966375414..dff86f3954e21 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -65,8 +65,7 @@ var P = (function () { var Q = (function (_super) { __extends(Q, _super); function Q() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Q; }(P)); diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 31b90bcf7ac2b..0a4c9082a2162 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -164,8 +164,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index c570642a1ba3e..d36d7e27efe94 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -97,8 +97,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 aebdc2c3ce30e..4aedfe12b0404 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -72,8 +72,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 442ae29e27883..3cb1443814122 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -59,8 +59,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 40a1365b7e1c7..429dfdf6b14aa 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -52,8 +52,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Object.defineProperty(C.prototype, "y", { get: function () { return this.x; }, @@ -94,8 +93,7 @@ var C = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return E; }(C)); diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index e6c768a67592c..0571b85ea9e2a 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -147,8 +147,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived1.prototype.method1 = function () { var B = (function () { @@ -174,8 +173,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived2.prototype.method2 = function () { var C = (function () { @@ -201,8 +199,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived3.prototype.method3 = function () { var D = (function () { @@ -228,8 +225,7 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 3f46b69ecf35d..a10b39b402e4d 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -34,8 +34,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 44a4fbdf284c3..a404b8049bc47 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -120,8 +120,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived1.prototype.method1 = function () { var b; @@ -140,8 +139,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived2.prototype.method2 = function () { var b; @@ -160,8 +158,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived3.prototype.method3 = function () { var b; @@ -180,8 +177,7 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 4cc09bac99d15..7d449bdcbd4c9 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -30,8 +30,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 003e2f50e6f8f..3259d401270d8 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -61,8 +61,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } B.prototype.g = function () { var t1 = this.x; @@ -94,8 +93,7 @@ var B = (function (_super) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index 984527b2c0d2b..46b4691dff77f 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -137,8 +137,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } C2.prototype.f = function () { return _super.prototype.f.call(this) + this.x; @@ -152,8 +151,7 @@ var C2 = (function (_super) { var C3 = (function (_super) { __extends(C3, _super); function C3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } C3.prototype.f = function () { return _super.prototype.f.call(this); @@ -189,16 +187,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 @@ -212,8 +208,7 @@ var C = (function (_super) { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); @@ -244,8 +239,7 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -258,8 +252,7 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A3)); diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index a272ad42fa129..ad1b1682aa73e 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -63,8 +63,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived1.staticMethod1 = function () { Base.x; // OK, accessed within a class derived from their declaring class @@ -77,8 +76,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived2.staticMethod2 = function () { Base.x; // OK, accessed within a class derived from their declaring class @@ -91,8 +89,7 @@ var Derived2 = (function (_super) { var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 2add5e7e154d7..a2346b8be40a3 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -38,8 +38,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived1.staticMethod1 = function () { this.x; // OK, accessed within a class derived from their declaring class @@ -50,8 +49,7 @@ var Derived1 = (function (_super) { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 225acf74bbe69..a881eb55a1811 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,8 +19,7 @@ var Alpha; var Beta = (function (_super) { __extends(Beta, _super); function Beta() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Beta; }(Alpha.x)); diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index 5b3e829d2e6e5..250a9e0b6183a 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -13,16 +13,14 @@ var __extends = (this && this.__extends) || function (d, b) { var A = (function (_super) { __extends(A, _super); function A() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return A; }(C)); var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index b515c7ab318ef..7f0c6b5f95d51 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var M = (function (_super) { __extends(M, _super); function M() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return M; }(M)); diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index 1871eff20d4bb..53a608baeca64 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var S18 = (function (_super) { __extends(S18, _super); function S18() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return S18; }(S18)); diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index c2f884aa8e4bb..344750974cbfd 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -21,8 +21,7 @@ var C1 = (function () { var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(C1)); diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index f84c7ad3daef0..34aa110b7ee74 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -28,8 +28,7 @@ var TypeScript2; var MemberNameArray = (function (_super) { __extends(MemberNameArray, _super); function MemberNameArray() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MemberNameArray; }(MemberName)); diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index 2baa854e4625c..4c88b77822671 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -190,8 +190,7 @@ var Sample; var Mode = (function (_super) { __extends(Mode, _super); function Mode() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } // scenario 2 Mode.prototype.getInitialState = function () { diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index 56c0fc4e6eb16..bd22ec3389852 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js.map +++ b/tests/baselines/reference/recursiveClassReferenceTest.js.map @@ -1,2 +1,2 @@ //// [recursiveClassReferenceTest.js.map] -{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,IAAO,MAAM,CAoBZ;AApBD,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;wBAA0B,kDAAY;;oBAQtC,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file +{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,IAAO,MAAM,CAoBZ;AApBD,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;;oBAQA,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index 9656c07834342..9dfefe4e1dcf6 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -1692,24 +1692,16 @@ sourceFile:recursiveClassReferenceTest.ts --- >>> function Mode() { 1 >^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 1 >Emitted(87, 21) Source(91, 2) + SourceIndex(0) --- ->>> var _this = _super.apply(this, arguments) || this; -1->^^^^^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1->export class Mode extends -2 > AbstractMode -1->Emitted(88, 25) Source(91, 28) + SourceIndex(0) -2 >Emitted(88, 75) Source(91, 40) + SourceIndex(0) ---- ->>> return _this; +>>> return _super.apply(this, arguments) || this; >>> } -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class Mode extends AbstractMode { > > // scenario 2 > public getInitialState(): IState { @@ -1719,8 +1711,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(90, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(90, 22) Source(99, 3) + SourceIndex(0) +1->Emitted(89, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(89, 22) Source(99, 3) + SourceIndex(0) --- >>> // scenario 2 1->^^^^^^^^^^^^^^^^^^^^ @@ -1728,8 +1720,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > // scenario 2 -1->Emitted(91, 21) Source(93, 3) + SourceIndex(0) -2 >Emitted(91, 34) Source(93, 16) + SourceIndex(0) +1->Emitted(90, 21) Source(93, 3) + SourceIndex(0) +2 >Emitted(90, 34) Source(93, 16) + SourceIndex(0) --- >>> Mode.prototype.getInitialState = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1739,9 +1731,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getInitialState 3 > -1->Emitted(92, 21) Source(94, 10) + SourceIndex(0) -2 >Emitted(92, 51) Source(94, 25) + SourceIndex(0) -3 >Emitted(92, 54) Source(94, 3) + SourceIndex(0) +1->Emitted(91, 21) Source(94, 10) + SourceIndex(0) +2 >Emitted(91, 51) Source(94, 25) + SourceIndex(0) +3 >Emitted(91, 54) Source(94, 3) + SourceIndex(0) --- >>> return new State(self); 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1763,15 +1755,15 @@ sourceFile:recursiveClassReferenceTest.ts 7 > self 8 > ) 9 > ; -1 >Emitted(93, 25) Source(95, 4) + SourceIndex(0) -2 >Emitted(93, 31) Source(95, 10) + SourceIndex(0) -3 >Emitted(93, 32) Source(95, 11) + SourceIndex(0) -4 >Emitted(93, 36) Source(95, 15) + SourceIndex(0) -5 >Emitted(93, 41) Source(95, 20) + SourceIndex(0) -6 >Emitted(93, 42) Source(95, 21) + SourceIndex(0) -7 >Emitted(93, 46) Source(95, 25) + SourceIndex(0) -8 >Emitted(93, 47) Source(95, 26) + SourceIndex(0) -9 >Emitted(93, 48) Source(95, 27) + SourceIndex(0) +1 >Emitted(92, 25) Source(95, 4) + SourceIndex(0) +2 >Emitted(92, 31) Source(95, 10) + SourceIndex(0) +3 >Emitted(92, 32) Source(95, 11) + SourceIndex(0) +4 >Emitted(92, 36) Source(95, 15) + SourceIndex(0) +5 >Emitted(92, 41) Source(95, 20) + SourceIndex(0) +6 >Emitted(92, 42) Source(95, 21) + SourceIndex(0) +7 >Emitted(92, 46) Source(95, 25) + SourceIndex(0) +8 >Emitted(92, 47) Source(95, 26) + SourceIndex(0) +9 >Emitted(92, 48) Source(95, 27) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1780,8 +1772,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(94, 21) Source(96, 3) + SourceIndex(0) -2 >Emitted(94, 22) Source(96, 4) + SourceIndex(0) +1 >Emitted(93, 21) Source(96, 3) + SourceIndex(0) +2 >Emitted(93, 22) Source(96, 4) + SourceIndex(0) --- >>> return Mode; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1792,8 +1784,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(95, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(95, 32) Source(99, 3) + SourceIndex(0) +1->Emitted(94, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(94, 32) Source(99, 3) + SourceIndex(0) --- >>> }(AbstractMode)); 1->^^^^^^^^^^^^^^^^ @@ -1817,12 +1809,12 @@ sourceFile:recursiveClassReferenceTest.ts > > > } -1->Emitted(96, 17) Source(99, 2) + SourceIndex(0) -2 >Emitted(96, 18) Source(99, 3) + SourceIndex(0) -3 >Emitted(96, 18) Source(91, 2) + SourceIndex(0) -4 >Emitted(96, 19) Source(91, 28) + SourceIndex(0) -5 >Emitted(96, 31) Source(91, 40) + SourceIndex(0) -6 >Emitted(96, 34) Source(99, 3) + SourceIndex(0) +1->Emitted(95, 17) Source(99, 2) + SourceIndex(0) +2 >Emitted(95, 18) Source(99, 3) + SourceIndex(0) +3 >Emitted(95, 18) Source(91, 2) + SourceIndex(0) +4 >Emitted(95, 19) Source(91, 28) + SourceIndex(0) +5 >Emitted(95, 31) Source(91, 40) + SourceIndex(0) +6 >Emitted(95, 34) Source(99, 3) + SourceIndex(0) --- >>> PlainText.Mode = Mode; 1->^^^^^^^^^^^^^^^^ @@ -1842,10 +1834,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(97, 17) Source(91, 15) + SourceIndex(0) -2 >Emitted(97, 31) Source(91, 19) + SourceIndex(0) -3 >Emitted(97, 38) Source(99, 3) + SourceIndex(0) -4 >Emitted(97, 39) Source(99, 3) + SourceIndex(0) +1->Emitted(96, 17) Source(91, 15) + SourceIndex(0) +2 >Emitted(96, 31) Source(91, 19) + SourceIndex(0) +3 >Emitted(96, 38) Source(99, 3) + SourceIndex(0) +4 >Emitted(96, 39) Source(99, 3) + SourceIndex(0) --- >>> })(PlainText = Languages.PlainText || (Languages.PlainText = {})); 1->^^^^^^^^^^^^ @@ -1891,15 +1883,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(98, 13) Source(100, 1) + SourceIndex(0) -2 >Emitted(98, 14) Source(100, 2) + SourceIndex(0) -3 >Emitted(98, 16) Source(76, 31) + SourceIndex(0) -4 >Emitted(98, 25) Source(76, 40) + SourceIndex(0) -5 >Emitted(98, 28) Source(76, 31) + SourceIndex(0) -6 >Emitted(98, 47) Source(76, 40) + SourceIndex(0) -7 >Emitted(98, 52) Source(76, 31) + SourceIndex(0) -8 >Emitted(98, 71) Source(76, 40) + SourceIndex(0) -9 >Emitted(98, 79) Source(100, 2) + SourceIndex(0) +1->Emitted(97, 13) Source(100, 1) + SourceIndex(0) +2 >Emitted(97, 14) Source(100, 2) + SourceIndex(0) +3 >Emitted(97, 16) Source(76, 31) + SourceIndex(0) +4 >Emitted(97, 25) Source(76, 40) + SourceIndex(0) +5 >Emitted(97, 28) Source(76, 31) + SourceIndex(0) +6 >Emitted(97, 47) Source(76, 40) + SourceIndex(0) +7 >Emitted(97, 52) Source(76, 31) + SourceIndex(0) +8 >Emitted(97, 71) Source(76, 40) + SourceIndex(0) +9 >Emitted(97, 79) Source(100, 2) + SourceIndex(0) --- >>> })(Languages = Thing.Languages || (Thing.Languages = {})); 1 >^^^^^^^^ @@ -1944,15 +1936,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(99, 9) Source(100, 1) + SourceIndex(0) -2 >Emitted(99, 10) Source(100, 2) + SourceIndex(0) -3 >Emitted(99, 12) Source(76, 21) + SourceIndex(0) -4 >Emitted(99, 21) Source(76, 30) + SourceIndex(0) -5 >Emitted(99, 24) Source(76, 21) + SourceIndex(0) -6 >Emitted(99, 39) Source(76, 30) + SourceIndex(0) -7 >Emitted(99, 44) Source(76, 21) + SourceIndex(0) -8 >Emitted(99, 59) Source(76, 30) + SourceIndex(0) -9 >Emitted(99, 67) Source(100, 2) + SourceIndex(0) +1 >Emitted(98, 9) Source(100, 1) + SourceIndex(0) +2 >Emitted(98, 10) Source(100, 2) + SourceIndex(0) +3 >Emitted(98, 12) Source(76, 21) + SourceIndex(0) +4 >Emitted(98, 21) Source(76, 30) + SourceIndex(0) +5 >Emitted(98, 24) Source(76, 21) + SourceIndex(0) +6 >Emitted(98, 39) Source(76, 30) + SourceIndex(0) +7 >Emitted(98, 44) Source(76, 21) + SourceIndex(0) +8 >Emitted(98, 59) Source(76, 30) + SourceIndex(0) +9 >Emitted(98, 67) Source(100, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1997,15 +1989,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(100, 5) Source(100, 1) + SourceIndex(0) -2 >Emitted(100, 6) Source(100, 2) + SourceIndex(0) -3 >Emitted(100, 8) Source(76, 15) + SourceIndex(0) -4 >Emitted(100, 13) Source(76, 20) + SourceIndex(0) -5 >Emitted(100, 16) Source(76, 15) + SourceIndex(0) -6 >Emitted(100, 28) Source(76, 20) + SourceIndex(0) -7 >Emitted(100, 33) Source(76, 15) + SourceIndex(0) -8 >Emitted(100, 45) Source(76, 20) + SourceIndex(0) -9 >Emitted(100, 53) Source(100, 2) + SourceIndex(0) +1 >Emitted(99, 5) Source(100, 1) + SourceIndex(0) +2 >Emitted(99, 6) Source(100, 2) + SourceIndex(0) +3 >Emitted(99, 8) Source(76, 15) + SourceIndex(0) +4 >Emitted(99, 13) Source(76, 20) + SourceIndex(0) +5 >Emitted(99, 16) Source(76, 15) + SourceIndex(0) +6 >Emitted(99, 28) Source(76, 20) + SourceIndex(0) +7 >Emitted(99, 33) Source(76, 15) + SourceIndex(0) +8 >Emitted(99, 45) Source(76, 20) + SourceIndex(0) +9 >Emitted(99, 53) Source(100, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -2047,12 +2039,12 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(101, 1) Source(100, 1) + SourceIndex(0) -2 >Emitted(101, 2) Source(100, 2) + SourceIndex(0) -3 >Emitted(101, 4) Source(76, 8) + SourceIndex(0) -4 >Emitted(101, 10) Source(76, 14) + SourceIndex(0) -5 >Emitted(101, 15) Source(76, 8) + SourceIndex(0) -6 >Emitted(101, 21) Source(76, 14) + SourceIndex(0) -7 >Emitted(101, 29) Source(100, 2) + SourceIndex(0) +1 >Emitted(100, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(100, 2) Source(100, 2) + SourceIndex(0) +3 >Emitted(100, 4) Source(76, 8) + SourceIndex(0) +4 >Emitted(100, 10) Source(76, 14) + SourceIndex(0) +5 >Emitted(100, 15) Source(76, 8) + SourceIndex(0) +6 >Emitted(100, 21) Source(76, 14) + SourceIndex(0) +7 >Emitted(100, 29) Source(100, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=recursiveClassReferenceTest.js.map \ No newline at end of file diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index ea31184d8567a..8441ff9e15a78 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -51,24 +51,21 @@ var Symbol = (function () { var InferenceSymbol = (function (_super) { __extends(InferenceSymbol, _super); function InferenceSymbol() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return InferenceSymbol; }(Symbol)); var ParameterSymbol = (function (_super) { __extends(ParameterSymbol, _super); function ParameterSymbol() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ParameterSymbol; }(InferenceSymbol)); var TypeSymbol = (function (_super) { __extends(TypeSymbol, _super); function TypeSymbol() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return TypeSymbol; }(InferenceSymbol)); diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index 72c97c309660a..76224741e6033 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -52,8 +52,7 @@ var MsPortal; var ViewModel = (function (_super) { __extends(ViewModel, _super); function ViewModel() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ViewModel; }(ItemValue)); diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index 95ce777e446f3..a75a90d4d8687 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -42,8 +42,7 @@ var foo2 = require("./foo2"); var x = (function (_super) { __extends(x, _super); function x() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return x; }(foo2.x)); diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index d2ec8e168bfad..615b0034caaa5 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1030,8 +1030,7 @@ var rionegrensis; var caniventer = (function (_super) { __extends(caniventer, _super); function caniventer() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } caniventer.prototype.salomonseni = function () { var _this = this; @@ -1069,8 +1068,7 @@ var rionegrensis; var veraecrucis = (function (_super) { __extends(veraecrucis, _super); function veraecrucis() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } veraecrucis.prototype.naso = function () { var _this = this; @@ -1249,8 +1247,7 @@ var julianae; var oralis = (function (_super) { __extends(oralis, _super); function oralis() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } oralis.prototype.cepapi = function () { var _this = this; @@ -1336,8 +1333,7 @@ var julianae; var sumatrana = (function (_super) { __extends(sumatrana, _super); function sumatrana() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } sumatrana.prototype.wolffsohni = function () { var _this = this; @@ -1537,8 +1533,7 @@ var julianae; var durangae = (function (_super) { __extends(durangae, _super); function durangae() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } durangae.prototype.Californium = function () { var _this = this; @@ -1612,8 +1607,7 @@ var Lanthanum; var nitidus = (function (_super) { __extends(nitidus, _super); function nitidus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } nitidus.prototype.granatensis = function () { var _this = this; @@ -1681,8 +1675,7 @@ var Lanthanum; var megalonyx = (function (_super) { __extends(megalonyx, _super); function megalonyx() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } megalonyx.prototype.phillipsii = function () { var _this = this; @@ -1831,8 +1824,7 @@ var rendalli; var zuluensis = (function (_super) { __extends(zuluensis, _super); function zuluensis() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } zuluensis.prototype.telfairi = function () { var _this = this; @@ -1990,8 +1982,7 @@ var rendalli; var crenulata = (function (_super) { __extends(crenulata, _super); function crenulata() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } crenulata.prototype.salvanius = function () { var _this = this; @@ -2074,8 +2065,7 @@ var trivirgatus; var mixtus = (function (_super) { __extends(mixtus, _super); function mixtus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } mixtus.prototype.ochrogaster = function () { var _this = this; @@ -2317,8 +2307,7 @@ var ruatanica; var americanus = (function (_super) { __extends(americanus, _super); function americanus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } americanus.prototype.nasoloi = function () { var _this = this; @@ -2353,8 +2342,7 @@ var lavali; var wilsoni = (function (_super) { __extends(wilsoni, _super); function wilsoni() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } wilsoni.prototype.setiger = function () { var _this = this; @@ -2446,8 +2434,7 @@ var lavali; var otion = (function (_super) { __extends(otion, _super); function otion() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } otion.prototype.bonaerensis = function () { var _this = this; @@ -2611,8 +2598,7 @@ var lavali; var thaeleri = (function (_super) { __extends(thaeleri, _super); function thaeleri() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } thaeleri.prototype.coromandra = function () { var _this = this; @@ -2668,8 +2654,7 @@ var lavali; var lepturus = (function (_super) { __extends(lepturus, _super); function lepturus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } lepturus.prototype.ferrumequinum = function () { var _this = this; @@ -2692,8 +2677,7 @@ var dogramacii; var robustulus = (function (_super) { __extends(robustulus, _super); function robustulus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } robustulus.prototype.fossor = function () { var _this = this; @@ -2908,8 +2892,7 @@ var lutreolus; var schlegeli = (function (_super) { __extends(schlegeli, _super); function schlegeli() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } schlegeli.prototype.mittendorfi = function () { var _this = this; @@ -3136,8 +3119,7 @@ var panglima; var amphibius = (function (_super) { __extends(amphibius, _super); function amphibius() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } amphibius.prototype.bottegi = function () { var _this = this; @@ -3181,8 +3163,7 @@ var panglima; var fundatus = (function (_super) { __extends(fundatus, _super); function fundatus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } fundatus.prototype.crassulus = function () { var _this = this; @@ -3208,8 +3189,7 @@ var panglima; var abidi = (function (_super) { __extends(abidi, _super); function abidi() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } abidi.prototype.greyii = function () { var _this = this; @@ -3301,8 +3281,7 @@ var minutus; var himalayana = (function (_super) { __extends(himalayana, _super); function himalayana() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } himalayana.prototype.simoni = function () { var _this = this; @@ -3385,8 +3364,7 @@ var caurinus; var mahaganus = (function (_super) { __extends(mahaganus, _super); function mahaganus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } mahaganus.prototype.martiniquensis = function () { var _this = this; @@ -3460,8 +3438,7 @@ var howi; var angulatus = (function (_super) { __extends(angulatus, _super); function angulatus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } angulatus.prototype.pennatus = function () { var _this = this; @@ -3544,8 +3521,7 @@ var sagitta; var walkeri = (function (_super) { __extends(walkeri, _super); function walkeri() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } walkeri.prototype.maracajuensis = function () { var _this = this; @@ -3562,8 +3538,7 @@ var minutus; var inez = (function (_super) { __extends(inez, _super); function inez() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } inez.prototype.vexillaris = function () { var _this = this; @@ -3580,8 +3555,7 @@ var macrorhinos; var konganensis = (function (_super) { __extends(konganensis, _super); function konganensis() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return konganensis; }(imperfecta.lasiurus)); @@ -3592,8 +3566,7 @@ var panamensis; var linulus = (function (_super) { __extends(linulus, _super); function linulus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } linulus.prototype.goslingi = function () { var _this = this; @@ -3745,8 +3718,7 @@ var samarensis; var pelurus = (function (_super) { __extends(pelurus, _super); function pelurus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } pelurus.prototype.Palladium = function () { var _this = this; @@ -3832,8 +3804,7 @@ var samarensis; var fuscus = (function (_super) { __extends(fuscus, _super); function fuscus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } fuscus.prototype.planifrons = function () { var _this = this; @@ -3994,8 +3965,7 @@ var sagitta; var leptoceros = (function (_super) { __extends(leptoceros, _super); function leptoceros() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } leptoceros.prototype.victus = function () { var _this = this; @@ -4036,8 +4006,7 @@ var daubentonii; var nigricans = (function (_super) { __extends(nigricans, _super); function nigricans() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } nigricans.prototype.woosnami = function () { var _this = this; @@ -4063,8 +4032,7 @@ var argurus; var pygmaea = (function (_super) { __extends(pygmaea, _super); function pygmaea() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } pygmaea.prototype.pajeros = function () { var _this = this; @@ -4093,8 +4061,7 @@ var chrysaeolus; var sarasinorum = (function (_super) { __extends(sarasinorum, _super); function sarasinorum() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } sarasinorum.prototype.belzebul = function () { var _this = this; @@ -4198,8 +4165,7 @@ var argurus; var oreas = (function (_super) { __extends(oreas, _super); function oreas() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } oreas.prototype.salamonis = function () { var _this = this; @@ -4426,8 +4392,7 @@ var provocax; var melanoleuca = (function (_super) { __extends(melanoleuca, _super); function melanoleuca() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } melanoleuca.prototype.Neodymium = function () { var _this = this; @@ -4471,8 +4436,7 @@ var howi; var marcanoi = (function (_super) { __extends(marcanoi, _super); function marcanoi() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } marcanoi.prototype.formosae = function () { var _this = this; @@ -4879,8 +4843,7 @@ var gabriellae; var klossii = (function (_super) { __extends(klossii, _super); function klossii() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return klossii; }(imperfecta.lasiurus)); @@ -5083,8 +5046,7 @@ var imperfecta; var ciliolabrum = (function (_super) { __extends(ciliolabrum, _super); function ciliolabrum() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } ciliolabrum.prototype.leschenaultii = function () { var _this = this; @@ -5146,8 +5108,7 @@ var petrophilus; var sodyi = (function (_super) { __extends(sodyi, _super); function sodyi() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } sodyi.prototype.saundersiae = function () { var _this = this; @@ -5212,8 +5173,7 @@ var caurinus; var megaphyllus = (function (_super) { __extends(megaphyllus, _super); function megaphyllus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } megaphyllus.prototype.montana = function () { var _this = this; @@ -5386,8 +5346,7 @@ var lutreolus; var cor = (function (_super) { __extends(cor, _super); function cor() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } cor.prototype.antinorii = function () { var _this = this; @@ -5479,8 +5438,7 @@ var argurus; var germaini = (function (_super) { __extends(germaini, _super); function germaini() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } germaini.prototype.sharpei = function () { var _this = this; @@ -5578,8 +5536,7 @@ var dammermani; var melanops = (function (_super) { __extends(melanops, _super); function melanops() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } melanops.prototype.blarina = function () { var _this = this; @@ -5668,8 +5625,7 @@ var argurus; var peninsulae = (function (_super) { __extends(peninsulae, _super); function peninsulae() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } peninsulae.prototype.aitkeni = function () { var _this = this; @@ -5815,8 +5771,7 @@ var ruatanica; var Praseodymium = (function (_super) { __extends(Praseodymium, _super); function Praseodymium() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Praseodymium.prototype.clara = function () { var _this = this; @@ -5905,8 +5860,7 @@ var caurinus; var johorensis = (function (_super) { __extends(johorensis, _super); function johorensis() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } johorensis.prototype.maini = function () { var _this = this; @@ -6034,8 +5988,7 @@ var caurinus; var psilurus = (function (_super) { __extends(psilurus, _super); function psilurus() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 659eea55689ba..f786e9949634e 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -48,8 +48,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 02c812454459b..1474f8ab29a82 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -22,8 +22,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 781fd5ac6eef1..0baf01870094c 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -22,8 +22,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 d7e1b69e27451..4906814f7eb43 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -18,8 +18,7 @@ var base = (function () { var derived = (function (_super) { __extends(derived, _super); function derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } derived.prototype.n = function () { }; return derived; diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index 4f14cb6db97d5..f65f42941bfdb 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -36,8 +36,7 @@ var Model = (function () { var MyView = (function (_super) { __extends(MyView, _super); function MyView() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MyView; }(View)); diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index 3b909a8083646..b76afaff08c37 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -27,8 +27,7 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 d229c5330ba5a..de7588c3ebefc 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -31,8 +31,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Derived.prototype.foo = function () { return 2; }; return Derived; diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index a07bea081a9fa..7b8ca52b9a41f 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -26,8 +26,7 @@ var SomeBase = (function () { var P = (function (_super) { __extends(P, _super); function P() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return P; }(SomeBase)); diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index af01ca1716f9d..29715745890eb 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -48,8 +48,7 @@ function foo() { var myClass = (function (_super) { __extends(package, _super); function package() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return package; }(public)); diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index 300d83b9bbceb..1507e53d8cf8d 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -75,16 +75,14 @@ var F1 = (function () { var G = (function (_super) { __extends(G, _super); function G() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return G; }(package)); var H = (function (_super) { __extends(H, _super); function H() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return H; }(package.A)); diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index eb5052f51d7db..b532df7b1201a 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -55,8 +55,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } B.prototype.bar = function () { return ''; }; return B; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index cbe42a510b34d..a6606c5d55989 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -120,8 +120,7 @@ var C3 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1; }(C3)); diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index 568002483939a..82bcbf14eccf9 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -182,32 +182,28 @@ var C3 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1; }(C3)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(C3)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D3; }(C3)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D4; }(C3)); @@ -217,24 +213,21 @@ var D4 = (function (_super) { var D5 = (function (_super) { __extends(D5, _super); function D5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D5; }(C3)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D6; }(C3)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D7; }(C3)); @@ -243,24 +236,21 @@ var D7 = (function (_super) { var D8 = (function (_super) { __extends(D8, _super); function D8() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D8; }(C3)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D9; }(C3)); var D10 = (function (_super) { __extends(D10, _super); function D10() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D10; }(C3)); @@ -269,24 +259,21 @@ var D10 = (function (_super) { var D11 = (function (_super) { __extends(D11, _super); function D11() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D11; }(C3)); var D12 = (function (_super) { __extends(D12, _super); function D12() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D12; }(C3)); var D13 = (function (_super) { __extends(D13, _super); function D13() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D13; }(C3)); @@ -296,32 +283,28 @@ var D13 = (function (_super) { var D14 = (function (_super) { __extends(D14, _super); function D14() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D14; }(C3)); var D15 = (function (_super) { __extends(D15, _super); function D15() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D15; }(C3)); var D16 = (function (_super) { __extends(D16, _super); function D16() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D16; }(C3)); var D17 = (function (_super) { __extends(D17, _super); function D17() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D17; }(C3)); @@ -330,32 +313,28 @@ var D17 = (function (_super) { var D18 = (function (_super) { __extends(D18, _super); function D18() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D18; }(C3)); var D19 = (function (_super) { __extends(D19, _super); function D19() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D19; }(C3)); var D20 = (function (_super) { __extends(D20, _super); function D20() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D20; }(C3)); var D21 = (function (_super) { __extends(D21, _super); function D21() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D21; }(C3)); @@ -364,32 +343,28 @@ var D21 = (function (_super) { var D22 = (function (_super) { __extends(D22, _super); function D22() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D22; }(C3)); var D23 = (function (_super) { __extends(D23, _super); function D23() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D23; }(C3)); var D24 = (function (_super) { __extends(D24, _super); function D24() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D24; }(C3)); var D25 = (function (_super) { __extends(D25, _super); function D25() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D25; }(C3)); @@ -398,32 +373,28 @@ var D25 = (function (_super) { var D26 = (function (_super) { __extends(D26, _super); function D26() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D26; }(C3)); var D27 = (function (_super) { __extends(D27, _super); function D27() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D27; }(C3)); var D28 = (function (_super) { __extends(D28, _super); function D28() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D28; }(C3)); var D29 = (function (_super) { __extends(D29, _super); function D29() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D29; }(C3)); diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index e4e35262d80d6..e0baced37a4ea 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -118,72 +118,63 @@ var B1 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1; }(B1)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(B1)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D3; }(B1)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D4; }(B1)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D5; }(B1)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D6; }(B1)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D7; }(B1)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D8; }(B1)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D9; }(B1)); diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index 0d1347cd33c91..0b17fc07f24d5 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -217,72 +217,63 @@ var M1; var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1; }(Base)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(Base)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D3; }(Base)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D4; }(Base)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D5; }(Base)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D6; }(Base)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D7; }(Base)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D8; }(Base)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D9; }(Base)); @@ -297,72 +288,63 @@ var M2; var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1; }(Base2)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(Base2)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D3; }(Base2)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D4; }(Base2)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D5; }(Base2)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D6; }(Base2)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D7; }(Base2)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D8; }(Base2)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D9; }(Base2)); diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index 9ba7ac52df58a..9c4c90117589e 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -33,16 +33,14 @@ var B = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(B)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(B)); diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index d4cd66a5e0a41..843a727c33e6b 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -187,24 +187,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index 93b1cbebd0aad..a9e7d01aab661 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -136,24 +136,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index 5cab9f1e7c483..94f549c62c18a 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -126,24 +126,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index ec551f5f58cbf..1d12aeb945f73 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -187,24 +187,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index ba833c31e7a60..78582304cb8e5 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -138,24 +138,21 @@ var Errors; var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index 0b624fcbc51ad..17252fdb809df 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -126,24 +126,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index 3d2d4d50d6e91..a0561606393ca 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -64,24 +64,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index 1cec204ff877e..c508781e089bf 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -67,24 +67,21 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); var OtherDerived = (function (_super) { __extends(OtherDerived, _super); function OtherDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return OtherDerived; }(Base)); diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index 2aa4d834395a4..3cf75dd83fd78 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -54,16 +54,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A)); @@ -77,32 +75,28 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B4; }(A)); diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index 60f463546c856..e9e8d39bf3c28 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -58,16 +58,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A)); @@ -81,40 +79,35 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B4; }(A)); var B5 = (function (_super) { __extends(B5, _super); function B5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B5; }(A)); diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index f40804bd55f0f..798e775083fa2 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -42,8 +42,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -57,16 +56,14 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A)); diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index 420be798293c0..3675ed6a41051 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -81,16 +81,14 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Derived)); @@ -104,8 +102,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -117,8 +114,7 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -130,8 +126,7 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A3)); @@ -145,8 +140,7 @@ var TwoLevels; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -158,8 +152,7 @@ var TwoLevels; var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -171,8 +164,7 @@ var TwoLevels; var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index 0bb50afe98540..404b6cbe98857 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -48,8 +48,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -61,8 +60,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -74,8 +72,7 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -87,8 +84,7 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index ec3b8382ecab1..8b168ea73b5cf 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -48,8 +48,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -61,8 +60,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -74,8 +72,7 @@ var A2 = (function () { var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -87,8 +84,7 @@ var A3 = (function () { var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index 24f36819ff655..0a83b760218d0 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -76,8 +76,7 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived; }(Base)); @@ -91,8 +90,7 @@ var ExplicitPublic; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -104,8 +102,7 @@ var ExplicitPublic; var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -117,8 +114,7 @@ var ExplicitPublic; var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A3)); @@ -133,8 +129,7 @@ var ImplicitPublic; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -146,8 +141,7 @@ var ImplicitPublic; var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A2)); @@ -159,8 +153,7 @@ var ImplicitPublic; var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A3)); diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index 95a71a018d162..195b7d2192e87 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -55,16 +55,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A)); @@ -78,32 +76,28 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B4; }(A)); diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index fd9b400cb3da8..0b2a57324ebe2 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -58,16 +58,14 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A)); @@ -81,40 +79,35 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var B2 = (function (_super) { __extends(B2, _super); function B2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B2; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A)); var B4 = (function (_super) { __extends(B4, _super); function B4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B4; }(A)); var B5 = (function (_super) { __extends(B5, _super); function B5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B5; }(A)); diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index 46178d1dc321a..2937261ad0510 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -42,8 +42,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); @@ -57,16 +56,14 @@ var Generics; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(A)); var B3 = (function (_super) { __extends(B3, _super); function B3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B3; }(A)); diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index 54afddcc11913..504e8542d4d9e 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -58,8 +58,7 @@ var Base = (function () { var Sub1 = (function (_super) { __extends(Sub1, _super); function Sub1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Sub1.prototype.foo = function () { return "sub1" + _super.prototype.foo.call(this) + _super.prototype.bar.call(this); @@ -69,8 +68,7 @@ var Sub1 = (function (_super) { var SubSub1 = (function (_super) { __extends(SubSub1, _super); function SubSub1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 8ef621cdf2b51..9f1289dce554c 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -84,8 +84,7 @@ var Base1 = (function () { var Sub1 = (function (_super) { __extends(Sub1, _super); function Sub1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Sub1.prototype.bar = function () { return "base"; @@ -95,8 +94,7 @@ var Sub1 = (function (_super) { var SubSub1 = (function (_super) { __extends(SubSub1, _super); function SubSub1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } SubSub1.prototype.bar = function () { return _super.prototype.super.foo; @@ -115,8 +113,7 @@ var Base2 = (function () { var SubE2 = (function (_super) { __extends(SubE2, _super); function SubE2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } SubE2.prototype.bar = function () { return _super.prototype.prototype.foo = null; @@ -135,8 +132,7 @@ var Base3 = (function () { var SubE3 = (function (_super) { __extends(SubE3, _super); function SubE3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } SubE3.prototype.bar = function () { return _super.prototype.bar.call(this); @@ -157,8 +153,7 @@ var Base4; var SubSub4 = (function (_super) { __extends(SubSub4, _super); function SubSub4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 80e26c36f7c89..1d2331052db1a 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -71,8 +71,7 @@ var Base5 = (function () { var Sub5 = (function (_super) { __extends(Sub5, _super); function Sub5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Sub5.prototype.x = function () { return "SubX"; @@ -82,8 +81,7 @@ var Sub5 = (function (_super) { var SubSub5 = (function (_super) { __extends(SubSub5, _super); function SubSub5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } SubSub5.prototype.x = function () { return _super.prototype.x.call(this); @@ -105,8 +103,7 @@ var Base6 = (function () { var Sub6 = (function (_super) { __extends(Sub6, _super); function Sub6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Sub6.prototype.y = function () { return "SubY"; @@ -116,8 +113,7 @@ var Sub6 = (function (_super) { var SubSub6 = (function (_super) { __extends(SubSub6, _super); function SubSub6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 8c9d93f3a36a2..0bd9d305d2eaf 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -30,8 +30,7 @@ MyBase.S1 = 5; var MyDerived = (function (_super) { __extends(MyDerived, _super); function MyDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 be97707b12a55..a7f964309f736 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -34,8 +34,7 @@ var test; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } B.prototype.bar = function (callback) { }; diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index 6cf9f79e7a413..b31110fdf7896 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -62,8 +62,7 @@ var Doing = (function () { var Other = (function (_super) { __extends(Other, _super); function Other() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } // in static method Other.staticMethod = function () { diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 561b7300fe428..16f1108864006 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -18,8 +18,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Foo.prototype.m1 = function () { return _super.prototype.m1.call(this); diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index 9eb7df62c1ab9..e1fc0f970244d 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -28,8 +28,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } B.prototype.m = function () { try { diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index adeda5835cb83..816277e4e9eb6 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -100,8 +100,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } B.prototype.f = function () { var _this = this; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index b1377eb9cde35..7b5823e598b31 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -61,8 +61,7 @@ var MyBase = (function () { var MyDerived = (function (_super) { __extends(MyDerived, _super); function MyDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 1397a0748ae5e..956bce4ef2eb6 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -29,8 +29,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 4e817b7bbf1c5..45c32076be960 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -72,8 +72,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Object.defineProperty(B.prototype, "property", { set: function (value) { diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index 0796c912d8cfa..dd37deb5af31d 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -31,8 +31,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 ee376cec2cb27..8c8534b428ab9 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -31,8 +31,7 @@ var Foo = (function () { var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Bar[symbol] = function () { return _super[symbol].call(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 ed71cebe3c78a..6815b71ce117d 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,8 +57,7 @@ var F = (function () { var SuperObjectTest = (function (_super) { __extends(SuperObjectTest, _super); function SuperObjectTest() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 7aac6cb47e0c2..2e1aecc728830 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -98,8 +98,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index 59aff947e5c06..78c09355fa006 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -49,8 +49,7 @@ System.register(["./foo"], function (exports_1, context_1) { Bar = (function (_super) { __extends(Bar, _super); function Bar() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 7fcfaf9d3174d..1fc1c7346396b 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -97,8 +97,7 @@ genericFunc(undefined); // Should be an error var ErrClass3 = (function (_super) { __extends(ErrClass3, _super); function ErrClass3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ErrClass3; }(this)); diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 546863b52165a..f8cb6d695dcce 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -98,8 +98,7 @@ genericFunc(undefined); // Should be an error var ErrClass3 = (function (_super) { __extends(ErrClass3, _super); function ErrClass3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return ErrClass3; }(this)); diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 6eaaed5c497ec..6400f410a0926 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -227,8 +227,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D; }(C)); @@ -337,8 +336,7 @@ var Base1 = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived1; }(Base1)); @@ -352,8 +350,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 08e12f49dca76..446bc15e6d9da 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -296,8 +296,7 @@ var Base1 = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived1; }(Base1)); @@ -311,8 +310,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base2)); diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 0f6b8716ed012..58e7f1c8d856e 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -42,8 +42,7 @@ var React = require("react"); var Button = (function (_super) { __extends(Button, _super); function Button() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } Button.prototype.render = function () { return ; @@ -64,8 +63,7 @@ var button_1 = require("./button"); var App = (function (_super) { __extends(App, _super); function App() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 f7ac96cff1f8c..88d917235012b 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -52,8 +52,7 @@ function Greet(x) { var BigGreeter = (function (_super) { __extends(BigGreeter, _super); function BigGreeter() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 56a6896f05277..3520b5af3720a 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -35,8 +35,7 @@ var React = require("react"); var MyComponent = (function (_super) { __extends(MyComponent, _super); function MyComponent() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } MyComponent.prototype.render = function () { var AnyComponent = this.props.AnyComponent; @@ -50,8 +49,7 @@ React.createElement(MyComponent, { AnyComponent: function () { return React.crea var MyButtonComponent = (function (_super) { __extends(MyButtonComponent, _super); function MyButtonComponent() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return MyButtonComponent; }(React.Component)); diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index 083cb5e94b391..a57fb222a77c0 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -74,8 +74,7 @@ var SomeBase = (function () { var SomeDerived = (function (_super) { __extends(SomeDerived, _super); function SomeDerived() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return SomeDerived; }(SomeBase)); diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index 45bf0853b138a..b88d1038969d2 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -102,8 +102,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 727640ee8af7f..6f0880ad7f59a 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -164,8 +164,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index dad77edf2329b..703c809274fc7 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -52,8 +52,7 @@ var B = (function () { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(A)); diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index eec648976c6cb..c052ea7d72b3c 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -161,8 +161,7 @@ var RoyalGuard = (function () { var LeadGuard = (function (_super) { __extends(LeadGuard, _super); function LeadGuard() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } LeadGuard.prototype.lead = function () { }; ; @@ -171,8 +170,7 @@ var LeadGuard = (function (_super) { var FollowerGuard = (function (_super) { __extends(FollowerGuard, _super); function FollowerGuard() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } FollowerGuard.prototype.follow = function () { }; ; @@ -226,8 +224,7 @@ var ArrowGuard = (function () { var ArrowElite = (function (_super) { __extends(ArrowElite, _super); function ArrowElite() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } ArrowElite.prototype.defend = function () { }; return ArrowElite; @@ -235,8 +232,7 @@ var ArrowElite = (function (_super) { var ArrowMedic = (function (_super) { __extends(ArrowMedic, _super); function ArrowMedic() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } ArrowMedic.prototype.heal = function () { }; return ArrowMedic; @@ -270,8 +266,7 @@ var MimicGuard = (function () { var MimicLeader = (function (_super) { __extends(MimicLeader, _super); function MimicLeader() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } MimicLeader.prototype.lead = function () { }; return MimicLeader; @@ -279,8 +274,7 @@ var MimicLeader = (function (_super) { var MimicFollower = (function (_super) { __extends(MimicFollower, _super); function MimicFollower() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 a82d3d2527fe9..a85a207a665f7 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -79,8 +79,7 @@ var RoyalGuard = (function () { var LeadGuard = (function (_super) { __extends(LeadGuard, _super); function LeadGuard() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } LeadGuard.prototype.lead = function () { }; ; @@ -89,8 +88,7 @@ var LeadGuard = (function (_super) { var FollowerGuard = (function (_super) { __extends(FollowerGuard, _super); function FollowerGuard() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } FollowerGuard.prototype.follow = function () { }; ; diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index a94d5fe93e775..a181a446a81e2 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -91,8 +91,7 @@ var C2 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1; }(C1)); diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index 2d83a62ad3e6b..14e9259a9e781 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -56,8 +56,7 @@ var C2 = (function () { var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1; }(C1)); diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 541c03dd4b4c7..52097af34f782 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -128,8 +128,7 @@ var Test; var Directory = (function (_super) { __extends(Directory, _super); function Directory() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Directory; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index b61676b40c360..c65445a3a5a80 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -78,8 +78,7 @@ var Test; var Directory = (function (_super) { __extends(Directory, _super); function Directory() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Directory; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 03408c6196b0d..2cae93924bc55 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -65,8 +65,7 @@ var Animal = (function () { var Giraffe = (function (_super) { __extends(Giraffe, _super); function Giraffe() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Giraffe; }(Animal)); diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index d67259304c3a8..15d1c3b396e3f 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -11,8 +11,7 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(T)); diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index 24f8789a82d66..2d0962f01d77d 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -21,16 +21,14 @@ var __extends = (this && this.__extends) || function (d, b) { var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(T)); var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(U)); diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 55bc51bbdbb3b..2738aa205281e 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -27,16 +27,14 @@ var Animal = (function () { var Cat = (function (_super) { __extends(Cat, _super); function Cat() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Cat; }(Animal)); var Dog = (function (_super) { __extends(Dog, _super); function Dog() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Dog; }(Animal)); diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index 75f62e94c679c..b3754436f2684 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -27,16 +27,14 @@ var Animal = (function () { var Cat = (function (_super) { __extends(Cat, _super); function Cat() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Cat; }(Animal)); var Dog = (function (_super) { __extends(Dog, _super); function Dog() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Dog; }(Animal)); diff --git a/tests/baselines/reference/typeValueConflict1.js b/tests/baselines/reference/typeValueConflict1.js index a1ecef212dae8..8711a656bf5f9 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -33,8 +33,7 @@ var M2; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(M1.A)); diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index a0cfeda07ecdc..7abda8110b6c6 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -40,8 +40,7 @@ var M2; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(M1.A)); @@ -52,8 +51,7 @@ var M3; var B = (function (_super) { __extends(B, _super); function B() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return B; }(M1.A)); diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index b3da31103df5a..f1ec6a77b14d3 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -37,8 +37,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 853cb5eafd7bf..045f7b40e555c 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -56,16 +56,14 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index 9931459744099..b4d42d819edb6 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -54,16 +54,14 @@ var Base = (function () { var Derived1 = (function (_super) { __extends(Derived1, _super); function Derived1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived1; }(Base)); var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index 64117b1935a3c..4b7813231cf86 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -14,8 +14,7 @@ var M; var C = (function (_super) { __extends(C, _super); function C() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C; }(M.I)); diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index 451aec91affe6..86948a2d9e668 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -136,120 +136,105 @@ var Base = (function () { var D0 = (function (_super) { __extends(D0, _super); function D0() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D0; }(Base)); var DA = (function (_super) { __extends(DA, _super); function DA() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return DA; }(Base)); var D1 = (function (_super) { __extends(D1, _super); function D1() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1; }(Base)); var D1A = (function (_super) { __extends(D1A, _super); function D1A() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D1A; }(Base)); var D2 = (function (_super) { __extends(D2, _super); function D2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2; }(Base)); var D2A = (function (_super) { __extends(D2A, _super); function D2A() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D2A; }(Base)); var D3 = (function (_super) { __extends(D3, _super); function D3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D3; }(Base)); var D3A = (function (_super) { __extends(D3A, _super); function D3A() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D3A; }(Base)); var D4 = (function (_super) { __extends(D4, _super); function D4() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D4; }(Base)); var D5 = (function (_super) { __extends(D5, _super); function D5() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D5; }(Base)); var D6 = (function (_super) { __extends(D6, _super); function D6() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D6; }(Base)); var D7 = (function (_super) { __extends(D7, _super); function D7() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D7; }(Base)); var D8 = (function (_super) { __extends(D8, _super); function D8() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D8; }(Base)); var D9 = (function (_super) { __extends(D9, _super); function D9() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D9; }(Base)); var D10 = (function (_super) { __extends(D10, _super); function D10() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D10; }(Base)); @@ -260,8 +245,7 @@ var E; var D11 = (function (_super) { __extends(D11, _super); function D11() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D11; }(Base)); @@ -273,8 +257,7 @@ var f; var D12 = (function (_super) { __extends(D12, _super); function D12() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D12; }(Base)); @@ -290,24 +273,21 @@ var c; var D13 = (function (_super) { __extends(D13, _super); function D13() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D13; }(Base)); var D14 = (function (_super) { __extends(D14, _super); function D14() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D14; }(Base)); var D15 = (function (_super) { __extends(D15, _super); function D15() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D15; }(Base)); @@ -317,16 +297,14 @@ var D15 = (function (_super) { var D16 = (function (_super) { __extends(D16, _super); function D16() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D16; }(Base)); var D17 = (function (_super) { __extends(D17, _super); function D17() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return D17; }(Base)); diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index 61f1bf2c9f9b6..c8e936af5277f 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -57,8 +57,7 @@ var __extends = (this && this.__extends) || function (d, b) { var MyView = (function (_super) { __extends(MyView, _super); function MyView() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } MyView.prototype.getDataSeries = function () { var data = this.model.get("data"); diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index b0be82122de83..e4d0acc893cc0 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -34,8 +34,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 72cf61f72fd88..83ad2a343946b 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -54,8 +54,7 @@ var D = (function () { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } E.prototype.foo3 = function () { }; return E; @@ -63,8 +62,7 @@ var E = (function (_super) { var F = (function (_super) { __extends(F, _super); function F() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 fafc4ec85fa99..231b8b27f3ba6 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -88,8 +88,7 @@ var C = (function () { var D = (function (_super) { __extends(D, _super); function D() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } D.prototype.foo1 = function () { }; return D; @@ -97,8 +96,7 @@ var D = (function (_super) { var E = (function (_super) { __extends(E, _super); function E() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 7d5a4b9deedf2..1343bea602e39 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -169,8 +169,7 @@ var ts; var Type = (function (_super) { __extends(Type, _super); function Type() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _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 324dc784b67f4..b82a7cbc0ae9e 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -70,8 +70,7 @@ var r4 = c2(); // should be an error var C2 = (function (_super) { __extends(C2, _super); function C2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return C2; }(Function)); // error diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index 3c1dd16874e5e..0ab1227bf3d04 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -36,8 +36,7 @@ var Validation; var c3 = (function (_super) { __extends(c3, _super); function c3() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return c3; }(c1)); diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index fd7d859ac3710..dbb261e5f2a03 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -168,8 +168,7 @@ var Greeter; var class2 = (function (_super) { __extends(class2, _super); function class2() { - var _this = _super.apply(this, arguments) || this; - return _this; + return _super.apply(this, arguments) || this; } return class2; }(class1)); From e0c35f2c829079a00f73bcc9ff4abd671578c26e Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 27 Sep 2016 14:17:11 -0700 Subject: [PATCH 35/39] Restore arrow function. --- src/compiler/transformers/es6.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index ed5659e8a3f56..df21df5e1fbe2 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -224,7 +224,7 @@ namespace ts { : visitorWorker(node); } - function saveStateAndInvoke(node: Node, f: (node: Node) => T): T { + function saveStateAndInvoke(node: T, f: (node: T) => U): U { const savedEnclosingFunction = enclosingFunction; const savedEnclosingNonArrowFunction = enclosingNonArrowFunction; const savedEnclosingNonAsyncFunctionBody = enclosingNonAsyncFunctionBody; @@ -867,7 +867,7 @@ namespace ts { } if (constructor) { - const body = saveStateAndInvoke(constructor, makeTransformerForConstructorBodyAtOffset(statementOffset)); + const body = saveStateAndInvoke(constructor, constructor => visitNodes(constructor.body.statements, visitor, isStatement, /*start*/ statementOffset)); addRange(statements, body); } @@ -900,10 +900,6 @@ namespace ts { return block; } - function makeTransformerForConstructorBodyAtOffset(offset: number): (c: ConstructorDeclaration) => NodeArray { - return constructor => visitNodes(constructor.body.statements, visitor, isStatement, /*start*/ offset); - } - /** * We want to try to avoid emitting a return statement in certain cases if a user already returned something. * It would be pointless and generate dead code, so we'll try to make things a little bit prettier From f8fbc22ef23e7c4bc5c2b75af30fb532d2208cb6 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 27 Sep 2016 14:35:57 -0700 Subject: [PATCH 36/39] Reuse the 'captureThisForNode' function. --- src/compiler/transformers/es6.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index df21df5e1fbe2..b0633c309eaf2 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -965,21 +965,8 @@ namespace ts { // The constructor was generated for some reason. // Create a captured '_this' variable. - statements.push( - createVariableStatement( - /*modifiers*/ undefined, - createVariableDeclarationList([ - createVariableDeclaration( - "_this", - /*type*/ undefined, - superReturnValueOrThis - ) - ]), - /*location*/ extendsClauseElement) - ); - + captureThisForNode(statements, constructor, superReturnValueOrThis); enableSubstitutionsForCapturedThis(); - return SuperCaptureResult.ReplaceSuperCapture; } From fb4b503834456dd833b3c695a0248a228c7339cb Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 27 Sep 2016 14:36:17 -0700 Subject: [PATCH 37/39] Removed pointlessish overloads. --- src/compiler/transformers/es6.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index b0633c309eaf2..481857e053602 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -1290,8 +1290,6 @@ namespace ts { } } - function captureThisForNode(statements: Statement[], node: Node, initializer: Expression | undefined): void; - function captureThisForNode(statements: Statement[], node: Node, initializer: Expression | undefined, originalStatement: Statement): void; function captureThisForNode(statements: Statement[], node: Node, initializer: Expression | undefined, originalStatement?: Statement): void { enableSubstitutionsForCapturedThis(); const captureThisStatement = createVariableStatement( From b5a10316851ec7943ab24ee6127178e705657f1c Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 27 Sep 2016 14:41:47 -0700 Subject: [PATCH 38/39] Moved code around, fixed indent, reworded comment. --- src/compiler/transformers/es6.ts | 129 +++++++++++++++---------------- 1 file changed, 64 insertions(+), 65 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 481857e053602..0495e422fc327 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -161,7 +161,7 @@ namespace ts { * Callers should skip the current statement and avoid any returns of '_this'. */ ReplaceWithReturn, -} + } export function transformES6(context: TransformationContext) { const { @@ -902,7 +902,7 @@ namespace ts { /** * We want to try to avoid emitting a return statement in certain cases if a user already returned something. - * It would be pointless and generate dead code, so we'll try to make things a little bit prettier + * It would generate obviously dead code, so we'll try to make things a little bit prettier * by doing a minimal check on whether some common patterns always explicitly return. */ function isSufficientlyCoveredByReturnStatements(statement: Statement): boolean { @@ -910,7 +910,6 @@ namespace ts { if (statement.kind === SyntaxKind.ReturnStatement) { return true; } - // An if-statement with two covered branches is covered. else if (statement.kind === SyntaxKind.IfStatement) { const ifStatement = statement as IfStatement; @@ -973,6 +972,68 @@ namespace ts { return SuperCaptureResult.NoReplacement; } + /** + * Declares a `_this` variable for derived classes and for when arrow functions capture `this`. + * + * @returns The new statement offset into the `statements` array. + */ + function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements: Statement[], ctor: ConstructorDeclaration, hasExtendsClause: boolean, statementOffset: number) { + // If this isn't a derived class, just capture 'this' for arrow functions if necessary. + if (!hasExtendsClause) { + addCaptureThisForNodeIfNeeded(statements, ctor); + return SuperCaptureResult.NoReplacement; + } + + // Most of the time, a 'super' call will be the first real statement in a constructor body. + // In these cases, we'd like to transform these into a *single* statement instead of a declaration + // followed by an assignment statement for '_this'. For instance, if we emitted without an initializer, + // we'd get: + // + // var _this; + // _this = _super.call(...) || this; + // + // instead of + // + // var _this = _super.call(...) || this; + // + // Additionally, if the 'super()' call is the last statement, we should just avoid capturing + // entirely and immediately return the result like so: + // + // return _super.call(...) || this; + // + let firstStatement: Statement; + let superCallExpression: Expression; + + const ctorStatements = ctor.body.statements; + if (statementOffset < ctorStatements.length) { + firstStatement = ctorStatements[statementOffset]; + + if (firstStatement.kind === SyntaxKind.ExpressionStatement && isSuperCallExpression((firstStatement as ExpressionStatement).expression)) { + const superCall = (firstStatement as ExpressionStatement).expression as CallExpression; + superCallExpression = setOriginalNode( + saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), + superCall + ); + } + } + + // Return the result if we have an immediate super() call on the last statement. + if (superCallExpression && statementOffset === ctorStatements.length - 1) { + statements.push(createReturn(superCallExpression)); + return SuperCaptureResult.ReplaceWithReturn; + } + + // Perform the capture. + captureThisForNode(statements, ctor, superCallExpression, firstStatement); + + // If we're actually replacing the original statement, we need to signal this to the caller. + if (superCallExpression) { + return SuperCaptureResult.ReplaceSuperCapture; + } + + return SuperCaptureResult.NoReplacement; + } + /** * Visits a parameter declaration. * @@ -1216,68 +1277,6 @@ namespace ts { statements.push(forStatement); } - /** - * Declares a `_this` variable for derived classes and for when arrow functions capture `this`. - * - * @returns The new statement offset into the `statements` array. - */ - function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements: Statement[], ctor: ConstructorDeclaration, hasExtendsClause: boolean, statementOffset: number) { - // If this isn't a derived class, just capture 'this' for arrow functions if necessary. - if (!hasExtendsClause) { - addCaptureThisForNodeIfNeeded(statements, ctor); - return SuperCaptureResult.NoReplacement; - } - - // Most of the time, a 'super' call will be the first real statement in a constructor body. - // In these cases, we'd like to transform these into a *single* statement instead of a declaration - // followed by an assignment statement for '_this'. For instance, if we emitted without an initializer, - // we'd get: - // - // var _this; - // _this = _super.call(...) || this; - // - // instead of - // - // var _this = _super.call(...) || this; - // - // Additionally, if the 'super()' call is the last statement, we should just avoid capturing - // entirely and immediately return the result like so: - // - // return _super.call(...) || this; - // - let firstStatement: Statement; - let superCallExpression: Expression; - - const ctorStatements = ctor.body.statements; - if (statementOffset < ctorStatements.length) { - firstStatement = ctorStatements[statementOffset]; - - if (firstStatement.kind === SyntaxKind.ExpressionStatement && isSuperCallExpression((firstStatement as ExpressionStatement).expression)) { - const superCall = (firstStatement as ExpressionStatement).expression as CallExpression; - superCallExpression = setOriginalNode( - saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), - superCall - ); - } - } - - // Return the result if we have an immediate super() call on the last statement. - if (superCallExpression && statementOffset === ctorStatements.length - 1) { - statements.push(createReturn(superCallExpression)); - return SuperCaptureResult.ReplaceWithReturn; - } - - // Perform the capture. - captureThisForNode(statements, ctor, superCallExpression, firstStatement); - - // If we're actually replacing the original statement, we need to signal this to the caller. - if (superCallExpression) { - return SuperCaptureResult.ReplaceSuperCapture; - } - - return SuperCaptureResult.NoReplacement; - } - /** * Adds a statement to capture the `this` of a function declaration if it is needed. * From c29ec6fe371fb4c1ff2aed13a213ead2acfc961a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 27 Sep 2016 20:53:15 -0700 Subject: [PATCH 39/39] Consolidated 'super()' transformation logic into one function. --- src/compiler/transformers/es6.ts | 88 ++++++++++++++------------------ 1 file changed, 38 insertions(+), 50 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 0495e422fc327..1ed7ee9b7abf8 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -837,7 +837,6 @@ namespace ts { startLexicalEnvironment(); let statementOffset = -1; - let superCaptureStatus = SuperCaptureResult.NoReplacement; if (hasSynthesizedSuper) { // If a super call has already been synthesized, // we're going to assume that we should just transform everything after that. @@ -854,12 +853,9 @@ namespace ts { addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper); Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!"); - superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, statementOffset); } - if (superCaptureStatus === SuperCaptureResult.NoReplacement) { - superCaptureStatus = addDefaultSuperCallIfNeeded(statements, constructor, extendsClauseElement, hasSynthesizedSuper); - } + const superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, hasSynthesizedSuper, statementOffset); // The last statement expression was replaced. Skip it. if (superCaptureStatus === SuperCaptureResult.ReplaceSuperCapture || superCaptureStatus === SuperCaptureResult.ReplaceWithReturn) { @@ -929,61 +925,42 @@ namespace ts { return false; } - /** - * Adds a synthesized call to `_super` if it is needed. - * - * @param statements The statements for the new constructor body. - * @param constructor The constructor for the class. - * @param extendsClauseElement The expression for the class `extends` clause. - * @param hasSynthesizedSuper A value indicating whether the constructor starts with a - * synthesized `super` call. - */ - function addDefaultSuperCallIfNeeded(statements: Statement[], constructor: ConstructorDeclaration, extendsClauseElement: ExpressionWithTypeArguments, hasSynthesizedSuper: boolean) { - // If the TypeScript transformer needed to synthesize a constructor for property - // initializers, it would have also added a synthetic `...args` parameter and - // `super` call. - // If this is the case, or if the class has an `extends` clause but no - // constructor, we emit a synthesized call to `_super`. - if (constructor ? hasSynthesizedSuper : extendsClauseElement) { - const actualThis = createThis(); - setNodeEmitFlags(actualThis, NodeEmitFlags.NoSubstitution); - const superCall = createFunctionApply( - createIdentifier("_super"), - actualThis, - createIdentifier("arguments"), - ); - const superReturnValueOrThis = createLogicalOr(superCall, actualThis); - - if (!constructor) { - // We must be here because the user didn't write a constructor - // but we needed to call 'super()' anyway - but if that's the case, - // we can just immediately return the result of a 'super()' call. - statements.push(createReturn(superReturnValueOrThis)); - return SuperCaptureResult.ReplaceWithReturn; - } - - // The constructor was generated for some reason. - // Create a captured '_this' variable. - captureThisForNode(statements, constructor, superReturnValueOrThis); - enableSubstitutionsForCapturedThis(); - return SuperCaptureResult.ReplaceSuperCapture; - } - - return SuperCaptureResult.NoReplacement; - } - /** * Declares a `_this` variable for derived classes and for when arrow functions capture `this`. * * @returns The new statement offset into the `statements` array. */ - function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements: Statement[], ctor: ConstructorDeclaration, hasExtendsClause: boolean, statementOffset: number) { + function declareOrCaptureOrReturnThisForConstructorIfNeeded( + statements: Statement[], + ctor: ConstructorDeclaration | undefined, + hasExtendsClause: boolean, + hasSynthesizedSuper: boolean, + statementOffset: number) { // If this isn't a derived class, just capture 'this' for arrow functions if necessary. if (!hasExtendsClause) { - addCaptureThisForNodeIfNeeded(statements, ctor); + if (ctor) { + addCaptureThisForNodeIfNeeded(statements, ctor); + } return SuperCaptureResult.NoReplacement; } + // We must be here because the user didn't write a constructor + // but we needed to call 'super(...args)' anyway as per 14.5.14 of the ES2016 spec. + // If that's the case we can just immediately return the result of a 'super()' call. + if (!ctor) { + statements.push(createReturn(createDefaultSuperCallOrThis())); + return SuperCaptureResult.ReplaceWithReturn; + } + + // The constructor exists, but it and the 'super()' call it contains were generated + // for something like property initializers. + // Create a captured '_this' variable and assume it will subsequently be used. + if (hasSynthesizedSuper) { + captureThisForNode(statements, ctor, createDefaultSuperCallOrThis()); + enableSubstitutionsForCapturedThis(); + return SuperCaptureResult.ReplaceSuperCapture; + } + // Most of the time, a 'super' call will be the first real statement in a constructor body. // In these cases, we'd like to transform these into a *single* statement instead of a declaration // followed by an assignment statement for '_this'. For instance, if we emitted without an initializer, @@ -1034,6 +1011,17 @@ namespace ts { return SuperCaptureResult.NoReplacement; } + function createDefaultSuperCallOrThis() { + const actualThis = createThis(); + setNodeEmitFlags(actualThis, NodeEmitFlags.NoSubstitution); + const superCall = createFunctionApply( + createIdentifier("_super"), + actualThis, + createIdentifier("arguments"), + ); + return createLogicalOr(superCall, actualThis); + } + /** * Visits a parameter declaration. *