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 | 103 ++++++++++++++++++++++--------- 1 file changed, 73 insertions(+), 30 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 4e994c1acb0..aab894dc4ff 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) { - statements.push( - createStatement( - createFunctionApply( - createIdentifier("_super"), - createThis(), - createIdentifier("arguments") - ), - /*location*/ extendsClauseElement - ) + const superCall = createFunctionApply( + createIdentifier("_super"), + createThis(), + createIdentifier("arguments"), ); + const superReturnValueOrThis = createLogicalOr(superCall, createThis()); + + statements.push( + 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 7dcbfef1d72..de8e08843a2 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 8f175621af4..58c7bd4c3c1 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 a49da04c8a1..04407cfc08c 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 1f6c1dfdd7a..09109c40675 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 87b5475111b..803df9f1d56 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 5fc340c58d0..d6e1ce1813f 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 c04532078e9..d60f260a163 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 7294aa1aff7..860d74f5204 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 905ed9bce0e..d717da94d38 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 2d9f7cfed6e..f08363776cc 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 21565dc99fc..06e3e266ee9 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 af24b61cf33..96121364837 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 3b21f15777c..bbfe2952594 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 b380104b461..3b036f52a9d 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 1e9a5420345..4167294e5f2 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 76b90c01bf0..1893f6586ee 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 7c73fac2d67..0ba5cbbc8d0 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 275bbf67602..27e6dd714ba 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 2d04b059a9a..914679c7de2 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 de1b1ba11bd..01fdb92a24e 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 e2ca36cbd1d..911df30a423 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 a15df1b14b7..aff812247a2 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 f45f67a8765..7df39836542 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 f54dec83c9c..81155544cab 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 4dbf88f8688..53066c70391 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 c15782a8e20..3c5f4365053 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 255b52e16c9..aba7a7cbc8c 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 73e3be15e11..bfd49be6bbf 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 24f95ec61ea..80a9aa9cf14 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 43608565039..5932aec049a 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 b3318dd53e8..7ea579d87ed 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 becbfea57a0..0fb5867836c 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 d062a563a4d..b933425ffb0 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 5744424f878..e407c3acdb0 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 de42671c9f1..59c816dcc5c 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 206ae7768ba..b3b349ebc06 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 56b206786f1..6e14fb66ecd 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 53f92dd3b59..3b32f327b07 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 092de2ca707..ce80efc3c7a 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 791ae494ab2..d95eb43f0e5 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 d93ddf8b3a4..f4c401979cf 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 ef6befe268e..54839da4b5a 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 8a3b4b35d0b..070c151ee51 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 54d1b0fdac8..6fcc24b06bf 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 87debbdc55c..22ca0aa0cbe 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 19de38325e2..0081a30d930 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 e6790021f63..85dd3725639 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 9123f5f2ea8..f81b5800929 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 c4210f3f6a5..800742ff63b 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 3f3fa3cc0b9..6629ef35dda 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 66d2135f01d..187a354553d 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 dc52eeeaee6..bbf57046a97 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 f67f754d063..fcf1d7fe124 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 1c2fc896a6a..a9e38f0520c 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 21a69f517fc..9af685812c2 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 e38ce2854bd..36232ad04b1 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 6b3bf8e125e..4fd0dc2cefc 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 a823047fc0d..710725f145b 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 b60cf2014f1..154aee0693b 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 434af36123e..7359d330cd6 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 9776d14612e..594d2dcafb7 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 e89e9d9345b..2149db744b0 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 791b6f4c979..0c36877d9dc 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 bcff0938157..426889df7de 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 b4b6330a7cf..71b345a311c 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 c53910e00ac..7c428751b28 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 cdc19a5688d..48825a01a67 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 cfb5726dac1..dc70f3e8d08 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 afbc15cf912..f1fcdb48dae 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 7e9c23c1f83..d2ede7d04b1 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 1257b446ccb..c6eddf4ef48 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 1889ee998ca..e58d55fd274 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 39db4dec174..15fcbff4c89 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 d071c05db5d..0cade04664d 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 f334cc7f42b..cf0da205d71 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 19c156176bf..9d0e7648dcb 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 6ce1dd62fc5..811e86b21ca 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 5695e6c79d3..8738b43bb3f 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 46f0a8938c4..02d31377de8 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 8d7128cc03d..8ac2cc9de3d 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 d5b0417f995..4f612e3d9c6 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 c9409e97466..b76117fddfc 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 17fbf568601..aa66ba540a8 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 4d5c804e557..0bd5dab31a9 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 0263e9e97b3..aef8f58fab2 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 379e0b18ccc..2e6cd648dc0 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 d613dd1fe31..5cb07934658 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 7ada903974c..44b15710c73 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 457195f5449..ae6b08e4bca 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 dc025b11dde..9f43ee1a6b3 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 03b7af3e716..95206681372 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 6342facae21..dfbc70de115 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 ec9e9f83a8e..b73ecb4a92b 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 c31fd8bf9dd..1f282ba7132 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 7f52a6a581f..81ad696ddc8 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 0da9449a3a7..95509867cc5 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 7ab6cb2ceca..83152355a13 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 5a455edc082..ef584afd6e9 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 ed9497c8729..f7405cfd38a 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 508dc039387..b91d5413611 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 c4da02cb321..8673e48d65f 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 ace4cf19fee..2a01c1aa8b3 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 8073271b5ea..4218bfbea98 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 a41bb14451a..031253a19ad 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 c46e3c5ddbe..d33e6b4edef 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 fa6f0357b0d..d6188aaf988 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 8ecad9c24a5..c23683470d0 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 af766977967..072dc8138c7 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 17d888834ec..b5cf4ae1382 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 4f1d872e753..d1ee8b48b3a 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 0805389f268..0dcf4103f49 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 80b4b7c175d..f1a695c0b2a 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 4c593761f00..f754e140d37 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 8b4663ad2cb..584b31b7e8e 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 6aceb0ffebf..e01e90d512d 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 b324f7382d8..7047eaad658 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 69e63f92570..64d519d6952 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 45415488700..ced164bca10 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 279d0ad6899..654cd35c400 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 f8ea40ee69c..ae5852d91f9 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 269edb851e9..63eeb5bc178 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 2d2cf938156..4e67909f2d3 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 61db0a41a5c..a185f6cf40a 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 afb2be21c68..3ff1c92a56e 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 ae2f73cadc1..a7f4a4bb9d9 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 00cd35693f1..519074358cc 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 7f85e4e25d7..d3134a97ccd 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 09cdd5c779b..d525fb8a6ad 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 b47514b1286..3257e51b5b8 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 32ae1ef3e88..f0b8698c64d 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 923ac9c9829..bf5d0141a19 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 a807590749e..f1929cdc798 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 39fb844613e..ab825abcd31 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 e6e7a1eaf42..11b0c5e3ae2 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 b51488dbe1e..6caa97781dd 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 ec49320b4be..49b2a428e06 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 d937197fad5..1381df2797d 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 0e3897a4f46..7898ae8a2b2 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 72fd4af1eed..c5c506d1af6 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 b708489c518..d9e4c3f1482 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 581575d0d46..7b13fa1bf4c 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 e94a4700506..6ff5ae2ac5b 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 04dcfa2325c..6bb9387f673 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 2b2e01e59df..fb07eb3d0b2 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 327adead6b8..cd23c220231 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 a8a440fa17d..d4f6bb11ca9 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 7e6f26ad591..dbbbe340ba7 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 fc64a8012ee..eaf031c2571 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 b6e7cb121d6..b961b8fa4a5 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 14b8bf46697..14965b53abd 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 2af7a6a870e..da4175fe5c7 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 6887a22ae20..55db3a5e625 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 d3b5e7a2030..b3ef3000762 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 4553608756d..c5bb6ebcd01 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 df5d812cf54..598bb5b6e85 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 2db90d8b026..5501b3e2df4 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 29b5ad3b496..9909ca512ce 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 517c126ab44..105fe849767 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 f94a9fde5f2..6a8dd340a20 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 c71b0dcf1dd..59b64e4a9ba 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 42df3cca389..860c0b90e48 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 0de25c15013..fb7a811cba3 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 4185af60dbc..675235ae324 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 90c67439773..ceb386b3e14 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 736b57e08ba..03494b4f88d 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 ca7eea70ad6..ee8185802d4 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 c64e33827c5..5a36f91c7ca 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 dc7a12eecdc..f23588dcbc5 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 d4be6df98dd..cc6fe9ce640 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 ee5ad2fbd07..d401defc2ed 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 79e4bfd0bbf..b4b531b8084 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 31c0dd3c7c5..69f46e2ccd2 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 5decd7a21fb..171f21e77fc 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 46974055171..523002e5b57 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 3d885d3eef1..1201dcf3d3d 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 a55c068d4a4..2057d63b38f 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 16500b823b8..ef29163eda6 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 24cfe77d93c..00186f40a28 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 b03dd285ced..afc0e20eca9 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 41a20ac6477..6b75da57e9a 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 bdef47165b1..3c89ecd50c0 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 ed15bbf0145..aaac258504c 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 a900fd44c67..c31d873ffb9 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 2e38e2a131f..7b803e9c987 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 c79a4d8d6d1..293d017734e 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 78e20a7d6a3..c990298c4ac 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 9c7482a4713..f5a31fffabb 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 3514965f1ce..a6d00d847f3 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 8780c92fc1e..58b050c5ebe 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 09ff39f582e..934c7eceb0e 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 37c1b1737cd..217cf23f9cb 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 4fd63cf60d0..511c293d417 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 88f35f53b17..0e14e958b28 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 96318a0d616..cb2cadb7698 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 171c4bc6210..25c69839117 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 26757c43def..dcd972d3a97 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 ae1d0d90445..69fdebe8f5c 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 1d533506e15..3345708ddaa 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 d06faa80f20..b16721d0acc 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 1c3d6bf16d0..a235e2555f3 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 960b76f52c4..956e8cd2e0d 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 76481ec1bc6..a0ed6d890d4 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 61f0d50db03..7bc7989f7a3 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 905c12e07e3..1b91e8a131a 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 5775e0f064d..365e17afc9b 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 29bb48e7970..7be8079cfd9 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 1d84d74e590..102562a841a 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 c385eff83d5..5fafe95c1a8 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 e9081acab55..58bff801774 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 4b9535cd2c3..d58dcd1f536 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 117bb6a7bd5..2f68300a4bf 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 0974f9d7b36..2ed404342d7 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 a4636d82993..4ccc090f4f2 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 4ac08f97a52..c9c569f8676 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 6dfce6e8e63..3681f9fa859 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 d05b5c46dad..0b364e90e45 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 e34dcc9810f..aea36311add 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 061042aa34b..9fbb3a4bf63 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 da0478e26d0..d74f9361e28 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 10ef42d6838..5b7754dff64 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 39ee7ce1e69..d304422f038 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 f1ea96973b8..81236200ade 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 192f0647ed6..e118e164dfc 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 f1e9ea0b4de..f167928087d 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 5fc5501c329..d50912fbeac 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 66946fab8bd..6f37ad9dea1 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 6e9b9763a3a..6d95c696176 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 2e6ac2c7934..75901c708b3 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 7dbb901362f..6dcf8f3fd83 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 0c7a21232e6..2fe5906e746 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 a44d4340b8f..dc63ccb21d8 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 c81c6f048f5..605ad6afa45 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 cd486152c1c..7ab70d93ff2 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 5b8af9e85bf..d3e3fe5d4c9 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 5c7d73d5dfd..1f43469596a 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 ebb675a26db..d678f5ce59f 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 b8a15ee8b6c..eeaf80061af 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 b62f0d8f7d3..7839398551d 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 147e6edbbb4..f2d8f72edfb 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 8e5fa82cf0f..f7afd6529c0 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 50408d3bee7..ad2dc22debf 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 1c88306bf3a..a464970fe50 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 38c465492e6..0e88d3664c6 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 5d08905a605..5a3f8f3cf57 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 be7e97a8fc5..f6aa6963795 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 0c70f03218e..8d18e311d88 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 34af167011d..70885570373 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 2c0775efc19..24d43468dcf 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 540be97d165..a6b7710ec6d 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 93d5b49fcd0..3da7720b77e 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 b58acc01082..57f474affe7 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 479beebbbfe..84028f1d3f2 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 4dc35c5e006..6c3ce90d6f0 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 3b0a673d378..295fbac60e1 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 b6103940b33..27947b4f05f 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 56daf4b7310..e31b18e11e7 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 2e0a561e846..4430ad5a31b 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 cfbe44166c9..f6415d84965 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 2df6ce46b2c..a1f109ed49e 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 88ce3f1418b..4e07d5c8655 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 920ad1f7bda..b6eabb2a418 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 3fa18140034..0e866e98f46 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 1350ed9d4c8..4bb83a7c172 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 5c85d39e1ec..2292f0a494a 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 96f6c65b85c..7b05688b8c8 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 3e778535bb7..765fdf083b5 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 dbfbdb46940..18c98868e93 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 a7898810e10..d3d275ff25b 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 c32865478e3..88000a12bbe 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 a722cce1670..0a6323630fb 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 1881e6b8c87..ebf779f7bba 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 14662410a14..6e30a1d7879 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 0504bad39c7..439f74a9c9d 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 a9ea4bf5eda..b6eec928a07 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 446c6df9c94..508eea66500 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 f7bd85d685c..14f3d69ef3e 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 e52e5b497ac..03bf54db78d 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 1f4f62a42ee..50db54a05e9 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 d598389d0fa..6cab3a8c7f6 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 6532603b73c..c0cb5d49023 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 20f43a948b8..6985657ced3 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 558e6d6ba57..829b1ae1a32 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 3785c7c5846..9a2d4fb2adf 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 6542492e200..db2fcdbbf36 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 fb9a3f12378..db11c06d782 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 9423789dd35..f61317c2d50 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 3d5efcc1b1a..68a2960b03f 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 5c097a68ccc..7176a27ebc9 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 caec9bd1987..cca8e94dcab 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 aff01bc8565..82910ff0435 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 2dc6c8a1bc4..465ea54b73f 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 6e37f929efe..e26e49c1b7a 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 7485abe1927..c604461f32d 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 33d0e8c7e03..38a98a3f114 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 e5488121d34..5c512883a10 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 5aa43d78826..25dfb7ae722 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 3226f1cd659..e39353b6a7f 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 04d5bd2d997..53c02a85113 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 509dd9a1136..3835a4dd787 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 d3f18e0bfcb..a16f8bcac68 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 acab51690d3..410675804af 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 31b4cd181b9..3fbb7c8a901 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 f334da52625..d14b70b6312 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 9f71ace88a9..a6c14b9ba0f 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 8f90c2fb6e4..0cc1f5867a2 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 394e6650e0a..2124f414172 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 2bd33efb3dc..6f10b979c4a 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 d2bf12667fc..4581ecc31ec 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 f61f57cb615..8f1e9c8365f 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 906145850f1..454bc77ae5b 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 1c73075acc4..26749718d43 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 170ef89abb2..e7c32cbe73f 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 3f1b6e21adc..ccaf6fa8807 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 b7cca85561c..85658593705 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 73012f714e8..e567e2a8042 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 61cb758c48e..226fede58b6 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 02a51aed35d..31d2b3976db 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 2c5bbf51d7f..41a187edb6a 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 5bc7a943163..b776668f2e2 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 5f4bb41a83f..761220ae11a 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 7fe6c49d65e..39468204a5a 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 12be456a8a8..a41d459b445 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 1f016b401ed..c0498b351e1 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 e482f0d33d3..e3c50cfa8f7 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 75762ffbb54..af1e3be18ff 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 88671ce1cee..e27a9789cb1 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 ba3583c3051..0dfc867a2f7 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 8fec5dc27da..033d6150194 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 915e652056c..78cfb6b51b9 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 60e142dd5f7..d9f40f83051 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 f850b5cf177..6641ef9d212 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 bb02cbf0417..89fab70bdba 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 a5929bc152c..2a97d3d2d87 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 8c5afc99ece..d5f8db60f97 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 36bc0c5f76b..5891922f9f2 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 cb50330c20c..b4c2040aa71 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 3c1ee19ec48..552bd0ed404 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 316a94d9069..b4950b039f3 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 b9827d5bc93..956e20a1045 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 dd143da97e6..c8b910abb2d 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 66d23a45b72..c1c77ec5fc9 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 99ab918e631..366ad1f0af5 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 6321f77d31f..9b145b55d04 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 f5bc099cb8d..5db269f7c58 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 9462df7a3c3..7f3e872245b 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 52fbfaffdde..c4acea22260 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 c65155ee55c..f555d5bf694 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 b416cf3fb93..2ed366d7b8a 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 25a977531ca..369c6b20a14 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 dfd05556925..d884364d95c 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 b4efaa89621..c1289f99a78 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 5044a8e03ac..665b547154d 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 6ebdc336a64..a9a92003542 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 3ddff027c1a..17541ee163d 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 a6c3beea4ef..a154d0426a9 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 94b602d29d9..be10895642e 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 a8fc4d5a3dd..6895077abda 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 7d5cdb43e96..00c1093053b 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 648f1d1622e..6cbb7ae7e8c 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 59675c56e5f..370e27514c1 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 97464233027..a61b6bafabd 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 49145b010d4..9f71208e5db 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 4a202b76497..2e0c3dc90d0 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 a0dd1177cfb..95bf94572b1 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 06f907371ea..25d75bea5af 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 ea36c40480f..5c39c10e738 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 ae523d53d9b..c37caf8d53c 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 93890bd8294..eb185d56d0b 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 4d0f2438459..0779cc10d37 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 f2dfda4e48f..4934947233f 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 0dc736a375d..27a65d513fd 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 51c474430ad..7cfafdf1f9d 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 d138ac3eba8..1840a7829e8 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 3d3f550713e..8e498273b86 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 e23917e40a4..c003eaa60b4 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 2d312d9859d..ca6a379816f 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 0ad25b302f0..b323aefbd48 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 95b71069584..1de6f5f638a 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 775afe86946..f78378f0885 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 a507a19a456..cf056e768d8 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 d72f29e93bf..e70dc7b6481 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 97be2137722..de2789caa68 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 4d5e4376308..83ad38e64f0 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 8138e7888b3..6111e7f8cee 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 99f5b07696d..499bd219905 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 43c7c6f6fa4..70ceaa8acd3 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 e1bdbff85dd..5e6695dd200 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 1592b1a723b..6f35c3f0e40 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 edfb33bfe1b..f3bfa4db6a5 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 cb3c22b52eb..75bf3f91884 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 0c90c6d0025..b4fbd6f3698 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 0f5b0d3e08d..1409b1c59a8 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 2d391a64fe7..baf2d1de129 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 63c84090c9c..c149d4e3c3d 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 822aa71efd0..16653cfb4f3 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 568379948bc..bfbf75b1731 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 a4f835c8669..96c9337817d 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 6292356faf5..19cd9ee4630 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 ce4b929c7f9..53a8c983399 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 2ff9d3e6604..50108773a70 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 72ac1c8a928..fd0bea5494c 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 a7e341c31ce..a3baa1920e3 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 3d9c4e1175e..e21ca151c87 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 54834397b64..c1f4480241c 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 71f16846363..598ddaef2de 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 cd2df2633ae..2f4ac430cc1 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 ec434286f43..11053d76d2d 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 26372bfb718..80e9a469398 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 c8cca671327..7c5ec66c6be 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 b2c26c6af75..c3d27cac8a9 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 b9927ebf193..bbab8e9ccdd 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 cef2759e1d5..1901e169447 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 9f7a61fe30d..97c3e56d423 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 a9eace23833..732f7e2672c 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 47fb46794f0..1d38f844384 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 dce09972c83..ddfbce8fc12 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 9c5bcfb8e2d..76c18900945 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 29781229b5a..3df18cb27cb 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 7ecb597a2d9..e7d2f603d5c 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 9710afe700d..e0b75f54208 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 7d6be5eaf8f..681af407bd4 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 cb9c677f024..2011b741df2 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 241fbcaf27e..80bdd4c87e1 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 c0578c2fba1..3eac80c60fc 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 0670d45a5a5..d55ef5eb28c 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 3e6a47b4de2..04056fa9c14 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 42decf512e4..408f73b6533 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 6d42c38f907..f53f0c74a54 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 f6ccdbe3fab..a8bd88ed3a8 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 48cefeef22c..b23da97c790 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 8a478e675c6..5643875efd3 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 7f9893b2346..25873d9cd07 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 ba7f1d93245..2fa35a323a0 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 b23b73caf83..eecb4101958 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 59ab70de531..f77bed44ffc 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 86573493e20..5287a760ac8 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 90f8feab7bc..ac2f2510b64 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 c6e1aab6bc8..1cdbef49afa 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 8be43826419..e940429a74b 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 fd05873c647..d83c8aea7ad 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 a3b7a329861..ad49f8e9d7a 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 efb57153b13..2b521b4baf5 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 181f9d8129c..df5e0065adb 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 d73c59863ad..6a750612395 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 c98075c04a1..5d0546d0edc 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 0d25322fdfc..c34d037b350 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 9fa55fe1e95..0a899584c18 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 12d8480eefb..42dceff061e 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 b261201be40..52d8a1b7abe 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 977ae7ec5b9..85976ae7fcd 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 ddd9fae6429..b7ad5b66554 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 e2f66bfadd7..0a29bdf2da0 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 4d94ea619ec..cdef63aa80f 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 41f07380e97..6e6a423fe90 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 41ecc9135c0..f91efad621e 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 c375b4b5a21..9d51b0ed25e 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 f19ac06c35c..7c91281d05c 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 272edc89fb6..aeb7ce09190 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 88d8481d52a..b14257310c4 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 b53c41fb45c..c4a2fd29711 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 500f6d38c6d..ae9d5068e29 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 8c02a996ea5..8992706cd16 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 f6f4f39393f..0ec560c1306 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 99e19586c52..d4c754fb0b1 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 255cad3ca21..429a388c894 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 0c1d1064255..4be1ed20767 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 1a525c49d19..3f7e05e7164 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 caf41fe2708..5425696b133 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 a149aa26f75..8181d0612a8 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 e2bb58781de..fe3ae6ba6d0 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 e8c8c447cf9..481a3921921 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 188c3149fd0..ca432ee7ab7 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 8fbe5121136..cfdc137aedf 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 058a6ba1b65..8b516a5a19c 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 352256ac9bd..aad41d01b07 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 7ed6f3d6792..44adec751bf 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 3b6e407d045..ed9768b06c2 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 3b6e407d045..ed9768b06c2 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 6a07c9a92ca..deb73448794 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 6a07c9a92ca..deb73448794 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 64a207a7cad..b5147a28919 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 64a207a7cad..b5147a28919 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 591c4760e58..a22f9663754 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 2dbb316d848..31b90bcf7ac 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 bbd2def2206..c570642a1ba 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 76da06166d4..aebdc2c3ce3 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 c49153c59b0..442ae29e278 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 255c05ac3ac..40a1365b7e1 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 02ad29bd312..e6c768a6759 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 a87f67e15f2..3f46b69ecf3 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 05dc85e251e..44a4fbdf284 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 6675589226e..4cc09bac99d 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 eba89aac28e..003e2f50e6f 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 dcc68e0c946..984527b2c0d 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 323a5a2f2b6..a272ad42fa1 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 1295dc7448e..2add5e7e154 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 f396c2483e8..225acf74bbe 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 40c292e4ce8..1c1e2a94ff1 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 b032ce6774d..5b3e829d2e6 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 07ba40c68b1..b515c7ab318 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 5b880c294b7..1871eff20d4 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 dd79ba068bb..c2f884aa8e4 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 62e5958715e..f84c7ad3dae 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 3aa066d158d..2baa854e462 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 7e0b27b82b4..56c0fc4e6eb 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 7e9da7dddf3..9656c078343 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 a5756024458..ea31184d856 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 92cc2f72cac..72c97c30966 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 a4b68115ac2..95ce777e446 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 6e621a18805..d2ec8e168bf 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 fab0fe8fe09..cd3a9f4c346 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 a543ad3bdda..659eea55689 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 3833a5caf7a..02c81245445 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 d5de584e779..781fd5ac6ee 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 833e84ee5f3..e9394a64c9b 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 a1474a24777..d7e1b69e274 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 1d852127963..ea71fbc20c0 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 9c350133f2b..e36f2eaaf8e 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 f3052384651..3da1d42edcd 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 f521ba14838..4f14cb6db97 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 62688f7cb7e..3b909a80836 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 6ccd30e37d1..d229c5330ba 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 52868930792..8b4b8326cab 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 1c76a251220..a07bea081a9 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 c25c406746d..b2eea36eece 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 446fed5b76a..e40e0c45a59 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 210d9ec75be..af01ca1716f 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 281b4ade5d6..300d83b9bbc 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 08a26230f37..eb5052f51d7 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 10d9e3e42ec..cbe42a510b3 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 0753c52dc9e..56800248393 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 f388bd4e047..e4e35262d80 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 cffda7d7f55..0d1347cd33c 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 9d3df207a0c..9ba7ac52df5 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 014ce4a3003..d4cd66a5e0a 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 55f5fa60e71..93b1cbebd0a 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 b8839316e86..5cab9f1e7c4 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 c4168febf4e..ec551f5f58c 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 171e52505e0..ba833c31e7a 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 1152dde04dd..0b624fcbc51 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 24a5ce77dd0..3d2d4d50d6e 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 8778255dbd5..1cec204ff87 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 cd447c116da..2aa4d834395 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 104141b761d..60f463546c8 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 59f8cd95ad0..f40804bd55f 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 c3cef6601e6..420be798293 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 d5c1107e45d..0bb50afe985 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 25faacad88e..ec3b8382eca 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 7b0398143a2..24f36819ff6 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 0740743a5d9..95a71a018d1 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 5ed44177d52..fd9b400cb3d 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 d6fb874c090..46178d1dc32 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 81d76aec62b..54afddcc119 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 4179843b79a..8ef621cdf2b 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 979bdba84e4..80e26c36f7c 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 6e5cd9aca44..8c9d93f3a36 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 8de13b5ef51..ff711ca8d75 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 3cd4e199c62..be97707b12a 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 9dcdbda8e31..3dec9369dd4 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 7002f94eb7d..4eeabdfa282 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 1fc7ab39c91..e70dde9fd8e 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 e5acf06bbfd..8ab6c5f349c 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 101d74e4bc7..1f4c8114913 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 9c3c5ab60c4..2645eaa9795 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 3281a3f8b55..df345ec5c26 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 746ce9f2791..d4e8c979552 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 c3aa1655cf7..f6c41b144eb 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 0865c4305a5..7d09351621a 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 50830480b1a..6de41cb5188 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 ef770985888..5ae8f8b3874 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 ebb70023b53..bc85d74c4c8 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 d619343ba14..a1736bb45f0 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 e9ee84be152..c5beb5df5b5 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 d793e9bb2ae..e4b358c9a0a 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 a7fcbaaeff0..7f34628c58a 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 9746ab6a9de..dcbebeaa452 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 3ff07edf4c9..6640a32be5a 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 91558e47d3f..6cf9f79e7a4 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 e677c426e02..f47b50d4915 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 ee373f69f46..b9e1f6c9786 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 3f9a0a9ce9c..68a9c19e819 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 202ed531a10..fd91de4cc8e 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 5bfe3927a51..a311ce95fc7 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 539ecbed065..9439871f38c 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 d35a1707bb7..cfa3fd1c074 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 7758bcfd89d..561b7300fe4 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 ae8327ec200..96b0061f47e 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 434f730c76b..be34657a0c1 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 fd70114d0fd..f962876a391 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 9d5cb1affdc..9eb7df62c1a 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 3c6eb0bdad2..ab1744929a9 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 b0940b1d538..f2c84cb7e64 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 5d1fed24b4f..adeda5835cb 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 01ae169b598..32c4da4d4e4 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 0e1e8783448..b1377eb9cde 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 4df9398024c..86f059a2fb2 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 ec74a2ea069..be0c44b4081 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 a91dfc76e3d..1397a0748ae 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 df230ce3703..f7663eab6e0 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 63f5f6f316a..14492c2788a 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 3acd26d2974..0796c912d8c 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 8b04075c411..ee376cec2cb 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 a54ee1bbcbc..499c0a6de1f 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 b4fe56bee4c..471c7cd36ac 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 766b5f7920e..a4acd321f50 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 e0d2a40633f..ca399c4de78 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 586dc595b39..5a124586d0c 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 db6db37ac8a..ed71cebe3c7 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 093a7fb2f2c..7aac6cb47e0 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 31cd542d2e2..59aff947e5c 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 d028c04d711..a9bbc34123f 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 76eeef0139c..2a86b144ae5 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 634b5ef0a20..3748ebaa42f 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 827d101c95a..91e71522e4d 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 a1cfc196ac6..8e68c47eb27 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 fdffdd27d6d..6771f15c99b 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 09ad6b705a9..4b6c1747d17 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 cfe1706ae99..6eaaed5c497 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 4b40ca2e1e7..08e12f49dca 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 a8d154998e1..9a64ef6cee6 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 dbe171f9682..30500b37ce5 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 e6f63b6a9bf..a6cf3bb45b8 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 589cc7cd226..aa63e614d15 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 0d4e58d7008..0f6b8716ed0 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 b93832567d5..f7ac96cff1f 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 444542068be..56a6896f052 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 1d33fa927a7..083cb5e94b3 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 fcd6435ca1d..45bf0853b13 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 f3ff5ffab4a..727640ee8af 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 2b5bd5e8265..dad77edf232 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 ad85f679e0a..eec648976c6 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 73622bf60cc..a82d3d2527f 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 a6881cf3cea..a94d5fe93e7 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 3f55b9d41ea..2d83a62ad3e 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 9d71613ed8f..63c79ce4c91 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 5991fdd3169..5c28921a6a7 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 57ba67752e2..03408c6196b 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 94215d4ae1b..70ace4becb4 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 a01b6a0cac2..d67259304c3 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 9c3a9bcfcd0..24f8789a82d 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 75614f46d21..55bc51bbdbb 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 b32c43bc5ec..75f62e94c67 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 6f8f1ccd4cc..43c1f7ee146 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 eaca97d31dd..a1ecef212da 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 d89ab0fd357..a0cfeda07ec 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 a0c30c1b166..b3da31103df 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 e83fd36ae62..853cb5eafd7 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 63d5e9bb5b2..99314597440 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 3dd27a3dbfb..64117b1935a 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 513464daa85..451aec91aff 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 a615faea805..61f1bf2c9f9 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 1ff47f68e5f..b0be82122de 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 95dd9d39853..72cf61f72fd 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 c7105608004..fafc4ec85fa 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 03ed4990c29..46ee4ed02d5 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 7b3938c7099..b2ea2cac9eb 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 e991db69367..324dc784b67 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 65198c1c1aa..3c1dd16874e 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 521f17bf5ef..fd7d859ac37 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 027ba254ae0..96802932f12 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 db8f566702a..e892cc28a3c 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 aab894dc4ff..5dd2b154c01 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 803df9f1d56..d9bfd5eb05f 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 d6e1ce1813f..e94d9492fdb 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 d60f260a163..b4c269b1e3b 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 1893f6586ee..462390d28f7 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 85dd3725639..b6afd28d429 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 800742ff63b..c3a2731b45d 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 fcf1d7fe124..ff6a3262d45 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 36232ad04b1..34deb346cbd 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 dc70f3e8d08..35e00c36621 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 f1fcdb48dae..b49c1aab774 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 d2ede7d04b1..70600bb03a9 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 c6eddf4ef48..95e0062b087 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 e58d55fd274..1c77b2e7c78 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 cf0da205d71..a280c0d6ca6 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 95206681372..9d1ebdd9d9a 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 1f282ba7132..066c724b60f 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 81ad696ddc8..b8050435171 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 95509867cc5..9e0c0264fd9 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 b91d5413611..e0ba9c349e7 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 031253a19ad..2d91befc172 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 d9e4c3f1482..4751e0e8d6e 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 7b13fa1bf4c..d334e1c7f66 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 da4175fe5c7..e3d834dd1d4 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 598bb5b6e85..e7cb0e613cc 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 9909ca512ce..a60889888d6 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 6a8dd340a20..696f439a4b1 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 c31d873ffb9..9fbe5f380ca 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 3345708ddaa..2c2838c97f9 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 4ccc090f4f2..50280b589b3 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 75901c708b3..58903b2ba57 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 f7afd6529c0..658e56fb098 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 ad2dc22debf..6b06204b8e9 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 a464970fe50..e73d0041206 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 84028f1d3f2..cc260f09499 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 6c3ce90d6f0..d3711ec27c0 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 295fbac60e1..14f9fdf88af 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 4e07d5c8655..60fa8e32c1e 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 b6eabb2a418..abef8394924 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 0e866e98f46..0f36d9d9115 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 765fdf083b5..4f54781deb9 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 0a6323630fb..4b2cb2c51b5 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 226fede58b6..49109e1aa5a 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 e27a9789cb1..77f0a0a2b6b 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 6f35c3f0e40..3f205640f59 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 ddfbce8fc12..9543082fbd1 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 408f73b6533..1885c419fef 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 b23da97c790..44eb2a7aa56 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 6a750612395..22bacbdb0b4 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 6e6a423fe90..365e640c150 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 429a388c894..c9f011704d0 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 4be1ed20767..054608e9d19 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 3f7e05e7164..f0db6078832 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 cfdc137aedf..618c38b89d5 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 aad41d01b07..e953198290b 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 1c1e2a94ff1..f1b69ecc00b 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 e9394a64c9b..3fd9018e945 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 8b4b8326cab..462f2382f3c 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 b2eea36eece..f5bac0135af 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 e40e0c45a59..1af13b1ce7a 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 ff711ca8d75..807347e1d16 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 3dec9369dd4..770cb0bf79f 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 e70dde9fd8e..6af4482f371 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 1f4c8114913..f77cb964179 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 2645eaa9795..c147b0d84cc 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 df345ec5c26..8fff8068ec0 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 d4e8c979552..843a1d3b2cf 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 f6c41b144eb..d6ad948a08c 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 7d09351621a..cbf0236c4cc 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 6640a32be5a..1dd120eeb5c 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 fd91de4cc8e..774dde72340 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 cfa3fd1c074..d77df52ddd6 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 96b0061f47e..33127da6437 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 f962876a391..2e68370fc32 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 ab1744929a9..56e40b65e10 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 f2c84cb7e64..5a1f48f3826 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 86f059a2fb2..c9865806570 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 be0c44b4081..df6e08177cb 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 f7663eab6e0..d8dda26288c 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 14492c2788a..1d2ab4c2a3f 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 a4acd321f50..cc46fa96896 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 ca399c4de78..4b5176bed96 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 5a124586d0c..aa70803de4d 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 2a86b144ae5..218ebfb1686 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 3748ebaa42f..c14f71ac0b6 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 91e71522e4d..cf64eebced1 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 8e68c47eb27..eba933d9893 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 6771f15c99b..ed6baabb408 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 4b6c1747d17..d705d5fa7e0 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 9a64ef6cee6..76b79dbc7dc 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 30500b37ce5..c55ceb100ea 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 a6cf3bb45b8..57ce2becbad 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 aa63e614d15..1bc14eb32ee 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 63c79ce4c91..fefb1e7ff38 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 5c28921a6a7..ed53a308808 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 43c1f7ee146..87f0f60c53f 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 b2ea2cac9eb..06d2c4bd6a5 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 e892cc28a3c..04eaa58a196 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 ea71fbc20c0..29da6d52a38 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 e36f2eaaf8e..3a75f3d3b66 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 3da1d42edcd..7c05c1b4d84 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 5dd2b154c01..886ee1b8e40 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 d9bfd5eb05f..292213ead53 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 e94d9492fdb..28ada310ef4 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 b4c269b1e3b..65431a2f778 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 462390d28f7..8af9c702654 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 bfd49be6bbf..660208cb0c1 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 070c151ee51..52d14cbe536 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 b6afd28d429..0638efab0b3 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 c3a2731b45d..832830ae864 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 ff6a3262d45..6b73eb9556b 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 34deb346cbd..8213733b753 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 2149db744b0..48af58edf65 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 0c36877d9dc..2d39722548d 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 48825a01a67..8c0cfc104d2 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 35e00c36621..a54f82ab9fa 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 b49c1aab774..95b34f27b68 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 70600bb03a9..0e882f71fdb 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 95e0062b087..00f2ed22fbf 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 1c77b2e7c78..e365678ee0c 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 15fcbff4c89..cc8912230ab 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 0cade04664d..7ba43de005b 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 a280c0d6ca6..25a480b9b57 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 9d1ebdd9d9a..8a81d469fb8 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 066c724b60f..214815f4976 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 b8050435171..7c714aa4c03 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 9e0c0264fd9..275f3920538 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 e0ba9c349e7..3c53d728233 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 2d91befc172..32d7fff0cbd 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 3ff1c92a56e..301dee7f705 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 c5c506d1af6..1af6b6f846c 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 4751e0e8d6e..fda7b0b0848 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 d334e1c7f66..2d7ecc3c190 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 b961b8fa4a5..5f2a5e89301 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 e3d834dd1d4..a6893c6a57a 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 b3ef3000762..d799c783503 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 e7cb0e613cc..4bb4f6a5a8b 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 a60889888d6..6ed47a1b3c1 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 696f439a4b1..2d3709fa878 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 860c0b90e48..370ee0d246c 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 2057d63b38f..dfbdf31c3d1 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 ef29163eda6..da670472b47 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 aaac258504c..8152394cbf8 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 9fbe5f380ca..9f4a4ab51f9 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 2c2838c97f9..c7939472a96 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 a235e2555f3..4f70c7d7f35 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 a0ed6d890d4..0041acb489e 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 7bc7989f7a3..c0ae9b452f9 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 50280b589b3..0e5351e69ea 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 d50912fbeac..1f0b9b0d517 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 6f37ad9dea1..9182cce66f4 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 58903b2ba57..e76f3445c8e 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 605ad6afa45..fd601ff2211 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 d3e3fe5d4c9..12344c19915 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 1f43469596a..37be9e209ac 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 d678f5ce59f..0836c9d7f41 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 7839398551d..8d0375ab13a 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 658e56fb098..f623653d6fa 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 6b06204b8e9..e3bbf2699c5 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 e73d0041206..102944889bd 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 cc260f09499..f5eb3d22360 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 d3711ec27c0..5ad20389230 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 14f9fdf88af..d0e5f22d4f3 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 a1f109ed49e..8c35b9044a1 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 60fa8e32c1e..b95263464a7 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 abef8394924..f078c448b75 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 0f36d9d9115..e64af9ef862 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 4f54781deb9..864bc19a344 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 18c98868e93..1b7c9a418fc 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 88000a12bbe..2eec250211e 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 4b2cb2c51b5..705915812be 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 ebf779f7bba..eec5d830e01 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 0cc1f5867a2..ccbac1d22b5 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 4581ecc31ec..246b9b76e3c 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 8f1e9c8365f..e7744b28833 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 49109e1aa5a..d22823b9f81 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 761220ae11a..48ff00e5ac2 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 77f0a0a2b6b..868d53daad5 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 3f205640f59..51c64f48f6c 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 bfbf75b1731..a71f1c9065a 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 c1f4480241c..20252f37e61 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 9543082fbd1..760454dd9a4 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 1885c419fef..72df561227f 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 f53f0c74a54..258f05cbc85 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 44eb2a7aa56..ca78ad7286e 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 22bacbdb0b4..360b38ce70c 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 365e640c150..799a17d47de 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 c9f011704d0..88516c9a692 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 054608e9d19..fa112e51dad 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 f0db6078832..2d219c63e6a 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 618c38b89d5..c07238dff5e 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 e953198290b..0d4cfefb63b 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 f1b69ecc00b..581b110298a 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 cd3a9f4c346..0ee301758cf 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 3fd9018e945..9436043094e 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 29da6d52a38..7fef0a42010 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 3a75f3d3b66..14f7f65f050 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 7c05c1b4d84..e1adf2f7a29 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 462f2382f3c..5e769cab563 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 f5bac0135af..6240f8c454f 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 1af13b1ce7a..4e1c483f1c1 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 807347e1d16..408f9051bad 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 770cb0bf79f..dc450147f88 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 4eeabdfa282..6e30cc64052 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 6af4482f371..a5d6ec18ce3 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 8ab6c5f349c..c7a206dbbbe 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 f77cb964179..185767fefb6 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 c147b0d84cc..311b7ca2183 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 8fff8068ec0..57228538faf 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 843a1d3b2cf..e630d539f14 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 d6ad948a08c..9cfe8736774 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 cbf0236c4cc..fe459b5e031 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 6de41cb5188..2cfc0bfcbd4 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 5ae8f8b3874..f9eeadc98e6 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 bc85d74c4c8..02bec67d7aa 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 a1736bb45f0..55c6ee6f445 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 c5beb5df5b5..977377e41d4 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 1dd120eeb5c..503aee2dcc6 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 f47b50d4915..326662abdac 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 b9e1f6c9786..5797085726d 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 68a9c19e819..636b03c227f 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 774dde72340..65a8b435166 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 a311ce95fc7..4e4ae47967a 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 9439871f38c..f3a246c6389 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 d77df52ddd6..e7b8b355108 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 33127da6437..2fe7712ce68 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 be34657a0c1..48b79acadf4 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 2e68370fc32..93676c5d8f3 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 56e40b65e10..7519a8253ec 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 5a1f48f3826..9b4d956dc5a 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 32c4da4d4e4..30b07308bb2 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 c9865806570..b6559a63a98 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 df6e08177cb..eded4e74a7f 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 d8dda26288c..2ba460d18f7 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 1d2ab4c2a3f..011c5129e9f 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 499c0a6de1f..1152399e6eb 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 471c7cd36ac..f2580d30c5f 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 cc46fa96896..a1c04975404 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 4b5176bed96..42a0e46d4c0 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 aa70803de4d..803e5c264c2 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 a9bbc34123f..a08380b173f 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 218ebfb1686..10629d579ba 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 c14f71ac0b6..444952fea3f 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 cf64eebced1..f9d9f8694c9 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 eba933d9893..3185e42dab6 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 ed6baabb408..b9f7571868a 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 d705d5fa7e0..309ebf93407 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 76b79dbc7dc..307cd0fca93 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 c55ceb100ea..39e30b6ba38 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 57ce2becbad..77423709347 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 1bc14eb32ee..6b5d130c0b4 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 fefb1e7ff38..3995ffd447c 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 ed53a308808..14807ddd88c 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 70ace4becb4..179e981b8d1 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 87f0f60c53f..eee99568638 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 46ee4ed02d5..2c2b3ded1b5 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 06d2c4bd6a5..02927bf558d 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 96802932f12..3a05ff12ee8 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 04eaa58a196..9c1c8f8c29d 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 886ee1b8e40..8890ac60173 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 b95263464a7..efed8e66a15 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 f078c448b75..6e3d3bfaa1b 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 e64af9ef862..6559569fe79 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 4e1c483f1c1..1c33f16a3c6 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 8890ac60173..9b703e5ddc4 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 9b703e5ddc4..85838112fc3 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 292213ead53..fb7deaa09dd 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 28ada310ef4..5a4c24fe233 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 65431a2f778..02d092dfd39 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 8af9c702654..91c6ca2c53f 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 660208cb0c1..1af0797b41f 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 52d14cbe536..ab3f80eff21 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 0638efab0b3..1c29bfeeff7 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 832830ae864..623cd152b9a 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 8213733b753..d71b6f17abf 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 48af58edf65..161eb36dbcf 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 2d39722548d..069871f598e 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 8c0cfc104d2..156608bd6b5 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 a54f82ab9fa..8ced6fce500 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 e365678ee0c..3174bebd11d 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 7ba43de005b..364aed4d4b0 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 8a81d469fb8..ef637611e8d 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 214815f4976..e0e75bcfeeb 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 7c714aa4c03..84da66c3e3c 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 275f3920538..db9f94cf0fb 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 3c53d728233..c0376c54c27 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 32d7fff0cbd..fdda53a381f 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 301dee7f705..a820b525aab 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 1af6b6f846c..475f9bd4ceb 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 fda7b0b0848..361378c3ff5 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 2d7ecc3c190..9809966c4c2 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 5f2a5e89301..d4a22b731f2 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 a6893c6a57a..67b7f0e3991 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 d799c783503..e3069352c08 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 4bb4f6a5a8b..d793e022c6b 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 6ed47a1b3c1..750ae15ef0a 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 2d3709fa878..269881b3b90 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 370ee0d246c..294f3a33690 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 dfbdf31c3d1..bfea11911bf 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 da670472b47..c8fb8c6a222 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 8152394cbf8..ab765c56dd7 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 9f4a4ab51f9..c2c7cddd971 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 c7939472a96..6bbea0fddf7 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 4f70c7d7f35..1ae239430c7 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 0041acb489e..c26d031656f 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 0e5351e69ea..328ab0cd949 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 1f0b9b0d517..44bde0a171d 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 9182cce66f4..5130986b1f7 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 fd601ff2211..a0b1559d430 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 12344c19915..e86806d31d2 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 37be9e209ac..3035b2cb56f 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 0836c9d7f41..0e0c1c1ff01 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 8d0375ab13a..703f1d4a833 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 f623653d6fa..27dcc4b7d5d 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 e3bbf2699c5..b778d7bbca2 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 102944889bd..039e25919f8 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 f5eb3d22360..7a6a7ecbb63 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 5ad20389230..62beb4bf28f 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 d0e5f22d4f3..c96d0c96723 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 8c35b9044a1..8781671853f 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 efed8e66a15..05b061116d3 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 6e3d3bfaa1b..2cf2cb02073 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 6559569fe79..eaa52e39285 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 864bc19a344..720894e50c0 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 1b7c9a418fc..0fef86493f1 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 705915812be..d0879152544 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 eec5d830e01..9217f890377 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 ccbac1d22b5..86410aaf10e 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 246b9b76e3c..582937e7c0a 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 e7744b28833..88173a4cbe3 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 d22823b9f81..5a02ceb0ff4 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 48ff00e5ac2..b82e261a14f 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 51c64f48f6c..49b5efbd012 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 a71f1c9065a..364d52d9385 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 20252f37e61..34b60940aa9 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 760454dd9a4..a1739ce0d8e 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 72df561227f..8b999b45d71 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 258f05cbc85..e93058d71d2 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 ca78ad7286e..f9b9ecaf990 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 360b38ce70c..49d96b97b74 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 799a17d47de..c7bdb90775e 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 88516c9a692..253f856a990 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 fa112e51dad..fd2c017b637 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 2d219c63e6a..059ac2efd8e 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 c07238dff5e..6fa05178f91 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 0d4cfefb63b..c1897e8503a 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 581b110298a..872c00486c0 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 0ee301758cf..6c678db2358 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 9436043094e..48863404a8e 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 7fef0a42010..4bac0210c85 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 14f7f65f050..6b18a783dfa 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 e1adf2f7a29..91e284fd063 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 5e769cab563..d204c1aed47 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 1c33f16a3c6..ecd6bacd20a 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 408f9051bad..54c59978151 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 dc450147f88..106d7433bf5 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 a5d6ec18ce3..e3aed9e40e9 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 c7a206dbbbe..91cc3d28dd6 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 311b7ca2183..91acb88ce22 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 e630d539f14..4eb8e5266c2 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 2cfc0bfcbd4..27f3db51453 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 f9eeadc98e6..a8d5e8008ac 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 02bec67d7aa..b12a3eef6d4 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 55c6ee6f445..c78e6693f16 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 977377e41d4..32d2065dd3f 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 503aee2dcc6..cd84052ca3c 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 326662abdac..b696b4a302f 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 5797085726d..829311f237c 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 65a8b435166..e32bfc66050 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 4e4ae47967a..0fe27f493e8 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 f3a246c6389..f970be44aff 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 e7b8b355108..6a43d58c471 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 2fe7712ce68..99a3b78752c 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 93676c5d8f3..19f0d74f677 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 9b4d956dc5a..73ca53c3b5c 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 b6559a63a98..0b1e4fc280f 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 eded4e74a7f..7c72ad5d1bb 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 2ba460d18f7..88a5da8b8fb 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 011c5129e9f..4e817b7bbf1 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 1152399e6eb..96303dab4ed 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 f2580d30c5f..36b48554871 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 a08380b173f..8581526c1b6 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 10629d579ba..7872aa121ed 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 444952fea3f..e656824ae66 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 f9d9f8694c9..1c1f11ffbc8 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 3185e42dab6..e3eea1fb91d 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 b9f7571868a..6288082ed64 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 309ebf93407..6a72f17248f 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 307cd0fca93..d3bb404ceea 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 39e30b6ba38..84debfd3e71 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 77423709347..6166b99f4ac 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 6b5d130c0b4..928649264c8 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 3995ffd447c..541c03dd4b4 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 14807ddd88c..b61676b40c3 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 eee99568638..2f97f4b0d1c 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 2c2b3ded1b5..5e2bb509a23 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 02927bf558d..7d5a4b9deed 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 3a05ff12ee8..bbd564db366 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 9c1c8f8c29d..0875f2ba1dd 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 85838112fc3..44089326f7f 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 d0879152544..067e57c2581 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 e93058d71d2..374b0956509 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 54c59978151..da19770584a 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 7519a8253ec..8c99b649917 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 00000000000..2475eac0bb2 --- /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 00000000000..de1e409b55f --- /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 00000000000..dd7aedd1a98 --- /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 00000000000..5f41ab56300 --- /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 00000000000..ee043fcfe71 --- /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 00000000000..aa3b1ec7fbf --- /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 44089326f7f..aa62af361db 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 a820b525aab..1eeb5172cad 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 1ae239430c7..a60eb4de056 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 de1e409b55f..4ab447d8e32 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 dd7aedd1a98..8b9037e40c9 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 5f41ab56300..d452115ceb7 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 6c678db2358..a47fa7ed513 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 00000000000..0d3f5849cb1 --- /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 00000000000..000176c213f --- /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 00000000000..c05cd4f6fc3 --- /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 00000000000..b07f3e0efbf --- /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 81f22e2f192..9cb18f7c488 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 030a3a33871..5d10c3c4c67 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 69d98d4b0c6..d0e87aba25b 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 7ad703fd3b7..1b4119227bc 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 00000000000..3828825cb6b --- /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 aa62af361db..a419170769b 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 aa3b1ec7fbf..d361e783ef0 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 7d007950c93..20fb56870da 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 00000000000..da197258a73 --- /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 00000000000..f7e0494c884 --- /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 00000000000..c1e9494376b --- /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 20fb56870da..29270628fb0 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 f7e0494c884..5569ebf1af6 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 | 123 +++++++++++++++++++++---------- 1 file changed, 85 insertions(+), 38 deletions(-) diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 535e9162a3a..5748739cb23 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); - - // We're actually skipping an extra statement. Signal this to the caller. - if (initializer) { - return firstNonPrologue + 1; - } - } - else { + 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; } - return firstNonPrologue; + // 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; } /** 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 1af0797b41f..64727398f72 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 623cd152b9a..870f811c09f 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 069871f598e..2c4df5db961 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 156608bd6b5..ade99e9319b 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 3174bebd11d..8c7f18b77f6 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 364aed4d4b0..ca12c16e047 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 475f9bd4ceb..67ee666749b 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 361378c3ff5..589dd81c5c6 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 9809966c4c2..53ef71d0e4b 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 750ae15ef0a..f5765043c55 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 269881b3b90..5fa7fe29091 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 294f3a33690..a8a8d5fa889 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 a60eb4de056..c5e27748f52 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 c26d031656f..2d26194f2e7 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 328ab0cd949..a51254122ed 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 44bde0a171d..ce323e8ed1e 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 5130986b1f7..f06bf80b21d 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 a0b1559d430..981c072d47c 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 e86806d31d2..b8997769eb7 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 3035b2cb56f..ac9b401a45c 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 0e0c1c1ff01..d0d9d8fa0f5 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 703f1d4a833..92fbc07e774 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 039e25919f8..504d414a608 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 8781671853f..7ba178823df 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 9217f890377..b3787405ff7 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 86410aaf10e..28eaf464968 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 582937e7c0a..b0974c26ede 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 88173a4cbe3..a403c0de0b3 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 b82e261a14f..67303166aa3 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 34b60940aa9..c7b30882b14 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 374b0956509..1b603898aa6 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 fd2c017b637..eb05d13f4ed 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 059ac2efd8e..14ce4338176 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 ecd6bacd20a..da45bda5c6e 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 91cc3d28dd6..7331718a9ed 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 4eb8e5266c2..e4dfb3f714a 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 27f3db51453..bc196299bf9 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 a8d5e8008ac..8a0ef085590 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 b12a3eef6d4..0529d5e3dc2 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 c78e6693f16..fb08ec28902 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 32d2065dd3f..50153391f62 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 b696b4a302f..05e44119608 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 829311f237c..3d55fe11cff 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 0fe27f493e8..d8491b4ee83 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 f970be44aff..9868a7db124 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 96303dab4ed..a0381d0b944 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 36b48554871..803f229bd4b 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 8581526c1b6..cac93023a00 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 7872aa121ed..7fcfaf9d317 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 e656824ae66..546863b5216 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 1c1f11ffbc8..2a4d15973ab 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 6288082ed64..eabfa9d562c 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 5e2bb509a23..832868c4b8f 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 bbd564db366..483e905b48a 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 5748739cb23..a69dcdfbe6a 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 995b04c74da..2f529a09f9b 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 2f529a09f9b..ed5659e8a3f 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 de8e08843a2..ec0ed5494a4 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 58c7bd4c3c1..bae9593fb98 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 04407cfc08c..db5144be399 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 09109c40675..1b3e11cfa32 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 5a4c24fe233..bebf9026a0e 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 860d74f5204..dbaeec1f688 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 d717da94d38..8b60ed8e76d 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 f08363776cc..bf573aa9abb 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 06e3e266ee9..49bdd493aac 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 96121364837..dc3a8a88bab 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 bbfe2952594..cb7ad3027ca 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 3b036f52a9d..81e3e621e85 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 4167294e5f2..4faa41dd034 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 91c6ca2c53f..2cf4aefab6c 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 0ba5cbbc8d0..80bb2dca20e 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 27e6dd714ba..01002792921 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 914679c7de2..6ca9d343a72 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 01fdb92a24e..c6d3378872e 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 911df30a423..a887203cd5e 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 aff812247a2..d82dedff29d 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 7df39836542..b7ddaa5d6da 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 81155544cab..919d3a5e922 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 53066c70391..530cdedec73 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 3c5f4365053..c0f320ac1e5 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 aba7a7cbc8c..d1d75e8041c 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 80a9aa9cf14..c5a1f415437 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 5932aec049a..58faf663ea8 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 7ea579d87ed..87506cad08f 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 0fb5867836c..2c05d5960b2 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 b933425ffb0..76ad53e4e05 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 e407c3acdb0..f516df153c6 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 59c816dcc5c..ef7de7f011b 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 b3b349ebc06..3d58ae707a5 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 6e14fb66ecd..37160506683 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 3b32f327b07..2e6ecd72741 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 ce80efc3c7a..2cc2510c8da 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 d95eb43f0e5..3b12701b3d9 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 f4c401979cf..f965d18e2ce 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 54839da4b5a..8d081c90794 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 396f380db3e..76ffbc833aa 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 1bada582b03..9ceff6bab4e 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 0081a30d930..dd54f6ee833 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 f81b5800929..b207ba08f8d 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 6629ef35dda..7e922cf83b2 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 187a354553d..ec96b80a999 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 bbf57046a97..5f8dcbd0e10 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 a9e38f0520c..6d0f19dd37d 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 9af685812c2..2e2d0bcb1e2 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 d71b6f17abf..928909f4c38 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 4fd0dc2cefc..0ae7648c7f9 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 710725f145b..7a7791280ad 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 154aee0693b..19d66ce8d46 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 7359d330cd6..1c53de5d26e 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 594d2dcafb7..c42e36389ca 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 426889df7de..f0178dcbbf0 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 71b345a311c..3857867043c 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 7c428751b28..26d341e1f6a 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 9d0e7648dcb..6fe5e604e57 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 811e86b21ca..78e9d3f34e7 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 8738b43bb3f..35d9e75884f 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 02d31377de8..fe23e60c94f 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 8ac2cc9de3d..e899cb82d6d 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 4f612e3d9c6..50e232a9fca 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 b76117fddfc..96df8f5f19e 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 aa66ba540a8..c6a9e206bcc 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 0bd5dab31a9..297a80dd99c 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 aef8f58fab2..5abbb9c1baa 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 2e6cd648dc0..dea4c744ae0 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 5cb07934658..4ecebdf7b32 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 44b15710c73..0197f48a429 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 ae6b08e4bca..74b5d62aaf5 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 9f43ee1a6b3..25cf1a307c7 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 dfbc70de115..4772ac68d11 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 b73ecb4a92b..d658349c2a5 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 83152355a13..c1ecad3a792 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 ef584afd6e9..076412e164d 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 f7405cfd38a..59b62c60cfe 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 8673e48d65f..7312ab6567d 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 2a01c1aa8b3..4c95e3008ea 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 4218bfbea98..91e3752980c 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 fdda53a381f..bfc10c23563 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 d33e6b4edef..574d5004486 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 d6188aaf988..8d5d73329aa 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 c23683470d0..53cb45c2081 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 072dc8138c7..b32dc31a5b4 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 b5cf4ae1382..fced8c2a373 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 d1ee8b48b3a..c133ceb87dc 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 0dcf4103f49..5be0ab8f9c0 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 f1a695c0b2a..cc4870e837b 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 f754e140d37..6c3dc789445 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 584b31b7e8e..a19f5d5cdd6 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 e01e90d512d..fbc364ca5da 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 7047eaad658..b5946224317 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 64d519d6952..9dcd8dd7279 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 ced164bca10..9da8831a138 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 654cd35c400..36f2263d671 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 ae5852d91f9..0f3f48d2f2c 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 63eeb5bc178..e215a07c357 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 4e67909f2d3..f8366d77e13 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 a185f6cf40a..cd9c28ad283 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 a7f4a4bb9d9..ddaadc2dc62 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 519074358cc..31bff6e430c 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 d3134a97ccd..12265f569bd 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 d525fb8a6ad..5e3eae46543 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 3257e51b5b8..5fd003e93b9 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 f0b8698c64d..477288972df 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 bf5d0141a19..0ec258ab77b 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 f1929cdc798..0771c56415c 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 ab825abcd31..2e55c894645 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 11b0c5e3ae2..f68d76fad47 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 6caa97781dd..52300987d8e 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 49b2a428e06..63490fa29b1 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 1381df2797d..e21a5ed64cf 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 7898ae8a2b2..9443509032c 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 6ff5ae2ac5b..c25687d3c74 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 6bb9387f673..f445d22d18f 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 fb07eb3d0b2..2cb8a4e0a50 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 cd23c220231..9e79780d5cc 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 d4f6bb11ca9..a3059757d2f 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 dbbbe340ba7..f65295627f1 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 eaf031c2571..85c0e398fbd 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 14965b53abd..81c069da169 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 55db3a5e625..26f782c0d17 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 c5bb6ebcd01..0524d993ba1 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 5501b3e2df4..cb5636ec904 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 105fe849767..ed19500f9d4 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 59b64e4a9ba..9e8132c6883 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 a8a8d5fa889..3527f5d23bb 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 fb7a811cba3..a263a30e382 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 675235ae324..b8584522b7b 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 ceb386b3e14..93e1e876a7f 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 03494b4f88d..a8973bf2c10 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 ee8185802d4..4539538782d 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 5a36f91c7ca..5e8412bc361 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 f23588dcbc5..d30c3586b12 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 cc6fe9ce640..4235c1352d4 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 d401defc2ed..9a6fecd668d 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 b4b531b8084..5721a452486 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 69f46e2ccd2..b6bf8a16e61 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 171f21e77fc..690214fc00f 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 523002e5b57..4f48e5fc2c5 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 1201dcf3d3d..326c0830c4f 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 00186f40a28..ff9112755bd 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 afc0e20eca9..dad9c5c291a 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 6b75da57e9a..5db7768270a 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 3c89ecd50c0..381805659e2 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 7b803e9c987..00cc765f4cc 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 293d017734e..b1bb0fec72c 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 c990298c4ac..bf940f15014 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 f5a31fffabb..5b5d64f9bf0 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 a6d00d847f3..408571af42a 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 58b050c5ebe..0ac935a582a 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 934c7eceb0e..160191c5ca0 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 217cf23f9cb..509f9ba70e6 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 511c293d417..7908d36a56a 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 0e14e958b28..6b308d88896 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 cb2cadb7698..09abd6e0868 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 25c69839117..4e9a8c59bf9 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 dcd972d3a97..91ec3b313bb 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 69fdebe8f5c..edafb009916 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 b16721d0acc..45ed976e191 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 956e8cd2e0d..a16694cdbf5 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 1b91e8a131a..2e3190c15c8 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 365e17afc9b..caf7ed445e5 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 7be8079cfd9..a6ce98f61e2 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 102562a841a..e3bd1643cfb 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 5fafe95c1a8..89979da4812 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 58bff801774..30ddc3f08bf 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 d58dcd1f536..442007d9b9a 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 2f68300a4bf..47593dc9d68 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 2ed404342d7..b2e99a73ad7 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 c9c569f8676..cd10a9e9456 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 3681f9fa859..f3b93efc9eb 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 8973fbb1455..726c7b22446 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 ff75df8baba..4081de6d3ed 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 fc73eb5dbd0..f36a7e250a2 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 ed34544256b..b90c1275197 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 c17f624087d..09dcea089a8 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 cc4e27895f1..9ae8e8a2437 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 0b364e90e45..ad9b7a70373 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 aea36311add..fe7995462ef 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 f167928087d..3c7588d2b6c 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 6d95c696176..7dd5f698182 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 6dcf8f3fd83..7f6b83593ca 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 2fe5906e746..8224473cb54 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 dc63ccb21d8..4753e395390 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 7ab70d93ff2..1a58c038fea 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 ac9b401a45c..6797eef0e77 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 eeaf80061af..06f80997600 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 92fbc07e774..7943d904dea 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 f2d8f72edfb..e42ff9c9e1d 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 0e88d3664c6..a76ac8101a0 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 5a3f8f3cf57..a3894863696 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 f6aa6963795..71dfecb346f 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 8d18e311d88..0030ce702d8 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 70885570373..2a199e55861 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 24d43468dcf..0542815c4e4 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 a6b7710ec6d..41869cad416 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 3da7720b77e..10ae3cb35c8 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 57f474affe7..3f2c2a3b811 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 27947b4f05f..3e097a9b139 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 e31b18e11e7..1822f3fcc47 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 4430ad5a31b..c17922e05ee 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 f6415d84965..6fe690fd692 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 4bb83a7c172..1f7ed8bfa94 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 2292f0a494a..3ed21cf217a 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 7b05688b8c8..ed2e1aa7f06 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 0fef86493f1..e12a758b053 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 d3d275ff25b..6dd9f62edcb 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 b3787405ff7..de5657b087e 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 6e30a1d7879..f786fce4461 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 439f74a9c9d..7c1831ecac4 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 b6eec928a07..518c6636947 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 508eea66500..b20a463338c 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 14f3d69ef3e..3ab217eb019 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 03bf54db78d..74bbf3a27ac 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 50db54a05e9..fa7963487d5 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 6cab3a8c7f6..596ab319b2c 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 c0cb5d49023..895cdedfaff 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 6985657ced3..4bf92dd0315 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 829b1ae1a32..b23b601bc29 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 9a2d4fb2adf..78dfaa91827 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 db2fcdbbf36..da081154d8a 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 db11c06d782..267cd86eed0 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 f61317c2d50..76fbc3365af 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 68a2960b03f..ac44416e133 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 7176a27ebc9..4f52b5e1456 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 cca8e94dcab..d1181760a36 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 82910ff0435..3666ad930a6 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 465ea54b73f..433418af41d 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 e26e49c1b7a..86636b84a87 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 c604461f32d..55917962184 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 38a98a3f114..a676316459f 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 5c512883a10..2a6911d9cf5 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 25dfb7ae722..a075eff9550 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 e39353b6a7f..2b562742bf7 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 53c02a85113..afef6224ba1 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 3835a4dd787..7b621b3ffd9 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 a16f8bcac68..892cda0ee2d 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 410675804af..addfbc756a8 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 3fbb7c8a901..c2ad2ba29a3 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 d14b70b6312..dc574dedb00 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 a6c14b9ba0f..1f3a6e17f14 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 2124f414172..4609e3bc9db 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 6f10b979c4a..5371e2479aa 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 454bc77ae5b..1b455073196 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 26749718d43..0abd655e1da 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 e7c32cbe73f..059a3213b7a 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 ccaf6fa8807..eac025cce9b 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 85658593705..9e3ede0019d 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 e567e2a8042..6d65ee5531b 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 31d2b3976db..687d593f01e 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 41a187edb6a..50dbe5debbd 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 b776668f2e2..7bbd7351f1d 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 39468204a5a..cf19feede34 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 a41d459b445..973ee231762 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 c0498b351e1..d6fb98b67ca 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 e3c50cfa8f7..60a8976722d 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 af1e3be18ff..483370bee5c 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 0dfc867a2f7..df725cde43a 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 033d6150194..a5a5e02c156 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 78cfb6b51b9..d0f74847141 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 d9f40f83051..b4f45cac806 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 6641ef9d212..ae4d3127010 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 89fab70bdba..fea93840fa9 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 2a97d3d2d87..28c00f97554 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 d5f8db60f97..e22d1f4353d 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 5891922f9f2..41df9710f33 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 b4c2040aa71..a45f6285782 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 552bd0ed404..20f2d299c52 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 b4950b039f3..34cc0604e7a 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 956e20a1045..a40c3a51a78 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 c8b910abb2d..d7357f021d0 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 c1c77ec5fc9..2f4f37b9b53 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 366ad1f0af5..9171bb0eeb6 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 9b145b55d04..ad1a063bfb0 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 5db269f7c58..40e6abd3e53 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 7f3e872245b..a0874eb1c72 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 c4acea22260..cbfef2d3382 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 f555d5bf694..86de0b76350 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 2ed366d7b8a..57a9c897583 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 369c6b20a14..83c5aa3e4cd 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 d884364d95c..b11b6e318a7 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 c1289f99a78..09ea08899d9 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 665b547154d..59d2abdaab2 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 a9a92003542..98a95747a8e 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 17541ee163d..0d54e5d42fa 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 a154d0426a9..9af25c6fdb8 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 be10895642e..5c77ce08101 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 6895077abda..82c7a94d17c 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 00c1093053b..e6929218e63 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 6cbb7ae7e8c..85764cddc52 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 370e27514c1..28fe8144509 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 a61b6bafabd..0cc71e168f4 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 9f71208e5db..bb91ee5f9ea 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 2e0c3dc90d0..363852a84bf 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 95bf94572b1..ba8df7a5f0b 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 25d75bea5af..e464029fba5 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 5c39c10e738..cc825cfa9b5 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 c37caf8d53c..466c65fa7d5 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 eb185d56d0b..dfc0ce2c13f 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 0779cc10d37..da7850f2071 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 4934947233f..d5916a9d452 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 27a65d513fd..b4cae99b64b 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 7cfafdf1f9d..38c637dd8d1 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 1840a7829e8..49dc86fc500 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 8e498273b86..bcd63537540 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 c003eaa60b4..c1bdd9b66a2 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 ca6a379816f..c9db1756676 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 b323aefbd48..9a1b13a8434 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 1de6f5f638a..7ba382e8c47 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 f78378f0885..b8f39c5b0e2 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 cf056e768d8..8dc5227685f 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 e70dc7b6481..914f3796001 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 de2789caa68..54a574238e5 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 83ad38e64f0..bc496a63632 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 6111e7f8cee..6542376a19b 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 499bd219905..70a62da4131 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 70ceaa8acd3..8324a001f91 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 5e6695dd200..1179ff101df 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 f3bfa4db6a5..afb5a795264 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 75bf3f91884..6e9b09c906f 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 b4fbd6f3698..340429cc398 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 1409b1c59a8..a6b07b7d7bd 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 baf2d1de129..6f1d38dcbb5 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 c149d4e3c3d..604787af744 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 16653cfb4f3..47db7f3ce64 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 96c9337817d..100452b7a96 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 19cd9ee4630..e5a4d11f00c 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 53a8c983399..b24e86eca58 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 50108773a70..d610e4ab46f 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 fd0bea5494c..0f598f2cf78 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 a3baa1920e3..6dccf1dfdd9 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 e21ca151c87..a3ca796575c 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 598ddaef2de..fc0533a2470 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 2f4ac430cc1..51d9eb89b1d 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 11053d76d2d..1558ef742ab 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 80e9a469398..9c0e865cdb7 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 7c5ec66c6be..8b59564d465 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 c3d27cac8a9..fdb7cbab7d4 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 d0e87aba25b..cc4c9422373 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 1b4119227bc..1323955c05e 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 bbab8e9ccdd..b0a3365193d 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 1901e169447..92c8b380e00 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 97c3e56d423..29cb75b4234 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 732f7e2672c..135e169c4a9 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 1d38f844384..5b9e797bdec 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 76c18900945..17045d65af0 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 3df18cb27cb..e82cef9bdd6 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 e7d2f603d5c..abcea113670 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 e0b75f54208..f5aeb177472 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 681af407bd4..3946027063f 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 2011b741df2..9cae6960a2e 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 80bdd4c87e1..68754a583aa 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 3eac80c60fc..b0211bbbba7 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 d55ef5eb28c..00d7d1e81d8 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 04056fa9c14..e460ab3fb15 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 a8bd88ed3a8..1312a89502a 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 5643875efd3..5054c2a3c33 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 25873d9cd07..e987d5deb8a 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 2fa35a323a0..1bfda049776 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 eecb4101958..a615090f33a 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 f77bed44ffc..ac8fb23d87c 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 5287a760ac8..732214237fa 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 ac2f2510b64..b9ff7c15b61 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 1cdbef49afa..45d57990450 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 e940429a74b..482c898e0cb 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 d83c8aea7ad..41aafdfb29c 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 ad49f8e9d7a..f9d1c81b06b 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 2b521b4baf5..a680a62ddfe 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 df5e0065adb..025e449fd6f 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 49d96b97b74..0f436a5f0b2 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 5d0546d0edc..e3f58c0f7d0 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 c34d037b350..e5cc35c39c4 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 0a899584c18..7c8b2e2ccb6 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 42dceff061e..44bbfbcec2b 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 52d8a1b7abe..96f4f7baf24 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 85976ae7fcd..0c34d0f4b76 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 b7ad5b66554..ca5616450ba 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 0a29bdf2da0..a9ca0a6db73 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 cdef63aa80f..d3648dc5b64 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 c7bdb90775e..6b86353b959 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 f91efad621e..a61b492b7a9 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 9d51b0ed25e..f58f0ab00cb 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 7c91281d05c..912aa8c6581 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 aeb7ce09190..054aaf0eb7a 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 b14257310c4..1423edfe037 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 c4a2fd29711..aa0679bb8f5 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 ae9d5068e29..1308c7c194b 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 8992706cd16..b1471628fbd 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 0ec560c1306..641d296dc43 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 d4c754fb0b1..b0f14a090ae 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 5425696b133..7b94b555eb1 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 8181d0612a8..7e56edf2cf1 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 fe3ae6ba6d0..e0828809416 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 481a3921921..fa769a606ae 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 ca432ee7ab7..21ff4793fb3 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 8b516a5a19c..b732661edfc 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 44adec751bf..11959f2f174 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 ed9768b06c2..99a4842f636 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 ed9768b06c2..99a4842f636 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 deb73448794..7ee160b82ef 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 deb73448794..7ee160b82ef 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 b5147a28919..b793b07534c 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 b5147a28919..b793b07534c 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 a22f9663754..dff86f3954e 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 31b90bcf7ac..0a4c9082a21 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 c570642a1ba..d36d7e27efe 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 aebdc2c3ce3..4aedfe12b04 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 442ae29e278..3cb14438141 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 40a1365b7e1..429dfdf6b14 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 e6c768a6759..0571b85ea9e 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 3f46b69ecf3..a10b39b402e 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 44a4fbdf284..a404b8049bc 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 4cc09bac99d..7d449bdcbd4 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 003e2f50e6f..3259d401270 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 984527b2c0d..46b4691dff7 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 a272ad42fa1..ad1b1682aa7 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 2add5e7e154..a2346b8be40 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 225acf74bbe..a881eb55a18 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 5b3e829d2e6..250a9e0b618 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 b515c7ab318..7f0c6b5f95d 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 1871eff20d4..53a608baeca 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 c2f884aa8e4..344750974cb 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 f84c7ad3dae..34aa110b7ee 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 2baa854e462..4c88b778226 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 56c0fc4e6eb..bd22ec33898 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 9656c078343..9dfefe4e1dc 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 ea31184d856..8441ff9e15a 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 72c97c30966..76224741e60 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 95ce777e446..a75a90d4d86 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 d2ec8e168bf..615b0034caa 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 659eea55689..f786e994963 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 02c81245445..1474f8ab29a 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 781fd5ac6ee..0baf0187009 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 d7e1b69e274..4906814f7eb 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 4f14cb6db97..f65f42941bf 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 3b909a80836..b76afaff08c 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 d229c5330ba..de7588c3ebe 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 a07bea081a9..7b8ca52b9a4 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 af01ca1716f..29715745890 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 300d83b9bbc..1507e53d8cf 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 eb5052f51d7..b532df7b120 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 cbe42a510b3..a6606c5d559 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 56800248393..82bcbf14ecc 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 e4e35262d80..e0baced37a4 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 0d1347cd33c..0b17fc07f24 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 9ba7ac52df5..9c4c9011758 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 d4cd66a5e0a..843a727c33e 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 93b1cbebd0a..a9e7d01aab6 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 5cab9f1e7c4..94f549c62c1 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 ec551f5f58c..1d12aeb945f 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 ba833c31e7a..78582304cb8 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 0b624fcbc51..17252fdb809 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 3d2d4d50d6e..a0561606393 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 1cec204ff87..c508781e089 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 2aa4d834395..3cf75dd83fd 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 60f463546c8..e9e8d39bf3c 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 f40804bd55f..798e775083f 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 420be798293..3675ed6a410 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 0bb50afe985..404b6cbe988 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 ec3b8382eca..8b168ea73b5 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 24f36819ff6..0a83b760218 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 95a71a018d1..195b7d2192e 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 fd9b400cb3d..0b2a57324eb 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 46178d1dc32..2937261ad05 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 54afddcc119..504e8542d4d 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 8ef621cdf2b..9f1289dce55 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 80e26c36f7c..1d2331052db 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 8c9d93f3a36..0bd9d305d2e 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 be97707b12a..a7f964309f7 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 6cf9f79e7a4..b31110fdf78 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 561b7300fe4..16f11088640 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 9eb7df62c1a..e1fc0f97024 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 adeda5835cb..816277e4e9e 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 b1377eb9cde..7b5823e598b 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 1397a0748ae..956bce4ef2e 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 4e817b7bbf1..45c32076be9 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 0796c912d8c..dd37deb5af3 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 ee376cec2cb..8c8534b428a 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 ed71cebe3c7..6815b71ce11 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 7aac6cb47e0..2e1aecc7288 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 59aff947e5c..78c09355fa0 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 7fcfaf9d317..1fc1c734639 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 546863b5216..f8cb6d695dc 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 6eaaed5c497..6400f410a09 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 08e12f49dca..446bc15e6d9 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 0f6b8716ed0..58e7f1c8d85 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 f7ac96cff1f..88d91723501 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 56a6896f052..3520b5af372 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 083cb5e94b3..a57fb222a77 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 45bf0853b13..b88d1038969 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 727640ee8af..6f0880ad7f5 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 dad77edf232..703c809274f 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 eec648976c6..c052ea7d72b 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 a82d3d2527f..a85a207a665 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 a94d5fe93e7..a181a446a81 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 2d83a62ad3e..14e9259a9e7 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 541c03dd4b4..52097af34f7 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 b61676b40c3..c65445a3a5a 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 03408c6196b..2cae93924bc 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 d67259304c3..15d1c3b396e 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 24f8789a82d..2d0962f01d7 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 55bc51bbdbb..2738aa20528 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 75f62e94c67..b3754436f26 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 a1ecef212da..8711a656bf5 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 a0cfeda07ec..7abda8110b6 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 b3da31103df..f1ec6a77b14 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 853cb5eafd7..045f7b40e55 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 99314597440..b4d42d819ed 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 64117b1935a..4b7813231cf 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 451aec91aff..86948a2d9e6 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 61f1bf2c9f9..c8e936af527 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 b0be82122de..e4d0acc893c 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 72cf61f72fd..83ad2a34394 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 fafc4ec85fa..231b8b27f3b 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 7d5a4b9deed..1343bea602e 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 324dc784b67..b82a7cbc0ae 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 3c1dd16874e..0ab1227bf3d 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 fd7d859ac37..dbb261e5f2a 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 ed5659e8a3f..df21df5e1fb 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 df21df5e1fb..b0633c309ea 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 b0633c309ea..481857e0536 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 481857e0536..0495e422fc3 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 0495e422fc3..1ed7ee9b7ab 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. *