From d8846dd495d03697ee598d6c887f55eac61789ef Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 3 Sep 2016 00:26:02 -0700 Subject: [PATCH] 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;